diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/Vpc.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/Vpc.java index bb30d795f5..734ff1ab54 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/Vpc.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/Vpc.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -12,7 +12,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.105.1-067d600b-20250616-154447 + * IBM OpenAPI SDK Code Generator Version: 3.104.0-b4a47c49-20250418-184351 */ package com.ibm.cloud.is.vpc.v1; @@ -25,6 +25,7 @@ import com.ibm.cloud.is.vpc.v1.model.AddInstanceNetworkInterfaceFloatingIpOptions; import com.ibm.cloud.is.vpc.v1.model.AddNetworkInterfaceFloatingIpOptions; import com.ibm.cloud.is.vpc.v1.model.AddVirtualNetworkInterfaceIpOptions; +import com.ibm.cloud.is.vpc.v1.model.AddVpnGatewayAdvertisedCidrOptions; import com.ibm.cloud.is.vpc.v1.model.AddVpnGatewayConnectionsLocalCidrOptions; import com.ibm.cloud.is.vpc.v1.model.AddVpnGatewayConnectionsPeerCidrOptions; import com.ibm.cloud.is.vpc.v1.model.AddressPrefix; @@ -47,6 +48,7 @@ import com.ibm.cloud.is.vpc.v1.model.BareMetalServerNetworkInterfaceCollection; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerProfile; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerProfileCollection; +import com.ibm.cloud.is.vpc.v1.model.CheckVpnGatewayAdvertisedCidrOptions; import com.ibm.cloud.is.vpc.v1.model.CheckVpnGatewayConnectionsLocalCidrOptions; import com.ibm.cloud.is.vpc.v1.model.CheckVpnGatewayConnectionsPeerCidrOptions; import com.ibm.cloud.is.vpc.v1.model.ClusterNetwork; @@ -122,6 +124,7 @@ import com.ibm.cloud.is.vpc.v1.model.CreateVpcDnsResolutionBindingOptions; import com.ibm.cloud.is.vpc.v1.model.CreateVpcOptions; import com.ibm.cloud.is.vpc.v1.model.CreateVpcRouteOptions; +import com.ibm.cloud.is.vpc.v1.model.CreateVpcRouteResponse; import com.ibm.cloud.is.vpc.v1.model.CreateVpcRoutingTableOptions; import com.ibm.cloud.is.vpc.v1.model.CreateVpcRoutingTableRouteOptions; import com.ibm.cloud.is.vpc.v1.model.CreateVpnGatewayConnectionOptions; @@ -319,10 +322,12 @@ import com.ibm.cloud.is.vpc.v1.model.GetVpcDnsResolutionBindingOptions; import com.ibm.cloud.is.vpc.v1.model.GetVpcOptions; import com.ibm.cloud.is.vpc.v1.model.GetVpcRouteOptions; +import com.ibm.cloud.is.vpc.v1.model.GetVpcRouteResponse; import com.ibm.cloud.is.vpc.v1.model.GetVpcRoutingTableOptions; import com.ibm.cloud.is.vpc.v1.model.GetVpcRoutingTableRouteOptions; import com.ibm.cloud.is.vpc.v1.model.GetVpnGatewayConnectionOptions; import com.ibm.cloud.is.vpc.v1.model.GetVpnGatewayOptions; +import com.ibm.cloud.is.vpc.v1.model.GetVpnGatewayServiceConnectionOptions; import com.ibm.cloud.is.vpc.v1.model.GetVpnServerClientConfigurationOptions; import com.ibm.cloud.is.vpc.v1.model.GetVpnServerClientOptions; import com.ibm.cloud.is.vpc.v1.model.GetVpnServerOptions; @@ -334,9 +339,11 @@ import com.ibm.cloud.is.vpc.v1.model.IPsecPolicyCollection; import com.ibm.cloud.is.vpc.v1.model.IPsecPolicyConnectionCollection; import com.ibm.cloud.is.vpc.v1.model.Image; +import com.ibm.cloud.is.vpc.v1.model.ImageBareMetalServerProfileCollection; import com.ibm.cloud.is.vpc.v1.model.ImageCollection; import com.ibm.cloud.is.vpc.v1.model.ImageExportJob; import com.ibm.cloud.is.vpc.v1.model.ImageExportJobUnpaginatedCollection; +import com.ibm.cloud.is.vpc.v1.model.ImageInstanceProfileCollection; import com.ibm.cloud.is.vpc.v1.model.Instance; import com.ibm.cloud.is.vpc.v1.model.InstanceAction; import com.ibm.cloud.is.vpc.v1.model.InstanceClusterNetworkAttachment; @@ -389,7 +396,9 @@ import com.ibm.cloud.is.vpc.v1.model.ListFlowLogCollectorsOptions; import com.ibm.cloud.is.vpc.v1.model.ListIkePoliciesOptions; import com.ibm.cloud.is.vpc.v1.model.ListIkePolicyConnectionsOptions; +import com.ibm.cloud.is.vpc.v1.model.ListImageBareMetalServerProfilesOptions; import com.ibm.cloud.is.vpc.v1.model.ListImageExportJobsOptions; +import com.ibm.cloud.is.vpc.v1.model.ListImageInstanceProfilesOptions; import com.ibm.cloud.is.vpc.v1.model.ListImagesOptions; import com.ibm.cloud.is.vpc.v1.model.ListInstanceClusterNetworkAttachmentsOptions; import com.ibm.cloud.is.vpc.v1.model.ListInstanceDisksOptions; @@ -439,11 +448,13 @@ import com.ibm.cloud.is.vpc.v1.model.ListSharesOptions; import com.ibm.cloud.is.vpc.v1.model.ListSnapshotClonesOptions; import com.ibm.cloud.is.vpc.v1.model.ListSnapshotConsistencyGroupsOptions; +import com.ibm.cloud.is.vpc.v1.model.ListSnapshotInstanceProfilesOptions; import com.ibm.cloud.is.vpc.v1.model.ListSnapshotsOptions; import com.ibm.cloud.is.vpc.v1.model.ListSubnetReservedIpsOptions; import com.ibm.cloud.is.vpc.v1.model.ListSubnetsOptions; import com.ibm.cloud.is.vpc.v1.model.ListVirtualNetworkInterfaceIpsOptions; import com.ibm.cloud.is.vpc.v1.model.ListVirtualNetworkInterfacesOptions; +import com.ibm.cloud.is.vpc.v1.model.ListVolumeInstanceProfilesOptions; import com.ibm.cloud.is.vpc.v1.model.ListVolumeProfilesOptions; import com.ibm.cloud.is.vpc.v1.model.ListVolumesOptions; import com.ibm.cloud.is.vpc.v1.model.ListVpcAddressPrefixesOptions; @@ -452,9 +463,11 @@ import com.ibm.cloud.is.vpc.v1.model.ListVpcRoutingTableRoutesOptions; import com.ibm.cloud.is.vpc.v1.model.ListVpcRoutingTablesOptions; import com.ibm.cloud.is.vpc.v1.model.ListVpcsOptions; +import com.ibm.cloud.is.vpc.v1.model.ListVpnGatewayAdvertisedCidrsOptions; import com.ibm.cloud.is.vpc.v1.model.ListVpnGatewayConnectionsLocalCidrsOptions; import com.ibm.cloud.is.vpc.v1.model.ListVpnGatewayConnectionsOptions; import com.ibm.cloud.is.vpc.v1.model.ListVpnGatewayConnectionsPeerCidrsOptions; +import com.ibm.cloud.is.vpc.v1.model.ListVpnGatewayServiceConnectionsOptions; import com.ibm.cloud.is.vpc.v1.model.ListVpnGatewaysOptions; import com.ibm.cloud.is.vpc.v1.model.ListVpnServerClientsOptions; import com.ibm.cloud.is.vpc.v1.model.ListVpnServerRoutesOptions; @@ -504,6 +517,7 @@ import com.ibm.cloud.is.vpc.v1.model.RemoveInstanceNetworkInterfaceFloatingIpOptions; import com.ibm.cloud.is.vpc.v1.model.RemoveNetworkInterfaceFloatingIpOptions; import com.ibm.cloud.is.vpc.v1.model.RemoveVirtualNetworkInterfaceIpOptions; +import com.ibm.cloud.is.vpc.v1.model.RemoveVpnGatewayAdvertisedCidrOptions; import com.ibm.cloud.is.vpc.v1.model.RemoveVpnGatewayConnectionsLocalCidrOptions; import com.ibm.cloud.is.vpc.v1.model.RemoveVpnGatewayConnectionsPeerCidrOptions; import com.ibm.cloud.is.vpc.v1.model.ReplaceBareMetalServerInitializationOptions; @@ -550,6 +564,7 @@ import com.ibm.cloud.is.vpc.v1.model.SnapshotCollection; import com.ibm.cloud.is.vpc.v1.model.SnapshotConsistencyGroup; import com.ibm.cloud.is.vpc.v1.model.SnapshotConsistencyGroupCollection; +import com.ibm.cloud.is.vpc.v1.model.SnapshotInstanceProfileCollection; import com.ibm.cloud.is.vpc.v1.model.StartBareMetalServerOptions; import com.ibm.cloud.is.vpc.v1.model.StopBareMetalServerOptions; import com.ibm.cloud.is.vpc.v1.model.Subnet; @@ -619,6 +634,7 @@ import com.ibm.cloud.is.vpc.v1.model.UpdateVpcDnsResolutionBindingOptions; import com.ibm.cloud.is.vpc.v1.model.UpdateVpcOptions; import com.ibm.cloud.is.vpc.v1.model.UpdateVpcRouteOptions; +import com.ibm.cloud.is.vpc.v1.model.UpdateVpcRouteResponse; import com.ibm.cloud.is.vpc.v1.model.UpdateVpcRoutingTableOptions; import com.ibm.cloud.is.vpc.v1.model.UpdateVpcRoutingTableRouteOptions; import com.ibm.cloud.is.vpc.v1.model.UpdateVpnGatewayConnectionOptions; @@ -630,10 +646,13 @@ import com.ibm.cloud.is.vpc.v1.model.VPCDNSResolutionBinding; import com.ibm.cloud.is.vpc.v1.model.VPCDNSResolutionBindingCollection; import com.ibm.cloud.is.vpc.v1.model.VPNGateway; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayAdvertisedCIDRCollection; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayCollection; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnection; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionCIDRs; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionCollection; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayServiceConnection; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayServiceConnectionCollection; import com.ibm.cloud.is.vpc.v1.model.VPNServer; import com.ibm.cloud.is.vpc.v1.model.VPNServerClient; import com.ibm.cloud.is.vpc.v1.model.VPNServerClientCollection; @@ -646,6 +665,7 @@ import com.ibm.cloud.is.vpc.v1.model.VolumeAttachment; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentCollection; import com.ibm.cloud.is.vpc.v1.model.VolumeCollection; +import com.ibm.cloud.is.vpc.v1.model.VolumeInstanceProfileCollection; import com.ibm.cloud.is.vpc.v1.model.VolumeProfile; import com.ibm.cloud.is.vpc.v1.model.VolumeProfileCollection; import com.ibm.cloud.is.vpc.v1.model.Zone; @@ -668,7 +688,7 @@ * The IBM Cloud Virtual Private Cloud (VPC) API can be used to programmatically provision and manage virtual server * instances, along with subnets, volumes, load balancers, and more. * - * API Version: 2025-07-08 + * API Version: today */ public class Vpc extends BaseService { private static final Logger LOGGER = Logger.getLogger(Vpc.class.getName()); @@ -681,7 +701,7 @@ public class Vpc extends BaseService { /** * Default service endpoint URL. */ - public static final String DEFAULT_SERVICE_URL = "https://us-south.iaas.cloud.ibm.com/v1"; + public static final String DEFAULT_SERVICE_URL = "https://au-syd.iaas.cloud.ibm.com/v1"; private static final Map _regionalEndpoints; static { @@ -700,6 +720,8 @@ public class Vpc extends BaseService { m.put("eu-gb", "https://eu-gb.iaas.cloud.ibm.com/v1"); // United Kingdom (London) + m.put("in-che", "https://in-che.iaas.cloud.ibm.com/v1"); // India (Chennai) + m.put("jp-osa", "https://jp-osa.iaas.cloud.ibm.com/v1"); // Japan (Osaka) m.put("jp-tok", "https://jp-tok.iaas.cloud.ibm.com/v1"); // Japan (Tokyo) @@ -722,28 +744,32 @@ public static String getServiceUrlForRegion(String region) { private Long generation = Long.valueOf("2"); - private String version = "2025-07-08"; + private String version; /** * Class method which constructs an instance of the `Vpc` client. * The default service name is used to configure the client instance. * + * @param version The API version, in format `YYYY-MM-DD`. For the API behavior documented here, specify any date + * between `2025-09-16` and `2025-12-12`. * @return an instance of the `Vpc` client using external configuration */ - public static Vpc newInstance() { - return newInstance(DEFAULT_SERVICE_NAME); + public static Vpc newInstance(String version) { + return newInstance(version, DEFAULT_SERVICE_NAME); } /** * Class method which constructs an instance of the `Vpc` client. * The specified service name is used to configure the client instance. * + * @param version The API version, in format `YYYY-MM-DD`. For the API behavior documented here, specify any date + * between `2025-09-16` and `2025-12-12`. * @param serviceName the service name to be used when configuring the client instance * @return an instance of the `Vpc` client using external configuration */ - public static Vpc newInstance(String serviceName) { + public static Vpc newInstance(String version, String serviceName) { Authenticator authenticator = ConfigBasedAuthenticatorFactory.getAuthenticator(serviceName); - Vpc service = new Vpc(serviceName, authenticator); + Vpc service = new Vpc(version, serviceName, authenticator); service.configureService(serviceName); return service; } @@ -752,10 +778,12 @@ public static Vpc newInstance(String serviceName) { * Constructs an instance of the `Vpc` client. * The specified service name and authenticator are used to configure the client instance. * + * @param version The API version, in format `YYYY-MM-DD`. For the API behavior documented here, specify any date + * between `2025-09-16` and `2025-12-12`. * @param serviceName the service name to be used when configuring the client instance * @param authenticator the {@link Authenticator} instance to be configured for this client */ - public Vpc(String serviceName, Authenticator authenticator) { + public Vpc(String version, String serviceName, Authenticator authenticator) { super(serviceName, authenticator); setServiceUrl(DEFAULT_SERVICE_URL); setVersion(version); @@ -786,7 +814,7 @@ public void setGeneration(final long generation) { * Gets the version. * * The API version, in format `YYYY-MM-DD`. For the API behavior documented here, specify any date between - * `2025-06-30` and `2025-07-10`. + * `2025-09-16` and `2025-12-12`. * * @return the version */ @@ -805,551 +833,518 @@ public void setVersion(final String version) { } /** - * List VPCs. + * Create a backup policy. * - * This request lists VPCs in the region. A VPC is a virtual network that belongs to an account and provides logical - * isolation from other networks. A VPC is made up of resources in one or more zones. VPCs are regional, and each VPC - * can contain resources in multiple zones in a region. + * This request creates a new backup policy from a backup policy prototype object. The prototype object is structured + * in the same way as a retrieved backup policy, and contains the information necessary to create the new backup + * policy. * - * @param listVpcsOptions the {@link ListVpcsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPCCollection} + * @param createBackupPolicyOptions the {@link CreateBackupPolicyOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BackupPolicy} */ - public ServiceCall listVpcs(ListVpcsOptions listVpcsOptions) { - if (listVpcsOptions == null) { - listVpcsOptions = new ListVpcsOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpcs"); + public ServiceCall createBackupPolicy(CreateBackupPolicyOptions createBackupPolicyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createBackupPolicyOptions, + "createBackupPolicyOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/backup_policies")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createBackupPolicy"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listVpcsOptions.start() != null) { - builder.query("start", String.valueOf(listVpcsOptions.start())); - } - if (listVpcsOptions.limit() != null) { - builder.query("limit", String.valueOf(listVpcsOptions.limit())); - } - if (listVpcsOptions.resourceGroupId() != null) { - builder.query("resource_group.id", String.valueOf(listVpcsOptions.resourceGroupId())); - } - if (listVpcsOptions.classicAccess() != null) { - builder.query("classic_access", String.valueOf(listVpcsOptions.classicAccess())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createBackupPolicyOptions.backupPolicyPrototype()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List VPCs. - * - * This request lists VPCs in the region. A VPC is a virtual network that belongs to an account and provides logical - * isolation from other networks. A VPC is made up of resources in one or more zones. VPCs are regional, and each VPC - * can contain resources in multiple zones in a region. + * Create a plan for a backup policy. * - * @return a {@link ServiceCall} with a result of type {@link VPCCollection} - */ - public ServiceCall listVpcs() { - return listVpcs(null); - } - - /** - * Create a VPC. + * This request creates a new backup policy plan from a backup policy plan prototype object. The prototype object is + * structured in the same way as a retrieved backup policy plan, and contains the information necessary to create the + * new backup policy plan. * - * This request creates a new VPC from a VPC prototype object. The prototype object is structured in the same way as a - * retrieved VPC, and contains the information necessary to create the new VPC. + * Backups created by this plan will use the resource group of the source being backed up. * - * The system will automatically create the following additional resources for the VPC: - * - Unless `address_prefix_management` is `manual`, a [default address - * prefix](https://cloud.ibm.com/apidocs/vpc/latest#get-vpc-address-prefix) for each zone - * - A [default network - * ACL](https://cloud.ibm.com/apidocs/vpc/latest#get-vpc-default-network-acl) - * - A [default routing - * table](https://cloud.ibm.com/apidocs/vpc/latest#get-vpc-default-routing-table) - * - A [default security - * group](https://cloud.ibm.com/apidocs/vpc/latest#get-vpc-default-security-group). + * Backups created by this plan will use the plan's name truncated to 46 characters, followed by a unique 16-character + * suffix. * - * @param createVpcOptions the {@link CreateVpcOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPC} + * @param createBackupPolicyPlanOptions the {@link CreateBackupPolicyPlanOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BackupPolicyPlan} */ - public ServiceCall createVpc(CreateVpcOptions createVpcOptions) { - boolean skipBody = false; - if (createVpcOptions == null) { - createVpcOptions = new CreateVpcOptions.Builder().build(); - skipBody = true; - } - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createVpc"); + public ServiceCall createBackupPolicyPlan(CreateBackupPolicyPlanOptions createBackupPolicyPlanOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createBackupPolicyPlanOptions, + "createBackupPolicyPlanOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("backup_policy_id", createBackupPolicyPlanOptions.backupPolicyId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/backup_policies/{backup_policy_id}/plans", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createBackupPolicyPlan"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (!skipBody) { - final JsonObject contentJson = new JsonObject(); - if (createVpcOptions.addressPrefixManagement() != null) { - contentJson.addProperty("address_prefix_management", createVpcOptions.addressPrefixManagement()); - } - if (createVpcOptions.classicAccess() != null) { - contentJson.addProperty("classic_access", createVpcOptions.classicAccess()); - } - if (createVpcOptions.dns() != null) { - contentJson.add("dns", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpcOptions.dns())); - } - if (createVpcOptions.name() != null) { - contentJson.addProperty("name", createVpcOptions.name()); - } - if (createVpcOptions.resourceGroup() != null) { - contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpcOptions.resourceGroup())); - } - builder.bodyJson(contentJson); + final JsonObject contentJson = new JsonObject(); + contentJson.addProperty("cron_spec", createBackupPolicyPlanOptions.cronSpec()); + if (createBackupPolicyPlanOptions.active() != null) { + contentJson.addProperty("active", createBackupPolicyPlanOptions.active()); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (createBackupPolicyPlanOptions.attachUserTags() != null) { + contentJson.add("attach_user_tags", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createBackupPolicyPlanOptions.attachUserTags())); + } + if (createBackupPolicyPlanOptions.clonePolicy() != null) { + contentJson.add("clone_policy", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createBackupPolicyPlanOptions.clonePolicy())); + } + if (createBackupPolicyPlanOptions.copyUserTags() != null) { + contentJson.addProperty("copy_user_tags", createBackupPolicyPlanOptions.copyUserTags()); + } + if (createBackupPolicyPlanOptions.deletionTrigger() != null) { + contentJson.add("deletion_trigger", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createBackupPolicyPlanOptions.deletionTrigger())); + } + if (createBackupPolicyPlanOptions.name() != null) { + contentJson.addProperty("name", createBackupPolicyPlanOptions.name()); + } + if (createBackupPolicyPlanOptions.remoteRegionPolicies() != null) { + contentJson.add("remote_region_policies", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createBackupPolicyPlanOptions.remoteRegionPolicies())); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create a VPC. - * - * This request creates a new VPC from a VPC prototype object. The prototype object is structured in the same way as a - * retrieved VPC, and contains the information necessary to create the new VPC. - * - * The system will automatically create the following additional resources for the VPC: - * - Unless `address_prefix_management` is `manual`, a [default address - * prefix](https://cloud.ibm.com/apidocs/vpc/latest#get-vpc-address-prefix) for each zone - * - A [default network - * ACL](https://cloud.ibm.com/apidocs/vpc/latest#get-vpc-default-network-acl) - * - A [default routing - * table](https://cloud.ibm.com/apidocs/vpc/latest#get-vpc-default-routing-table) - * - A [default security - * group](https://cloud.ibm.com/apidocs/vpc/latest#get-vpc-default-security-group). - * - * @return a {@link ServiceCall} with a result of type {@link VPC} - */ - public ServiceCall createVpc() { - return createVpc(null); - } - - /** - * Delete a VPC. - * - * This request deletes a VPC. This operation cannot be reversed. + * Delete a backup policy. * - * For this request to succeed: - * - Instances, subnets, public gateways, endpoint gateways, and private path service - * gateways must not reside in this VPC - * - The VPC must not be providing DNS resolution for any other VPCs - * - If `dns.enable_hub` is `true`, `dns.resolution_binding_count` must be zero + * This request deletes a backup policy. This operation cannot be reversed. * - * All security groups and network ACLs associated with the VPC are automatically deleted. All flow log collectors - * with `auto_delete` set to `true` targeting the VPC or any resource in the VPC are automatically deleted. All public - * address ranges attached to the VPC are automatically detached. + * If the request is accepted, the backup policy `status` will be set to `deleting`. Once deletion processing + * completes, the backup policy will no longer be retrievable. * - * @param deleteVpcOptions the {@link DeleteVpcOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param deleteBackupPolicyOptions the {@link DeleteBackupPolicyOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BackupPolicy} */ - public ServiceCall deleteVpc(DeleteVpcOptions deleteVpcOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVpcOptions, - "deleteVpcOptions cannot be null"); + public ServiceCall deleteBackupPolicy(DeleteBackupPolicyOptions deleteBackupPolicyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteBackupPolicyOptions, + "deleteBackupPolicyOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteVpcOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVpc"); + pathParamsMap.put("id", deleteBackupPolicyOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/backup_policies/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteBackupPolicy"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - if (deleteVpcOptions.ifMatch() != null) { - builder.header("If-Match", deleteVpcOptions.ifMatch()); + builder.header("Accept", "application/json"); + if (deleteBackupPolicyOptions.ifMatch() != null) { + builder.header("If-Match", deleteBackupPolicyOptions.ifMatch()); } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a VPC. + * Delete a backup policy plan. * - * This request retrieves a single VPC specified by the identifier in the URL. + * This request deletes a backup policy plan. This operation cannot be reversed. Any backups that have been created by + * the plan will remain but will no longer be subject to the plan's deletion trigger. Any running jobs associated with + * the plan will run to completion before the plan is deleted. * - * @param getVpcOptions the {@link GetVpcOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPC} + * If the request is accepted, the backup policy plan `status` will be set to `deleting`. Once deletion processing + * completes, the backup policy plan will no longer be retrievable. + * + * @param deleteBackupPolicyPlanOptions the {@link DeleteBackupPolicyPlanOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BackupPolicyPlan} */ - public ServiceCall getVpc(GetVpcOptions getVpcOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getVpcOptions, - "getVpcOptions cannot be null"); + public ServiceCall deleteBackupPolicyPlan(DeleteBackupPolicyPlanOptions deleteBackupPolicyPlanOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteBackupPolicyPlanOptions, + "deleteBackupPolicyPlanOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getVpcOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpc"); + pathParamsMap.put("backup_policy_id", deleteBackupPolicyPlanOptions.backupPolicyId()); + pathParamsMap.put("id", deleteBackupPolicyPlanOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/backup_policies/{backup_policy_id}/plans/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteBackupPolicyPlan"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); + if (deleteBackupPolicyPlanOptions.ifMatch() != null) { + builder.header("If-Match", deleteBackupPolicyPlanOptions.ifMatch()); + } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a VPC. + * Retrieve a backup policy. * - * This request updates a VPC with the information provided in a VPC patch object. The patch object is structured in - * the same way as a retrieved VPC and needs to contain only the information to be updated. + * This request retrieves a single backup policy specified by the identifier in the URL. * - * @param updateVpcOptions the {@link UpdateVpcOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPC} + * @param getBackupPolicyOptions the {@link GetBackupPolicyOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BackupPolicy} */ - public ServiceCall updateVpc(UpdateVpcOptions updateVpcOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateVpcOptions, - "updateVpcOptions cannot be null"); + public ServiceCall getBackupPolicy(GetBackupPolicyOptions getBackupPolicyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getBackupPolicyOptions, + "getBackupPolicyOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateVpcOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateVpc"); + pathParamsMap.put("id", getBackupPolicyOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/backup_policies/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getBackupPolicy"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); - if (updateVpcOptions.ifMatch() != null) { - builder.header("If-Match", updateVpcOptions.ifMatch()); - } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateVpcOptions.vpcPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a VPC's default network ACL. + * Retrieve a backup policy job. * - * This request retrieves the default network ACL for the VPC specified by the identifier in the URL. The default - * network ACL is applied to any new subnets in the VPC which do not specify a network ACL. + * This request retrieves a single backup policy job specified by the identifier in the URL. * - * @param getVpcDefaultNetworkAclOptions the {@link GetVpcDefaultNetworkAclOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link DefaultNetworkACL} + * @param getBackupPolicyJobOptions the {@link GetBackupPolicyJobOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BackupPolicyJob} */ - public ServiceCall getVpcDefaultNetworkAcl(GetVpcDefaultNetworkAclOptions getVpcDefaultNetworkAclOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getVpcDefaultNetworkAclOptions, - "getVpcDefaultNetworkAclOptions cannot be null"); + public ServiceCall getBackupPolicyJob(GetBackupPolicyJobOptions getBackupPolicyJobOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getBackupPolicyJobOptions, + "getBackupPolicyJobOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getVpcDefaultNetworkAclOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{id}/default_network_acl", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpcDefaultNetworkAcl"); + pathParamsMap.put("backup_policy_id", getBackupPolicyJobOptions.backupPolicyId()); + pathParamsMap.put("id", getBackupPolicyJobOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/backup_policies/{backup_policy_id}/jobs/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getBackupPolicyJob"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a VPC's default routing table. + * Retrieve a backup policy plan. * - * This request retrieves the default routing table for the VPC specified by the identifier in the URL. The default - * routing table is associated with any subnets in the VPC which have not been explicitly associated with another - * routing table. + * This request retrieves a single backup policy plan specified by the identifier in the URL. * - * @param getVpcDefaultRoutingTableOptions the {@link GetVpcDefaultRoutingTableOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link DefaultRoutingTable} + * @param getBackupPolicyPlanOptions the {@link GetBackupPolicyPlanOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BackupPolicyPlan} */ - public ServiceCall getVpcDefaultRoutingTable(GetVpcDefaultRoutingTableOptions getVpcDefaultRoutingTableOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getVpcDefaultRoutingTableOptions, - "getVpcDefaultRoutingTableOptions cannot be null"); + public ServiceCall getBackupPolicyPlan(GetBackupPolicyPlanOptions getBackupPolicyPlanOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getBackupPolicyPlanOptions, + "getBackupPolicyPlanOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getVpcDefaultRoutingTableOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{id}/default_routing_table", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpcDefaultRoutingTable"); + pathParamsMap.put("backup_policy_id", getBackupPolicyPlanOptions.backupPolicyId()); + pathParamsMap.put("id", getBackupPolicyPlanOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/backup_policies/{backup_policy_id}/plans/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getBackupPolicyPlan"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a VPC's default security group. + * List backup policies. * - * This request retrieves the default security group for the VPC specified by the identifier in the URL. Resources - * created in this VPC that allow a security group to be optionally specified will use this security group by default. + * This request lists backup policies in the region. Backup policies control which sources are selected for backup and + * include a set of backup policy plans that provide the backup schedules and deletion triggers. * - * @param getVpcDefaultSecurityGroupOptions the {@link GetVpcDefaultSecurityGroupOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link DefaultSecurityGroup} + * @param listBackupPoliciesOptions the {@link ListBackupPoliciesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BackupPolicyCollection} */ - public ServiceCall getVpcDefaultSecurityGroup(GetVpcDefaultSecurityGroupOptions getVpcDefaultSecurityGroupOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getVpcDefaultSecurityGroupOptions, - "getVpcDefaultSecurityGroupOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getVpcDefaultSecurityGroupOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{id}/default_security_group", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpcDefaultSecurityGroup"); + public ServiceCall listBackupPolicies(ListBackupPoliciesOptions listBackupPoliciesOptions) { + if (listBackupPoliciesOptions == null) { + listBackupPoliciesOptions = new ListBackupPoliciesOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/backup_policies")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listBackupPolicies"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listBackupPoliciesOptions.start() != null) { + builder.query("start", String.valueOf(listBackupPoliciesOptions.start())); + } + if (listBackupPoliciesOptions.limit() != null) { + builder.query("limit", String.valueOf(listBackupPoliciesOptions.limit())); + } + if (listBackupPoliciesOptions.resourceGroupId() != null) { + builder.query("resource_group.id", String.valueOf(listBackupPoliciesOptions.resourceGroupId())); + } + if (listBackupPoliciesOptions.name() != null) { + builder.query("name", String.valueOf(listBackupPoliciesOptions.name())); + } + if (listBackupPoliciesOptions.tag() != null) { + builder.query("tag", String.valueOf(listBackupPoliciesOptions.tag())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List address prefixes for a VPC. + * List backup policies. * - * This request lists address pool prefixes for a VPC. + * This request lists backup policies in the region. Backup policies control which sources are selected for backup and + * include a set of backup policy plans that provide the backup schedules and deletion triggers. * - * @param listVpcAddressPrefixesOptions the {@link ListVpcAddressPrefixesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link AddressPrefixCollection} + * @return a {@link ServiceCall} with a result of type {@link BackupPolicyCollection} */ - public ServiceCall listVpcAddressPrefixes(ListVpcAddressPrefixesOptions listVpcAddressPrefixesOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listVpcAddressPrefixesOptions, - "listVpcAddressPrefixesOptions cannot be null"); + public ServiceCall listBackupPolicies() { + return listBackupPolicies(null); + } + + /** + * List jobs for a backup policy. + * + * This request retrieves jobs for a backup policy. A backup job represents the execution of a backup policy plan for + * a resource matching the policy's criteria. + * + * @param listBackupPolicyJobsOptions the {@link ListBackupPolicyJobsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BackupPolicyJobCollection} + */ + public ServiceCall listBackupPolicyJobs(ListBackupPolicyJobsOptions listBackupPolicyJobsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listBackupPolicyJobsOptions, + "listBackupPolicyJobsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpc_id", listVpcAddressPrefixesOptions.vpcId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/address_prefixes", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpcAddressPrefixes"); + pathParamsMap.put("backup_policy_id", listBackupPolicyJobsOptions.backupPolicyId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/backup_policies/{backup_policy_id}/jobs", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listBackupPolicyJobs"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listVpcAddressPrefixesOptions.start() != null) { - builder.query("start", String.valueOf(listVpcAddressPrefixesOptions.start())); + if (listBackupPolicyJobsOptions.status() != null) { + builder.query("status", String.valueOf(listBackupPolicyJobsOptions.status())); } - if (listVpcAddressPrefixesOptions.limit() != null) { - builder.query("limit", String.valueOf(listVpcAddressPrefixesOptions.limit())); + if (listBackupPolicyJobsOptions.backupPolicyPlanId() != null) { + builder.query("backup_policy_plan.id", String.valueOf(listBackupPolicyJobsOptions.backupPolicyPlanId())); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listBackupPolicyJobsOptions.start() != null) { + builder.query("start", String.valueOf(listBackupPolicyJobsOptions.start())); + } + if (listBackupPolicyJobsOptions.limit() != null) { + builder.query("limit", String.valueOf(listBackupPolicyJobsOptions.limit())); + } + if (listBackupPolicyJobsOptions.sort() != null) { + builder.query("sort", String.valueOf(listBackupPolicyJobsOptions.sort())); + } + if (listBackupPolicyJobsOptions.sourceId() != null) { + builder.query("source.id", String.valueOf(listBackupPolicyJobsOptions.sourceId())); + } + if (listBackupPolicyJobsOptions.targetSnapshotsId() != null) { + builder.query("target_snapshots[].id", String.valueOf(listBackupPolicyJobsOptions.targetSnapshotsId())); + } + if (listBackupPolicyJobsOptions.targetSnapshotsCrn() != null) { + builder.query("target_snapshots[].crn", String.valueOf(listBackupPolicyJobsOptions.targetSnapshotsCrn())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create an address prefix for a VPC. + * List plans for a backup policy. * - * This request creates a new prefix from a prefix prototype object. The prototype object is structured in the same - * way as a retrieved prefix, and contains the information necessary to create the new prefix. + * This request retrieves plans for a backup policy. Backup plans provide the backup schedule and deletion triggers. * - * @param createVpcAddressPrefixOptions the {@link CreateVpcAddressPrefixOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link AddressPrefix} + * @param listBackupPolicyPlansOptions the {@link ListBackupPolicyPlansOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BackupPolicyPlanCollection} */ - public ServiceCall createVpcAddressPrefix(CreateVpcAddressPrefixOptions createVpcAddressPrefixOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createVpcAddressPrefixOptions, - "createVpcAddressPrefixOptions cannot be null"); + public ServiceCall listBackupPolicyPlans(ListBackupPolicyPlansOptions listBackupPolicyPlansOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listBackupPolicyPlansOptions, + "listBackupPolicyPlansOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpc_id", createVpcAddressPrefixOptions.vpcId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/address_prefixes", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createVpcAddressPrefix"); + pathParamsMap.put("backup_policy_id", listBackupPolicyPlansOptions.backupPolicyId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/backup_policies/{backup_policy_id}/plans", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listBackupPolicyPlans"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("cidr", createVpcAddressPrefixOptions.cidr()); - contentJson.add("zone", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpcAddressPrefixOptions.zone())); - if (createVpcAddressPrefixOptions.isDefault() != null) { - contentJson.addProperty("is_default", createVpcAddressPrefixOptions.isDefault()); - } - if (createVpcAddressPrefixOptions.name() != null) { - contentJson.addProperty("name", createVpcAddressPrefixOptions.name()); + if (listBackupPolicyPlansOptions.name() != null) { + builder.query("name", String.valueOf(listBackupPolicyPlansOptions.name())); } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete an address prefix. + * Update a backup policy. * - * This request deletes a prefix. This operation cannot be reversed. The request will fail if any subnets use - * addresses from this prefix. + * This request updates a backup policy with the information in a provided backup policy patch. The backup policy + * patch object is structured in the same way as a retrieved backup policy and contains only the information to be + * updated. * - * @param deleteVpcAddressPrefixOptions the {@link DeleteVpcAddressPrefixOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param updateBackupPolicyOptions the {@link UpdateBackupPolicyOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BackupPolicy} */ - public ServiceCall deleteVpcAddressPrefix(DeleteVpcAddressPrefixOptions deleteVpcAddressPrefixOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVpcAddressPrefixOptions, - "deleteVpcAddressPrefixOptions cannot be null"); + public ServiceCall updateBackupPolicy(UpdateBackupPolicyOptions updateBackupPolicyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateBackupPolicyOptions, + "updateBackupPolicyOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpc_id", deleteVpcAddressPrefixOptions.vpcId()); - pathParamsMap.put("id", deleteVpcAddressPrefixOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/address_prefixes/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVpcAddressPrefix"); + pathParamsMap.put("id", updateBackupPolicyOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/backup_policies/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateBackupPolicy"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); + if (updateBackupPolicyOptions.ifMatch() != null) { + builder.header("If-Match", updateBackupPolicyOptions.ifMatch()); + } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateBackupPolicyOptions.backupPolicyPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve an address prefix. + * Update a backup policy plan. * - * This request retrieves a single prefix specified by the identifier in the URL. + * This request updates a backup policy plan with the information in a provided plan patch. The plan patch object is + * structured in the same way as a retrieved backup policy plan and can contains only the information to be updated. * - * @param getVpcAddressPrefixOptions the {@link GetVpcAddressPrefixOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link AddressPrefix} + * @param updateBackupPolicyPlanOptions the {@link UpdateBackupPolicyPlanOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BackupPolicyPlan} */ - public ServiceCall getVpcAddressPrefix(GetVpcAddressPrefixOptions getVpcAddressPrefixOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getVpcAddressPrefixOptions, - "getVpcAddressPrefixOptions cannot be null"); + public ServiceCall updateBackupPolicyPlan(UpdateBackupPolicyPlanOptions updateBackupPolicyPlanOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateBackupPolicyPlanOptions, + "updateBackupPolicyPlanOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpc_id", getVpcAddressPrefixOptions.vpcId()); - pathParamsMap.put("id", getVpcAddressPrefixOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/address_prefixes/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpcAddressPrefix"); + pathParamsMap.put("backup_policy_id", updateBackupPolicyPlanOptions.backupPolicyId()); + pathParamsMap.put("id", updateBackupPolicyPlanOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/backup_policies/{backup_policy_id}/plans/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateBackupPolicyPlan"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); + if (updateBackupPolicyPlanOptions.ifMatch() != null) { + builder.header("If-Match", updateBackupPolicyPlanOptions.ifMatch()); + } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateBackupPolicyPlanOptions.backupPolicyPlanPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update an address prefix. + * Associate a floating IP with a bare metal server network interface. * - * This request updates a prefix with the information in a provided prefix patch. The prefix patch object is - * structured in the same way as a retrieved prefix and contains only the information to be updated. + * This request associates the specified floating IP with the specified bare metal server network interface. If + * `enable_infrastructure_nat` is `false`, this adds the IP to any existing associations. If + * `enable_infrastructure_nat` is `true`, this replaces any existing association. * - * @param updateVpcAddressPrefixOptions the {@link UpdateVpcAddressPrefixOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link AddressPrefix} + * The existing floating IP must: + * - not be required by another resource, such as a public gateway + * - be in the same `zone` as the bare metal server + * + * A request body is not required, and if provided, is ignored. + * + * @param addBareMetalServerNetworkInterfaceFloatingIpOptions the {@link AddBareMetalServerNetworkInterfaceFloatingIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link FloatingIP} */ - public ServiceCall updateVpcAddressPrefix(UpdateVpcAddressPrefixOptions updateVpcAddressPrefixOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateVpcAddressPrefixOptions, - "updateVpcAddressPrefixOptions cannot be null"); + public ServiceCall addBareMetalServerNetworkInterfaceFloatingIp(AddBareMetalServerNetworkInterfaceFloatingIpOptions addBareMetalServerNetworkInterfaceFloatingIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(addBareMetalServerNetworkInterfaceFloatingIpOptions, + "addBareMetalServerNetworkInterfaceFloatingIpOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpc_id", updateVpcAddressPrefixOptions.vpcId()); - pathParamsMap.put("id", updateVpcAddressPrefixOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/address_prefixes/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateVpcAddressPrefix"); + pathParamsMap.put("bare_metal_server_id", addBareMetalServerNetworkInterfaceFloatingIpOptions.bareMetalServerId()); + pathParamsMap.put("network_interface_id", addBareMetalServerNetworkInterfaceFloatingIpOptions.networkInterfaceId()); + pathParamsMap.put("id", addBareMetalServerNetworkInterfaceFloatingIpOptions.id()); + RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/floating_ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "addBareMetalServerNetworkInterfaceFloatingIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateVpcAddressPrefixOptions.addressPrefixPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List DNS resolution bindings for a VPC. - * - * This request lists DNS resolution bindings for a VPC. A DNS resolution binding represents an association with - * another VPC for centralizing DNS name resolution. - * - * If the VPC specified by the identifier in the URL is a DNS hub VPC (has `dns.enable_hub` set to `true`) then there - * is one binding for each VPC bound to the hub VPC. The endpoint gateways in the bound VPCs can allow (using - * `allow_dns_resolution_binding`) the hub VPC to centralize resolution of their DNS names. - * - * If the VPC specified by the identifier in the URL is not a DNS hub VPC, then there is at most one binding (to a hub - * VPC). The endpoint gateways in the VPC specified by the identifier in the URL can allow (using - * `allow_dns_resolution_binding`) its hub VPC to centralize resolution of their DNS names. + * Create a bare metal server. * - * To make use of centralized DNS resolution, a VPC bound to a DNS hub VPC must delegate DNS resolution to its hub VPC - * by setting `dns.resolver.type` to `delegate`. + * This request provisions a new bare metal server from a prototype object. The prototype object is structured in the + * same way as a retrieved bare metal server, and contains the information necessary to provision the new bare metal + * server. The bare metal server is automatically started. * - * The bindings will be sorted by their `created_at` property values, with newest bindings first. Bindings with - * identical `created_at` property values will in turn be sorted by ascending `name` property values. + * For this request to succeed, the properties in the request must adhere to the source image's `allowed_use` + * property. * - * @param listVpcDnsResolutionBindingsOptions the {@link ListVpcDnsResolutionBindingsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPCDNSResolutionBindingCollection} + * @param createBareMetalServerOptions the {@link CreateBareMetalServerOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BareMetalServer} */ - public ServiceCall listVpcDnsResolutionBindings(ListVpcDnsResolutionBindingsOptions listVpcDnsResolutionBindingsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listVpcDnsResolutionBindingsOptions, - "listVpcDnsResolutionBindingsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpc_id", listVpcDnsResolutionBindingsOptions.vpcId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/dns_resolution_bindings", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpcDnsResolutionBindings"); + public ServiceCall createBareMetalServer(CreateBareMetalServerOptions createBareMetalServerOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createBareMetalServerOptions, + "createBareMetalServerOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createBareMetalServer"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listVpcDnsResolutionBindingsOptions.sort() != null) { - builder.query("sort", String.valueOf(listVpcDnsResolutionBindingsOptions.sort())); - } - if (listVpcDnsResolutionBindingsOptions.start() != null) { - builder.query("start", String.valueOf(listVpcDnsResolutionBindingsOptions.start())); - } - if (listVpcDnsResolutionBindingsOptions.limit() != null) { - builder.query("limit", String.valueOf(listVpcDnsResolutionBindingsOptions.limit())); - } - if (listVpcDnsResolutionBindingsOptions.name() != null) { - builder.query("name", String.valueOf(listVpcDnsResolutionBindingsOptions.name())); - } - if (listVpcDnsResolutionBindingsOptions.vpcCrn() != null) { - builder.query("vpc.crn", String.valueOf(listVpcDnsResolutionBindingsOptions.vpcCrn())); - } - if (listVpcDnsResolutionBindingsOptions.vpcName() != null) { - builder.query("vpc.name", String.valueOf(listVpcDnsResolutionBindingsOptions.vpcName())); - } - if (listVpcDnsResolutionBindingsOptions.accountId() != null) { - builder.query("account.id", String.valueOf(listVpcDnsResolutionBindingsOptions.accountId())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createBareMetalServerOptions.bareMetalServerPrototype()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create a DNS resolution binding. - * - * This request creates a new DNS resolution binding from a DNS resolution binding prototype object. The prototype - * object is structured in the same way as a retrieved DNS resolution binding, and contains the information necessary - * to create the new DNS resolution binding. - * - * For this request to succeed: - * - The VPC specified by the identifier in the URL must not already have a DNS resolution - * binding - * - The VPC specified by the identifier in the URL must have `dns.enable_hub` set to `false` - * - The updated DNS sharing connected topology must not contain more than one endpoint - * gateway with `allow_dns_resolution_binding` set to `true` targeting the same service. + * Create a console access token for a bare metal server. * - * See [About DNS sharing for VPE gateways](/docs/vpc?topic=vpc-vpe-dns-sharing) for more information. + * This request creates a new single-use console access token for a bare metal server. All console configuration is + * provided at token create time, and the token is subsequently used in the `access_token` query parameter for the + * WebSocket request. The access token is only valid for a short period of time, and a maximum of one token is valid + * for a given bare metal server at a time. For this request to succeed, the server must have a `status` of + * `stopped`, `starting`, or `running`. * - * @param createVpcDnsResolutionBindingOptions the {@link CreateVpcDnsResolutionBindingOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPCDNSResolutionBinding} + * @param createBareMetalServerConsoleAccessTokenOptions the {@link CreateBareMetalServerConsoleAccessTokenOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BareMetalServerConsoleAccessToken} */ - public ServiceCall createVpcDnsResolutionBinding(CreateVpcDnsResolutionBindingOptions createVpcDnsResolutionBindingOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createVpcDnsResolutionBindingOptions, - "createVpcDnsResolutionBindingOptions cannot be null"); + public ServiceCall createBareMetalServerConsoleAccessToken(CreateBareMetalServerConsoleAccessTokenOptions createBareMetalServerConsoleAccessTokenOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createBareMetalServerConsoleAccessTokenOptions, + "createBareMetalServerConsoleAccessTokenOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpc_id", createVpcDnsResolutionBindingOptions.vpcId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/dns_resolution_bindings", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createVpcDnsResolutionBinding"); + pathParamsMap.put("bare_metal_server_id", createBareMetalServerConsoleAccessTokenOptions.bareMetalServerId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/console_access_token", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createBareMetalServerConsoleAccessToken"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } @@ -1357,746 +1352,682 @@ public ServiceCall createVpcDnsResolutionBinding(Create builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); final JsonObject contentJson = new JsonObject(); - contentJson.add("vpc", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpcDnsResolutionBindingOptions.vpc())); - if (createVpcDnsResolutionBindingOptions.name() != null) { - contentJson.addProperty("name", createVpcDnsResolutionBindingOptions.name()); + contentJson.addProperty("console_type", createBareMetalServerConsoleAccessTokenOptions.consoleType()); + if (createBareMetalServerConsoleAccessTokenOptions.force() != null) { + contentJson.addProperty("force", createBareMetalServerConsoleAccessTokenOptions.force()); } builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a DNS resolution binding. - * - * This request deletes a DNS resolution binding. This operation cannot be reversed. + * Create a network attachment on a bare metal server. * - * For this request to succeed, the VPC specified by the identifier in the URL must not have - * `dns.resolver.type` set to `delegated`. + * This request creates a new bare metal server network attachment from a bare metal server network attachment + * prototype object. The prototype object is structured in the same way as a retrieved bare metal server network + * attachment, and contains the information necessary to create the new bare metal server network attachment. * - * @param deleteVpcDnsResolutionBindingOptions the {@link DeleteVpcDnsResolutionBindingOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPCDNSResolutionBinding} + * @param createBareMetalServerNetworkAttachmentOptions the {@link CreateBareMetalServerNetworkAttachmentOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BareMetalServerNetworkAttachment} */ - public ServiceCall deleteVpcDnsResolutionBinding(DeleteVpcDnsResolutionBindingOptions deleteVpcDnsResolutionBindingOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVpcDnsResolutionBindingOptions, - "deleteVpcDnsResolutionBindingOptions cannot be null"); + public ServiceCall createBareMetalServerNetworkAttachment(CreateBareMetalServerNetworkAttachmentOptions createBareMetalServerNetworkAttachmentOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createBareMetalServerNetworkAttachmentOptions, + "createBareMetalServerNetworkAttachmentOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpc_id", deleteVpcDnsResolutionBindingOptions.vpcId()); - pathParamsMap.put("id", deleteVpcDnsResolutionBindingOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/dns_resolution_bindings/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVpcDnsResolutionBinding"); + pathParamsMap.put("bare_metal_server_id", createBareMetalServerNetworkAttachmentOptions.bareMetalServerId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_attachments", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createBareMetalServerNetworkAttachment"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createBareMetalServerNetworkAttachmentOptions.bareMetalServerNetworkAttachmentPrototype()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a DNS resolution binding. + * Create a network interface on a bare metal server. * - * This request retrieves a single DNS resolution binding specified by the identifier in the URL. + * This request creates a new bare metal server network interface from a bare metal server network interface prototype + * object. The prototype object is structured in the same way as a retrieved bare metal server network interface, and + * contains the information necessary to create the new bare metal server network interface. Any subnet in the bare + * metal server's VPC may be specified, even if it is already attached to another bare metal server network interface. + * Addresses on the bare metal server network interface must be within the specified subnet's CIDR blocks. * - * @param getVpcDnsResolutionBindingOptions the {@link GetVpcDnsResolutionBindingOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPCDNSResolutionBinding} + * If this bare metal server has network attachments, each network interface is a [read-only + * representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding + * network attachment and its attached virtual network interface, and new network interfaces are not allowed to be + * created. + * + * @param createBareMetalServerNetworkInterfaceOptions the {@link CreateBareMetalServerNetworkInterfaceOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BareMetalServerNetworkInterface} */ - public ServiceCall getVpcDnsResolutionBinding(GetVpcDnsResolutionBindingOptions getVpcDnsResolutionBindingOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getVpcDnsResolutionBindingOptions, - "getVpcDnsResolutionBindingOptions cannot be null"); + public ServiceCall createBareMetalServerNetworkInterface(CreateBareMetalServerNetworkInterfaceOptions createBareMetalServerNetworkInterfaceOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createBareMetalServerNetworkInterfaceOptions, + "createBareMetalServerNetworkInterfaceOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpc_id", getVpcDnsResolutionBindingOptions.vpcId()); - pathParamsMap.put("id", getVpcDnsResolutionBindingOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/dns_resolution_bindings/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpcDnsResolutionBinding"); + pathParamsMap.put("bare_metal_server_id", createBareMetalServerNetworkInterfaceOptions.bareMetalServerId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_interfaces", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createBareMetalServerNetworkInterface"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createBareMetalServerNetworkInterfaceOptions.bareMetalServerNetworkInterfacePrototype()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a DNS resolution binding. + * Delete a bare metal server. * - * This request updates a DNS resolution binding with the information in a provided DNS resolution binding patch. The - * DNS resolution binding patch object is structured in the same way as a retrieved DNS resolution binding and - * contains only the information to be updated. + * This request deletes a bare metal server. This operation cannot be reversed. Any floating IPs associated with the + * bare metal server network interfaces are implicitly disassociated. * - * @param updateVpcDnsResolutionBindingOptions the {@link UpdateVpcDnsResolutionBindingOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPCDNSResolutionBinding} + * @param deleteBareMetalServerOptions the {@link DeleteBareMetalServerOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall updateVpcDnsResolutionBinding(UpdateVpcDnsResolutionBindingOptions updateVpcDnsResolutionBindingOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateVpcDnsResolutionBindingOptions, - "updateVpcDnsResolutionBindingOptions cannot be null"); + public ServiceCall deleteBareMetalServer(DeleteBareMetalServerOptions deleteBareMetalServerOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteBareMetalServerOptions, + "deleteBareMetalServerOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpc_id", updateVpcDnsResolutionBindingOptions.vpcId()); - pathParamsMap.put("id", updateVpcDnsResolutionBindingOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/dns_resolution_bindings/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateVpcDnsResolutionBinding"); + pathParamsMap.put("id", deleteBareMetalServerOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteBareMetalServer"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateVpcDnsResolutionBindingOptions.vpcdnsResolutionBindingPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * List routes in a VPC's default routing table. + * Delete a bare metal server network attachment. * - * This request lists routes in the VPC's default routing table. Each route is zone-specific and directs any packets - * matching its destination CIDR block to a `next_hop` IP address. The most specific route matching a packet's - * destination will be used. If multiple equally-specific routes exist, traffic will be distributed across them. + * This request deletes a bare metal server network attachment. This operation cannot be reversed. Any floating IPs + * associated with the bare metal server network attachment are implicitly disassociated. * - * @param listVpcRoutesOptions the {@link ListVpcRoutesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link RouteCollectionVPCContext} - * @deprecated this method is deprecated and may be removed in a future release + * The bare metal server's primary network attachment cannot be deleted. + * + * @param deleteBareMetalServerNetworkAttachmentOptions the {@link DeleteBareMetalServerNetworkAttachmentOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - @Deprecated - public ServiceCall listVpcRoutes(ListVpcRoutesOptions listVpcRoutesOptions) { - LOGGER.warning("A deprecated operation has been invoked: listVpcRoutes"); - com.ibm.cloud.sdk.core.util.Validator.notNull(listVpcRoutesOptions, - "listVpcRoutesOptions cannot be null"); + public ServiceCall deleteBareMetalServerNetworkAttachment(DeleteBareMetalServerNetworkAttachmentOptions deleteBareMetalServerNetworkAttachmentOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteBareMetalServerNetworkAttachmentOptions, + "deleteBareMetalServerNetworkAttachmentOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpc_id", listVpcRoutesOptions.vpcId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routes", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpcRoutes"); + pathParamsMap.put("bare_metal_server_id", deleteBareMetalServerNetworkAttachmentOptions.bareMetalServerId()); + pathParamsMap.put("id", deleteBareMetalServerNetworkAttachmentOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_attachments/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteBareMetalServerNetworkAttachment"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listVpcRoutesOptions.zoneName() != null) { - builder.query("zone.name", String.valueOf(listVpcRoutesOptions.zoneName())); - } - if (listVpcRoutesOptions.start() != null) { - builder.query("start", String.valueOf(listVpcRoutesOptions.start())); - } - if (listVpcRoutesOptions.limit() != null) { - builder.query("limit", String.valueOf(listVpcRoutesOptions.limit())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Create a route in a VPC's default routing table. + * Delete a bare metal server network interface. * - * This request creates a new route in the VPC's default routing table. The route prototype object is structured in - * the same way as a retrieved route, and contains the information necessary to create the new route. The request will - * fail if the new route will cause a loop. + * This request deletes a bare metal server network interface. This operation cannot be reversed. Any floating IPs + * associated with the bare metal server network interface are implicitly disassociated. The primary bare metal + * server network interface is not allowed to be deleted. * - * @param createVpcRouteOptions the {@link CreateVpcRouteOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Route} - * @deprecated this method is deprecated and may be removed in a future release + * If this bare metal server has network attachments, this network interface is a [read-only + * representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding + * network attachment and its attached virtual network interface, and is not allowed to be deleted. + * + * @param deleteBareMetalServerNetworkInterfaceOptions the {@link DeleteBareMetalServerNetworkInterfaceOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - @Deprecated - public ServiceCall createVpcRoute(CreateVpcRouteOptions createVpcRouteOptions) { - LOGGER.warning("A deprecated operation has been invoked: createVpcRoute"); - com.ibm.cloud.sdk.core.util.Validator.notNull(createVpcRouteOptions, - "createVpcRouteOptions cannot be null"); + public ServiceCall deleteBareMetalServerNetworkInterface(DeleteBareMetalServerNetworkInterfaceOptions deleteBareMetalServerNetworkInterfaceOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteBareMetalServerNetworkInterfaceOptions, + "deleteBareMetalServerNetworkInterfaceOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpc_id", createVpcRouteOptions.vpcId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routes", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createVpcRoute"); + pathParamsMap.put("bare_metal_server_id", deleteBareMetalServerNetworkInterfaceOptions.bareMetalServerId()); + pathParamsMap.put("id", deleteBareMetalServerNetworkInterfaceOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteBareMetalServerNetworkInterface"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("destination", createVpcRouteOptions.destination()); - contentJson.add("zone", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpcRouteOptions.zone())); - if (createVpcRouteOptions.action() != null) { - contentJson.addProperty("action", createVpcRouteOptions.action()); - } - if (createVpcRouteOptions.advertise() != null) { - contentJson.addProperty("advertise", createVpcRouteOptions.advertise()); - } - if (createVpcRouteOptions.name() != null) { - contentJson.addProperty("name", createVpcRouteOptions.name()); - } - if (createVpcRouteOptions.nextHop() != null) { - contentJson.add("next_hop", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpcRouteOptions.nextHop())); - } - if (createVpcRouteOptions.priority() != null) { - contentJson.addProperty("priority", createVpcRouteOptions.priority()); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a VPC route. + * Retrieve a bare metal server. * - * This request deletes a route. This operation cannot be reversed. + * This request retrieves a single bare metal server specified by the identifier in the URL. * - * @param deleteVpcRouteOptions the {@link DeleteVpcRouteOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result - * @deprecated this method is deprecated and may be removed in a future release + * @param getBareMetalServerOptions the {@link GetBareMetalServerOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BareMetalServer} */ - @Deprecated - public ServiceCall deleteVpcRoute(DeleteVpcRouteOptions deleteVpcRouteOptions) { - LOGGER.warning("A deprecated operation has been invoked: deleteVpcRoute"); - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVpcRouteOptions, - "deleteVpcRouteOptions cannot be null"); + public ServiceCall getBareMetalServer(GetBareMetalServerOptions getBareMetalServerOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getBareMetalServerOptions, + "getBareMetalServerOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpc_id", deleteVpcRouteOptions.vpcId()); - pathParamsMap.put("id", deleteVpcRouteOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routes/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVpcRoute"); + pathParamsMap.put("id", getBareMetalServerOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getBareMetalServer"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a VPC route. + * Retrieve a bare metal server disk. * - * This request retrieves a single route specified by the identifier in the URL. + * This request retrieves a single disk specified by the identifier in the URL. * - * @param getVpcRouteOptions the {@link GetVpcRouteOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Route} - * @deprecated this method is deprecated and may be removed in a future release + * @param getBareMetalServerDiskOptions the {@link GetBareMetalServerDiskOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BareMetalServerDisk} */ - @Deprecated - public ServiceCall getVpcRoute(GetVpcRouteOptions getVpcRouteOptions) { - LOGGER.warning("A deprecated operation has been invoked: getVpcRoute"); - com.ibm.cloud.sdk.core.util.Validator.notNull(getVpcRouteOptions, - "getVpcRouteOptions cannot be null"); + public ServiceCall getBareMetalServerDisk(GetBareMetalServerDiskOptions getBareMetalServerDiskOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getBareMetalServerDiskOptions, + "getBareMetalServerDiskOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpc_id", getVpcRouteOptions.vpcId()); - pathParamsMap.put("id", getVpcRouteOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routes/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpcRoute"); + pathParamsMap.put("bare_metal_server_id", getBareMetalServerDiskOptions.bareMetalServerId()); + pathParamsMap.put("id", getBareMetalServerDiskOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/disks/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getBareMetalServerDisk"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a VPC route. + * Retrieve initialization configuration for a bare metal server. * - * This request updates a route with the information in a provided route patch. The route patch object is structured - * in the same way as a retrieved route and contains only the information to be updated. + * This request retrieves configuration used to initialize the bare metal server, such as the image used, SSH keys, + * and any configured usernames and passwords. These can subsequently be changed on the server and therefore may not + * be current. * - * @param updateVpcRouteOptions the {@link UpdateVpcRouteOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Route} - * @deprecated this method is deprecated and may be removed in a future release + * @param getBareMetalServerInitializationOptions the {@link GetBareMetalServerInitializationOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BareMetalServerInitialization} */ - @Deprecated - public ServiceCall updateVpcRoute(UpdateVpcRouteOptions updateVpcRouteOptions) { - LOGGER.warning("A deprecated operation has been invoked: updateVpcRoute"); - com.ibm.cloud.sdk.core.util.Validator.notNull(updateVpcRouteOptions, - "updateVpcRouteOptions cannot be null"); + public ServiceCall getBareMetalServerInitialization(GetBareMetalServerInitializationOptions getBareMetalServerInitializationOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getBareMetalServerInitializationOptions, + "getBareMetalServerInitializationOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpc_id", updateVpcRouteOptions.vpcId()); - pathParamsMap.put("id", updateVpcRouteOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routes/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateVpcRoute"); + pathParamsMap.put("id", getBareMetalServerInitializationOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{id}/initialization", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getBareMetalServerInitialization"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateVpcRouteOptions.routePatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List routing tables for a VPC. + * Retrieve a bare metal server network attachment. * - * This request lists routing tables for a VPC. Each subnet in a VPC is associated with a routing table, which - * controls delivery of packets sent on that subnet according to the action of the most specific matching route in the - * table. If multiple equally-specific routes exist, traffic will be distributed across them. If no routes match, - * delivery will be controlled by the system's built-in routes. + * This request retrieves a single bare metal server network attachment specified by the identifier in the URL. * - * @param listVpcRoutingTablesOptions the {@link ListVpcRoutingTablesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link RoutingTableCollection} + * @param getBareMetalServerNetworkAttachmentOptions the {@link GetBareMetalServerNetworkAttachmentOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BareMetalServerNetworkAttachment} */ - public ServiceCall listVpcRoutingTables(ListVpcRoutingTablesOptions listVpcRoutingTablesOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listVpcRoutingTablesOptions, - "listVpcRoutingTablesOptions cannot be null"); + public ServiceCall getBareMetalServerNetworkAttachment(GetBareMetalServerNetworkAttachmentOptions getBareMetalServerNetworkAttachmentOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getBareMetalServerNetworkAttachmentOptions, + "getBareMetalServerNetworkAttachmentOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpc_id", listVpcRoutingTablesOptions.vpcId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routing_tables", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpcRoutingTables"); + pathParamsMap.put("bare_metal_server_id", getBareMetalServerNetworkAttachmentOptions.bareMetalServerId()); + pathParamsMap.put("id", getBareMetalServerNetworkAttachmentOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_attachments/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getBareMetalServerNetworkAttachment"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listVpcRoutingTablesOptions.start() != null) { - builder.query("start", String.valueOf(listVpcRoutingTablesOptions.start())); - } - if (listVpcRoutingTablesOptions.limit() != null) { - builder.query("limit", String.valueOf(listVpcRoutingTablesOptions.limit())); - } - if (listVpcRoutingTablesOptions.isDefault() != null) { - builder.query("is_default", String.valueOf(listVpcRoutingTablesOptions.isDefault())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create a routing table for a VPC. + * Retrieve a bare metal server network interface. * - * This request creates a routing table from a routing table prototype object. The prototype object is structured in - * the same way as a retrieved routing table, and contains the information necessary to create the new routing table. + * This request retrieves a single bare metal server network interface specified by the identifier in the URL. * - * At present, the routing table's `resource_group` will be inherited from its VPC, but may be specifiable in the - * future. + * If this bare metal server has network attachments, the retrieved network interface is a [read-only + * representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding + * network attachment and its attached virtual network interface. * - * @param createVpcRoutingTableOptions the {@link CreateVpcRoutingTableOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link RoutingTable} + * @param getBareMetalServerNetworkInterfaceOptions the {@link GetBareMetalServerNetworkInterfaceOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BareMetalServerNetworkInterface} */ - public ServiceCall createVpcRoutingTable(CreateVpcRoutingTableOptions createVpcRoutingTableOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createVpcRoutingTableOptions, - "createVpcRoutingTableOptions cannot be null"); + public ServiceCall getBareMetalServerNetworkInterface(GetBareMetalServerNetworkInterfaceOptions getBareMetalServerNetworkInterfaceOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getBareMetalServerNetworkInterfaceOptions, + "getBareMetalServerNetworkInterfaceOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpc_id", createVpcRoutingTableOptions.vpcId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routing_tables", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createVpcRoutingTable"); + pathParamsMap.put("bare_metal_server_id", getBareMetalServerNetworkInterfaceOptions.bareMetalServerId()); + pathParamsMap.put("id", getBareMetalServerNetworkInterfaceOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getBareMetalServerNetworkInterface"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - if (createVpcRoutingTableOptions.acceptRoutesFrom() != null) { - contentJson.add("accept_routes_from", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpcRoutingTableOptions.acceptRoutesFrom())); - } - if (createVpcRoutingTableOptions.advertiseRoutesTo() != null) { - contentJson.add("advertise_routes_to", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpcRoutingTableOptions.advertiseRoutesTo())); - } - if (createVpcRoutingTableOptions.name() != null) { - contentJson.addProperty("name", createVpcRoutingTableOptions.name()); - } - if (createVpcRoutingTableOptions.routeDirectLinkIngress() != null) { - contentJson.addProperty("route_direct_link_ingress", createVpcRoutingTableOptions.routeDirectLinkIngress()); - } - if (createVpcRoutingTableOptions.routeInternetIngress() != null) { - contentJson.addProperty("route_internet_ingress", createVpcRoutingTableOptions.routeInternetIngress()); - } - if (createVpcRoutingTableOptions.routeTransitGatewayIngress() != null) { - contentJson.addProperty("route_transit_gateway_ingress", createVpcRoutingTableOptions.routeTransitGatewayIngress()); - } - if (createVpcRoutingTableOptions.routeVpcZoneIngress() != null) { - contentJson.addProperty("route_vpc_zone_ingress", createVpcRoutingTableOptions.routeVpcZoneIngress()); - } - if (createVpcRoutingTableOptions.routes() != null) { - contentJson.add("routes", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpcRoutingTableOptions.routes())); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a VPC routing table. + * Retrieve associated floating IP. * - * This request deletes a routing table. A routing table cannot be deleted if it is associated with any subnets in - * the VPC. Additionally, a VPC's default routing table cannot be deleted. This operation cannot be reversed. + * This request retrieves a specified floating IP if it is associated with the bare metal server network interface + * specified in the URL. * - * @param deleteVpcRoutingTableOptions the {@link DeleteVpcRoutingTableOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param getBareMetalServerNetworkInterfaceFloatingIpOptions the {@link GetBareMetalServerNetworkInterfaceFloatingIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link FloatingIP} */ - public ServiceCall deleteVpcRoutingTable(DeleteVpcRoutingTableOptions deleteVpcRoutingTableOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVpcRoutingTableOptions, - "deleteVpcRoutingTableOptions cannot be null"); + public ServiceCall getBareMetalServerNetworkInterfaceFloatingIp(GetBareMetalServerNetworkInterfaceFloatingIpOptions getBareMetalServerNetworkInterfaceFloatingIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getBareMetalServerNetworkInterfaceFloatingIpOptions, + "getBareMetalServerNetworkInterfaceFloatingIpOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpc_id", deleteVpcRoutingTableOptions.vpcId()); - pathParamsMap.put("id", deleteVpcRoutingTableOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routing_tables/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVpcRoutingTable"); + pathParamsMap.put("bare_metal_server_id", getBareMetalServerNetworkInterfaceFloatingIpOptions.bareMetalServerId()); + pathParamsMap.put("network_interface_id", getBareMetalServerNetworkInterfaceFloatingIpOptions.networkInterfaceId()); + pathParamsMap.put("id", getBareMetalServerNetworkInterfaceFloatingIpOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/floating_ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getBareMetalServerNetworkInterfaceFloatingIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - if (deleteVpcRoutingTableOptions.ifMatch() != null) { - builder.header("If-Match", deleteVpcRoutingTableOptions.ifMatch()); - } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a VPC routing table. + * Retrieve the primary reserved IP. * - * This request retrieves a single routing table specified by the identifier in the URL. + * This request retrieves the primary reserved IP for a bare metal server network interface. * - * @param getVpcRoutingTableOptions the {@link GetVpcRoutingTableOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link RoutingTable} + * @param getBareMetalServerNetworkInterfaceIpOptions the {@link GetBareMetalServerNetworkInterfaceIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ReservedIP} + * @deprecated this method is deprecated and may be removed in a future release */ - public ServiceCall getVpcRoutingTable(GetVpcRoutingTableOptions getVpcRoutingTableOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getVpcRoutingTableOptions, - "getVpcRoutingTableOptions cannot be null"); + @Deprecated + public ServiceCall getBareMetalServerNetworkInterfaceIp(GetBareMetalServerNetworkInterfaceIpOptions getBareMetalServerNetworkInterfaceIpOptions) { + LOGGER.warning("A deprecated operation has been invoked: getBareMetalServerNetworkInterfaceIp"); + com.ibm.cloud.sdk.core.util.Validator.notNull(getBareMetalServerNetworkInterfaceIpOptions, + "getBareMetalServerNetworkInterfaceIpOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpc_id", getVpcRoutingTableOptions.vpcId()); - pathParamsMap.put("id", getVpcRoutingTableOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routing_tables/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpcRoutingTable"); + pathParamsMap.put("bare_metal_server_id", getBareMetalServerNetworkInterfaceIpOptions.bareMetalServerId()); + pathParamsMap.put("network_interface_id", getBareMetalServerNetworkInterfaceIpOptions.networkInterfaceId()); + pathParamsMap.put("id", getBareMetalServerNetworkInterfaceIpOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getBareMetalServerNetworkInterfaceIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a VPC routing table. + * Retrieve a bare metal server profile. * - * This request updates a routing table with the information in a provided routing table patch. The patch object is - * structured in the same way as a retrieved table and contains only the information to be updated. + * This request retrieves a single bare metal server profile specified by the name in the URL. * - * @param updateVpcRoutingTableOptions the {@link UpdateVpcRoutingTableOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link RoutingTable} + * @param getBareMetalServerProfileOptions the {@link GetBareMetalServerProfileOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BareMetalServerProfile} */ - public ServiceCall updateVpcRoutingTable(UpdateVpcRoutingTableOptions updateVpcRoutingTableOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateVpcRoutingTableOptions, - "updateVpcRoutingTableOptions cannot be null"); + public ServiceCall getBareMetalServerProfile(GetBareMetalServerProfileOptions getBareMetalServerProfileOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getBareMetalServerProfileOptions, + "getBareMetalServerProfileOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpc_id", updateVpcRoutingTableOptions.vpcId()); - pathParamsMap.put("id", updateVpcRoutingTableOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routing_tables/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateVpcRoutingTable"); + pathParamsMap.put("name", getBareMetalServerProfileOptions.name()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_server/profiles/{name}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getBareMetalServerProfile"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); - if (updateVpcRoutingTableOptions.ifMatch() != null) { - builder.header("If-Match", updateVpcRoutingTableOptions.ifMatch()); - } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateVpcRoutingTableOptions.routingTablePatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List routes in a VPC routing table. + * List disks on a bare metal server. * - * This request lists routes in a VPC routing table. If subnets are associated with this routing table, delivery of - * packets sent on a subnet is performed according to the action of the most specific matching route in the table - * (provided the subnet and route are in the same zone). If multiple equally-specific routes exist, the route with the - * highest priority will be used. If two matching routes have the same destination and priority, traffic will be - * distributed between them. If no routes match, delivery will be controlled by the system's built-in routes. + * This request lists disks on a bare metal server. A disk is a block device that is locally attached to the + * physical server. By default, the listed disks are sorted by their `created_at` property values, with the newest + * disk first. * - * @param listVpcRoutingTableRoutesOptions the {@link ListVpcRoutingTableRoutesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link RouteCollection} + * @param listBareMetalServerDisksOptions the {@link ListBareMetalServerDisksOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BareMetalServerDiskCollection} */ - public ServiceCall listVpcRoutingTableRoutes(ListVpcRoutingTableRoutesOptions listVpcRoutingTableRoutesOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listVpcRoutingTableRoutesOptions, - "listVpcRoutingTableRoutesOptions cannot be null"); + public ServiceCall listBareMetalServerDisks(ListBareMetalServerDisksOptions listBareMetalServerDisksOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listBareMetalServerDisksOptions, + "listBareMetalServerDisksOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpc_id", listVpcRoutingTableRoutesOptions.vpcId()); - pathParamsMap.put("routing_table_id", listVpcRoutingTableRoutesOptions.routingTableId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpcRoutingTableRoutes"); + pathParamsMap.put("bare_metal_server_id", listBareMetalServerDisksOptions.bareMetalServerId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/disks", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listBareMetalServerDisks"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listVpcRoutingTableRoutesOptions.start() != null) { - builder.query("start", String.valueOf(listVpcRoutingTableRoutesOptions.start())); - } - if (listVpcRoutingTableRoutesOptions.limit() != null) { - builder.query("limit", String.valueOf(listVpcRoutingTableRoutesOptions.limit())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create a route in a VPC routing table. + * List network attachments on a bare metal server. * - * This request creates a new VPC route from a VPC route prototype object. The prototype object is structured in the - * same way as a retrieved VPC route and contains the information necessary to create the route. + * This request lists network attachments on a bare metal server. A bare metal server network attachment is an + * abstract representation of a network device and attaches a bare metal server to a single subnet. Each network + * interface on a bare metal server can attach to any subnet in the zone, including subnets that are already attached + * to the bare metal server. * - * @param createVpcRoutingTableRouteOptions the {@link CreateVpcRoutingTableRouteOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Route} + * The network attachments will be sorted by their `created_at` property values, with newest network attachments + * first. Network attachments with identical `created_at` property values will in turn be sorted by ascending `name` + * property values. + * + * @param listBareMetalServerNetworkAttachmentsOptions the {@link ListBareMetalServerNetworkAttachmentsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BareMetalServerNetworkAttachmentCollection} */ - public ServiceCall createVpcRoutingTableRoute(CreateVpcRoutingTableRouteOptions createVpcRoutingTableRouteOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createVpcRoutingTableRouteOptions, - "createVpcRoutingTableRouteOptions cannot be null"); + public ServiceCall listBareMetalServerNetworkAttachments(ListBareMetalServerNetworkAttachmentsOptions listBareMetalServerNetworkAttachmentsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listBareMetalServerNetworkAttachmentsOptions, + "listBareMetalServerNetworkAttachmentsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpc_id", createVpcRoutingTableRouteOptions.vpcId()); - pathParamsMap.put("routing_table_id", createVpcRoutingTableRouteOptions.routingTableId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createVpcRoutingTableRoute"); + pathParamsMap.put("bare_metal_server_id", listBareMetalServerNetworkAttachmentsOptions.bareMetalServerId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_attachments", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listBareMetalServerNetworkAttachments"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("destination", createVpcRoutingTableRouteOptions.destination()); - contentJson.add("zone", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpcRoutingTableRouteOptions.zone())); - if (createVpcRoutingTableRouteOptions.action() != null) { - contentJson.addProperty("action", createVpcRoutingTableRouteOptions.action()); - } - if (createVpcRoutingTableRouteOptions.advertise() != null) { - contentJson.addProperty("advertise", createVpcRoutingTableRouteOptions.advertise()); - } - if (createVpcRoutingTableRouteOptions.name() != null) { - contentJson.addProperty("name", createVpcRoutingTableRouteOptions.name()); - } - if (createVpcRoutingTableRouteOptions.nextHop() != null) { - contentJson.add("next_hop", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpcRoutingTableRouteOptions.nextHop())); + if (listBareMetalServerNetworkAttachmentsOptions.start() != null) { + builder.query("start", String.valueOf(listBareMetalServerNetworkAttachmentsOptions.start())); } - if (createVpcRoutingTableRouteOptions.priority() != null) { - contentJson.addProperty("priority", createVpcRoutingTableRouteOptions.priority()); + if (listBareMetalServerNetworkAttachmentsOptions.limit() != null) { + builder.query("limit", String.valueOf(listBareMetalServerNetworkAttachmentsOptions.limit())); } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a VPC routing table route. + * List floating IPs associated with a bare metal server network interface. * - * This request deletes a VPC route. This operation cannot be reversed. Only VPC routes with an `origin` of `user` are - * allowed to be deleted. + * This request lists floating IPs associated with a bare metal server network interface. * - * @param deleteVpcRoutingTableRouteOptions the {@link DeleteVpcRoutingTableRouteOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param listBareMetalServerNetworkInterfaceFloatingIpsOptions the {@link ListBareMetalServerNetworkInterfaceFloatingIpsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link FloatingIPUnpaginatedCollection} */ - public ServiceCall deleteVpcRoutingTableRoute(DeleteVpcRoutingTableRouteOptions deleteVpcRoutingTableRouteOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVpcRoutingTableRouteOptions, - "deleteVpcRoutingTableRouteOptions cannot be null"); + public ServiceCall listBareMetalServerNetworkInterfaceFloatingIps(ListBareMetalServerNetworkInterfaceFloatingIpsOptions listBareMetalServerNetworkInterfaceFloatingIpsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listBareMetalServerNetworkInterfaceFloatingIpsOptions, + "listBareMetalServerNetworkInterfaceFloatingIpsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpc_id", deleteVpcRoutingTableRouteOptions.vpcId()); - pathParamsMap.put("routing_table_id", deleteVpcRoutingTableRouteOptions.routingTableId()); - pathParamsMap.put("id", deleteVpcRoutingTableRouteOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVpcRoutingTableRoute"); + pathParamsMap.put("bare_metal_server_id", listBareMetalServerNetworkInterfaceFloatingIpsOptions.bareMetalServerId()); + pathParamsMap.put("network_interface_id", listBareMetalServerNetworkInterfaceFloatingIpsOptions.networkInterfaceId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/floating_ips", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listBareMetalServerNetworkInterfaceFloatingIps"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a VPC routing table route. + * List the primary reserved IP for a bare metal server network interface. * - * This request retrieves a single VPC route specified by the identifier in the URL path. + * This request lists the primary reserved IP for a bare metal server network interface. * - * @param getVpcRoutingTableRouteOptions the {@link GetVpcRoutingTableRouteOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Route} + * @param listBareMetalServerNetworkInterfaceIpsOptions the {@link ListBareMetalServerNetworkInterfaceIpsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ReservedIPCollectionBareMetalServerNetworkInterfaceContext} + * @deprecated this method is deprecated and may be removed in a future release */ - public ServiceCall getVpcRoutingTableRoute(GetVpcRoutingTableRouteOptions getVpcRoutingTableRouteOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getVpcRoutingTableRouteOptions, - "getVpcRoutingTableRouteOptions cannot be null"); + @Deprecated + public ServiceCall listBareMetalServerNetworkInterfaceIps(ListBareMetalServerNetworkInterfaceIpsOptions listBareMetalServerNetworkInterfaceIpsOptions) { + LOGGER.warning("A deprecated operation has been invoked: listBareMetalServerNetworkInterfaceIps"); + com.ibm.cloud.sdk.core.util.Validator.notNull(listBareMetalServerNetworkInterfaceIpsOptions, + "listBareMetalServerNetworkInterfaceIpsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpc_id", getVpcRoutingTableRouteOptions.vpcId()); - pathParamsMap.put("routing_table_id", getVpcRoutingTableRouteOptions.routingTableId()); - pathParamsMap.put("id", getVpcRoutingTableRouteOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpcRoutingTableRoute"); + pathParamsMap.put("bare_metal_server_id", listBareMetalServerNetworkInterfaceIpsOptions.bareMetalServerId()); + pathParamsMap.put("network_interface_id", listBareMetalServerNetworkInterfaceIpsOptions.networkInterfaceId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/ips", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listBareMetalServerNetworkInterfaceIps"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a VPC routing table route. - * - * This request updates a VPC route with the information provided in a route patch object. The patch object is - * structured in the same way as a retrieved VPC route and needs to contain only the information to be updated. Only - * VPC routes with an `origin` of `user` are allowed to be updated. + * List network interfaces on a bare metal server. * - * @param updateVpcRoutingTableRouteOptions the {@link UpdateVpcRoutingTableRouteOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Route} + * This request lists network interfaces on a bare metal server. A bare metal server network interface is an abstract + * representation of a network device and attaches a bare metal server to a single subnet. Each network interface on a + * bare metal server can attach to any subnet in the zone, including subnets that are already attached to the bare + * metal server. + * + * If this bare metal server has network attachments, each returned network interface is a [read-only + * representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding + * network attachment and its attached virtual network interface. + * + * @param listBareMetalServerNetworkInterfacesOptions the {@link ListBareMetalServerNetworkInterfacesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BareMetalServerNetworkInterfaceCollection} */ - public ServiceCall updateVpcRoutingTableRoute(UpdateVpcRoutingTableRouteOptions updateVpcRoutingTableRouteOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateVpcRoutingTableRouteOptions, - "updateVpcRoutingTableRouteOptions cannot be null"); + public ServiceCall listBareMetalServerNetworkInterfaces(ListBareMetalServerNetworkInterfacesOptions listBareMetalServerNetworkInterfacesOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listBareMetalServerNetworkInterfacesOptions, + "listBareMetalServerNetworkInterfacesOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpc_id", updateVpcRoutingTableRouteOptions.vpcId()); - pathParamsMap.put("routing_table_id", updateVpcRoutingTableRouteOptions.routingTableId()); - pathParamsMap.put("id", updateVpcRoutingTableRouteOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateVpcRoutingTableRoute"); + pathParamsMap.put("bare_metal_server_id", listBareMetalServerNetworkInterfacesOptions.bareMetalServerId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_interfaces", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listBareMetalServerNetworkInterfaces"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateVpcRoutingTableRouteOptions.routePatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listBareMetalServerNetworkInterfacesOptions.start() != null) { + builder.query("start", String.valueOf(listBareMetalServerNetworkInterfacesOptions.start())); + } + if (listBareMetalServerNetworkInterfacesOptions.limit() != null) { + builder.query("limit", String.valueOf(listBareMetalServerNetworkInterfacesOptions.limit())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List subnets. + * List bare metal server profiles. * - * This request lists subnets in the region. Subnets are contiguous ranges of IP addresses specified in CIDR block - * notation. Each subnet is within a particular zone and cannot span multiple zones or regions. + * This request lists [bare metal server + * profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-servers-profile) available in the region. A bare + * metal server profile specifies the performance characteristics and pricing model for a bare metal server. * - * @param listSubnetsOptions the {@link ListSubnetsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link SubnetCollection} + * @param listBareMetalServerProfilesOptions the {@link ListBareMetalServerProfilesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BareMetalServerProfileCollection} */ - public ServiceCall listSubnets(ListSubnetsOptions listSubnetsOptions) { - if (listSubnetsOptions == null) { - listSubnetsOptions = new ListSubnetsOptions.Builder().build(); + public ServiceCall listBareMetalServerProfiles(ListBareMetalServerProfilesOptions listBareMetalServerProfilesOptions) { + if (listBareMetalServerProfilesOptions == null) { + listBareMetalServerProfilesOptions = new ListBareMetalServerProfilesOptions.Builder().build(); } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listSubnets"); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_server/profiles")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listBareMetalServerProfiles"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listSubnetsOptions.start() != null) { - builder.query("start", String.valueOf(listSubnetsOptions.start())); - } - if (listSubnetsOptions.limit() != null) { - builder.query("limit", String.valueOf(listSubnetsOptions.limit())); - } - if (listSubnetsOptions.resourceGroupId() != null) { - builder.query("resource_group.id", String.valueOf(listSubnetsOptions.resourceGroupId())); - } - if (listSubnetsOptions.zoneName() != null) { - builder.query("zone.name", String.valueOf(listSubnetsOptions.zoneName())); - } - if (listSubnetsOptions.vpcId() != null) { - builder.query("vpc.id", String.valueOf(listSubnetsOptions.vpcId())); - } - if (listSubnetsOptions.vpcCrn() != null) { - builder.query("vpc.crn", String.valueOf(listSubnetsOptions.vpcCrn())); - } - if (listSubnetsOptions.vpcName() != null) { - builder.query("vpc.name", String.valueOf(listSubnetsOptions.vpcName())); - } - if (listSubnetsOptions.routingTableId() != null) { - builder.query("routing_table.id", String.valueOf(listSubnetsOptions.routingTableId())); + if (listBareMetalServerProfilesOptions.start() != null) { + builder.query("start", String.valueOf(listBareMetalServerProfilesOptions.start())); } - if (listSubnetsOptions.routingTableName() != null) { - builder.query("routing_table.name", String.valueOf(listSubnetsOptions.routingTableName())); + if (listBareMetalServerProfilesOptions.limit() != null) { + builder.query("limit", String.valueOf(listBareMetalServerProfilesOptions.limit())); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List subnets. + * List bare metal server profiles. * - * This request lists subnets in the region. Subnets are contiguous ranges of IP addresses specified in CIDR block - * notation. Each subnet is within a particular zone and cannot span multiple zones or regions. + * This request lists [bare metal server + * profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-servers-profile) available in the region. A bare + * metal server profile specifies the performance characteristics and pricing model for a bare metal server. * - * @return a {@link ServiceCall} with a result of type {@link SubnetCollection} + * @return a {@link ServiceCall} with a result of type {@link BareMetalServerProfileCollection} */ - public ServiceCall listSubnets() { - return listSubnets(null); + public ServiceCall listBareMetalServerProfiles() { + return listBareMetalServerProfiles(null); } /** - * Create a subnet. + * List bare metal servers. * - * This request creates a new subnet from a subnet prototype object. The prototype object is structured in the same - * way as a retrieved subnet, and contains the information necessary to create the new subnet. For this request to - * succeed, the prototype's CIDR block must not overlap with an existing subnet in the VPC. + * This request lists bare metal servers in the region. * - * @param createSubnetOptions the {@link CreateSubnetOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Subnet} + * @param listBareMetalServersOptions the {@link ListBareMetalServersOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BareMetalServerCollection} */ - public ServiceCall createSubnet(CreateSubnetOptions createSubnetOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createSubnetOptions, - "createSubnetOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createSubnet"); + public ServiceCall listBareMetalServers(ListBareMetalServersOptions listBareMetalServersOptions) { + if (listBareMetalServersOptions == null) { + listBareMetalServersOptions = new ListBareMetalServersOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listBareMetalServers"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createSubnetOptions.subnetPrototype()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listBareMetalServersOptions.start() != null) { + builder.query("start", String.valueOf(listBareMetalServersOptions.start())); + } + if (listBareMetalServersOptions.limit() != null) { + builder.query("limit", String.valueOf(listBareMetalServersOptions.limit())); + } + if (listBareMetalServersOptions.resourceGroupId() != null) { + builder.query("resource_group.id", String.valueOf(listBareMetalServersOptions.resourceGroupId())); + } + if (listBareMetalServersOptions.name() != null) { + builder.query("name", String.valueOf(listBareMetalServersOptions.name())); + } + if (listBareMetalServersOptions.reservationId() != null) { + builder.query("reservation.id", String.valueOf(listBareMetalServersOptions.reservationId())); + } + if (listBareMetalServersOptions.reservationCrn() != null) { + builder.query("reservation.crn", String.valueOf(listBareMetalServersOptions.reservationCrn())); + } + if (listBareMetalServersOptions.reservationName() != null) { + builder.query("reservation.name", String.valueOf(listBareMetalServersOptions.reservationName())); + } + if (listBareMetalServersOptions.vpcId() != null) { + builder.query("vpc.id", String.valueOf(listBareMetalServersOptions.vpcId())); + } + if (listBareMetalServersOptions.vpcCrn() != null) { + builder.query("vpc.crn", String.valueOf(listBareMetalServersOptions.vpcCrn())); + } + if (listBareMetalServersOptions.vpcName() != null) { + builder.query("vpc.name", String.valueOf(listBareMetalServersOptions.vpcName())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a subnet. + * List bare metal servers. * - * This request deletes a subnet. This operation cannot be reversed. For this request to succeed, the subnet must not - * be referenced by any bare metal server network interfaces, instance network interfaces, virtual network interfaces, - * VPN gateways, or load balancers. A delete operation automatically detaches the subnet from any network ACLs, public - * gateways, or endpoint gateways. All flow log collectors with `auto_delete` set to `true` targeting the subnet or - * any resource in the subnet are automatically deleted. + * This request lists bare metal servers in the region. * - * @param deleteSubnetOptions the {@link DeleteSubnetOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BareMetalServerCollection} + */ + public ServiceCall listBareMetalServers() { + return listBareMetalServers(null); + } + + /** + * Disassociate a floating IP from a bare metal server network interface. + * + * This request disassociates the specified floating IP from the specified bare metal server network interface. + * + * @param removeBareMetalServerNetworkInterfaceFloatingIpOptions the {@link RemoveBareMetalServerNetworkInterfaceFloatingIpOptions} containing the options for the call * @return a {@link ServiceCall} with a void result */ - public ServiceCall deleteSubnet(DeleteSubnetOptions deleteSubnetOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteSubnetOptions, - "deleteSubnetOptions cannot be null"); + public ServiceCall removeBareMetalServerNetworkInterfaceFloatingIp(RemoveBareMetalServerNetworkInterfaceFloatingIpOptions removeBareMetalServerNetworkInterfaceFloatingIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(removeBareMetalServerNetworkInterfaceFloatingIpOptions, + "removeBareMetalServerNetworkInterfaceFloatingIpOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteSubnetOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteSubnet"); + pathParamsMap.put("bare_metal_server_id", removeBareMetalServerNetworkInterfaceFloatingIpOptions.bareMetalServerId()); + pathParamsMap.put("network_interface_id", removeBareMetalServerNetworkInterfaceFloatingIpOptions.networkInterfaceId()); + pathParamsMap.put("id", removeBareMetalServerNetworkInterfaceFloatingIpOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/floating_ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "removeBareMetalServerNetworkInterfaceFloatingIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } @@ -2107,310 +2038,332 @@ public ServiceCall deleteSubnet(DeleteSubnetOptions deleteSubnetOptions) { } /** - * Retrieve a subnet. + * Reinitialize a bare metal server. * - * This request retrieves a single subnet specified by the identifier in the URL. + * This request reinitializes a bare metal server with the specified image and SSH keys. The server must be stopped. + * Upon successful reinitiatilization, the bare metal server will be started automatically. * - * @param getSubnetOptions the {@link GetSubnetOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Subnet} + * For this request to succeed, the properties of the server which would result from the reinitialization must adhere + * to the specified image's `allowed_use` property. + * + * @param replaceBareMetalServerInitializationOptions the {@link ReplaceBareMetalServerInitializationOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BareMetalServerInitialization} */ - public ServiceCall getSubnet(GetSubnetOptions getSubnetOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getSubnetOptions, - "getSubnetOptions cannot be null"); + public ServiceCall replaceBareMetalServerInitialization(ReplaceBareMetalServerInitializationOptions replaceBareMetalServerInitializationOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(replaceBareMetalServerInitializationOptions, + "replaceBareMetalServerInitializationOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getSubnetOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getSubnet"); + pathParamsMap.put("id", replaceBareMetalServerInitializationOptions.id()); + RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{id}/initialization", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "replaceBareMetalServerInitialization"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + final JsonObject contentJson = new JsonObject(); + contentJson.add("image", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(replaceBareMetalServerInitializationOptions.image())); + contentJson.add("keys", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(replaceBareMetalServerInitializationOptions.keys())); + if (replaceBareMetalServerInitializationOptions.defaultTrustedProfile() != null) { + contentJson.add("default_trusted_profile", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(replaceBareMetalServerInitializationOptions.defaultTrustedProfile())); + } + if (replaceBareMetalServerInitializationOptions.userData() != null) { + contentJson.addProperty("user_data", replaceBareMetalServerInitializationOptions.userData()); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a subnet. + * Restart a bare metal server. * - * This request updates a subnet with the information in a provided subnet patch. The subnet patch object is - * structured in the same way as a retrieved subnet and contains only the information to be updated. + * This request immediately restarts a bare metal server. For this request to succeed, the server must have a + * `status` of `running`. * - * @param updateSubnetOptions the {@link UpdateSubnetOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Subnet} + * @param restartBareMetalServerOptions the {@link RestartBareMetalServerOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall updateSubnet(UpdateSubnetOptions updateSubnetOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateSubnetOptions, - "updateSubnetOptions cannot be null"); + public ServiceCall restartBareMetalServer(RestartBareMetalServerOptions restartBareMetalServerOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(restartBareMetalServerOptions, + "restartBareMetalServerOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateSubnetOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateSubnet"); + pathParamsMap.put("id", restartBareMetalServerOptions.id()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{id}/restart", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "restartBareMetalServer"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateSubnetOptions.subnetPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a subnet's attached network ACL. + * Start a bare metal server. * - * This request retrieves the network ACL attached to the subnet specified by the identifier in the URL. + * This request starts a bare metal server. It will run immediately provided the server is stopped. * - * @param getSubnetNetworkAclOptions the {@link GetSubnetNetworkAclOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link NetworkACL} + * @param startBareMetalServerOptions the {@link StartBareMetalServerOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall getSubnetNetworkAcl(GetSubnetNetworkAclOptions getSubnetNetworkAclOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getSubnetNetworkAclOptions, - "getSubnetNetworkAclOptions cannot be null"); + public ServiceCall startBareMetalServer(StartBareMetalServerOptions startBareMetalServerOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(startBareMetalServerOptions, + "startBareMetalServerOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getSubnetNetworkAclOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{id}/network_acl", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getSubnetNetworkAcl"); + pathParamsMap.put("id", startBareMetalServerOptions.id()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{id}/start", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "startBareMetalServer"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Replace the network ACL for a subnet. + * Stop a bare metal server. * - * This request replaces the existing network ACL for a subnet with the network ACL specified in the request body. + * This request stops a bare metal server. It will run immediately provided the server is running. Note: A soft stop + * may not complete as it relies on the operating system to perform the operation. * - * @param replaceSubnetNetworkAclOptions the {@link ReplaceSubnetNetworkAclOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link NetworkACL} + * @param stopBareMetalServerOptions the {@link StopBareMetalServerOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall replaceSubnetNetworkAcl(ReplaceSubnetNetworkAclOptions replaceSubnetNetworkAclOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(replaceSubnetNetworkAclOptions, - "replaceSubnetNetworkAclOptions cannot be null"); + public ServiceCall stopBareMetalServer(StopBareMetalServerOptions stopBareMetalServerOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(stopBareMetalServerOptions, + "stopBareMetalServerOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", replaceSubnetNetworkAclOptions.id()); - RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{id}/network_acl", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "replaceSubnetNetworkAcl"); + pathParamsMap.put("id", stopBareMetalServerOptions.id()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{id}/stop", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "stopBareMetalServer"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(replaceSubnetNetworkAclOptions.networkAclIdentity()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + final JsonObject contentJson = new JsonObject(); + contentJson.addProperty("type", stopBareMetalServerOptions.type()); + builder.bodyJson(contentJson); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Detach a public gateway from a subnet. + * Update a bare metal server. * - * This request detaches the public gateway from the subnet specified by the subnet identifier in the URL. + * This request updates a bare metal server with the information in a provided patch. The bare metal server patch + * object is structured in the same way as a retrieved bare metal server and contains only the information to be + * updated. * - * @param unsetSubnetPublicGatewayOptions the {@link UnsetSubnetPublicGatewayOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * For this request to succeed, the properties in the request must adhere to the `allowed_use` property of the disk + * referenced in the server's `boot_target`. + * + * @param updateBareMetalServerOptions the {@link UpdateBareMetalServerOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BareMetalServer} */ - public ServiceCall unsetSubnetPublicGateway(UnsetSubnetPublicGatewayOptions unsetSubnetPublicGatewayOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(unsetSubnetPublicGatewayOptions, - "unsetSubnetPublicGatewayOptions cannot be null"); + public ServiceCall updateBareMetalServer(UpdateBareMetalServerOptions updateBareMetalServerOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateBareMetalServerOptions, + "updateBareMetalServerOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", unsetSubnetPublicGatewayOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{id}/public_gateway", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "unsetSubnetPublicGateway"); + pathParamsMap.put("id", updateBareMetalServerOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateBareMetalServer"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateBareMetalServerOptions.bareMetalServerPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a subnet's attached public gateway. + * Update a bare metal server disk. * - * This request retrieves the public gateway attached to the subnet specified by the identifier in the URL. + * This request updates the bare metal server disk with the information in a provided patch. * - * @param getSubnetPublicGatewayOptions the {@link GetSubnetPublicGatewayOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link PublicGateway} + * @param updateBareMetalServerDiskOptions the {@link UpdateBareMetalServerDiskOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BareMetalServerDisk} */ - public ServiceCall getSubnetPublicGateway(GetSubnetPublicGatewayOptions getSubnetPublicGatewayOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getSubnetPublicGatewayOptions, - "getSubnetPublicGatewayOptions cannot be null"); + public ServiceCall updateBareMetalServerDisk(UpdateBareMetalServerDiskOptions updateBareMetalServerDiskOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateBareMetalServerDiskOptions, + "updateBareMetalServerDiskOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getSubnetPublicGatewayOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{id}/public_gateway", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getSubnetPublicGateway"); + pathParamsMap.put("bare_metal_server_id", updateBareMetalServerDiskOptions.bareMetalServerId()); + pathParamsMap.put("id", updateBareMetalServerDiskOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/disks/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateBareMetalServerDisk"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateBareMetalServerDiskOptions.bareMetalServerDiskPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Attach a public gateway to a subnet. + * Update a bare metal server network attachment. * - * This request attaches the public gateway, specified in the request body, to the subnet specified by the subnet - * identifier in the URL. The public gateway must have the same VPC and zone as the subnet. + * This request updates a bare metal server network attachment with the information provided in a bare metal server + * network attachment patch object. The bare metal server network attachment patch object is structured in the same + * way as a retrieved bare metal server network attachment and contains only the information to be updated. * - * @param setSubnetPublicGatewayOptions the {@link SetSubnetPublicGatewayOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link PublicGateway} + * @param updateBareMetalServerNetworkAttachmentOptions the {@link UpdateBareMetalServerNetworkAttachmentOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BareMetalServerNetworkAttachment} */ - public ServiceCall setSubnetPublicGateway(SetSubnetPublicGatewayOptions setSubnetPublicGatewayOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(setSubnetPublicGatewayOptions, - "setSubnetPublicGatewayOptions cannot be null"); + public ServiceCall updateBareMetalServerNetworkAttachment(UpdateBareMetalServerNetworkAttachmentOptions updateBareMetalServerNetworkAttachmentOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateBareMetalServerNetworkAttachmentOptions, + "updateBareMetalServerNetworkAttachmentOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", setSubnetPublicGatewayOptions.id()); - RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{id}/public_gateway", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "setSubnetPublicGateway"); + pathParamsMap.put("bare_metal_server_id", updateBareMetalServerNetworkAttachmentOptions.bareMetalServerId()); + pathParamsMap.put("id", updateBareMetalServerNetworkAttachmentOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_attachments/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateBareMetalServerNetworkAttachment"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(setSubnetPublicGatewayOptions.publicGatewayIdentity()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateBareMetalServerNetworkAttachmentOptions.bareMetalServerNetworkAttachmentPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a subnet's attached routing table. + * Update a bare metal server network interface. * - * This request retrieves the routing table attached to the subnet specified by the identifier in the URL. + * This request updates a bare metal server network interface with the information provided in a bare metal server + * network interface patch object. The bare metal server network interface patch object is structured in the same way + * as a retrieved bare metal server network interface and needs to contain only the information to be updated. * - * @param getSubnetRoutingTableOptions the {@link GetSubnetRoutingTableOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link RoutingTable} + * If this bare metal server has network attachments, this network interface is a [read-only + * representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding + * network attachment and its attached virtual network interface, and is not allowed to be updated. + * + * @param updateBareMetalServerNetworkInterfaceOptions the {@link UpdateBareMetalServerNetworkInterfaceOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link BareMetalServerNetworkInterface} */ - public ServiceCall getSubnetRoutingTable(GetSubnetRoutingTableOptions getSubnetRoutingTableOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getSubnetRoutingTableOptions, - "getSubnetRoutingTableOptions cannot be null"); + public ServiceCall updateBareMetalServerNetworkInterface(UpdateBareMetalServerNetworkInterfaceOptions updateBareMetalServerNetworkInterfaceOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateBareMetalServerNetworkInterfaceOptions, + "updateBareMetalServerNetworkInterfaceOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getSubnetRoutingTableOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{id}/routing_table", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getSubnetRoutingTable"); + pathParamsMap.put("bare_metal_server_id", updateBareMetalServerNetworkInterfaceOptions.bareMetalServerId()); + pathParamsMap.put("id", updateBareMetalServerNetworkInterfaceOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateBareMetalServerNetworkInterface"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateBareMetalServerNetworkInterfaceOptions.bareMetalServerNetworkInterfacePatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Replace the routing table for a subnet. - * - * This request replaces the existing routing table for a subnet with the routing table specified in the request body. + * Update firmware for a bare metal server. * - * For this request to succeed, the routing table `route_direct_link_ingress`, - * `route_internet_ingress`, `route_transit_gateway_ingress`, and `route_vpc_zone_ingress` properties must be `false`. + * This request updates a bare metal server to the latest available firmware. The server must be stopped. * - * @param replaceSubnetRoutingTableOptions the {@link ReplaceSubnetRoutingTableOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link RoutingTable} + * @param updateFirmwareForBareMetalServerOptions the {@link UpdateFirmwareForBareMetalServerOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall replaceSubnetRoutingTable(ReplaceSubnetRoutingTableOptions replaceSubnetRoutingTableOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(replaceSubnetRoutingTableOptions, - "replaceSubnetRoutingTableOptions cannot be null"); + public ServiceCall updateFirmwareForBareMetalServer(UpdateFirmwareForBareMetalServerOptions updateFirmwareForBareMetalServerOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateFirmwareForBareMetalServerOptions, + "updateFirmwareForBareMetalServerOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", replaceSubnetRoutingTableOptions.id()); - RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{id}/routing_table", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "replaceSubnetRoutingTable"); + pathParamsMap.put("id", updateFirmwareForBareMetalServerOptions.id()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{id}/firmware/update", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateFirmwareForBareMetalServer"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(replaceSubnetRoutingTableOptions.routingTableIdentity()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + final JsonObject contentJson = new JsonObject(); + if (updateFirmwareForBareMetalServerOptions.autoStart() != null) { + contentJson.addProperty("auto_start", updateFirmwareForBareMetalServerOptions.autoStart()); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * List reserved IPs in a subnet. + * Create a cluster network. * - * This request lists reserved IPs in a subnet. A reserved IP resource will exist for every address in the subnet - * which is not available for use. + * This request creates a new cluster network from a cluster network prototype object. The prototype object is + * structured in the same way as a retrieved cluster network, and contains the information necessary to create the new + * cluster network. * - * @param listSubnetReservedIpsOptions the {@link ListSubnetReservedIpsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ReservedIPCollection} + * @param createClusterNetworkOptions the {@link CreateClusterNetworkOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ClusterNetwork} */ - public ServiceCall listSubnetReservedIps(ListSubnetReservedIpsOptions listSubnetReservedIpsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listSubnetReservedIpsOptions, - "listSubnetReservedIpsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("subnet_id", listSubnetReservedIpsOptions.subnetId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{subnet_id}/reserved_ips", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listSubnetReservedIps"); + public ServiceCall createClusterNetwork(CreateClusterNetworkOptions createClusterNetworkOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createClusterNetworkOptions, + "createClusterNetworkOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createClusterNetwork"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listSubnetReservedIpsOptions.start() != null) { - builder.query("start", String.valueOf(listSubnetReservedIpsOptions.start())); - } - if (listSubnetReservedIpsOptions.limit() != null) { - builder.query("limit", String.valueOf(listSubnetReservedIpsOptions.limit())); - } - if (listSubnetReservedIpsOptions.sort() != null) { - builder.query("sort", String.valueOf(listSubnetReservedIpsOptions.sort())); - } - if (listSubnetReservedIpsOptions.targetId() != null) { - builder.query("target.id", String.valueOf(listSubnetReservedIpsOptions.targetId())); - } - if (listSubnetReservedIpsOptions.targetCrn() != null) { - builder.query("target.crn", String.valueOf(listSubnetReservedIpsOptions.targetCrn())); + final JsonObject contentJson = new JsonObject(); + contentJson.add("profile", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createClusterNetworkOptions.profile())); + contentJson.add("vpc", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createClusterNetworkOptions.vpc())); + contentJson.add("zone", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createClusterNetworkOptions.zone())); + if (createClusterNetworkOptions.name() != null) { + contentJson.addProperty("name", createClusterNetworkOptions.name()); } - if (listSubnetReservedIpsOptions.targetName() != null) { - builder.query("target.name", String.valueOf(listSubnetReservedIpsOptions.targetName())); + if (createClusterNetworkOptions.resourceGroup() != null) { + contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createClusterNetworkOptions.resourceGroup())); } - if (listSubnetReservedIpsOptions.targetResourceType() != null) { - builder.query("target.resource_type", String.valueOf(listSubnetReservedIpsOptions.targetResourceType())); + if (createClusterNetworkOptions.subnetPrefixes() != null) { + contentJson.add("subnet_prefixes", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createClusterNetworkOptions.subnetPrefixes())); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); - return createServiceCall(builder.build(), responseConverter); - } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + return createServiceCall(builder.build(), responseConverter); + } /** - * Reserve an IP in a subnet. + * Create a cluster network interface. * - * This request reserves an IP address in a subnet. If the provided prototype object includes an `address`, the - * address must not already be reserved. + * This request creates a new cluster network interface from a cluster network interface prototype object. The + * prototype object is structured in the same way as a retrieved cluster network interface, and contains the + * information necessary to create the new cluster network interface. * - * @param createSubnetReservedIpOptions the {@link CreateSubnetReservedIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ReservedIP} + * @param createClusterNetworkInterfaceOptions the {@link CreateClusterNetworkInterfaceOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkInterface} */ - public ServiceCall createSubnetReservedIp(CreateSubnetReservedIpOptions createSubnetReservedIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createSubnetReservedIpOptions, - "createSubnetReservedIpOptions cannot be null"); + public ServiceCall createClusterNetworkInterface(CreateClusterNetworkInterfaceOptions createClusterNetworkInterfaceOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createClusterNetworkInterfaceOptions, + "createClusterNetworkInterfaceOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("subnet_id", createSubnetReservedIpOptions.subnetId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{subnet_id}/reserved_ips", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createSubnetReservedIp"); + pathParamsMap.put("cluster_network_id", createClusterNetworkInterfaceOptions.clusterNetworkId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/interfaces", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createClusterNetworkInterface"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } @@ -2418,1261 +2371,1235 @@ public ServiceCall createSubnetReservedIp(CreateSubnetReservedIpOpti builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); final JsonObject contentJson = new JsonObject(); - if (createSubnetReservedIpOptions.address() != null) { - contentJson.addProperty("address", createSubnetReservedIpOptions.address()); - } - if (createSubnetReservedIpOptions.autoDelete() != null) { - contentJson.addProperty("auto_delete", createSubnetReservedIpOptions.autoDelete()); + if (createClusterNetworkInterfaceOptions.name() != null) { + contentJson.addProperty("name", createClusterNetworkInterfaceOptions.name()); } - if (createSubnetReservedIpOptions.name() != null) { - contentJson.addProperty("name", createSubnetReservedIpOptions.name()); + if (createClusterNetworkInterfaceOptions.primaryIp() != null) { + contentJson.add("primary_ip", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createClusterNetworkInterfaceOptions.primaryIp())); } - if (createSubnetReservedIpOptions.target() != null) { - contentJson.add("target", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createSubnetReservedIpOptions.target())); + if (createClusterNetworkInterfaceOptions.subnet() != null) { + contentJson.add("subnet", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createClusterNetworkInterfaceOptions.subnet())); } builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a reserved IP. - * - * This request releases a reserved IP. This operation cannot be reversed. + * Create a cluster network subnet. * - * For this request to succeed, the reserved IP must not be required by another resource, such as a bare metal server - * network interface, instance network interface or virtual network interface for which it is the primary IP. A - * provider-owned reserved IP is not allowed to be deleted. + * This request creates a new cluster network subnet from a cluster network subnet prototype object. The prototype + * object is structured in the same way as a retrieved cluster network subnet, and contains the information necessary + * to create the new cluster network subnet. * - * @param deleteSubnetReservedIpOptions the {@link DeleteSubnetReservedIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param createClusterNetworkSubnetOptions the {@link CreateClusterNetworkSubnetOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkSubnet} */ - public ServiceCall deleteSubnetReservedIp(DeleteSubnetReservedIpOptions deleteSubnetReservedIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteSubnetReservedIpOptions, - "deleteSubnetReservedIpOptions cannot be null"); + public ServiceCall createClusterNetworkSubnet(CreateClusterNetworkSubnetOptions createClusterNetworkSubnetOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createClusterNetworkSubnetOptions, + "createClusterNetworkSubnetOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("subnet_id", deleteSubnetReservedIpOptions.subnetId()); - pathParamsMap.put("id", deleteSubnetReservedIpOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{subnet_id}/reserved_ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteSubnetReservedIp"); + pathParamsMap.put("cluster_network_id", createClusterNetworkSubnetOptions.clusterNetworkId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/subnets", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createClusterNetworkSubnet"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createClusterNetworkSubnetOptions.clusterNetworkSubnetPrototype()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a reserved IP. + * Create a cluster network subnet reserved IP. * - * This request retrieves a single reserved IP specified by the identifier in the URL. + * This request creates a new cluster network subnet reserved IP from a cluster network subnet reserved IP prototype + * object. The prototype object is structured in the same way as a retrieved cluster network subnet reserved IP, and + * contains the information necessary to create the new cluster network subnet reserved IP. * - * @param getSubnetReservedIpOptions the {@link GetSubnetReservedIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ReservedIP} + * @param createClusterNetworkSubnetReservedIpOptions the {@link CreateClusterNetworkSubnetReservedIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkSubnetReservedIP} */ - public ServiceCall getSubnetReservedIp(GetSubnetReservedIpOptions getSubnetReservedIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getSubnetReservedIpOptions, - "getSubnetReservedIpOptions cannot be null"); + public ServiceCall createClusterNetworkSubnetReservedIp(CreateClusterNetworkSubnetReservedIpOptions createClusterNetworkSubnetReservedIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createClusterNetworkSubnetReservedIpOptions, + "createClusterNetworkSubnetReservedIpOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("subnet_id", getSubnetReservedIpOptions.subnetId()); - pathParamsMap.put("id", getSubnetReservedIpOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{subnet_id}/reserved_ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getSubnetReservedIp"); + pathParamsMap.put("cluster_network_id", createClusterNetworkSubnetReservedIpOptions.clusterNetworkId()); + pathParamsMap.put("cluster_network_subnet_id", createClusterNetworkSubnetReservedIpOptions.clusterNetworkSubnetId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/subnets/{cluster_network_subnet_id}/reserved_ips", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createClusterNetworkSubnetReservedIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + final JsonObject contentJson = new JsonObject(); + if (createClusterNetworkSubnetReservedIpOptions.address() != null) { + contentJson.addProperty("address", createClusterNetworkSubnetReservedIpOptions.address()); + } + if (createClusterNetworkSubnetReservedIpOptions.name() != null) { + contentJson.addProperty("name", createClusterNetworkSubnetReservedIpOptions.name()); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a reserved IP. + * Delete a cluster network. * - * This request updates a reserved IP with the information in a provided reserved IP patch. The reserved IP patch - * object is structured in the same way as a retrieved reserved IP and contains only the information to be updated. + * This request deletes a cluster network. This operation cannot be reversed. * - * A provider-owned reserved IP is not allowed to be updated. + * For this request to succeed, virtual server instances must not reside in this cluster network. * - * @param updateSubnetReservedIpOptions the {@link UpdateSubnetReservedIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ReservedIP} + * @param deleteClusterNetworkOptions the {@link DeleteClusterNetworkOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ClusterNetwork} */ - public ServiceCall updateSubnetReservedIp(UpdateSubnetReservedIpOptions updateSubnetReservedIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateSubnetReservedIpOptions, - "updateSubnetReservedIpOptions cannot be null"); + public ServiceCall deleteClusterNetwork(DeleteClusterNetworkOptions deleteClusterNetworkOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteClusterNetworkOptions, + "deleteClusterNetworkOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("subnet_id", updateSubnetReservedIpOptions.subnetId()); - pathParamsMap.put("id", updateSubnetReservedIpOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{subnet_id}/reserved_ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateSubnetReservedIp"); + pathParamsMap.put("id", deleteClusterNetworkOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteClusterNetwork"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); + if (deleteClusterNetworkOptions.ifMatch() != null) { + builder.header("If-Match", deleteClusterNetworkOptions.ifMatch()); + } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateSubnetReservedIpOptions.reservedIpPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List images. + * Delete a cluster network interface. * - * This request lists images available in the region. An image provides source data for a volume. Images are either - * system-provided, or created from another source, such as importing from Cloud Object Storage. + * This request deletes a cluster network interface. This operation cannot be reversed. For this request to succeed, + * the cluster network interface must not be required by another resource, such as a cluster network attachment for a + * virtual server instance. * - * @param listImagesOptions the {@link ListImagesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ImageCollection} + * @param deleteClusterNetworkInterfaceOptions the {@link DeleteClusterNetworkInterfaceOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkInterface} */ - public ServiceCall listImages(ListImagesOptions listImagesOptions) { - if (listImagesOptions == null) { - listImagesOptions = new ListImagesOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listImages"); + public ServiceCall deleteClusterNetworkInterface(DeleteClusterNetworkInterfaceOptions deleteClusterNetworkInterfaceOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteClusterNetworkInterfaceOptions, + "deleteClusterNetworkInterfaceOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("cluster_network_id", deleteClusterNetworkInterfaceOptions.clusterNetworkId()); + pathParamsMap.put("id", deleteClusterNetworkInterfaceOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/interfaces/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteClusterNetworkInterface"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); + if (deleteClusterNetworkInterfaceOptions.ifMatch() != null) { + builder.header("If-Match", deleteClusterNetworkInterfaceOptions.ifMatch()); + } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listImagesOptions.start() != null) { - builder.query("start", String.valueOf(listImagesOptions.start())); - } - if (listImagesOptions.limit() != null) { - builder.query("limit", String.valueOf(listImagesOptions.limit())); - } - if (listImagesOptions.resourceGroupId() != null) { - builder.query("resource_group.id", String.valueOf(listImagesOptions.resourceGroupId())); - } - if (listImagesOptions.name() != null) { - builder.query("name", String.valueOf(listImagesOptions.name())); - } - if (listImagesOptions.status() != null) { - builder.query("status", RequestUtils.join(listImagesOptions.status(), ",")); - } - if (listImagesOptions.visibility() != null) { - builder.query("visibility", String.valueOf(listImagesOptions.visibility())); - } - if (listImagesOptions.userDataFormat() != null) { - builder.query("user_data_format", RequestUtils.join(listImagesOptions.userDataFormat(), ",")); - } - if (listImagesOptions.remoteAccountId() != null) { - builder.query("remote.account.id", String.valueOf(listImagesOptions.remoteAccountId())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List images. - * - * This request lists images available in the region. An image provides source data for a volume. Images are either - * system-provided, or created from another source, such as importing from Cloud Object Storage. + * Delete a cluster network subnet. * - * @return a {@link ServiceCall} with a result of type {@link ImageCollection} - */ - public ServiceCall listImages() { - return listImages(null); - } - - /** - * Create an image. + * This request deletes a cluster network subnet. This operation cannot be reversed. * - * This request creates a new image from an image prototype object. The prototype object is structured in the same way - * as a retrieved image, and contains the information necessary to create the new image. If an image is being - * imported, a URL to the image file on object storage must be specified. If an image is being created from an - * existing volume, that volume must be specified. + * For this request to succeed, this cluster subnet must not be attached to a cluster network interface. * - * @param createImageOptions the {@link CreateImageOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Image} + * @param deleteClusterNetworkSubnetOptions the {@link DeleteClusterNetworkSubnetOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkSubnet} */ - public ServiceCall createImage(CreateImageOptions createImageOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createImageOptions, - "createImageOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createImage"); + public ServiceCall deleteClusterNetworkSubnet(DeleteClusterNetworkSubnetOptions deleteClusterNetworkSubnetOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteClusterNetworkSubnetOptions, + "deleteClusterNetworkSubnetOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("cluster_network_id", deleteClusterNetworkSubnetOptions.clusterNetworkId()); + pathParamsMap.put("id", deleteClusterNetworkSubnetOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/subnets/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteClusterNetworkSubnet"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); + if (deleteClusterNetworkSubnetOptions.ifMatch() != null) { + builder.header("If-Match", deleteClusterNetworkSubnetOptions.ifMatch()); + } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createImageOptions.imagePrototype()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete an image. + * Delete a cluster network subnet reserved IP. * - * This request deletes an image. Any active image export jobs will be completed first. This operation cannot be - * reversed. An image with `remote.account` set is not allowed to be deleted. Additionally, an image cannot be deleted - * if it: - * - has a `status` of `deleting` - * - has a `status` of `pending` with a `status_reasons` code of `image_request_in_progress` - * - has `catalog_offering.managed` set to `true`. + * This request deletes a cluster network subnet reserved IP. This operation cannot be reversed. * - * @param deleteImageOptions the {@link DeleteImageOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * For this request to succeed, the reserved IP must be unbound. A provider-owned reserved IP is not allowed to be + * deleted. + * + * @param deleteClusterNetworkSubnetReservedIpOptions the {@link DeleteClusterNetworkSubnetReservedIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkSubnetReservedIP} */ - public ServiceCall deleteImage(DeleteImageOptions deleteImageOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteImageOptions, - "deleteImageOptions cannot be null"); + public ServiceCall deleteClusterNetworkSubnetReservedIp(DeleteClusterNetworkSubnetReservedIpOptions deleteClusterNetworkSubnetReservedIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteClusterNetworkSubnetReservedIpOptions, + "deleteClusterNetworkSubnetReservedIpOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteImageOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteImage"); + pathParamsMap.put("cluster_network_id", deleteClusterNetworkSubnetReservedIpOptions.clusterNetworkId()); + pathParamsMap.put("cluster_network_subnet_id", deleteClusterNetworkSubnetReservedIpOptions.clusterNetworkSubnetId()); + pathParamsMap.put("id", deleteClusterNetworkSubnetReservedIpOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/subnets/{cluster_network_subnet_id}/reserved_ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteClusterNetworkSubnetReservedIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); + if (deleteClusterNetworkSubnetReservedIpOptions.ifMatch() != null) { + builder.header("If-Match", deleteClusterNetworkSubnetReservedIpOptions.ifMatch()); + } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve an image. + * Retrieve a cluster network. * - * This request retrieves a single image specified by the identifier in the URL. + * This request retrieves a single cluster network specified by the identifier in the URL. * - * @param getImageOptions the {@link GetImageOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Image} + * @param getClusterNetworkOptions the {@link GetClusterNetworkOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ClusterNetwork} */ - public ServiceCall getImage(GetImageOptions getImageOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getImageOptions, - "getImageOptions cannot be null"); + public ServiceCall getClusterNetwork(GetClusterNetworkOptions getClusterNetworkOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getClusterNetworkOptions, + "getClusterNetworkOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getImageOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getImage"); + pathParamsMap.put("id", getClusterNetworkOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getClusterNetwork"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update an image. + * Retrieve a cluster network interface. * - * This request updates an image with the information in a provided image patch. The image patch object is structured - * in the same way as a retrieved image and contains only the information to be updated. An image with - * `remote.account` set is not allowed to be updated. An image with a `status` of `deleting` cannot be updated. + * This request retrieves a single cluster network interface specified by the identifier in the URL. * - * @param updateImageOptions the {@link UpdateImageOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Image} + * @param getClusterNetworkInterfaceOptions the {@link GetClusterNetworkInterfaceOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkInterface} */ - public ServiceCall updateImage(UpdateImageOptions updateImageOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateImageOptions, - "updateImageOptions cannot be null"); + public ServiceCall getClusterNetworkInterface(GetClusterNetworkInterfaceOptions getClusterNetworkInterfaceOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getClusterNetworkInterfaceOptions, + "getClusterNetworkInterfaceOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateImageOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateImage"); + pathParamsMap.put("cluster_network_id", getClusterNetworkInterfaceOptions.clusterNetworkId()); + pathParamsMap.put("id", getClusterNetworkInterfaceOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/interfaces/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getClusterNetworkInterface"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateImageOptions.imagePatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Deprecate an image. - * - * This request deprecates an image, resulting in its `status` becoming `deprecated` and - * `deprecation_at` being set to the current date and time. - * - * The image must: - * - have a `status` of `available` - * - have `catalog_offering.managed` set to `false` - * - not have `deprecation_at` set + * Retrieve a cluster network profile. * - * An image with `remote.account` set is not allowed to be deprecated. + * This request retrieves a single cluster network profile specified by the name in the URL. * - * @param deprecateImageOptions the {@link DeprecateImageOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param getClusterNetworkProfileOptions the {@link GetClusterNetworkProfileOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkProfile} */ - public ServiceCall deprecateImage(DeprecateImageOptions deprecateImageOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deprecateImageOptions, - "deprecateImageOptions cannot be null"); + public ServiceCall getClusterNetworkProfile(GetClusterNetworkProfileOptions getClusterNetworkProfileOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getClusterNetworkProfileOptions, + "getClusterNetworkProfileOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deprecateImageOptions.id()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images/{id}/deprecate", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deprecateImage"); + pathParamsMap.put("name", getClusterNetworkProfileOptions.name()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_network/profiles/{name}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getClusterNetworkProfile"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Obsolete an image. - * - * This request obsoletes an image, resulting in its `status` becoming `obsolete` and - * `obsolescence_at` being set to the current date and time. - * - * The image must: - * - have a `status` of `available` or `deprecated` - * - have `catalog_offering.managed` set to `false` - * - not have `deprecation_at` set in the future - * - not have `obsolescence_at` set + * Retrieve a cluster network subnet. * - * An image with `remote.account` set is not allowed to be obsoleted. + * This request retrieves a single cluster network subnet specified by the identifier in the URL. * - * @param obsoleteImageOptions the {@link ObsoleteImageOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param getClusterNetworkSubnetOptions the {@link GetClusterNetworkSubnetOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkSubnet} */ - public ServiceCall obsoleteImage(ObsoleteImageOptions obsoleteImageOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(obsoleteImageOptions, - "obsoleteImageOptions cannot be null"); + public ServiceCall getClusterNetworkSubnet(GetClusterNetworkSubnetOptions getClusterNetworkSubnetOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getClusterNetworkSubnetOptions, + "getClusterNetworkSubnetOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", obsoleteImageOptions.id()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images/{id}/obsolete", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "obsoleteImage"); + pathParamsMap.put("cluster_network_id", getClusterNetworkSubnetOptions.clusterNetworkId()); + pathParamsMap.put("id", getClusterNetworkSubnetOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/subnets/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getClusterNetworkSubnet"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List export jobs for an image. - * - * This request lists export jobs for an image. Each job tracks the exporting of the image to another location, such - * as a bucket within cloud object storage. + * Retrieve a cluster network subnet reserved IP. * - * The jobs will be sorted by their `created_at` property values, with newest jobs first. Jobs with identical - * `created_at` property values will in turn be sorted by ascending - * `name` property values. + * This request retrieves a single cluster network subnet reserved IP specified by the identifier in the URL. * - * @param listImageExportJobsOptions the {@link ListImageExportJobsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ImageExportJobUnpaginatedCollection} + * @param getClusterNetworkSubnetReservedIpOptions the {@link GetClusterNetworkSubnetReservedIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkSubnetReservedIP} */ - public ServiceCall listImageExportJobs(ListImageExportJobsOptions listImageExportJobsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listImageExportJobsOptions, - "listImageExportJobsOptions cannot be null"); + public ServiceCall getClusterNetworkSubnetReservedIp(GetClusterNetworkSubnetReservedIpOptions getClusterNetworkSubnetReservedIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getClusterNetworkSubnetReservedIpOptions, + "getClusterNetworkSubnetReservedIpOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("image_id", listImageExportJobsOptions.imageId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images/{image_id}/export_jobs", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listImageExportJobs"); + pathParamsMap.put("cluster_network_id", getClusterNetworkSubnetReservedIpOptions.clusterNetworkId()); + pathParamsMap.put("cluster_network_subnet_id", getClusterNetworkSubnetReservedIpOptions.clusterNetworkSubnetId()); + pathParamsMap.put("id", getClusterNetworkSubnetReservedIpOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/subnets/{cluster_network_subnet_id}/reserved_ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getClusterNetworkSubnetReservedIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listImageExportJobsOptions.name() != null) { - builder.query("name", String.valueOf(listImageExportJobsOptions.name())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create an export job for an image. + * List cluster network interfaces. * - * This request creates and queues a new export job for the image specified in the URL using the image export job - * prototype object. The image must be owned by the account and be in the `available`, `deprecated`, `obsolete`, or - * `unusable` state. The prototype object is structured in the same way as a retrieved image export job, and contains - * the information necessary to create and queue the new image export job. + * This request lists cluster network interfaces in the region. A cluster network interface is a logical abstraction + * of a cluster network interface in a subnet, and may be attached to a target resource. * - * @param createImageExportJobOptions the {@link CreateImageExportJobOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ImageExportJob} + * The cluster network interfaces will be sorted by their `created_at` property values, with newest cluster network + * interfaces first. Cluster network interfaces with identical + * `created_at` property values will in turn be sorted by ascending `name` property values. + * + * @param listClusterNetworkInterfacesOptions the {@link ListClusterNetworkInterfacesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkInterfaceCollection} */ - public ServiceCall createImageExportJob(CreateImageExportJobOptions createImageExportJobOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createImageExportJobOptions, - "createImageExportJobOptions cannot be null"); + public ServiceCall listClusterNetworkInterfaces(ListClusterNetworkInterfacesOptions listClusterNetworkInterfacesOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listClusterNetworkInterfacesOptions, + "listClusterNetworkInterfacesOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("image_id", createImageExportJobOptions.imageId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images/{image_id}/export_jobs", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createImageExportJob"); + pathParamsMap.put("cluster_network_id", listClusterNetworkInterfacesOptions.clusterNetworkId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/interfaces", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listClusterNetworkInterfaces"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.add("storage_bucket", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createImageExportJobOptions.storageBucket())); - if (createImageExportJobOptions.format() != null) { - contentJson.addProperty("format", createImageExportJobOptions.format()); + if (listClusterNetworkInterfacesOptions.start() != null) { + builder.query("start", String.valueOf(listClusterNetworkInterfacesOptions.start())); } - if (createImageExportJobOptions.name() != null) { - contentJson.addProperty("name", createImageExportJobOptions.name()); + if (listClusterNetworkInterfacesOptions.limit() != null) { + builder.query("limit", String.valueOf(listClusterNetworkInterfacesOptions.limit())); } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listClusterNetworkInterfacesOptions.name() != null) { + builder.query("name", String.valueOf(listClusterNetworkInterfacesOptions.name())); + } + if (listClusterNetworkInterfacesOptions.sort() != null) { + builder.query("sort", String.valueOf(listClusterNetworkInterfacesOptions.sort())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete an image export job. + * List cluster network profiles. * - * This request deletes an image export job. This operation cannot be reversed. If the job has not completed, the job - * will be canceled, and the incomplete exported image object deleted. If the job has completed, the exported image - * object will not be deleted. + * This request lists cluster network profiles available in the region. A cluster network profile specifies the + * performance characteristics and capabilities for a cluster network. * - * @param deleteImageExportJobOptions the {@link DeleteImageExportJobOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param listClusterNetworkProfilesOptions the {@link ListClusterNetworkProfilesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkProfileCollection} */ - public ServiceCall deleteImageExportJob(DeleteImageExportJobOptions deleteImageExportJobOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteImageExportJobOptions, - "deleteImageExportJobOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("image_id", deleteImageExportJobOptions.imageId()); - pathParamsMap.put("id", deleteImageExportJobOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images/{image_id}/export_jobs/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteImageExportJob"); + public ServiceCall listClusterNetworkProfiles(ListClusterNetworkProfilesOptions listClusterNetworkProfilesOptions) { + if (listClusterNetworkProfilesOptions == null) { + listClusterNetworkProfilesOptions = new ListClusterNetworkProfilesOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_network/profiles")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listClusterNetworkProfiles"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); - return createServiceCall(builder.build(), responseConverter); + if (listClusterNetworkProfilesOptions.start() != null) { + builder.query("start", String.valueOf(listClusterNetworkProfilesOptions.start())); + } + if (listClusterNetworkProfilesOptions.limit() != null) { + builder.query("limit", String.valueOf(listClusterNetworkProfilesOptions.limit())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve an image export job. + * List cluster network profiles. * - * This request retrieves a single image export job specified by the identifier in the URL. + * This request lists cluster network profiles available in the region. A cluster network profile specifies the + * performance characteristics and capabilities for a cluster network. * - * @param getImageExportJobOptions the {@link GetImageExportJobOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ImageExportJob} + * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkProfileCollection} */ - public ServiceCall getImageExportJob(GetImageExportJobOptions getImageExportJobOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getImageExportJobOptions, - "getImageExportJobOptions cannot be null"); + public ServiceCall listClusterNetworkProfiles() { + return listClusterNetworkProfiles(null); + } + + /** + * List cluster network subnet reserved IPs. + * + * This request lists cluster network subnet reserved IPs in the cluster network. + * + * @param listClusterNetworkSubnetReservedIpsOptions the {@link ListClusterNetworkSubnetReservedIpsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkSubnetReservedIPCollection} + */ + public ServiceCall listClusterNetworkSubnetReservedIps(ListClusterNetworkSubnetReservedIpsOptions listClusterNetworkSubnetReservedIpsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listClusterNetworkSubnetReservedIpsOptions, + "listClusterNetworkSubnetReservedIpsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("image_id", getImageExportJobOptions.imageId()); - pathParamsMap.put("id", getImageExportJobOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images/{image_id}/export_jobs/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getImageExportJob"); + pathParamsMap.put("cluster_network_id", listClusterNetworkSubnetReservedIpsOptions.clusterNetworkId()); + pathParamsMap.put("cluster_network_subnet_id", listClusterNetworkSubnetReservedIpsOptions.clusterNetworkSubnetId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/subnets/{cluster_network_subnet_id}/reserved_ips", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listClusterNetworkSubnetReservedIps"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listClusterNetworkSubnetReservedIpsOptions.start() != null) { + builder.query("start", String.valueOf(listClusterNetworkSubnetReservedIpsOptions.start())); + } + if (listClusterNetworkSubnetReservedIpsOptions.limit() != null) { + builder.query("limit", String.valueOf(listClusterNetworkSubnetReservedIpsOptions.limit())); + } + if (listClusterNetworkSubnetReservedIpsOptions.name() != null) { + builder.query("name", String.valueOf(listClusterNetworkSubnetReservedIpsOptions.name())); + } + if (listClusterNetworkSubnetReservedIpsOptions.sort() != null) { + builder.query("sort", String.valueOf(listClusterNetworkSubnetReservedIpsOptions.sort())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update an image export job. + * List cluster network subnets. * - * This request updates an image export job with the information in a provided image export job patch. The image - * export job patch object is structured in the same way as a retrieved image export job and contains only the - * information to be updated. + * This request lists cluster network subnets in the cluster network. A cluster network subnet provides network + * routing between other cluster network subnets within a cluster network. * - * @param updateImageExportJobOptions the {@link UpdateImageExportJobOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ImageExportJob} + * @param listClusterNetworkSubnetsOptions the {@link ListClusterNetworkSubnetsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkSubnetCollection} */ - public ServiceCall updateImageExportJob(UpdateImageExportJobOptions updateImageExportJobOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateImageExportJobOptions, - "updateImageExportJobOptions cannot be null"); + public ServiceCall listClusterNetworkSubnets(ListClusterNetworkSubnetsOptions listClusterNetworkSubnetsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listClusterNetworkSubnetsOptions, + "listClusterNetworkSubnetsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("image_id", updateImageExportJobOptions.imageId()); - pathParamsMap.put("id", updateImageExportJobOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images/{image_id}/export_jobs/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateImageExportJob"); + pathParamsMap.put("cluster_network_id", listClusterNetworkSubnetsOptions.clusterNetworkId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/subnets", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listClusterNetworkSubnets"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateImageExportJobOptions.imageExportJobPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listClusterNetworkSubnetsOptions.start() != null) { + builder.query("start", String.valueOf(listClusterNetworkSubnetsOptions.start())); + } + if (listClusterNetworkSubnetsOptions.limit() != null) { + builder.query("limit", String.valueOf(listClusterNetworkSubnetsOptions.limit())); + } + if (listClusterNetworkSubnetsOptions.name() != null) { + builder.query("name", String.valueOf(listClusterNetworkSubnetsOptions.name())); + } + if (listClusterNetworkSubnetsOptions.sort() != null) { + builder.query("sort", String.valueOf(listClusterNetworkSubnetsOptions.sort())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List operating systems. + * List cluster networks. * - * This request lists operating systems in the region. + * This request lists [cluster networks](https://cloud.ibm.com/docs/vpc?topic=vpc-about-cluster-network) in the + * region. A cluster network is a grouping of resources in a separate networking space for high performance computing + * and networking. * - * @param listOperatingSystemsOptions the {@link ListOperatingSystemsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link OperatingSystemCollection} + * @param listClusterNetworksOptions the {@link ListClusterNetworksOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkCollection} */ - public ServiceCall listOperatingSystems(ListOperatingSystemsOptions listOperatingSystemsOptions) { - if (listOperatingSystemsOptions == null) { - listOperatingSystemsOptions = new ListOperatingSystemsOptions.Builder().build(); + public ServiceCall listClusterNetworks(ListClusterNetworksOptions listClusterNetworksOptions) { + if (listClusterNetworksOptions == null) { + listClusterNetworksOptions = new ListClusterNetworksOptions.Builder().build(); } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/operating_systems")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listOperatingSystems"); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listClusterNetworks"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listOperatingSystemsOptions.start() != null) { - builder.query("start", String.valueOf(listOperatingSystemsOptions.start())); + if (listClusterNetworksOptions.start() != null) { + builder.query("start", String.valueOf(listClusterNetworksOptions.start())); } - if (listOperatingSystemsOptions.limit() != null) { - builder.query("limit", String.valueOf(listOperatingSystemsOptions.limit())); + if (listClusterNetworksOptions.limit() != null) { + builder.query("limit", String.valueOf(listClusterNetworksOptions.limit())); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listClusterNetworksOptions.resourceGroupId() != null) { + builder.query("resource_group.id", String.valueOf(listClusterNetworksOptions.resourceGroupId())); + } + if (listClusterNetworksOptions.name() != null) { + builder.query("name", String.valueOf(listClusterNetworksOptions.name())); + } + if (listClusterNetworksOptions.sort() != null) { + builder.query("sort", String.valueOf(listClusterNetworksOptions.sort())); + } + if (listClusterNetworksOptions.vpcId() != null) { + builder.query("vpc.id", String.valueOf(listClusterNetworksOptions.vpcId())); + } + if (listClusterNetworksOptions.vpcCrn() != null) { + builder.query("vpc.crn", String.valueOf(listClusterNetworksOptions.vpcCrn())); + } + if (listClusterNetworksOptions.vpcName() != null) { + builder.query("vpc.name", String.valueOf(listClusterNetworksOptions.vpcName())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List operating systems. + * List cluster networks. * - * This request lists operating systems in the region. + * This request lists [cluster networks](https://cloud.ibm.com/docs/vpc?topic=vpc-about-cluster-network) in the + * region. A cluster network is a grouping of resources in a separate networking space for high performance computing + * and networking. * - * @return a {@link ServiceCall} with a result of type {@link OperatingSystemCollection} + * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkCollection} */ - public ServiceCall listOperatingSystems() { - return listOperatingSystems(null); + public ServiceCall listClusterNetworks() { + return listClusterNetworks(null); } /** - * Retrieve an operating system. + * Update a cluster. * - * This request retrieves a single operating system specified by the name in the URL. + * This request updates a cluster network with the information provided in a cluster network patch object. The patch + * object is structured in the same way as a retrieved cluster network and needs to contain only the information to be + * updated. * - * @param getOperatingSystemOptions the {@link GetOperatingSystemOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link OperatingSystem} + * @param updateClusterNetworkOptions the {@link UpdateClusterNetworkOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ClusterNetwork} */ - public ServiceCall getOperatingSystem(GetOperatingSystemOptions getOperatingSystemOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getOperatingSystemOptions, - "getOperatingSystemOptions cannot be null"); + public ServiceCall updateClusterNetwork(UpdateClusterNetworkOptions updateClusterNetworkOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateClusterNetworkOptions, + "updateClusterNetworkOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("name", getOperatingSystemOptions.name()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/operating_systems/{name}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getOperatingSystem"); + pathParamsMap.put("id", updateClusterNetworkOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateClusterNetwork"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); + if (updateClusterNetworkOptions.ifMatch() != null) { + builder.header("If-Match", updateClusterNetworkOptions.ifMatch()); + } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateClusterNetworkOptions.clusterNetworkPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List keys. + * Update a cluster network interface. * - * This request lists keys in the region. A key contains a public SSH key which may be installed on instances when - * they are created. Private keys are not stored. + * This request updates a cluster network interface with the information provided in a cluster network interface patch + * object. The patch object is structured in the same way as a retrieved cluster network interface and needs to + * contain only the information to be updated. * - * @param listKeysOptions the {@link ListKeysOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link KeyCollection} + * @param updateClusterNetworkInterfaceOptions the {@link UpdateClusterNetworkInterfaceOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkInterface} */ - public ServiceCall listKeys(ListKeysOptions listKeysOptions) { - if (listKeysOptions == null) { - listKeysOptions = new ListKeysOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/keys")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listKeys"); + public ServiceCall updateClusterNetworkInterface(UpdateClusterNetworkInterfaceOptions updateClusterNetworkInterfaceOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateClusterNetworkInterfaceOptions, + "updateClusterNetworkInterfaceOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("cluster_network_id", updateClusterNetworkInterfaceOptions.clusterNetworkId()); + pathParamsMap.put("id", updateClusterNetworkInterfaceOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/interfaces/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateClusterNetworkInterface"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); + if (updateClusterNetworkInterfaceOptions.ifMatch() != null) { + builder.header("If-Match", updateClusterNetworkInterfaceOptions.ifMatch()); + } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listKeysOptions.start() != null) { - builder.query("start", String.valueOf(listKeysOptions.start())); - } - if (listKeysOptions.limit() != null) { - builder.query("limit", String.valueOf(listKeysOptions.limit())); - } - if (listKeysOptions.resourceGroupId() != null) { - builder.query("resource_group.id", String.valueOf(listKeysOptions.resourceGroupId())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateClusterNetworkInterfaceOptions.clusterNetworkInterfacePatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List keys. + * Update a cluster network subnet. * - * This request lists keys in the region. A key contains a public SSH key which may be installed on instances when - * they are created. Private keys are not stored. + * This request updates a cluster network subnet with the information provided in a cluster network subnet patch + * object. The patch object is structured in the same way as a retrieved cluster network subnet and needs to contain + * only the information to be updated. * - * @return a {@link ServiceCall} with a result of type {@link KeyCollection} + * @param updateClusterNetworkSubnetOptions the {@link UpdateClusterNetworkSubnetOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkSubnet} */ - public ServiceCall listKeys() { - return listKeys(null); - } - - /** - * Create a key. - * - * This request creates a new SSH key from an key prototype object. The prototype object is structured in the same way - * as a retrieved key, and contains the information necessary to create the new key. The public key value must be - * provided. - * - * @param createKeyOptions the {@link CreateKeyOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Key} - */ - public ServiceCall createKey(CreateKeyOptions createKeyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createKeyOptions, - "createKeyOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/keys")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createKey"); + public ServiceCall updateClusterNetworkSubnet(UpdateClusterNetworkSubnetOptions updateClusterNetworkSubnetOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateClusterNetworkSubnetOptions, + "updateClusterNetworkSubnetOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("cluster_network_id", updateClusterNetworkSubnetOptions.clusterNetworkId()); + pathParamsMap.put("id", updateClusterNetworkSubnetOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/subnets/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateClusterNetworkSubnet"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); + if (updateClusterNetworkSubnetOptions.ifMatch() != null) { + builder.header("If-Match", updateClusterNetworkSubnetOptions.ifMatch()); + } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("public_key", createKeyOptions.publicKey()); - if (createKeyOptions.name() != null) { - contentJson.addProperty("name", createKeyOptions.name()); - } - if (createKeyOptions.resourceGroup() != null) { - contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createKeyOptions.resourceGroup())); - } - if (createKeyOptions.type() != null) { - contentJson.addProperty("type", createKeyOptions.type()); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateClusterNetworkSubnetOptions.clusterNetworkSubnetPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a key. + * Update a cluster network subnet reserved IP. * - * This request deletes a key. This operation cannot be reversed. + * This request updates a cluster network subnet reserved IP with the information provided in a cluster network subnet + * reserved IP patch object. The patch object is structured in the same way as a retrieved cluster network subnet + * reserved IP and needs to contain only the information to be updated. * - * @param deleteKeyOptions the {@link DeleteKeyOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param updateClusterNetworkSubnetReservedIpOptions the {@link UpdateClusterNetworkSubnetReservedIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkSubnetReservedIP} */ - public ServiceCall deleteKey(DeleteKeyOptions deleteKeyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteKeyOptions, - "deleteKeyOptions cannot be null"); + public ServiceCall updateClusterNetworkSubnetReservedIp(UpdateClusterNetworkSubnetReservedIpOptions updateClusterNetworkSubnetReservedIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateClusterNetworkSubnetReservedIpOptions, + "updateClusterNetworkSubnetReservedIpOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteKeyOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/keys/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteKey"); + pathParamsMap.put("cluster_network_id", updateClusterNetworkSubnetReservedIpOptions.clusterNetworkId()); + pathParamsMap.put("cluster_network_subnet_id", updateClusterNetworkSubnetReservedIpOptions.clusterNetworkSubnetId()); + pathParamsMap.put("id", updateClusterNetworkSubnetReservedIpOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/subnets/{cluster_network_subnet_id}/reserved_ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateClusterNetworkSubnetReservedIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); + if (updateClusterNetworkSubnetReservedIpOptions.ifMatch() != null) { + builder.header("If-Match", updateClusterNetworkSubnetReservedIpOptions.ifMatch()); + } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateClusterNetworkSubnetReservedIpOptions.clusterNetworkSubnetReservedIpPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a key. + * Create a dedicated host. * - * This request retrieves a single key specified by the identifier in the URL. + * This request creates a new dedicated host. * - * @param getKeyOptions the {@link GetKeyOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Key} + * @param createDedicatedHostOptions the {@link CreateDedicatedHostOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link DedicatedHost} */ - public ServiceCall getKey(GetKeyOptions getKeyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getKeyOptions, - "getKeyOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getKeyOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/keys/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getKey"); + public ServiceCall createDedicatedHost(CreateDedicatedHostOptions createDedicatedHostOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createDedicatedHostOptions, + "createDedicatedHostOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_hosts")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createDedicatedHost"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createDedicatedHostOptions.dedicatedHostPrototype()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a key. + * Create a dedicated host group. * - * This request updates a key's name. + * This request creates a new dedicated host group. * - * @param updateKeyOptions the {@link UpdateKeyOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Key} + * @param createDedicatedHostGroupOptions the {@link CreateDedicatedHostGroupOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link DedicatedHostGroup} */ - public ServiceCall updateKey(UpdateKeyOptions updateKeyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateKeyOptions, - "updateKeyOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateKeyOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/keys/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateKey"); + public ServiceCall createDedicatedHostGroup(CreateDedicatedHostGroupOptions createDedicatedHostGroupOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createDedicatedHostGroupOptions, + "createDedicatedHostGroupOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_host/groups")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createDedicatedHostGroup"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateKeyOptions.keyPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + final JsonObject contentJson = new JsonObject(); + contentJson.addProperty("class", createDedicatedHostGroupOptions.xClass()); + contentJson.addProperty("family", createDedicatedHostGroupOptions.family()); + contentJson.add("zone", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createDedicatedHostGroupOptions.zone())); + if (createDedicatedHostGroupOptions.name() != null) { + contentJson.addProperty("name", createDedicatedHostGroupOptions.name()); + } + if (createDedicatedHostGroupOptions.resourceGroup() != null) { + contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createDedicatedHostGroupOptions.resourceGroup())); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List instance profiles. + * Delete a dedicated host. * - * This request lists provisionable [instance profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) in the - * region. An instance profile specifies the performance characteristics and pricing model for an instance. + * This request deletes a dedicated host. This operation cannot be reversed. For this request to succeed, `instances` + * must be empty and `instance_placement_enabled` must be `false`. * - * @param listInstanceProfilesOptions the {@link ListInstanceProfilesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceProfileCollection} + * @param deleteDedicatedHostOptions the {@link DeleteDedicatedHostOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall listInstanceProfiles(ListInstanceProfilesOptions listInstanceProfilesOptions) { - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance/profiles")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceProfiles"); + public ServiceCall deleteDedicatedHost(DeleteDedicatedHostOptions deleteDedicatedHostOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteDedicatedHostOptions, + "deleteDedicatedHostOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", deleteDedicatedHostOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_hosts/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteDedicatedHost"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * List instance profiles. - * - * This request lists provisionable [instance profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) in the - * region. An instance profile specifies the performance characteristics and pricing model for an instance. - * - * @return a {@link ServiceCall} with a result of type {@link InstanceProfileCollection} - */ - public ServiceCall listInstanceProfiles() { - return listInstanceProfiles(null); - } - - /** - * Retrieve an instance profile. + * Delete a dedicated host group. * - * This request retrieves a single instance profile specified by the name in the URL. + * This request deletes a dedicated host group. * - * @param getInstanceProfileOptions the {@link GetInstanceProfileOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceProfile} + * @param deleteDedicatedHostGroupOptions the {@link DeleteDedicatedHostGroupOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall getInstanceProfile(GetInstanceProfileOptions getInstanceProfileOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceProfileOptions, - "getInstanceProfileOptions cannot be null"); + public ServiceCall deleteDedicatedHostGroup(DeleteDedicatedHostGroupOptions deleteDedicatedHostGroupOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteDedicatedHostGroupOptions, + "deleteDedicatedHostGroupOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("name", getInstanceProfileOptions.name()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance/profiles/{name}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceProfile"); + pathParamsMap.put("id", deleteDedicatedHostGroupOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_host/groups/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteDedicatedHostGroup"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * List instance templates. + * Retrieve a dedicated host. * - * This request lists instance templates in the region. + * This request retrieves a single dedicated host specified by the identifiers in the URL. * - * @param listInstanceTemplatesOptions the {@link ListInstanceTemplatesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceTemplateCollection} + * @param getDedicatedHostOptions the {@link GetDedicatedHostOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link DedicatedHost} */ - public ServiceCall listInstanceTemplates(ListInstanceTemplatesOptions listInstanceTemplatesOptions) { - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance/templates")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceTemplates"); + public ServiceCall getDedicatedHost(GetDedicatedHostOptions getDedicatedHostOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getDedicatedHostOptions, + "getDedicatedHostOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", getDedicatedHostOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_hosts/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getDedicatedHost"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List instance templates. - * - * This request lists instance templates in the region. - * - * @return a {@link ServiceCall} with a result of type {@link InstanceTemplateCollection} - */ - public ServiceCall listInstanceTemplates() { - return listInstanceTemplates(null); - } - - /** - * Create an instance template. - * - * This request creates a new instance template. The prototype object is structured in the same way as a retrieved - * instance template, and contains the information necessary to provision a new instance from the template. + * Retrieve a dedicated host disk. * - * If a `source_template` is specified in the prototype object, its contents are copied into the new template prior to - * copying any other properties provided in the prototype object. + * This request retrieves a single dedicated host disk specified by the identifier in the URL. * - * @param createInstanceTemplateOptions the {@link CreateInstanceTemplateOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceTemplate} + * @param getDedicatedHostDiskOptions the {@link GetDedicatedHostDiskOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link DedicatedHostDisk} */ - public ServiceCall createInstanceTemplate(CreateInstanceTemplateOptions createInstanceTemplateOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createInstanceTemplateOptions, - "createInstanceTemplateOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance/templates")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createInstanceTemplate"); + public ServiceCall getDedicatedHostDisk(GetDedicatedHostDiskOptions getDedicatedHostDiskOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getDedicatedHostDiskOptions, + "getDedicatedHostDiskOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("dedicated_host_id", getDedicatedHostDiskOptions.dedicatedHostId()); + pathParamsMap.put("id", getDedicatedHostDiskOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_hosts/{dedicated_host_id}/disks/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getDedicatedHostDisk"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createInstanceTemplateOptions.instanceTemplatePrototype()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete an instance template. + * Retrieve a dedicated host group. * - * This request deletes the instance template. This operation cannot be reversed. + * This request retrieves a single dedicated host group specified by the identifier in the URL. * - * @param deleteInstanceTemplateOptions the {@link DeleteInstanceTemplateOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param getDedicatedHostGroupOptions the {@link GetDedicatedHostGroupOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link DedicatedHostGroup} */ - public ServiceCall deleteInstanceTemplate(DeleteInstanceTemplateOptions deleteInstanceTemplateOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteInstanceTemplateOptions, - "deleteInstanceTemplateOptions cannot be null"); + public ServiceCall getDedicatedHostGroup(GetDedicatedHostGroupOptions getDedicatedHostGroupOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getDedicatedHostGroupOptions, + "getDedicatedHostGroupOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteInstanceTemplateOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance/templates/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteInstanceTemplate"); + pathParamsMap.put("id", getDedicatedHostGroupOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_host/groups/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getDedicatedHostGroup"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve an instance template. + * Retrieve a dedicated host profile. * - * This request retrieves a single instance template specified by the identifier in the URL. + * This request retrieves a single dedicated host profile specified by the name in the URL. * - * @param getInstanceTemplateOptions the {@link GetInstanceTemplateOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceTemplate} + * @param getDedicatedHostProfileOptions the {@link GetDedicatedHostProfileOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link DedicatedHostProfile} */ - public ServiceCall getInstanceTemplate(GetInstanceTemplateOptions getInstanceTemplateOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceTemplateOptions, - "getInstanceTemplateOptions cannot be null"); + public ServiceCall getDedicatedHostProfile(GetDedicatedHostProfileOptions getDedicatedHostProfileOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getDedicatedHostProfileOptions, + "getDedicatedHostProfileOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getInstanceTemplateOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance/templates/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceTemplate"); + pathParamsMap.put("name", getDedicatedHostProfileOptions.name()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_host/profiles/{name}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getDedicatedHostProfile"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update an instance template. + * List disks on a dedicated host. * - * This request updates an instance template with the information provided in the instance template patch. The - * instance template patch object is structured in the same way as a retrieved instance template and contains only the - * information to be updated. + * This request lists disks on a dedicated host. A disk is a physical device that is locally attached to the compute + * node. By default, the listed disks are sorted by their + * `created_at` property values, with the newest disk first. * - * @param updateInstanceTemplateOptions the {@link UpdateInstanceTemplateOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceTemplate} + * @param listDedicatedHostDisksOptions the {@link ListDedicatedHostDisksOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link DedicatedHostDiskCollection} */ - public ServiceCall updateInstanceTemplate(UpdateInstanceTemplateOptions updateInstanceTemplateOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateInstanceTemplateOptions, - "updateInstanceTemplateOptions cannot be null"); + public ServiceCall listDedicatedHostDisks(ListDedicatedHostDisksOptions listDedicatedHostDisksOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listDedicatedHostDisksOptions, + "listDedicatedHostDisksOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateInstanceTemplateOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance/templates/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateInstanceTemplate"); + pathParamsMap.put("dedicated_host_id", listDedicatedHostDisksOptions.dedicatedHostId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_hosts/{dedicated_host_id}/disks", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listDedicatedHostDisks"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateInstanceTemplateOptions.instanceTemplatePatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List instances. + * List dedicated host groups. * - * This request lists instances in the region. + * This request lists dedicated host groups in the region. Each dedicated host must belong to exactly one group, which + * controls placement of instances. Dedicated host groups do not span zones. * - * @param listInstancesOptions the {@link ListInstancesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceCollection} + * @param listDedicatedHostGroupsOptions the {@link ListDedicatedHostGroupsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link DedicatedHostGroupCollection} */ - public ServiceCall listInstances(ListInstancesOptions listInstancesOptions) { - if (listInstancesOptions == null) { - listInstancesOptions = new ListInstancesOptions.Builder().build(); + public ServiceCall listDedicatedHostGroups(ListDedicatedHostGroupsOptions listDedicatedHostGroupsOptions) { + if (listDedicatedHostGroupsOptions == null) { + listDedicatedHostGroupsOptions = new ListDedicatedHostGroupsOptions.Builder().build(); } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstances"); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_host/groups")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listDedicatedHostGroups"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listInstancesOptions.start() != null) { - builder.query("start", String.valueOf(listInstancesOptions.start())); - } - if (listInstancesOptions.limit() != null) { - builder.query("limit", String.valueOf(listInstancesOptions.limit())); - } - if (listInstancesOptions.resourceGroupId() != null) { - builder.query("resource_group.id", String.valueOf(listInstancesOptions.resourceGroupId())); - } - if (listInstancesOptions.name() != null) { - builder.query("name", String.valueOf(listInstancesOptions.name())); - } - if (listInstancesOptions.clusterNetworkId() != null) { - builder.query("cluster_network.id", String.valueOf(listInstancesOptions.clusterNetworkId())); - } - if (listInstancesOptions.clusterNetworkCrn() != null) { - builder.query("cluster_network.crn", String.valueOf(listInstancesOptions.clusterNetworkCrn())); - } - if (listInstancesOptions.clusterNetworkName() != null) { - builder.query("cluster_network.name", String.valueOf(listInstancesOptions.clusterNetworkName())); - } - if (listInstancesOptions.dedicatedHostId() != null) { - builder.query("dedicated_host.id", String.valueOf(listInstancesOptions.dedicatedHostId())); - } - if (listInstancesOptions.dedicatedHostCrn() != null) { - builder.query("dedicated_host.crn", String.valueOf(listInstancesOptions.dedicatedHostCrn())); - } - if (listInstancesOptions.dedicatedHostName() != null) { - builder.query("dedicated_host.name", String.valueOf(listInstancesOptions.dedicatedHostName())); - } - if (listInstancesOptions.placementGroupId() != null) { - builder.query("placement_group.id", String.valueOf(listInstancesOptions.placementGroupId())); - } - if (listInstancesOptions.placementGroupCrn() != null) { - builder.query("placement_group.crn", String.valueOf(listInstancesOptions.placementGroupCrn())); - } - if (listInstancesOptions.placementGroupName() != null) { - builder.query("placement_group.name", String.valueOf(listInstancesOptions.placementGroupName())); - } - if (listInstancesOptions.reservationAffinityPolicy() != null) { - builder.query("reservation_affinity.policy", String.valueOf(listInstancesOptions.reservationAffinityPolicy())); - } - if (listInstancesOptions.reservationId() != null) { - builder.query("reservation.id", String.valueOf(listInstancesOptions.reservationId())); - } - if (listInstancesOptions.reservationCrn() != null) { - builder.query("reservation.crn", String.valueOf(listInstancesOptions.reservationCrn())); + if (listDedicatedHostGroupsOptions.start() != null) { + builder.query("start", String.valueOf(listDedicatedHostGroupsOptions.start())); } - if (listInstancesOptions.reservationName() != null) { - builder.query("reservation.name", String.valueOf(listInstancesOptions.reservationName())); + if (listDedicatedHostGroupsOptions.limit() != null) { + builder.query("limit", String.valueOf(listDedicatedHostGroupsOptions.limit())); } - if (listInstancesOptions.vpcId() != null) { - builder.query("vpc.id", String.valueOf(listInstancesOptions.vpcId())); + if (listDedicatedHostGroupsOptions.resourceGroupId() != null) { + builder.query("resource_group.id", String.valueOf(listDedicatedHostGroupsOptions.resourceGroupId())); } - if (listInstancesOptions.vpcCrn() != null) { - builder.query("vpc.crn", String.valueOf(listInstancesOptions.vpcCrn())); + if (listDedicatedHostGroupsOptions.zoneName() != null) { + builder.query("zone.name", String.valueOf(listDedicatedHostGroupsOptions.zoneName())); } - if (listInstancesOptions.vpcName() != null) { - builder.query("vpc.name", String.valueOf(listInstancesOptions.vpcName())); + if (listDedicatedHostGroupsOptions.name() != null) { + builder.query("name", String.valueOf(listDedicatedHostGroupsOptions.name())); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List instances. + * List dedicated host groups. * - * This request lists instances in the region. + * This request lists dedicated host groups in the region. Each dedicated host must belong to exactly one group, which + * controls placement of instances. Dedicated host groups do not span zones. * - * @return a {@link ServiceCall} with a result of type {@link InstanceCollection} + * @return a {@link ServiceCall} with a result of type {@link DedicatedHostGroupCollection} */ - public ServiceCall listInstances() { - return listInstances(null); + public ServiceCall listDedicatedHostGroups() { + return listDedicatedHostGroups(null); } /** - * Create an instance. + * List dedicated host profiles. * - * This request provisions a new instance from an instance prototype object. The prototype object is structured in the - * same way as a retrieved instance, and contains the information necessary to provision the new instance. The - * instance is automatically started. + * This request lists provisionable [dedicated host profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-dh-profiles) in + * the region. A dedicated host profile specifies the hardware characteristics for a dedicated host. * - * @param createInstanceOptions the {@link CreateInstanceOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Instance} + * @param listDedicatedHostProfilesOptions the {@link ListDedicatedHostProfilesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link DedicatedHostProfileCollection} */ - public ServiceCall createInstance(CreateInstanceOptions createInstanceOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createInstanceOptions, - "createInstanceOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createInstance"); + public ServiceCall listDedicatedHostProfiles(ListDedicatedHostProfilesOptions listDedicatedHostProfilesOptions) { + if (listDedicatedHostProfilesOptions == null) { + listDedicatedHostProfilesOptions = new ListDedicatedHostProfilesOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_host/profiles")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listDedicatedHostProfiles"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createInstanceOptions.instancePrototype()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listDedicatedHostProfilesOptions.start() != null) { + builder.query("start", String.valueOf(listDedicatedHostProfilesOptions.start())); + } + if (listDedicatedHostProfilesOptions.limit() != null) { + builder.query("limit", String.valueOf(listDedicatedHostProfilesOptions.limit())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete an instance. + * List dedicated host profiles. * - * This request deletes an instance. This operation cannot be reversed. Any floating IPs associated with instance - * network interfaces are implicitly disassociated. All virtual network interfaces with `auto_delete` set to `true` - * targeting instance network attachments on the instance are automatically deleted. All flow log collectors with - * `auto_delete` set to `true` targeting the instance, the instance network attachments, the instance network - * interfaces, or the automatically deleted virtual network interfaces are automatically deleted. + * This request lists provisionable [dedicated host profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-dh-profiles) in + * the region. A dedicated host profile specifies the hardware characteristics for a dedicated host. * - * @param deleteInstanceOptions the {@link DeleteInstanceOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @return a {@link ServiceCall} with a result of type {@link DedicatedHostProfileCollection} */ - public ServiceCall deleteInstance(DeleteInstanceOptions deleteInstanceOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteInstanceOptions, - "deleteInstanceOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteInstanceOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteInstance"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - if (deleteInstanceOptions.ifMatch() != null) { - builder.header("If-Match", deleteInstanceOptions.ifMatch()); - } - builder.query("version", String.valueOf(this.version)); - builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); - return createServiceCall(builder.build(), responseConverter); + public ServiceCall listDedicatedHostProfiles() { + return listDedicatedHostProfiles(null); } /** - * Retrieve an instance. + * List dedicated hosts. * - * This request retrieves a single instance specified by the identifier in the URL. + * This request lists dedicated hosts in the region. * - * @param getInstanceOptions the {@link GetInstanceOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Instance} + * @param listDedicatedHostsOptions the {@link ListDedicatedHostsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link DedicatedHostCollection} */ - public ServiceCall getInstance(GetInstanceOptions getInstanceOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceOptions, - "getInstanceOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getInstanceOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstance"); + public ServiceCall listDedicatedHosts(ListDedicatedHostsOptions listDedicatedHostsOptions) { + if (listDedicatedHostsOptions == null) { + listDedicatedHostsOptions = new ListDedicatedHostsOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_hosts")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listDedicatedHosts"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listDedicatedHostsOptions.dedicatedHostGroupId() != null) { + builder.query("dedicated_host_group.id", String.valueOf(listDedicatedHostsOptions.dedicatedHostGroupId())); + } + if (listDedicatedHostsOptions.start() != null) { + builder.query("start", String.valueOf(listDedicatedHostsOptions.start())); + } + if (listDedicatedHostsOptions.limit() != null) { + builder.query("limit", String.valueOf(listDedicatedHostsOptions.limit())); + } + if (listDedicatedHostsOptions.resourceGroupId() != null) { + builder.query("resource_group.id", String.valueOf(listDedicatedHostsOptions.resourceGroupId())); + } + if (listDedicatedHostsOptions.zoneName() != null) { + builder.query("zone.name", String.valueOf(listDedicatedHostsOptions.zoneName())); + } + if (listDedicatedHostsOptions.name() != null) { + builder.query("name", String.valueOf(listDedicatedHostsOptions.name())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update an instance. + * List dedicated hosts. * - * This request updates an instance with the information in a provided instance patch. The instance patch object is - * structured in the same way as a retrieved instance and contains only the information to be updated. + * This request lists dedicated hosts in the region. * - * @param updateInstanceOptions the {@link UpdateInstanceOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Instance} + * @return a {@link ServiceCall} with a result of type {@link DedicatedHostCollection} */ - public ServiceCall updateInstance(UpdateInstanceOptions updateInstanceOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateInstanceOptions, - "updateInstanceOptions cannot be null"); + public ServiceCall listDedicatedHosts() { + return listDedicatedHosts(null); + } + + /** + * Update a dedicated host. + * + * This request updates a dedicated host with the information in a provided dedicated host patch. The dedicated host + * patch object is structured in the same way as a retrieved dedicated host and contains only the information to be + * updated. + * + * @param updateDedicatedHostOptions the {@link UpdateDedicatedHostOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link DedicatedHost} + */ + public ServiceCall updateDedicatedHost(UpdateDedicatedHostOptions updateDedicatedHostOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateDedicatedHostOptions, + "updateDedicatedHostOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateInstanceOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateInstance"); + pathParamsMap.put("id", updateDedicatedHostOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_hosts/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateDedicatedHost"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); - if (updateInstanceOptions.ifMatch() != null) { - builder.header("If-Match", updateInstanceOptions.ifMatch()); - } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateInstanceOptions.instancePatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateDedicatedHostOptions.dedicatedHostPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve initialization configuration for an instance. + * Update a dedicated host disk. * - * This request retrieves configuration used to initialize the instance, such as SSH keys and the Windows - * administrator password. These can subsequently be changed on the instance and therefore may not be current. + * This request updates the dedicated host disk with the information in a provided patch. * - * @param getInstanceInitializationOptions the {@link GetInstanceInitializationOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceInitialization} + * @param updateDedicatedHostDiskOptions the {@link UpdateDedicatedHostDiskOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link DedicatedHostDisk} */ - public ServiceCall getInstanceInitialization(GetInstanceInitializationOptions getInstanceInitializationOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceInitializationOptions, - "getInstanceInitializationOptions cannot be null"); + public ServiceCall updateDedicatedHostDisk(UpdateDedicatedHostDiskOptions updateDedicatedHostDiskOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateDedicatedHostDiskOptions, + "updateDedicatedHostDiskOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getInstanceInitializationOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{id}/initialization", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceInitialization"); + pathParamsMap.put("dedicated_host_id", updateDedicatedHostDiskOptions.dedicatedHostId()); + pathParamsMap.put("id", updateDedicatedHostDiskOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_hosts/{dedicated_host_id}/disks/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateDedicatedHostDisk"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateDedicatedHostDiskOptions.dedicatedHostDiskPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create an instance action. + * Update a dedicated host group. * - * This request creates a new action which will be queued up to run as soon as any pending or running actions have - * completed. + * This request updates a dedicated host group with the information in a provided dedicated host group patch. The + * dedicated host group patch object is structured in the same way as a retrieved dedicated host group and contains + * only the information to be updated. * - * @param createInstanceActionOptions the {@link CreateInstanceActionOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceAction} + * @param updateDedicatedHostGroupOptions the {@link UpdateDedicatedHostGroupOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link DedicatedHostGroup} */ - public ServiceCall createInstanceAction(CreateInstanceActionOptions createInstanceActionOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createInstanceActionOptions, - "createInstanceActionOptions cannot be null"); + public ServiceCall updateDedicatedHostGroup(UpdateDedicatedHostGroupOptions updateDedicatedHostGroupOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateDedicatedHostGroupOptions, + "updateDedicatedHostGroupOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", createInstanceActionOptions.instanceId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/actions", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createInstanceAction"); + pathParamsMap.put("id", updateDedicatedHostGroupOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_host/groups/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateDedicatedHostGroup"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("type", createInstanceActionOptions.type()); - if (createInstanceActionOptions.force() != null) { - contentJson.addProperty("force", createInstanceActionOptions.force()); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateDedicatedHostGroupOptions.dedicatedHostGroupPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List cluster network attachments on an instance. + * Bind a reserved IP to an endpoint gateway. * - * This request lists cluster network attachments on an instance. A cluster network attachment represents a device on - * the instance to which a cluster network interface is attached. + * This request binds the specified reserved IP to the specified endpoint gateway. The reserved IP: * - * @param listInstanceClusterNetworkAttachmentsOptions the {@link ListInstanceClusterNetworkAttachmentsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceClusterNetworkAttachmentCollection} + * - must currently be unbound, or not required by its target + * - must not be in the same zone as any other reserved IP bound to the endpoint gateway. + * + * @param addEndpointGatewayIpOptions the {@link AddEndpointGatewayIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ReservedIP} */ - public ServiceCall listInstanceClusterNetworkAttachments(ListInstanceClusterNetworkAttachmentsOptions listInstanceClusterNetworkAttachmentsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listInstanceClusterNetworkAttachmentsOptions, - "listInstanceClusterNetworkAttachmentsOptions cannot be null"); + public ServiceCall addEndpointGatewayIp(AddEndpointGatewayIpOptions addEndpointGatewayIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(addEndpointGatewayIpOptions, + "addEndpointGatewayIpOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", listInstanceClusterNetworkAttachmentsOptions.instanceId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/cluster_network_attachments", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceClusterNetworkAttachments"); + pathParamsMap.put("endpoint_gateway_id", addEndpointGatewayIpOptions.endpointGatewayId()); + pathParamsMap.put("id", addEndpointGatewayIpOptions.id()); + RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/endpoint_gateways/{endpoint_gateway_id}/ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "addEndpointGatewayIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listInstanceClusterNetworkAttachmentsOptions.start() != null) { - builder.query("start", String.valueOf(listInstanceClusterNetworkAttachmentsOptions.start())); - } - if (listInstanceClusterNetworkAttachmentsOptions.limit() != null) { - builder.query("limit", String.valueOf(listInstanceClusterNetworkAttachmentsOptions.limit())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create a cluster network attachment. - * - * This request creates a cluster network attachment from an instance cluster network attachment prototype object. A - * cluster network attachment will attach the instance to a cluster network. The cluster network attachment prototype - * must specify a cluster network interface identity or a cluster network interface prototype. + * Create an endpoint gateway. * - * The instance must be in a `stopped` or `stopping` state to create an instance cluster network attachment. + * This request creates a new endpoint gateway from an endpoint gateway prototype object. The prototype object is + * structured in the same way as a retrieved endpoint gateway, and contains the information necessary to create a new + * endpoint gateway. An endpoint gateway maps one or more reserved IPs in a VPC to a target service outside the VPC. * - * @param createClusterNetworkAttachmentOptions the {@link CreateClusterNetworkAttachmentOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceClusterNetworkAttachment} + * @param createEndpointGatewayOptions the {@link CreateEndpointGatewayOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link EndpointGateway} */ - public ServiceCall createClusterNetworkAttachment(CreateClusterNetworkAttachmentOptions createClusterNetworkAttachmentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createClusterNetworkAttachmentOptions, - "createClusterNetworkAttachmentOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", createClusterNetworkAttachmentOptions.instanceId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/cluster_network_attachments", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createClusterNetworkAttachment"); + public ServiceCall createEndpointGateway(CreateEndpointGatewayOptions createEndpointGatewayOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createEndpointGatewayOptions, + "createEndpointGatewayOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/endpoint_gateways")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createEndpointGateway"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } @@ -3680,430 +3607,453 @@ public ServiceCall createClusterNetworkAttachm builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); final JsonObject contentJson = new JsonObject(); - contentJson.add("cluster_network_interface", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createClusterNetworkAttachmentOptions.clusterNetworkInterface())); - if (createClusterNetworkAttachmentOptions.before() != null) { - contentJson.add("before", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createClusterNetworkAttachmentOptions.before())); + contentJson.add("target", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createEndpointGatewayOptions.target())); + contentJson.add("vpc", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createEndpointGatewayOptions.vpc())); + if (createEndpointGatewayOptions.allowDnsResolutionBinding() != null) { + contentJson.addProperty("allow_dns_resolution_binding", createEndpointGatewayOptions.allowDnsResolutionBinding()); } - if (createClusterNetworkAttachmentOptions.name() != null) { - contentJson.addProperty("name", createClusterNetworkAttachmentOptions.name()); + if (createEndpointGatewayOptions.ips() != null) { + contentJson.add("ips", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createEndpointGatewayOptions.ips())); + } + if (createEndpointGatewayOptions.name() != null) { + contentJson.addProperty("name", createEndpointGatewayOptions.name()); + } + if (createEndpointGatewayOptions.resourceGroup() != null) { + contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createEndpointGatewayOptions.resourceGroup())); + } + if (createEndpointGatewayOptions.securityGroups() != null) { + contentJson.add("security_groups", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createEndpointGatewayOptions.securityGroups())); } builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete an instance cluster network attachment. + * Delete an endpoint gateway. * - * This request deletes an instance cluster network attachment. The instance must be in a - * `stopped` or `stopping` state to delete an instance cluster network attachment. + * This request deletes an endpoint gateway. This operation cannot be reversed. * - * This operation cannot be reversed. + * Reserved IPs that were bound to the endpoint gateway will be released if their + * `auto_delete` property is set to true. * - * @param deleteInstanceClusterNetworkAttachmentOptions the {@link DeleteInstanceClusterNetworkAttachmentOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceClusterNetworkAttachment} + * @param deleteEndpointGatewayOptions the {@link DeleteEndpointGatewayOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall deleteInstanceClusterNetworkAttachment(DeleteInstanceClusterNetworkAttachmentOptions deleteInstanceClusterNetworkAttachmentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteInstanceClusterNetworkAttachmentOptions, - "deleteInstanceClusterNetworkAttachmentOptions cannot be null"); + public ServiceCall deleteEndpointGateway(DeleteEndpointGatewayOptions deleteEndpointGatewayOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteEndpointGatewayOptions, + "deleteEndpointGatewayOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", deleteInstanceClusterNetworkAttachmentOptions.instanceId()); - pathParamsMap.put("id", deleteInstanceClusterNetworkAttachmentOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/cluster_network_attachments/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteInstanceClusterNetworkAttachment"); + pathParamsMap.put("id", deleteEndpointGatewayOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/endpoint_gateways/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteEndpointGateway"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve an instance cluster network attachment. + * Retrieve an endpoint gateway. * - * This request retrieves a single instance cluster network attachment specified by the identifier in the URL. + * This request retrieves a single endpoint gateway specified by the identifier in the URL. * - * @param getInstanceClusterNetworkAttachmentOptions the {@link GetInstanceClusterNetworkAttachmentOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceClusterNetworkAttachment} + * @param getEndpointGatewayOptions the {@link GetEndpointGatewayOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link EndpointGateway} */ - public ServiceCall getInstanceClusterNetworkAttachment(GetInstanceClusterNetworkAttachmentOptions getInstanceClusterNetworkAttachmentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceClusterNetworkAttachmentOptions, - "getInstanceClusterNetworkAttachmentOptions cannot be null"); + public ServiceCall getEndpointGateway(GetEndpointGatewayOptions getEndpointGatewayOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getEndpointGatewayOptions, + "getEndpointGatewayOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", getInstanceClusterNetworkAttachmentOptions.instanceId()); - pathParamsMap.put("id", getInstanceClusterNetworkAttachmentOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/cluster_network_attachments/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceClusterNetworkAttachment"); - for (Entry header : sdkHeaders.entrySet()) { + pathParamsMap.put("id", getEndpointGatewayOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/endpoint_gateways/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getEndpointGateway"); + for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update an instance cluster network attachment. + * Retrieve a reserved IP bound to an endpoint gateway. * - * This request updates an instance cluster network attachment with the information provided in an instance network - * interface patch object. The instance cluster network attachment patch object is structured in the same way as a - * retrieved instance cluster network attachment and needs to contain only the information to be updated. + * This request retrieves the specified reserved IP address if it is bound to the endpoint gateway specified in the + * URL. * - * @param updateInstanceClusterNetworkAttachmentOptions the {@link UpdateInstanceClusterNetworkAttachmentOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceClusterNetworkAttachment} + * @param getEndpointGatewayIpOptions the {@link GetEndpointGatewayIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ReservedIP} */ - public ServiceCall updateInstanceClusterNetworkAttachment(UpdateInstanceClusterNetworkAttachmentOptions updateInstanceClusterNetworkAttachmentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateInstanceClusterNetworkAttachmentOptions, - "updateInstanceClusterNetworkAttachmentOptions cannot be null"); + public ServiceCall getEndpointGatewayIp(GetEndpointGatewayIpOptions getEndpointGatewayIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getEndpointGatewayIpOptions, + "getEndpointGatewayIpOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", updateInstanceClusterNetworkAttachmentOptions.instanceId()); - pathParamsMap.put("id", updateInstanceClusterNetworkAttachmentOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/cluster_network_attachments/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateInstanceClusterNetworkAttachment"); + pathParamsMap.put("endpoint_gateway_id", getEndpointGatewayIpOptions.endpointGatewayId()); + pathParamsMap.put("id", getEndpointGatewayIpOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/endpoint_gateways/{endpoint_gateway_id}/ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getEndpointGatewayIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateInstanceClusterNetworkAttachmentOptions.instanceClusterNetworkAttachmentPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create a console access token for an instance. + * List reserved IPs bound to an endpoint gateway. * - * This request creates a new single-use console access token for an instance. All console configuration is provided - * at token create time, and the token is subsequently used in the `access_token` query parameter for the WebSocket - * request. The access token is only valid for a short period of time, and a maximum of one token is valid for a - * given instance at a time. + * This request lists reserved IPs bound to an endpoint gateway. * - * @param createInstanceConsoleAccessTokenOptions the {@link CreateInstanceConsoleAccessTokenOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceConsoleAccessToken} + * @param listEndpointGatewayIpsOptions the {@link ListEndpointGatewayIpsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ReservedIPCollectionEndpointGatewayContext} */ - public ServiceCall createInstanceConsoleAccessToken(CreateInstanceConsoleAccessTokenOptions createInstanceConsoleAccessTokenOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createInstanceConsoleAccessTokenOptions, - "createInstanceConsoleAccessTokenOptions cannot be null"); + public ServiceCall listEndpointGatewayIps(ListEndpointGatewayIpsOptions listEndpointGatewayIpsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listEndpointGatewayIpsOptions, + "listEndpointGatewayIpsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", createInstanceConsoleAccessTokenOptions.instanceId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/console_access_token", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createInstanceConsoleAccessToken"); + pathParamsMap.put("endpoint_gateway_id", listEndpointGatewayIpsOptions.endpointGatewayId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/endpoint_gateways/{endpoint_gateway_id}/ips", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listEndpointGatewayIps"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("console_type", createInstanceConsoleAccessTokenOptions.consoleType()); - if (createInstanceConsoleAccessTokenOptions.force() != null) { - contentJson.addProperty("force", createInstanceConsoleAccessTokenOptions.force()); + if (listEndpointGatewayIpsOptions.start() != null) { + builder.query("start", String.valueOf(listEndpointGatewayIpsOptions.start())); } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listEndpointGatewayIpsOptions.limit() != null) { + builder.query("limit", String.valueOf(listEndpointGatewayIpsOptions.limit())); + } + if (listEndpointGatewayIpsOptions.sort() != null) { + builder.query("sort", String.valueOf(listEndpointGatewayIpsOptions.sort())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List disks on an instance. + * List endpoint gateways. * - * This request lists disks on an instance. A disk is a block device that is locally attached to the instance's - * physical host and is also referred to as instance storage. By default, the listed disks are sorted by their - * `created_at` property values, with the newest disk first. + * This request lists endpoint gateways in the region. An endpoint gateway maps one or more reserved IPs in a VPC to a + * target outside the VPC. * - * @param listInstanceDisksOptions the {@link ListInstanceDisksOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceDiskCollection} + * The endpoint gateways will be sorted by their `created_at` property values, with newest endpoint gateway first. + * Endpoint gateways with identical `created_at` property values will in turn be sorted by ascending `name` property + * values. + * + * @param listEndpointGatewaysOptions the {@link ListEndpointGatewaysOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link EndpointGatewayCollection} */ - public ServiceCall listInstanceDisks(ListInstanceDisksOptions listInstanceDisksOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listInstanceDisksOptions, - "listInstanceDisksOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", listInstanceDisksOptions.instanceId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/disks", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceDisks"); + public ServiceCall listEndpointGateways(ListEndpointGatewaysOptions listEndpointGatewaysOptions) { + if (listEndpointGatewaysOptions == null) { + listEndpointGatewaysOptions = new ListEndpointGatewaysOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/endpoint_gateways")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listEndpointGateways"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listEndpointGatewaysOptions.name() != null) { + builder.query("name", String.valueOf(listEndpointGatewaysOptions.name())); + } + if (listEndpointGatewaysOptions.start() != null) { + builder.query("start", String.valueOf(listEndpointGatewaysOptions.start())); + } + if (listEndpointGatewaysOptions.limit() != null) { + builder.query("limit", String.valueOf(listEndpointGatewaysOptions.limit())); + } + if (listEndpointGatewaysOptions.resourceGroupId() != null) { + builder.query("resource_group.id", String.valueOf(listEndpointGatewaysOptions.resourceGroupId())); + } + if (listEndpointGatewaysOptions.lifecycleState() != null) { + builder.query("lifecycle_state", RequestUtils.join(listEndpointGatewaysOptions.lifecycleState(), ",")); + } + if (listEndpointGatewaysOptions.vpcId() != null) { + builder.query("vpc.id", String.valueOf(listEndpointGatewaysOptions.vpcId())); + } + if (listEndpointGatewaysOptions.vpcCrn() != null) { + builder.query("vpc.crn", String.valueOf(listEndpointGatewaysOptions.vpcCrn())); + } + if (listEndpointGatewaysOptions.vpcName() != null) { + builder.query("vpc.name", String.valueOf(listEndpointGatewaysOptions.vpcName())); + } + if (listEndpointGatewaysOptions.allowDnsResolutionBinding() != null) { + builder.query("allow_dns_resolution_binding", String.valueOf(listEndpointGatewaysOptions.allowDnsResolutionBinding())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve an instance disk. + * List endpoint gateways. * - * This request retrieves a single instance disk specified by the identifier in the URL. + * This request lists endpoint gateways in the region. An endpoint gateway maps one or more reserved IPs in a VPC to a + * target outside the VPC. * - * @param getInstanceDiskOptions the {@link GetInstanceDiskOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceDisk} + * The endpoint gateways will be sorted by their `created_at` property values, with newest endpoint gateway first. + * Endpoint gateways with identical `created_at` property values will in turn be sorted by ascending `name` property + * values. + * + * @return a {@link ServiceCall} with a result of type {@link EndpointGatewayCollection} */ - public ServiceCall getInstanceDisk(GetInstanceDiskOptions getInstanceDiskOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceDiskOptions, - "getInstanceDiskOptions cannot be null"); + public ServiceCall listEndpointGateways() { + return listEndpointGateways(null); + } + + /** + * Unbind a reserved IP from an endpoint gateway. + * + * This request unbinds the specified reserved IP from the specified endpoint gateway. If the reserved IP has + * `auto_delete` set to `true`, the reserved IP will be deleted. + * + * @param removeEndpointGatewayIpOptions the {@link RemoveEndpointGatewayIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result + */ + public ServiceCall removeEndpointGatewayIp(RemoveEndpointGatewayIpOptions removeEndpointGatewayIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(removeEndpointGatewayIpOptions, + "removeEndpointGatewayIpOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", getInstanceDiskOptions.instanceId()); - pathParamsMap.put("id", getInstanceDiskOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/disks/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceDisk"); + pathParamsMap.put("endpoint_gateway_id", removeEndpointGatewayIpOptions.endpointGatewayId()); + pathParamsMap.put("id", removeEndpointGatewayIpOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/endpoint_gateways/{endpoint_gateway_id}/ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "removeEndpointGatewayIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Update an instance disk. + * Update an endpoint gateway. * - * This request updates the instance disk with the information in a provided patch. + * This request updates an endpoint gateway with the information in a provided endpoint gateway patch. The endpoint + * gateway patch object is structured in the same way as a retrieved endpoint gateway and contains only the + * information to be updated. * - * @param updateInstanceDiskOptions the {@link UpdateInstanceDiskOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceDisk} + * @param updateEndpointGatewayOptions the {@link UpdateEndpointGatewayOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link EndpointGateway} */ - public ServiceCall updateInstanceDisk(UpdateInstanceDiskOptions updateInstanceDiskOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateInstanceDiskOptions, - "updateInstanceDiskOptions cannot be null"); + public ServiceCall updateEndpointGateway(UpdateEndpointGatewayOptions updateEndpointGatewayOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateEndpointGatewayOptions, + "updateEndpointGatewayOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", updateInstanceDiskOptions.instanceId()); - pathParamsMap.put("id", updateInstanceDiskOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/disks/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateInstanceDisk"); + pathParamsMap.put("id", updateEndpointGatewayOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/endpoint_gateways/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateEndpointGateway"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateInstanceDiskOptions.instanceDiskPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateEndpointGatewayOptions.endpointGatewayPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List network attachments on an instance. - * - * This request lists network attachments on an instance. A network attachment represents a device on the instance to - * which a virtual network interface is attached. + * Reserve a floating IP. * - * The network attachments will be sorted by their `created_at` property values, with newest network attachments - * first. Network attachments with identical `created_at` property values will in turn be sorted by ascending `name` - * property values. + * This request reserves a new floating IP. * - * @param listInstanceNetworkAttachmentsOptions the {@link ListInstanceNetworkAttachmentsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceNetworkAttachmentCollection} + * @param createFloatingIpOptions the {@link CreateFloatingIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link FloatingIP} */ - public ServiceCall listInstanceNetworkAttachments(ListInstanceNetworkAttachmentsOptions listInstanceNetworkAttachmentsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listInstanceNetworkAttachmentsOptions, - "listInstanceNetworkAttachmentsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", listInstanceNetworkAttachmentsOptions.instanceId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_attachments", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceNetworkAttachments"); + public ServiceCall createFloatingIp(CreateFloatingIpOptions createFloatingIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createFloatingIpOptions, + "createFloatingIpOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/floating_ips")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createFloatingIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createFloatingIpOptions.floatingIpPrototype()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create a network attachment on an instance. + * Delete a floating IP. * - * This request creates a new instance network attachment from an instance network attachment prototype object. The - * prototype object is structured in the same way as a retrieved instance network attachment, and contains the - * information necessary to create the new instance network attachment. + * This request disassociates (if associated) and releases a floating IP. This operation cannot be reversed. For this + * request to succeed, the floating IP must not be required by another resource, such as a public gateway. * - * @param createInstanceNetworkAttachmentOptions the {@link CreateInstanceNetworkAttachmentOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceNetworkAttachment} + * @param deleteFloatingIpOptions the {@link DeleteFloatingIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall createInstanceNetworkAttachment(CreateInstanceNetworkAttachmentOptions createInstanceNetworkAttachmentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createInstanceNetworkAttachmentOptions, - "createInstanceNetworkAttachmentOptions cannot be null"); + public ServiceCall deleteFloatingIp(DeleteFloatingIpOptions deleteFloatingIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteFloatingIpOptions, + "deleteFloatingIpOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", createInstanceNetworkAttachmentOptions.instanceId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_attachments", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createInstanceNetworkAttachment"); + pathParamsMap.put("id", deleteFloatingIpOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/floating_ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteFloatingIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.add("virtual_network_interface", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createInstanceNetworkAttachmentOptions.virtualNetworkInterface())); - if (createInstanceNetworkAttachmentOptions.name() != null) { - contentJson.addProperty("name", createInstanceNetworkAttachmentOptions.name()); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Delete an instance network attachment. + * Retrieve a floating IP. * - * This request deletes an instance network attachment. This operation cannot be reversed. Any floating IPs associated - * with the instance network attachment are implicitly disassociated. All flow log collectors with `auto_delete` set - * to `true` targeting the instance network attachment are automatically deleted. The primary instance network - * attachment is not allowed to be deleted. + * This request retrieves a single floating IP specified by the identifier in the URL. * - * @param deleteInstanceNetworkAttachmentOptions the {@link DeleteInstanceNetworkAttachmentOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param getFloatingIpOptions the {@link GetFloatingIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link FloatingIP} */ - public ServiceCall deleteInstanceNetworkAttachment(DeleteInstanceNetworkAttachmentOptions deleteInstanceNetworkAttachmentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteInstanceNetworkAttachmentOptions, - "deleteInstanceNetworkAttachmentOptions cannot be null"); + public ServiceCall getFloatingIp(GetFloatingIpOptions getFloatingIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getFloatingIpOptions, + "getFloatingIpOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", deleteInstanceNetworkAttachmentOptions.instanceId()); - pathParamsMap.put("id", deleteInstanceNetworkAttachmentOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_attachments/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteInstanceNetworkAttachment"); + pathParamsMap.put("id", getFloatingIpOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/floating_ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getFloatingIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve an instance network attachment. + * List floating IPs. * - * This request retrieves a single instance network attachment specified by the identifier in the URL. + * This request lists floating IPs in the region. Floating IPs allow inbound and outbound traffic from the Internet to + * an instance. * - * @param getInstanceNetworkAttachmentOptions the {@link GetInstanceNetworkAttachmentOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceNetworkAttachment} + * @param listFloatingIpsOptions the {@link ListFloatingIpsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link FloatingIPCollection} */ - public ServiceCall getInstanceNetworkAttachment(GetInstanceNetworkAttachmentOptions getInstanceNetworkAttachmentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceNetworkAttachmentOptions, - "getInstanceNetworkAttachmentOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", getInstanceNetworkAttachmentOptions.instanceId()); - pathParamsMap.put("id", getInstanceNetworkAttachmentOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_attachments/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceNetworkAttachment"); + public ServiceCall listFloatingIps(ListFloatingIpsOptions listFloatingIpsOptions) { + if (listFloatingIpsOptions == null) { + listFloatingIpsOptions = new ListFloatingIpsOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/floating_ips")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listFloatingIps"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listFloatingIpsOptions.start() != null) { + builder.query("start", String.valueOf(listFloatingIpsOptions.start())); + } + if (listFloatingIpsOptions.limit() != null) { + builder.query("limit", String.valueOf(listFloatingIpsOptions.limit())); + } + if (listFloatingIpsOptions.resourceGroupId() != null) { + builder.query("resource_group.id", String.valueOf(listFloatingIpsOptions.resourceGroupId())); + } + if (listFloatingIpsOptions.sort() != null) { + builder.query("sort", String.valueOf(listFloatingIpsOptions.sort())); + } + if (listFloatingIpsOptions.targetId() != null) { + builder.query("target.id", String.valueOf(listFloatingIpsOptions.targetId())); + } + if (listFloatingIpsOptions.targetCrn() != null) { + builder.query("target.crn", String.valueOf(listFloatingIpsOptions.targetCrn())); + } + if (listFloatingIpsOptions.targetName() != null) { + builder.query("target.name", String.valueOf(listFloatingIpsOptions.targetName())); + } + if (listFloatingIpsOptions.targetResourceType() != null) { + builder.query("target.resource_type", String.valueOf(listFloatingIpsOptions.targetResourceType())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update an instance network attachment. + * List floating IPs. * - * This request updates an instance network attachment with the information provided in an instance network interface - * patch object. The instance network attachment patch object is structured in the same way as a retrieved instance - * network attachment and needs to contain only the information to be updated. + * This request lists floating IPs in the region. Floating IPs allow inbound and outbound traffic from the Internet to + * an instance. * - * @param updateInstanceNetworkAttachmentOptions the {@link UpdateInstanceNetworkAttachmentOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceNetworkAttachment} + * @return a {@link ServiceCall} with a result of type {@link FloatingIPCollection} */ - public ServiceCall updateInstanceNetworkAttachment(UpdateInstanceNetworkAttachmentOptions updateInstanceNetworkAttachmentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateInstanceNetworkAttachmentOptions, - "updateInstanceNetworkAttachmentOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", updateInstanceNetworkAttachmentOptions.instanceId()); - pathParamsMap.put("id", updateInstanceNetworkAttachmentOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_attachments/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateInstanceNetworkAttachment"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateInstanceNetworkAttachmentOptions.instanceNetworkAttachmentPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); - return createServiceCall(builder.build(), responseConverter); + public ServiceCall listFloatingIps() { + return listFloatingIps(null); } /** - * List network interfaces on an instance. - * - * This request lists network interfaces on an instance. An instance network interface is an abstract representation - * of a network device and attaches an instance to a single subnet. Each network interface on an instance can attach - * to any subnet in the zone, including subnets that are already attached to the instance. Multiple network interfaces - * on the instance may also attach to the same subnet. + * Update a floating IP. * - * If this instance has network attachments, each returned network interface is a [read-only - * representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding - * network attachment and its attached virtual network interface. + * This request updates a floating IP's name and/or target. * - * @param listInstanceNetworkInterfacesOptions the {@link ListInstanceNetworkInterfacesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link NetworkInterfaceUnpaginatedCollection} + * @param updateFloatingIpOptions the {@link UpdateFloatingIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link FloatingIP} */ - public ServiceCall listInstanceNetworkInterfaces(ListInstanceNetworkInterfacesOptions listInstanceNetworkInterfacesOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listInstanceNetworkInterfacesOptions, - "listInstanceNetworkInterfacesOptions cannot be null"); + public ServiceCall updateFloatingIp(UpdateFloatingIpOptions updateFloatingIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateFloatingIpOptions, + "updateFloatingIpOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", listInstanceNetworkInterfacesOptions.instanceId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_interfaces", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceNetworkInterfaces"); + pathParamsMap.put("id", updateFloatingIpOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/floating_ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateFloatingIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateFloatingIpOptions.floatingIpPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create a network interface on an instance. - * - * This request creates a new instance network interface from an instance network interface prototype object. The - * prototype object is structured in the same way as a retrieved instance network interface, and contains the - * information necessary to create the new instance network interface. Any subnet in the instance's VPC may be - * specified. Addresses on the instance network interface must be within the specified subnet's CIDR blocks. + * Create a flow log collector. * - * If this instance has network attachments, each network interface is a [read-only - * representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding - * network attachment and its attached virtual network interface, and new network interfaces are not allowed to be - * created. + * This request creates and starts a new flow log collector from a flow log collector prototype object. The prototype + * object is structured in the same way as a retrieved flow log collector, and contains the information necessary to + * create and start the new flow log collector. * - * @param createInstanceNetworkInterfaceOptions the {@link CreateInstanceNetworkInterfaceOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link NetworkInterface} + * @param createFlowLogCollectorOptions the {@link CreateFlowLogCollectorOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link FlowLogCollector} */ - public ServiceCall createInstanceNetworkInterface(CreateInstanceNetworkInterfaceOptions createInstanceNetworkInterfaceOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createInstanceNetworkInterfaceOptions, - "createInstanceNetworkInterfaceOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", createInstanceNetworkInterfaceOptions.instanceId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_interfaces", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createInstanceNetworkInterface"); + public ServiceCall createFlowLogCollector(CreateFlowLogCollectorOptions createFlowLogCollectorOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createFlowLogCollectorOptions, + "createFlowLogCollectorOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/flow_log_collectors")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createFlowLogCollector"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } @@ -4111,48 +4061,40 @@ public ServiceCall createInstanceNetworkInterface(CreateInstan builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); final JsonObject contentJson = new JsonObject(); - contentJson.add("subnet", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createInstanceNetworkInterfaceOptions.subnet())); - if (createInstanceNetworkInterfaceOptions.allowIpSpoofing() != null) { - contentJson.addProperty("allow_ip_spoofing", createInstanceNetworkInterfaceOptions.allowIpSpoofing()); - } - if (createInstanceNetworkInterfaceOptions.name() != null) { - contentJson.addProperty("name", createInstanceNetworkInterfaceOptions.name()); + contentJson.add("storage_bucket", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createFlowLogCollectorOptions.storageBucket())); + contentJson.add("target", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createFlowLogCollectorOptions.target())); + if (createFlowLogCollectorOptions.active() != null) { + contentJson.addProperty("active", createFlowLogCollectorOptions.active()); } - if (createInstanceNetworkInterfaceOptions.primaryIp() != null) { - contentJson.add("primary_ip", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createInstanceNetworkInterfaceOptions.primaryIp())); + if (createFlowLogCollectorOptions.name() != null) { + contentJson.addProperty("name", createFlowLogCollectorOptions.name()); } - if (createInstanceNetworkInterfaceOptions.securityGroups() != null) { - contentJson.add("security_groups", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createInstanceNetworkInterfaceOptions.securityGroups())); + if (createFlowLogCollectorOptions.resourceGroup() != null) { + contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createFlowLogCollectorOptions.resourceGroup())); } builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete an instance network interface. + * Delete a flow log collector. * - * This request deletes an instance network interface. This operation cannot be reversed. Any floating IPs associated - * with the instance network interface are implicitly disassociated. All flow log collectors with `auto_delete` set to - * `true` targeting the instance network interface are automatically deleted. The primary instance network interface - * is not allowed to be deleted. + * This request stops and deletes a flow log collector. This operation cannot be reversed. * - * If this instance has network attachments, this network interface is a [read-only - * representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding - * network attachment and its attached virtual network interface, and is not allowed to be deleted. + * Collected flow logs remain available within the flow log collector's Cloud Object Storage bucket. * - * @param deleteInstanceNetworkInterfaceOptions the {@link DeleteInstanceNetworkInterfaceOptions} containing the options for the call + * @param deleteFlowLogCollectorOptions the {@link DeleteFlowLogCollectorOptions} containing the options for the call * @return a {@link ServiceCall} with a void result */ - public ServiceCall deleteInstanceNetworkInterface(DeleteInstanceNetworkInterfaceOptions deleteInstanceNetworkInterfaceOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteInstanceNetworkInterfaceOptions, - "deleteInstanceNetworkInterfaceOptions cannot be null"); + public ServiceCall deleteFlowLogCollector(DeleteFlowLogCollectorOptions deleteFlowLogCollectorOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteFlowLogCollectorOptions, + "deleteFlowLogCollectorOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", deleteInstanceNetworkInterfaceOptions.instanceId()); - pathParamsMap.put("id", deleteInstanceNetworkInterfaceOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_interfaces/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteInstanceNetworkInterface"); + pathParamsMap.put("id", deleteFlowLogCollectorOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/flow_log_collectors/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteFlowLogCollector"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } @@ -4163,300 +4105,298 @@ public ServiceCall deleteInstanceNetworkInterface(DeleteInstanceNetworkInt } /** - * Retrieve an instance network interface. - * - * This request retrieves a single instance network interface specified by the identifier in the URL. + * Retrieve a flow log collector. * - * If this instance has network attachments, the retrieved network interface is a - * [read-only representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its - * corresponding network attachment and its attached virtual network interface. + * This request retrieves a single flow log collector specified by the identifier in the URL. * - * @param getInstanceNetworkInterfaceOptions the {@link GetInstanceNetworkInterfaceOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link NetworkInterface} + * @param getFlowLogCollectorOptions the {@link GetFlowLogCollectorOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link FlowLogCollector} */ - public ServiceCall getInstanceNetworkInterface(GetInstanceNetworkInterfaceOptions getInstanceNetworkInterfaceOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceNetworkInterfaceOptions, - "getInstanceNetworkInterfaceOptions cannot be null"); + public ServiceCall getFlowLogCollector(GetFlowLogCollectorOptions getFlowLogCollectorOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getFlowLogCollectorOptions, + "getFlowLogCollectorOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", getInstanceNetworkInterfaceOptions.instanceId()); - pathParamsMap.put("id", getInstanceNetworkInterfaceOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_interfaces/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceNetworkInterface"); + pathParamsMap.put("id", getFlowLogCollectorOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/flow_log_collectors/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getFlowLogCollector"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update an instance network interface. - * - * This request updates an instance network interface with the information provided in an instance network interface - * patch object. The instance network interface patch object is structured in the same way as a retrieved instance - * network interface and needs to contain only the information to be updated. + * List flow log collectors. * - * If this instance has network attachments, this network interface is a [read-only - * representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding - * network attachment and its attached virtual network interface, and is not allowed to be updated. + * This request lists flow log collectors in the region. A [flow log + * collector](https://cloud.ibm.com/docs/vpc?topic=vpc-flow-logs) summarizes TCP and UDP data sent over the instance + * network interfaces and instance network attachments contained within its target. The collected flow logs are + * written to a cloud object storage bucket, where they can be + * [viewed](https://cloud.ibm.com/docs/vpc?topic=vpc-fl-analyze). * - * @param updateInstanceNetworkInterfaceOptions the {@link UpdateInstanceNetworkInterfaceOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link NetworkInterface} + * @param listFlowLogCollectorsOptions the {@link ListFlowLogCollectorsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link FlowLogCollectorCollection} */ - public ServiceCall updateInstanceNetworkInterface(UpdateInstanceNetworkInterfaceOptions updateInstanceNetworkInterfaceOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateInstanceNetworkInterfaceOptions, - "updateInstanceNetworkInterfaceOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", updateInstanceNetworkInterfaceOptions.instanceId()); - pathParamsMap.put("id", updateInstanceNetworkInterfaceOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_interfaces/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateInstanceNetworkInterface"); + public ServiceCall listFlowLogCollectors(ListFlowLogCollectorsOptions listFlowLogCollectorsOptions) { + if (listFlowLogCollectorsOptions == null) { + listFlowLogCollectorsOptions = new ListFlowLogCollectorsOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/flow_log_collectors")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listFlowLogCollectors"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateInstanceNetworkInterfaceOptions.networkInterfacePatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listFlowLogCollectorsOptions.start() != null) { + builder.query("start", String.valueOf(listFlowLogCollectorsOptions.start())); + } + if (listFlowLogCollectorsOptions.limit() != null) { + builder.query("limit", String.valueOf(listFlowLogCollectorsOptions.limit())); + } + if (listFlowLogCollectorsOptions.resourceGroupId() != null) { + builder.query("resource_group.id", String.valueOf(listFlowLogCollectorsOptions.resourceGroupId())); + } + if (listFlowLogCollectorsOptions.name() != null) { + builder.query("name", String.valueOf(listFlowLogCollectorsOptions.name())); + } + if (listFlowLogCollectorsOptions.vpcId() != null) { + builder.query("vpc.id", String.valueOf(listFlowLogCollectorsOptions.vpcId())); + } + if (listFlowLogCollectorsOptions.vpcCrn() != null) { + builder.query("vpc.crn", String.valueOf(listFlowLogCollectorsOptions.vpcCrn())); + } + if (listFlowLogCollectorsOptions.vpcName() != null) { + builder.query("vpc.name", String.valueOf(listFlowLogCollectorsOptions.vpcName())); + } + if (listFlowLogCollectorsOptions.targetId() != null) { + builder.query("target.id", String.valueOf(listFlowLogCollectorsOptions.targetId())); + } + if (listFlowLogCollectorsOptions.targetResourceType() != null) { + builder.query("target.resource_type", String.valueOf(listFlowLogCollectorsOptions.targetResourceType())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List floating IPs associated with an instance network interface. + * List flow log collectors. * - * This request lists floating IPs associated with an instance network interface. + * This request lists flow log collectors in the region. A [flow log + * collector](https://cloud.ibm.com/docs/vpc?topic=vpc-flow-logs) summarizes TCP and UDP data sent over the instance + * network interfaces and instance network attachments contained within its target. The collected flow logs are + * written to a cloud object storage bucket, where they can be + * [viewed](https://cloud.ibm.com/docs/vpc?topic=vpc-fl-analyze). * - * @param listInstanceNetworkInterfaceFloatingIpsOptions the {@link ListInstanceNetworkInterfaceFloatingIpsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link FloatingIPUnpaginatedCollection} + * @return a {@link ServiceCall} with a result of type {@link FlowLogCollectorCollection} */ - public ServiceCall listInstanceNetworkInterfaceFloatingIps(ListInstanceNetworkInterfaceFloatingIpsOptions listInstanceNetworkInterfaceFloatingIpsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listInstanceNetworkInterfaceFloatingIpsOptions, - "listInstanceNetworkInterfaceFloatingIpsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", listInstanceNetworkInterfaceFloatingIpsOptions.instanceId()); - pathParamsMap.put("network_interface_id", listInstanceNetworkInterfaceFloatingIpsOptions.networkInterfaceId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceNetworkInterfaceFloatingIps"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); - return createServiceCall(builder.build(), responseConverter); + public ServiceCall listFlowLogCollectors() { + return listFlowLogCollectors(null); } /** - * Disassociate a floating IP from an instance network interface. + * Update a flow log collector. * - * This request disassociates the specified floating IP from the specified instance network interface. + * This request updates a flow log collector with the information in a provided flow log collector patch. The flow log + * collector patch object is structured in the same way as a retrieved flow log collector and contains only the + * information to be updated. * - * @param removeInstanceNetworkInterfaceFloatingIpOptions the {@link RemoveInstanceNetworkInterfaceFloatingIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param updateFlowLogCollectorOptions the {@link UpdateFlowLogCollectorOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link FlowLogCollector} */ - public ServiceCall removeInstanceNetworkInterfaceFloatingIp(RemoveInstanceNetworkInterfaceFloatingIpOptions removeInstanceNetworkInterfaceFloatingIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(removeInstanceNetworkInterfaceFloatingIpOptions, - "removeInstanceNetworkInterfaceFloatingIpOptions cannot be null"); + public ServiceCall updateFlowLogCollector(UpdateFlowLogCollectorOptions updateFlowLogCollectorOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateFlowLogCollectorOptions, + "updateFlowLogCollectorOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", removeInstanceNetworkInterfaceFloatingIpOptions.instanceId()); - pathParamsMap.put("network_interface_id", removeInstanceNetworkInterfaceFloatingIpOptions.networkInterfaceId()); - pathParamsMap.put("id", removeInstanceNetworkInterfaceFloatingIpOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "removeInstanceNetworkInterfaceFloatingIp"); + pathParamsMap.put("id", updateFlowLogCollectorOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/flow_log_collectors/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateFlowLogCollector"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateFlowLogCollectorOptions.flowLogCollectorPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve associated floating IP. + * Retrieve a region. * - * This request retrieves a specified floating IP address if it is associated with the instance network interface and - * instance specified in the URL. + * This request retrieves a single region specified by the name in the URL. * - * @param getInstanceNetworkInterfaceFloatingIpOptions the {@link GetInstanceNetworkInterfaceFloatingIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link FloatingIP} + * @param getRegionOptions the {@link GetRegionOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Region} */ - public ServiceCall getInstanceNetworkInterfaceFloatingIp(GetInstanceNetworkInterfaceFloatingIpOptions getInstanceNetworkInterfaceFloatingIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceNetworkInterfaceFloatingIpOptions, - "getInstanceNetworkInterfaceFloatingIpOptions cannot be null"); + public ServiceCall getRegion(GetRegionOptions getRegionOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getRegionOptions, + "getRegionOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", getInstanceNetworkInterfaceFloatingIpOptions.instanceId()); - pathParamsMap.put("network_interface_id", getInstanceNetworkInterfaceFloatingIpOptions.networkInterfaceId()); - pathParamsMap.put("id", getInstanceNetworkInterfaceFloatingIpOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceNetworkInterfaceFloatingIp"); + pathParamsMap.put("name", getRegionOptions.name()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/regions/{name}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getRegion"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Associate a floating IP with an instance network interface. - * - * This request associates the specified floating IP with the specified instance network interface, replacing any - * existing association. - * - * The existing floating IP must: - * - not be required by another resource, such as a public gateway - * - be in the same `zone` as the instance + * Retrieve a zone. * - * A request body is not required, and if provided, is ignored. + * This request retrieves a single zone specified by the region and zone names in the URL. * - * @param addInstanceNetworkInterfaceFloatingIpOptions the {@link AddInstanceNetworkInterfaceFloatingIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link FloatingIP} + * @param getRegionZoneOptions the {@link GetRegionZoneOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Zone} */ - public ServiceCall addInstanceNetworkInterfaceFloatingIp(AddInstanceNetworkInterfaceFloatingIpOptions addInstanceNetworkInterfaceFloatingIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(addInstanceNetworkInterfaceFloatingIpOptions, - "addInstanceNetworkInterfaceFloatingIpOptions cannot be null"); + public ServiceCall getRegionZone(GetRegionZoneOptions getRegionZoneOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getRegionZoneOptions, + "getRegionZoneOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", addInstanceNetworkInterfaceFloatingIpOptions.instanceId()); - pathParamsMap.put("network_interface_id", addInstanceNetworkInterfaceFloatingIpOptions.networkInterfaceId()); - pathParamsMap.put("id", addInstanceNetworkInterfaceFloatingIpOptions.id()); - RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "addInstanceNetworkInterfaceFloatingIp"); + pathParamsMap.put("region_name", getRegionZoneOptions.regionName()); + pathParamsMap.put("name", getRegionZoneOptions.name()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/regions/{region_name}/zones/{name}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getRegionZone"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List the primary reserved IP for an instance network interface. + * List zones in a region. * - * This request lists the primary reserved IP for an instance network interface. + * This request lists zones in a region. Zones represent logically-isolated data centers with high-bandwidth and + * low-latency interconnects to other zones in the same region. Faults in a zone do not affect other zones. * - * @param listInstanceNetworkInterfaceIpsOptions the {@link ListInstanceNetworkInterfaceIpsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ReservedIPCollectionInstanceNetworkInterfaceContext} - * @deprecated this method is deprecated and may be removed in a future release + * @param listRegionZonesOptions the {@link ListRegionZonesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ZoneCollection} */ - @Deprecated - public ServiceCall listInstanceNetworkInterfaceIps(ListInstanceNetworkInterfaceIpsOptions listInstanceNetworkInterfaceIpsOptions) { - LOGGER.warning("A deprecated operation has been invoked: listInstanceNetworkInterfaceIps"); - com.ibm.cloud.sdk.core.util.Validator.notNull(listInstanceNetworkInterfaceIpsOptions, - "listInstanceNetworkInterfaceIpsOptions cannot be null"); + public ServiceCall listRegionZones(ListRegionZonesOptions listRegionZonesOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listRegionZonesOptions, + "listRegionZonesOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", listInstanceNetworkInterfaceIpsOptions.instanceId()); - pathParamsMap.put("network_interface_id", listInstanceNetworkInterfaceIpsOptions.networkInterfaceId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_interfaces/{network_interface_id}/ips", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceNetworkInterfaceIps"); + pathParamsMap.put("region_name", listRegionZonesOptions.regionName()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/regions/{region_name}/zones", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listRegionZones"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listInstanceNetworkInterfaceIpsOptions.start() != null) { - builder.query("start", String.valueOf(listInstanceNetworkInterfaceIpsOptions.start())); - } - if (listInstanceNetworkInterfaceIpsOptions.limit() != null) { - builder.query("limit", String.valueOf(listInstanceNetworkInterfaceIpsOptions.limit())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve the primary reserved IP. + * List regions. * - * This request retrieves the primary reserved IP for an instance network interface. + * This request lists regions. Each region is a separate geographic area that contains multiple isolated zones. + * Resources can be provisioned into one or more zones in a region. Each zone is isolated, but connected to other + * zones in the same region with low-latency and high-bandwidth links. Regions represent the top-level of fault + * isolation available. Resources deployed within a single region also benefit from the low latency afforded by + * geographic proximity. * - * @param getInstanceNetworkInterfaceIpOptions the {@link GetInstanceNetworkInterfaceIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ReservedIP} - * @deprecated this method is deprecated and may be removed in a future release + * @param listRegionsOptions the {@link ListRegionsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link RegionCollection} */ - @Deprecated - public ServiceCall getInstanceNetworkInterfaceIp(GetInstanceNetworkInterfaceIpOptions getInstanceNetworkInterfaceIpOptions) { - LOGGER.warning("A deprecated operation has been invoked: getInstanceNetworkInterfaceIp"); - com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceNetworkInterfaceIpOptions, - "getInstanceNetworkInterfaceIpOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", getInstanceNetworkInterfaceIpOptions.instanceId()); - pathParamsMap.put("network_interface_id", getInstanceNetworkInterfaceIpOptions.networkInterfaceId()); - pathParamsMap.put("id", getInstanceNetworkInterfaceIpOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_interfaces/{network_interface_id}/ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceNetworkInterfaceIp"); + public ServiceCall listRegions(ListRegionsOptions listRegionsOptions) { + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/regions")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listRegions"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List volumes attachments on an instance. + * List regions. * - * This request lists volume attachments on an instance. A volume attachment connects a volume to an instance. Each - * instance may have many volume attachments but each volume attachment connects exactly one instance to exactly one - * volume. + * This request lists regions. Each region is a separate geographic area that contains multiple isolated zones. + * Resources can be provisioned into one or more zones in a region. Each zone is isolated, but connected to other + * zones in the same region with low-latency and high-bandwidth links. Regions represent the top-level of fault + * isolation available. Resources deployed within a single region also benefit from the low latency afforded by + * geographic proximity. * - * @param listInstanceVolumeAttachmentsOptions the {@link ListInstanceVolumeAttachmentsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VolumeAttachmentCollection} + * @return a {@link ServiceCall} with a result of type {@link RegionCollection} */ - public ServiceCall listInstanceVolumeAttachments(ListInstanceVolumeAttachmentsOptions listInstanceVolumeAttachmentsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listInstanceVolumeAttachmentsOptions, - "listInstanceVolumeAttachmentsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", listInstanceVolumeAttachmentsOptions.instanceId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/volume_attachments", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceVolumeAttachments"); + public ServiceCall listRegions() { + return listRegions(null); + } + + /** + * Create an image. + * + * This request creates a new image from an image prototype object. The prototype object is structured in the same way + * as a retrieved image, and contains the information necessary to create the new image. If an image is being + * imported, a URL to the image file on object storage must be specified. If an image is being created from an + * existing volume, that volume must be specified. + * + * @param createImageOptions the {@link CreateImageOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Image} + */ + public ServiceCall createImage(CreateImageOptions createImageOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createImageOptions, + "createImageOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createImage"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createImageOptions.imagePrototype()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create a volume attachment on an instance. + * Create an export job for an image. * - * This request creates a new volume attachment from a volume attachment prototype object, connecting a volume to an - * instance. For this request to succeed, the specified volume must not be busy. The prototype object is structured in - * the same way as a retrieved volume attachment, and contains the information necessary to create the new volume - * attachment. + * This request creates and queues a new export job for the image specified in the URL using the image export job + * prototype object. The image must be owned by the account and be in the `available`, `deprecated`, `obsolete`, or + * `unusable` state. The prototype object is structured in the same way as a retrieved image export job, and contains + * the information necessary to create and queue the new image export job. * - * @param createInstanceVolumeAttachmentOptions the {@link CreateInstanceVolumeAttachmentOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VolumeAttachment} + * @param createImageExportJobOptions the {@link CreateImageExportJobOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ImageExportJob} */ - public ServiceCall createInstanceVolumeAttachment(CreateInstanceVolumeAttachmentOptions createInstanceVolumeAttachmentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createInstanceVolumeAttachmentOptions, - "createInstanceVolumeAttachmentOptions cannot be null"); + public ServiceCall createImageExportJob(CreateImageExportJobOptions createImageExportJobOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createImageExportJobOptions, + "createImageExportJobOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", createInstanceVolumeAttachmentOptions.instanceId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/volume_attachments", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createInstanceVolumeAttachment"); + pathParamsMap.put("image_id", createImageExportJobOptions.imageId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images/{image_id}/export_jobs", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createImageExportJob"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } @@ -4464,36 +4404,40 @@ public ServiceCall createInstanceVolumeAttachment(CreateInstan builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); final JsonObject contentJson = new JsonObject(); - contentJson.add("volume", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createInstanceVolumeAttachmentOptions.volume())); - if (createInstanceVolumeAttachmentOptions.deleteVolumeOnInstanceDelete() != null) { - contentJson.addProperty("delete_volume_on_instance_delete", createInstanceVolumeAttachmentOptions.deleteVolumeOnInstanceDelete()); + contentJson.add("storage_bucket", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createImageExportJobOptions.storageBucket())); + if (createImageExportJobOptions.format() != null) { + contentJson.addProperty("format", createImageExportJobOptions.format()); } - if (createInstanceVolumeAttachmentOptions.name() != null) { - contentJson.addProperty("name", createInstanceVolumeAttachmentOptions.name()); + if (createImageExportJobOptions.name() != null) { + contentJson.addProperty("name", createImageExportJobOptions.name()); } builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a volume attachment. + * Delete an image. * - * This request deletes a volume attachment. This operation cannot be reversed, but a new volume attachment may - * subsequently be created for the volume. For this request to succeed, the volume must not be busy. + * This request deletes an image. Any active image export jobs will be completed first. This operation cannot be + * reversed. An image with `remote.account` set is not allowed to be deleted. Additionally, an image cannot be deleted + * if it: + * - has a `status` of `deleting` + * - has a `status` of `pending` with a `status_reasons` code of + * `image_request_in_progress` + * - has `catalog_offering.managed` set to `true`. * - * @param deleteInstanceVolumeAttachmentOptions the {@link DeleteInstanceVolumeAttachmentOptions} containing the options for the call + * @param deleteImageOptions the {@link DeleteImageOptions} containing the options for the call * @return a {@link ServiceCall} with a void result */ - public ServiceCall deleteInstanceVolumeAttachment(DeleteInstanceVolumeAttachmentOptions deleteInstanceVolumeAttachmentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteInstanceVolumeAttachmentOptions, - "deleteInstanceVolumeAttachmentOptions cannot be null"); + public ServiceCall deleteImage(DeleteImageOptions deleteImageOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteImageOptions, + "deleteImageOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", deleteInstanceVolumeAttachmentOptions.instanceId()); - pathParamsMap.put("id", deleteInstanceVolumeAttachmentOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/volume_attachments/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteInstanceVolumeAttachment"); + pathParamsMap.put("id", deleteImageOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteImage"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } @@ -4504,328 +4448,373 @@ public ServiceCall deleteInstanceVolumeAttachment(DeleteInstanceVolumeAtta } /** - * Retrieve a volume attachment. + * Delete an image export job. * - * This request retrieves a single volume attachment specified by the identifier in the URL. + * This request deletes an image export job. This operation cannot be reversed. If the job has not completed, the job + * will be canceled, and the incomplete exported image object deleted. If the job has completed, the exported image + * object will not be deleted. * - * @param getInstanceVolumeAttachmentOptions the {@link GetInstanceVolumeAttachmentOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VolumeAttachment} + * @param deleteImageExportJobOptions the {@link DeleteImageExportJobOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall getInstanceVolumeAttachment(GetInstanceVolumeAttachmentOptions getInstanceVolumeAttachmentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceVolumeAttachmentOptions, - "getInstanceVolumeAttachmentOptions cannot be null"); + public ServiceCall deleteImageExportJob(DeleteImageExportJobOptions deleteImageExportJobOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteImageExportJobOptions, + "deleteImageExportJobOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", getInstanceVolumeAttachmentOptions.instanceId()); - pathParamsMap.put("id", getInstanceVolumeAttachmentOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/volume_attachments/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceVolumeAttachment"); + pathParamsMap.put("image_id", deleteImageExportJobOptions.imageId()); + pathParamsMap.put("id", deleteImageExportJobOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images/{image_id}/export_jobs/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteImageExportJob"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Update a volume attachment. + * Deprecate an image. * - * This request updates a volume attachment with the information provided in a volume attachment patch object. The - * volume attachment patch object is structured in the same way as a retrieved volume attachment and needs to contain - * only the information to be updated. + * This request deprecates an image, resulting in its `status` becoming `deprecated` and + * `deprecation_at` being set to the current date and time. * - * @param updateInstanceVolumeAttachmentOptions the {@link UpdateInstanceVolumeAttachmentOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VolumeAttachment} + * The image must: + * - have a `status` of `available` + * - have `catalog_offering.managed` set to `false` + * - not have `deprecation_at` set + * + * An image with `remote.account` set is not allowed to be deprecated. + * + * @param deprecateImageOptions the {@link DeprecateImageOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall updateInstanceVolumeAttachment(UpdateInstanceVolumeAttachmentOptions updateInstanceVolumeAttachmentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateInstanceVolumeAttachmentOptions, - "updateInstanceVolumeAttachmentOptions cannot be null"); + public ServiceCall deprecateImage(DeprecateImageOptions deprecateImageOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deprecateImageOptions, + "deprecateImageOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_id", updateInstanceVolumeAttachmentOptions.instanceId()); - pathParamsMap.put("id", updateInstanceVolumeAttachmentOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/volume_attachments/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateInstanceVolumeAttachment"); + pathParamsMap.put("id", deprecateImageOptions.id()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images/{id}/deprecate", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deprecateImage"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateInstanceVolumeAttachmentOptions.volumeAttachmentPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * List instance groups. + * Retrieve an image. * - * This request lists instance groups in the region. + * This request retrieves a single image specified by the identifier in the URL. * - * @param listInstanceGroupsOptions the {@link ListInstanceGroupsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceGroupCollection} + * @param getImageOptions the {@link GetImageOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Image} */ - public ServiceCall listInstanceGroups(ListInstanceGroupsOptions listInstanceGroupsOptions) { - if (listInstanceGroupsOptions == null) { - listInstanceGroupsOptions = new ListInstanceGroupsOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceGroups"); + public ServiceCall getImage(GetImageOptions getImageOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getImageOptions, + "getImageOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", getImageOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getImage"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listInstanceGroupsOptions.start() != null) { - builder.query("start", String.valueOf(listInstanceGroupsOptions.start())); - } - if (listInstanceGroupsOptions.limit() != null) { - builder.query("limit", String.valueOf(listInstanceGroupsOptions.limit())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List instance groups. + * Retrieve an image export job. * - * This request lists instance groups in the region. + * This request retrieves a single image export job specified by the identifier in the URL. * - * @return a {@link ServiceCall} with a result of type {@link InstanceGroupCollection} + * @param getImageExportJobOptions the {@link GetImageExportJobOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ImageExportJob} */ - public ServiceCall listInstanceGroups() { - return listInstanceGroups(null); + public ServiceCall getImageExportJob(GetImageExportJobOptions getImageExportJobOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getImageExportJobOptions, + "getImageExportJobOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("image_id", getImageExportJobOptions.imageId()); + pathParamsMap.put("id", getImageExportJobOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images/{image_id}/export_jobs/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getImageExportJob"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + builder.query("generation", String.valueOf(this.generation)); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + return createServiceCall(builder.build(), responseConverter); } /** - * Create an instance group. + * Retrieve an operating system. * - * This request creates a new instance group. + * This request retrieves a single operating system specified by the name in the URL. * - * @param createInstanceGroupOptions the {@link CreateInstanceGroupOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceGroup} + * @param getOperatingSystemOptions the {@link GetOperatingSystemOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link OperatingSystem} */ - public ServiceCall createInstanceGroup(CreateInstanceGroupOptions createInstanceGroupOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createInstanceGroupOptions, - "createInstanceGroupOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createInstanceGroup"); + public ServiceCall getOperatingSystem(GetOperatingSystemOptions getOperatingSystemOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getOperatingSystemOptions, + "getOperatingSystemOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("name", getOperatingSystemOptions.name()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/operating_systems/{name}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getOperatingSystem"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.add("instance_template", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createInstanceGroupOptions.instanceTemplate())); - contentJson.add("subnets", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createInstanceGroupOptions.subnets())); - if (createInstanceGroupOptions.applicationPort() != null) { - contentJson.addProperty("application_port", createInstanceGroupOptions.applicationPort()); - } - if (createInstanceGroupOptions.loadBalancer() != null) { - contentJson.add("load_balancer", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createInstanceGroupOptions.loadBalancer())); - } - if (createInstanceGroupOptions.loadBalancerPool() != null) { - contentJson.add("load_balancer_pool", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createInstanceGroupOptions.loadBalancerPool())); - } - if (createInstanceGroupOptions.membershipCount() != null) { - contentJson.addProperty("membership_count", createInstanceGroupOptions.membershipCount()); - } - if (createInstanceGroupOptions.name() != null) { - contentJson.addProperty("name", createInstanceGroupOptions.name()); - } - if (createInstanceGroupOptions.resourceGroup() != null) { - contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createInstanceGroupOptions.resourceGroup())); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete an instance group. + * List bare metal server profiles compatible with an image. * - * This request deletes an instance group. This operation cannot be reversed. Any instances associated with the group - * will be deleted. + * This request lists bare metal server profiles compatible with an image's + * `allowed_use.bare_metal_server`, `operating_system.architecture` and + * `user_data_format` properties, sorted by ascending `name` property values. * - * @param deleteInstanceGroupOptions the {@link DeleteInstanceGroupOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param listImageBareMetalServerProfilesOptions the {@link ListImageBareMetalServerProfilesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ImageBareMetalServerProfileCollection} */ - public ServiceCall deleteInstanceGroup(DeleteInstanceGroupOptions deleteInstanceGroupOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteInstanceGroupOptions, - "deleteInstanceGroupOptions cannot be null"); + public ServiceCall listImageBareMetalServerProfiles(ListImageBareMetalServerProfilesOptions listImageBareMetalServerProfilesOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listImageBareMetalServerProfilesOptions, + "listImageBareMetalServerProfilesOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteInstanceGroupOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteInstanceGroup"); + pathParamsMap.put("id", listImageBareMetalServerProfilesOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images/{id}/bare_metal_server_profiles", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listImageBareMetalServerProfiles"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + if (listImageBareMetalServerProfilesOptions.start() != null) { + builder.query("start", String.valueOf(listImageBareMetalServerProfilesOptions.start())); + } + if (listImageBareMetalServerProfilesOptions.limit() != null) { + builder.query("limit", String.valueOf(listImageBareMetalServerProfilesOptions.limit())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve an instance group. + * List export jobs for an image. * - * This request retrieves a single instance group specified by identifier in the URL. + * This request lists export jobs for an image. Each job tracks the exporting of the image to another location, such + * as a bucket within cloud object storage. * - * @param getInstanceGroupOptions the {@link GetInstanceGroupOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceGroup} + * The jobs will be sorted by their `created_at` property values, with newest jobs first. Jobs with identical + * `created_at` property values will in turn be sorted by ascending + * `name` property values. + * + * @param listImageExportJobsOptions the {@link ListImageExportJobsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ImageExportJobUnpaginatedCollection} */ - public ServiceCall getInstanceGroup(GetInstanceGroupOptions getInstanceGroupOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceGroupOptions, - "getInstanceGroupOptions cannot be null"); + public ServiceCall listImageExportJobs(ListImageExportJobsOptions listImageExportJobsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listImageExportJobsOptions, + "listImageExportJobsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getInstanceGroupOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceGroup"); + pathParamsMap.put("image_id", listImageExportJobsOptions.imageId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images/{image_id}/export_jobs", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listImageExportJobs"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listImageExportJobsOptions.name() != null) { + builder.query("name", String.valueOf(listImageExportJobsOptions.name())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update an instance group. + * List instance profiles compatible with an image. * - * This request updates an instance group with the information provided instance group patch. The instance group patch - * object is structured in the same way as a retrieved instance group and contains only the information to be updated. + * This request lists instance profiles compatible with an image's + * `allowed_use.instance`, `operating_system.architecture` and + * `user_data_format` properties, sorted by ascending `name` property values. * - * @param updateInstanceGroupOptions the {@link UpdateInstanceGroupOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceGroup} + * @param listImageInstanceProfilesOptions the {@link ListImageInstanceProfilesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ImageInstanceProfileCollection} */ - public ServiceCall updateInstanceGroup(UpdateInstanceGroupOptions updateInstanceGroupOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateInstanceGroupOptions, - "updateInstanceGroupOptions cannot be null"); + public ServiceCall listImageInstanceProfiles(ListImageInstanceProfilesOptions listImageInstanceProfilesOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listImageInstanceProfilesOptions, + "listImageInstanceProfilesOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateInstanceGroupOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateInstanceGroup"); + pathParamsMap.put("id", listImageInstanceProfilesOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images/{id}/instance_profiles", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listImageInstanceProfiles"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateInstanceGroupOptions.instanceGroupPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listImageInstanceProfilesOptions.start() != null) { + builder.query("start", String.valueOf(listImageInstanceProfilesOptions.start())); + } + if (listImageInstanceProfilesOptions.limit() != null) { + builder.query("limit", String.valueOf(listImageInstanceProfilesOptions.limit())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete an instance group load balancer. + * List images. * - * This request unbinds the instance group from the load balancer pool, and deletes the load balancer pool members. + * This request lists images available in the region. An image provides source data for a volume. Images are either + * system-provided, or created from another source, such as importing from Cloud Object Storage. * - * @param deleteInstanceGroupLoadBalancerOptions the {@link DeleteInstanceGroupLoadBalancerOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param listImagesOptions the {@link ListImagesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ImageCollection} */ - public ServiceCall deleteInstanceGroupLoadBalancer(DeleteInstanceGroupLoadBalancerOptions deleteInstanceGroupLoadBalancerOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteInstanceGroupLoadBalancerOptions, - "deleteInstanceGroupLoadBalancerOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_group_id", deleteInstanceGroupLoadBalancerOptions.instanceGroupId()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/load_balancer", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteInstanceGroupLoadBalancer"); + public ServiceCall listImages(ListImagesOptions listImagesOptions) { + if (listImagesOptions == null) { + listImagesOptions = new ListImagesOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listImages"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + if (listImagesOptions.start() != null) { + builder.query("start", String.valueOf(listImagesOptions.start())); + } + if (listImagesOptions.limit() != null) { + builder.query("limit", String.valueOf(listImagesOptions.limit())); + } + if (listImagesOptions.resourceGroupId() != null) { + builder.query("resource_group.id", String.valueOf(listImagesOptions.resourceGroupId())); + } + if (listImagesOptions.name() != null) { + builder.query("name", String.valueOf(listImagesOptions.name())); + } + if (listImagesOptions.status() != null) { + builder.query("status", RequestUtils.join(listImagesOptions.status(), ",")); + } + if (listImagesOptions.visibility() != null) { + builder.query("visibility", String.valueOf(listImagesOptions.visibility())); + } + if (listImagesOptions.userDataFormat() != null) { + builder.query("user_data_format", RequestUtils.join(listImagesOptions.userDataFormat(), ",")); + } + if (listImagesOptions.remoteAccountId() != null) { + builder.query("remote.account.id", String.valueOf(listImagesOptions.remoteAccountId())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List managers for an instance group. + * List images. * - * This request lists managers for an instance group. + * This request lists images available in the region. An image provides source data for a volume. Images are either + * system-provided, or created from another source, such as importing from Cloud Object Storage. * - * @param listInstanceGroupManagersOptions the {@link ListInstanceGroupManagersOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceGroupManagerCollection} + * @return a {@link ServiceCall} with a result of type {@link ImageCollection} */ - public ServiceCall listInstanceGroupManagers(ListInstanceGroupManagersOptions listInstanceGroupManagersOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listInstanceGroupManagersOptions, - "listInstanceGroupManagersOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_group_id", listInstanceGroupManagersOptions.instanceGroupId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceGroupManagers"); + public ServiceCall listImages() { + return listImages(null); + } + + /** + * List operating systems. + * + * This request lists operating systems in the region. + * + * @param listOperatingSystemsOptions the {@link ListOperatingSystemsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link OperatingSystemCollection} + */ + public ServiceCall listOperatingSystems(ListOperatingSystemsOptions listOperatingSystemsOptions) { + if (listOperatingSystemsOptions == null) { + listOperatingSystemsOptions = new ListOperatingSystemsOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/operating_systems")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listOperatingSystems"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listInstanceGroupManagersOptions.start() != null) { - builder.query("start", String.valueOf(listInstanceGroupManagersOptions.start())); + if (listOperatingSystemsOptions.start() != null) { + builder.query("start", String.valueOf(listOperatingSystemsOptions.start())); } - if (listInstanceGroupManagersOptions.limit() != null) { - builder.query("limit", String.valueOf(listInstanceGroupManagersOptions.limit())); + if (listOperatingSystemsOptions.limit() != null) { + builder.query("limit", String.valueOf(listOperatingSystemsOptions.limit())); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create a manager for an instance group. + * List operating systems. * - * This request creates a new instance group manager. + * This request lists operating systems in the region. * - * @param createInstanceGroupManagerOptions the {@link CreateInstanceGroupManagerOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceGroupManager} + * @return a {@link ServiceCall} with a result of type {@link OperatingSystemCollection} */ - public ServiceCall createInstanceGroupManager(CreateInstanceGroupManagerOptions createInstanceGroupManagerOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createInstanceGroupManagerOptions, - "createInstanceGroupManagerOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_group_id", createInstanceGroupManagerOptions.instanceGroupId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createInstanceGroupManager"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createInstanceGroupManagerOptions.instanceGroupManagerPrototype()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); - return createServiceCall(builder.build(), responseConverter); + public ServiceCall listOperatingSystems() { + return listOperatingSystems(null); } /** - * Delete an instance group manager. + * Obsolete an image. * - * This request deletes an instance group manager. This operation cannot be reversed. + * This request obsoletes an image, resulting in its `status` becoming `obsolete` and + * `obsolescence_at` being set to the current date and time. * - * @param deleteInstanceGroupManagerOptions the {@link DeleteInstanceGroupManagerOptions} containing the options for the call + * The image must: + * - have a `status` of `available` or `deprecated` + * - have `catalog_offering.managed` set to `false` + * - not have `deprecation_at` set in the future + * - not have `obsolescence_at` set + * + * An image with `remote.account` set is not allowed to be obsoleted. + * + * @param obsoleteImageOptions the {@link ObsoleteImageOptions} containing the options for the call * @return a {@link ServiceCall} with a void result */ - public ServiceCall deleteInstanceGroupManager(DeleteInstanceGroupManagerOptions deleteInstanceGroupManagerOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteInstanceGroupManagerOptions, - "deleteInstanceGroupManagerOptions cannot be null"); + public ServiceCall obsoleteImage(ObsoleteImageOptions obsoleteImageOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(obsoleteImageOptions, + "obsoleteImageOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_group_id", deleteInstanceGroupManagerOptions.instanceGroupId()); - pathParamsMap.put("id", deleteInstanceGroupManagerOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteInstanceGroupManager"); + pathParamsMap.put("id", obsoleteImageOptions.id()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images/{id}/obsolete", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "obsoleteImage"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } @@ -4836,90 +4825,134 @@ public ServiceCall deleteInstanceGroupManager(DeleteInstanceGroupManagerOp } /** - * Retrieve an instance group manager. + * Update an image. * - * This request retrieves a single instance group manager specified by identifier in the URL. + * This request updates an image with the information in a provided image patch. The image patch object is structured + * in the same way as a retrieved image and contains only the information to be updated. An image with + * `remote.account` set is not allowed to be updated. An image with a `status` of `deleting` cannot be updated. * - * @param getInstanceGroupManagerOptions the {@link GetInstanceGroupManagerOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceGroupManager} + * @param updateImageOptions the {@link UpdateImageOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Image} */ - public ServiceCall getInstanceGroupManager(GetInstanceGroupManagerOptions getInstanceGroupManagerOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceGroupManagerOptions, - "getInstanceGroupManagerOptions cannot be null"); + public ServiceCall updateImage(UpdateImageOptions updateImageOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateImageOptions, + "updateImageOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_group_id", getInstanceGroupManagerOptions.instanceGroupId()); - pathParamsMap.put("id", getInstanceGroupManagerOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceGroupManager"); + pathParamsMap.put("id", updateImageOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateImage"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateImageOptions.imagePatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update an instance group manager. + * Update an image export job. * - * This request updates an instance group manager with the information provided instance group manager patch. + * This request updates an image export job with the information in a provided image export job patch. The image + * export job patch object is structured in the same way as a retrieved image export job and contains only the + * information to be updated. * - * @param updateInstanceGroupManagerOptions the {@link UpdateInstanceGroupManagerOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceGroupManager} + * @param updateImageExportJobOptions the {@link UpdateImageExportJobOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ImageExportJob} */ - public ServiceCall updateInstanceGroupManager(UpdateInstanceGroupManagerOptions updateInstanceGroupManagerOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateInstanceGroupManagerOptions, - "updateInstanceGroupManagerOptions cannot be null"); + public ServiceCall updateImageExportJob(UpdateImageExportJobOptions updateImageExportJobOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateImageExportJobOptions, + "updateImageExportJobOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_group_id", updateInstanceGroupManagerOptions.instanceGroupId()); - pathParamsMap.put("id", updateInstanceGroupManagerOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateInstanceGroupManager"); + pathParamsMap.put("image_id", updateImageExportJobOptions.imageId()); + pathParamsMap.put("id", updateImageExportJobOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/images/{image_id}/export_jobs/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateImageExportJob"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateInstanceGroupManagerOptions.instanceGroupManagerPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateImageExportJobOptions.imageExportJobPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List actions for an instance group manager. + * Create an instance group. * - * This request lists instance group actions for an instance group manager. + * This request creates a new instance group. * - * @param listInstanceGroupManagerActionsOptions the {@link ListInstanceGroupManagerActionsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceGroupManagerActionsCollection} + * @param createInstanceGroupOptions the {@link CreateInstanceGroupOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceGroup} */ - public ServiceCall listInstanceGroupManagerActions(ListInstanceGroupManagerActionsOptions listInstanceGroupManagerActionsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listInstanceGroupManagerActionsOptions, - "listInstanceGroupManagerActionsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_group_id", listInstanceGroupManagerActionsOptions.instanceGroupId()); - pathParamsMap.put("instance_group_manager_id", listInstanceGroupManagerActionsOptions.instanceGroupManagerId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceGroupManagerActions"); + public ServiceCall createInstanceGroup(CreateInstanceGroupOptions createInstanceGroupOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createInstanceGroupOptions, + "createInstanceGroupOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createInstanceGroup"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listInstanceGroupManagerActionsOptions.start() != null) { - builder.query("start", String.valueOf(listInstanceGroupManagerActionsOptions.start())); + final JsonObject contentJson = new JsonObject(); + contentJson.add("instance_template", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createInstanceGroupOptions.instanceTemplate())); + contentJson.add("subnets", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createInstanceGroupOptions.subnets())); + if (createInstanceGroupOptions.applicationPort() != null) { + contentJson.addProperty("application_port", createInstanceGroupOptions.applicationPort()); } - if (listInstanceGroupManagerActionsOptions.limit() != null) { - builder.query("limit", String.valueOf(listInstanceGroupManagerActionsOptions.limit())); + if (createInstanceGroupOptions.loadBalancer() != null) { + contentJson.add("load_balancer", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createInstanceGroupOptions.loadBalancer())); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (createInstanceGroupOptions.loadBalancerPool() != null) { + contentJson.add("load_balancer_pool", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createInstanceGroupOptions.loadBalancerPool())); + } + if (createInstanceGroupOptions.membershipCount() != null) { + contentJson.addProperty("membership_count", createInstanceGroupOptions.membershipCount()); + } + if (createInstanceGroupOptions.name() != null) { + contentJson.addProperty("name", createInstanceGroupOptions.name()); + } + if (createInstanceGroupOptions.resourceGroup() != null) { + contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createInstanceGroupOptions.resourceGroup())); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * Create a manager for an instance group. + * + * This request creates a new instance group manager. + * + * @param createInstanceGroupManagerOptions the {@link CreateInstanceGroupManagerOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceGroupManager} + */ + public ServiceCall createInstanceGroupManager(CreateInstanceGroupManagerOptions createInstanceGroupManagerOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createInstanceGroupManagerOptions, + "createInstanceGroupManagerOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("instance_group_id", createInstanceGroupManagerOptions.instanceGroupId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createInstanceGroupManager"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + builder.query("generation", String.valueOf(this.generation)); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createInstanceGroupManagerOptions.instanceGroupManagerPrototype()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } @@ -4952,146 +4985,130 @@ public ServiceCall createInstanceGroupManagerAction( } /** - * Delete specified instance group manager action. + * Create a policy for an instance group manager. * - * This request deletes an instance group manager action. This operation cannot be reversed. + * This request creates a new instance group manager policy. * - * @param deleteInstanceGroupManagerActionOptions the {@link DeleteInstanceGroupManagerActionOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param createInstanceGroupManagerPolicyOptions the {@link CreateInstanceGroupManagerPolicyOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceGroupManagerPolicy} */ - public ServiceCall deleteInstanceGroupManagerAction(DeleteInstanceGroupManagerActionOptions deleteInstanceGroupManagerActionOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteInstanceGroupManagerActionOptions, - "deleteInstanceGroupManagerActionOptions cannot be null"); + public ServiceCall createInstanceGroupManagerPolicy(CreateInstanceGroupManagerPolicyOptions createInstanceGroupManagerPolicyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createInstanceGroupManagerPolicyOptions, + "createInstanceGroupManagerPolicyOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_group_id", deleteInstanceGroupManagerActionOptions.instanceGroupId()); - pathParamsMap.put("instance_group_manager_id", deleteInstanceGroupManagerActionOptions.instanceGroupManagerId()); - pathParamsMap.put("id", deleteInstanceGroupManagerActionOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteInstanceGroupManagerAction"); + pathParamsMap.put("instance_group_id", createInstanceGroupManagerPolicyOptions.instanceGroupId()); + pathParamsMap.put("instance_group_manager_id", createInstanceGroupManagerPolicyOptions.instanceGroupManagerId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createInstanceGroupManagerPolicy"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createInstanceGroupManagerPolicyOptions.instanceGroupManagerPolicyPrototype()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve specified instance group manager action. + * Delete an instance group. * - * This request retrieves a single instance group manager action specified by identifier in the URL. + * This request deletes an instance group. This operation cannot be reversed. Any instances associated with the group + * will be deleted. * - * @param getInstanceGroupManagerActionOptions the {@link GetInstanceGroupManagerActionOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceGroupManagerAction} + * @param deleteInstanceGroupOptions the {@link DeleteInstanceGroupOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall getInstanceGroupManagerAction(GetInstanceGroupManagerActionOptions getInstanceGroupManagerActionOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceGroupManagerActionOptions, - "getInstanceGroupManagerActionOptions cannot be null"); + public ServiceCall deleteInstanceGroup(DeleteInstanceGroupOptions deleteInstanceGroupOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteInstanceGroupOptions, + "deleteInstanceGroupOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_group_id", getInstanceGroupManagerActionOptions.instanceGroupId()); - pathParamsMap.put("instance_group_manager_id", getInstanceGroupManagerActionOptions.instanceGroupManagerId()); - pathParamsMap.put("id", getInstanceGroupManagerActionOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceGroupManagerAction"); + pathParamsMap.put("id", deleteInstanceGroupOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteInstanceGroup"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Update specified instance group manager action. + * Delete an instance group load balancer. * - * This request updates an instance group manager action. + * This request unbinds the instance group from the load balancer pool, and deletes the load balancer pool members. * - * @param updateInstanceGroupManagerActionOptions the {@link UpdateInstanceGroupManagerActionOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceGroupManagerAction} + * @param deleteInstanceGroupLoadBalancerOptions the {@link DeleteInstanceGroupLoadBalancerOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall updateInstanceGroupManagerAction(UpdateInstanceGroupManagerActionOptions updateInstanceGroupManagerActionOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateInstanceGroupManagerActionOptions, - "updateInstanceGroupManagerActionOptions cannot be null"); + public ServiceCall deleteInstanceGroupLoadBalancer(DeleteInstanceGroupLoadBalancerOptions deleteInstanceGroupLoadBalancerOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteInstanceGroupLoadBalancerOptions, + "deleteInstanceGroupLoadBalancerOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_group_id", updateInstanceGroupManagerActionOptions.instanceGroupId()); - pathParamsMap.put("instance_group_manager_id", updateInstanceGroupManagerActionOptions.instanceGroupManagerId()); - pathParamsMap.put("id", updateInstanceGroupManagerActionOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateInstanceGroupManagerAction"); + pathParamsMap.put("instance_group_id", deleteInstanceGroupLoadBalancerOptions.instanceGroupId()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/load_balancer", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteInstanceGroupLoadBalancer"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateInstanceGroupManagerActionOptions.instanceGroupManagerActionPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * List policies for an instance group manager. + * Delete an instance group manager. * - * This request lists policies for an instance group manager. + * This request deletes an instance group manager. This operation cannot be reversed. * - * @param listInstanceGroupManagerPoliciesOptions the {@link ListInstanceGroupManagerPoliciesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceGroupManagerPolicyCollection} + * @param deleteInstanceGroupManagerOptions the {@link DeleteInstanceGroupManagerOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall listInstanceGroupManagerPolicies(ListInstanceGroupManagerPoliciesOptions listInstanceGroupManagerPoliciesOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listInstanceGroupManagerPoliciesOptions, - "listInstanceGroupManagerPoliciesOptions cannot be null"); + public ServiceCall deleteInstanceGroupManager(DeleteInstanceGroupManagerOptions deleteInstanceGroupManagerOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteInstanceGroupManagerOptions, + "deleteInstanceGroupManagerOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_group_id", listInstanceGroupManagerPoliciesOptions.instanceGroupId()); - pathParamsMap.put("instance_group_manager_id", listInstanceGroupManagerPoliciesOptions.instanceGroupManagerId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceGroupManagerPolicies"); + pathParamsMap.put("instance_group_id", deleteInstanceGroupManagerOptions.instanceGroupId()); + pathParamsMap.put("id", deleteInstanceGroupManagerOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteInstanceGroupManager"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listInstanceGroupManagerPoliciesOptions.start() != null) { - builder.query("start", String.valueOf(listInstanceGroupManagerPoliciesOptions.start())); - } - if (listInstanceGroupManagerPoliciesOptions.limit() != null) { - builder.query("limit", String.valueOf(listInstanceGroupManagerPoliciesOptions.limit())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Create a policy for an instance group manager. + * Delete specified instance group manager action. * - * This request creates a new instance group manager policy. + * This request deletes an instance group manager action. This operation cannot be reversed. * - * @param createInstanceGroupManagerPolicyOptions the {@link CreateInstanceGroupManagerPolicyOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceGroupManagerPolicy} + * @param deleteInstanceGroupManagerActionOptions the {@link DeleteInstanceGroupManagerActionOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall createInstanceGroupManagerPolicy(CreateInstanceGroupManagerPolicyOptions createInstanceGroupManagerPolicyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createInstanceGroupManagerPolicyOptions, - "createInstanceGroupManagerPolicyOptions cannot be null"); + public ServiceCall deleteInstanceGroupManagerAction(DeleteInstanceGroupManagerActionOptions deleteInstanceGroupManagerActionOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteInstanceGroupManagerActionOptions, + "deleteInstanceGroupManagerActionOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_group_id", createInstanceGroupManagerPolicyOptions.instanceGroupId()); - pathParamsMap.put("instance_group_manager_id", createInstanceGroupManagerPolicyOptions.instanceGroupManagerId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createInstanceGroupManagerPolicy"); + pathParamsMap.put("instance_group_id", deleteInstanceGroupManagerActionOptions.instanceGroupId()); + pathParamsMap.put("instance_group_manager_id", deleteInstanceGroupManagerActionOptions.instanceGroupManagerId()); + pathParamsMap.put("id", deleteInstanceGroupManagerActionOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteInstanceGroupManagerAction"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createInstanceGroupManagerPolicyOptions.instanceGroupManagerPolicyPrototype()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } @@ -5122,59 +5139,28 @@ public ServiceCall deleteInstanceGroupManagerPolicy(DeleteInstanceGroupMan } /** - * Retrieve an instance group manager policy. + * Delete an instance group membership. * - * This request retrieves a single instance group manager policy specified by identifier in the URL. + * This request deletes a memberships of an instance group. This operation cannot be reversed. reversed. If the + * membership has `delete_instance_on_membership_delete` set to `true`, the instance will also be deleted. * - * @param getInstanceGroupManagerPolicyOptions the {@link GetInstanceGroupManagerPolicyOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceGroupManagerPolicy} - */ - public ServiceCall getInstanceGroupManagerPolicy(GetInstanceGroupManagerPolicyOptions getInstanceGroupManagerPolicyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceGroupManagerPolicyOptions, - "getInstanceGroupManagerPolicyOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_group_id", getInstanceGroupManagerPolicyOptions.instanceGroupId()); - pathParamsMap.put("instance_group_manager_id", getInstanceGroupManagerPolicyOptions.instanceGroupManagerId()); - pathParamsMap.put("id", getInstanceGroupManagerPolicyOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceGroupManagerPolicy"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Update an instance group manager policy. - * - * This request updates an instance group manager policy. - * - * @param updateInstanceGroupManagerPolicyOptions the {@link UpdateInstanceGroupManagerPolicyOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceGroupManagerPolicy} + * @param deleteInstanceGroupMembershipOptions the {@link DeleteInstanceGroupMembershipOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall updateInstanceGroupManagerPolicy(UpdateInstanceGroupManagerPolicyOptions updateInstanceGroupManagerPolicyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateInstanceGroupManagerPolicyOptions, - "updateInstanceGroupManagerPolicyOptions cannot be null"); + public ServiceCall deleteInstanceGroupMembership(DeleteInstanceGroupMembershipOptions deleteInstanceGroupMembershipOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteInstanceGroupMembershipOptions, + "deleteInstanceGroupMembershipOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_group_id", updateInstanceGroupManagerPolicyOptions.instanceGroupId()); - pathParamsMap.put("instance_group_manager_id", updateInstanceGroupManagerPolicyOptions.instanceGroupManagerId()); - pathParamsMap.put("id", updateInstanceGroupManagerPolicyOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateInstanceGroupManagerPolicy"); + pathParamsMap.put("instance_group_id", deleteInstanceGroupMembershipOptions.instanceGroupId()); + pathParamsMap.put("id", deleteInstanceGroupMembershipOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/memberships/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteInstanceGroupMembership"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateInstanceGroupManagerPolicyOptions.instanceGroupManagerPolicyPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } @@ -5204,60 +5190,111 @@ public ServiceCall deleteInstanceGroupMemberships(DeleteInstanceGroupMembe } /** - * List memberships for an instance group. + * Retrieve an instance group. * - * This request lists instance group memberships for an instance group. + * This request retrieves a single instance group specified by identifier in the URL. * - * @param listInstanceGroupMembershipsOptions the {@link ListInstanceGroupMembershipsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceGroupMembershipCollection} + * @param getInstanceGroupOptions the {@link GetInstanceGroupOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceGroup} */ - public ServiceCall listInstanceGroupMemberships(ListInstanceGroupMembershipsOptions listInstanceGroupMembershipsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listInstanceGroupMembershipsOptions, - "listInstanceGroupMembershipsOptions cannot be null"); + public ServiceCall getInstanceGroup(GetInstanceGroupOptions getInstanceGroupOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceGroupOptions, + "getInstanceGroupOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_group_id", listInstanceGroupMembershipsOptions.instanceGroupId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/memberships", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceGroupMemberships"); + pathParamsMap.put("id", getInstanceGroupOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceGroup"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listInstanceGroupMembershipsOptions.start() != null) { - builder.query("start", String.valueOf(listInstanceGroupMembershipsOptions.start())); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * Retrieve an instance group manager. + * + * This request retrieves a single instance group manager specified by identifier in the URL. + * + * @param getInstanceGroupManagerOptions the {@link GetInstanceGroupManagerOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceGroupManager} + */ + public ServiceCall getInstanceGroupManager(GetInstanceGroupManagerOptions getInstanceGroupManagerOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceGroupManagerOptions, + "getInstanceGroupManagerOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("instance_group_id", getInstanceGroupManagerOptions.instanceGroupId()); + pathParamsMap.put("id", getInstanceGroupManagerOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceGroupManager"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); } - if (listInstanceGroupMembershipsOptions.limit() != null) { - builder.query("limit", String.valueOf(listInstanceGroupMembershipsOptions.limit())); + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + builder.query("generation", String.valueOf(this.generation)); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * Retrieve specified instance group manager action. + * + * This request retrieves a single instance group manager action specified by identifier in the URL. + * + * @param getInstanceGroupManagerActionOptions the {@link GetInstanceGroupManagerActionOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceGroupManagerAction} + */ + public ServiceCall getInstanceGroupManagerAction(GetInstanceGroupManagerActionOptions getInstanceGroupManagerActionOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceGroupManagerActionOptions, + "getInstanceGroupManagerActionOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("instance_group_id", getInstanceGroupManagerActionOptions.instanceGroupId()); + pathParamsMap.put("instance_group_manager_id", getInstanceGroupManagerActionOptions.instanceGroupManagerId()); + pathParamsMap.put("id", getInstanceGroupManagerActionOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceGroupManagerAction"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + builder.query("generation", String.valueOf(this.generation)); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete an instance group membership. + * Retrieve an instance group manager policy. * - * This request deletes a memberships of an instance group. This operation cannot be reversed. reversed. If the - * membership has `delete_instance_on_membership_delete` set to `true`, the instance will also be deleted. + * This request retrieves a single instance group manager policy specified by identifier in the URL. * - * @param deleteInstanceGroupMembershipOptions the {@link DeleteInstanceGroupMembershipOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param getInstanceGroupManagerPolicyOptions the {@link GetInstanceGroupManagerPolicyOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceGroupManagerPolicy} */ - public ServiceCall deleteInstanceGroupMembership(DeleteInstanceGroupMembershipOptions deleteInstanceGroupMembershipOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteInstanceGroupMembershipOptions, - "deleteInstanceGroupMembershipOptions cannot be null"); + public ServiceCall getInstanceGroupManagerPolicy(GetInstanceGroupManagerPolicyOptions getInstanceGroupManagerPolicyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceGroupManagerPolicyOptions, + "getInstanceGroupManagerPolicyOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_group_id", deleteInstanceGroupMembershipOptions.instanceGroupId()); - pathParamsMap.put("id", deleteInstanceGroupMembershipOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/memberships/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteInstanceGroupMembership"); + pathParamsMap.put("instance_group_id", getInstanceGroupManagerPolicyOptions.instanceGroupId()); + pathParamsMap.put("instance_group_manager_id", getInstanceGroupManagerPolicyOptions.instanceGroupManagerId()); + pathParamsMap.put("id", getInstanceGroupManagerPolicyOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceGroupManagerPolicy"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } @@ -5289,813 +5326,833 @@ public ServiceCall getInstanceGroupMembership(GetInstan } /** - * Update an instance group membership. + * List actions for an instance group manager. * - * This request updates an instance group membership with the information provided instance group membership patch. + * This request lists instance group actions for an instance group manager. * - * @param updateInstanceGroupMembershipOptions the {@link UpdateInstanceGroupMembershipOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link InstanceGroupMembership} + * @param listInstanceGroupManagerActionsOptions the {@link ListInstanceGroupManagerActionsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceGroupManagerActionsCollection} */ - public ServiceCall updateInstanceGroupMembership(UpdateInstanceGroupMembershipOptions updateInstanceGroupMembershipOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateInstanceGroupMembershipOptions, - "updateInstanceGroupMembershipOptions cannot be null"); + public ServiceCall listInstanceGroupManagerActions(ListInstanceGroupManagerActionsOptions listInstanceGroupManagerActionsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listInstanceGroupManagerActionsOptions, + "listInstanceGroupManagerActionsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("instance_group_id", updateInstanceGroupMembershipOptions.instanceGroupId()); - pathParamsMap.put("id", updateInstanceGroupMembershipOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/memberships/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateInstanceGroupMembership"); + pathParamsMap.put("instance_group_id", listInstanceGroupManagerActionsOptions.instanceGroupId()); + pathParamsMap.put("instance_group_manager_id", listInstanceGroupManagerActionsOptions.instanceGroupManagerId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceGroupManagerActions"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateInstanceGroupMembershipOptions.instanceGroupMembershipPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listInstanceGroupManagerActionsOptions.start() != null) { + builder.query("start", String.valueOf(listInstanceGroupManagerActionsOptions.start())); + } + if (listInstanceGroupManagerActionsOptions.limit() != null) { + builder.query("limit", String.valueOf(listInstanceGroupManagerActionsOptions.limit())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List reservations. - * - * This request lists reservations in the region. A reservation provides reserved capacity for a specified profile in - * a specified zone. A reservation can also include a long-term committed use discount. + * List policies for an instance group manager. * - * The reservations will be sorted by their `created_at` property values, with newest reservations first. Reservations - * with identical `created_at` property values will in turn be sorted by ascending `name` property values. + * This request lists policies for an instance group manager. * - * @param listReservationsOptions the {@link ListReservationsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ReservationCollection} + * @param listInstanceGroupManagerPoliciesOptions the {@link ListInstanceGroupManagerPoliciesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceGroupManagerPolicyCollection} */ - public ServiceCall listReservations(ListReservationsOptions listReservationsOptions) { - if (listReservationsOptions == null) { - listReservationsOptions = new ListReservationsOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/reservations")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listReservations"); + public ServiceCall listInstanceGroupManagerPolicies(ListInstanceGroupManagerPoliciesOptions listInstanceGroupManagerPoliciesOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listInstanceGroupManagerPoliciesOptions, + "listInstanceGroupManagerPoliciesOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("instance_group_id", listInstanceGroupManagerPoliciesOptions.instanceGroupId()); + pathParamsMap.put("instance_group_manager_id", listInstanceGroupManagerPoliciesOptions.instanceGroupManagerId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceGroupManagerPolicies"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listReservationsOptions.start() != null) { - builder.query("start", String.valueOf(listReservationsOptions.start())); - } - if (listReservationsOptions.limit() != null) { - builder.query("limit", String.valueOf(listReservationsOptions.limit())); - } - if (listReservationsOptions.name() != null) { - builder.query("name", String.valueOf(listReservationsOptions.name())); - } - if (listReservationsOptions.profileResourceType() != null) { - builder.query("profile.resource_type", String.valueOf(listReservationsOptions.profileResourceType())); - } - if (listReservationsOptions.affinityPolicy() != null) { - builder.query("affinity_policy", String.valueOf(listReservationsOptions.affinityPolicy())); - } - if (listReservationsOptions.resourceGroupId() != null) { - builder.query("resource_group.id", String.valueOf(listReservationsOptions.resourceGroupId())); + if (listInstanceGroupManagerPoliciesOptions.start() != null) { + builder.query("start", String.valueOf(listInstanceGroupManagerPoliciesOptions.start())); } - if (listReservationsOptions.zoneName() != null) { - builder.query("zone.name", String.valueOf(listReservationsOptions.zoneName())); + if (listInstanceGroupManagerPoliciesOptions.limit() != null) { + builder.query("limit", String.valueOf(listInstanceGroupManagerPoliciesOptions.limit())); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List reservations. - * - * This request lists reservations in the region. A reservation provides reserved capacity for a specified profile in - * a specified zone. A reservation can also include a long-term committed use discount. + * List managers for an instance group. * - * The reservations will be sorted by their `created_at` property values, with newest reservations first. Reservations - * with identical `created_at` property values will in turn be sorted by ascending `name` property values. + * This request lists managers for an instance group. * - * @return a {@link ServiceCall} with a result of type {@link ReservationCollection} + * @param listInstanceGroupManagersOptions the {@link ListInstanceGroupManagersOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceGroupManagerCollection} */ - public ServiceCall listReservations() { - return listReservations(null); - } - - /** - * Create a reservation. - * - * This request creates a new reservation from a reservation prototype object. The prototype object is structured in - * the same way as a retrieved reservation, and contains the information necessary to create the new reservation. - * - * @param createReservationOptions the {@link CreateReservationOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Reservation} - */ - public ServiceCall createReservation(CreateReservationOptions createReservationOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createReservationOptions, - "createReservationOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/reservations")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createReservation"); + public ServiceCall listInstanceGroupManagers(ListInstanceGroupManagersOptions listInstanceGroupManagersOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listInstanceGroupManagersOptions, + "listInstanceGroupManagersOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("instance_group_id", listInstanceGroupManagersOptions.instanceGroupId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceGroupManagers"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.add("capacity", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createReservationOptions.capacity())); - contentJson.add("committed_use", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createReservationOptions.committedUse())); - contentJson.add("profile", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createReservationOptions.profile())); - contentJson.add("zone", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createReservationOptions.zone())); - if (createReservationOptions.affinityPolicy() != null) { - contentJson.addProperty("affinity_policy", createReservationOptions.affinityPolicy()); - } - if (createReservationOptions.name() != null) { - contentJson.addProperty("name", createReservationOptions.name()); + if (listInstanceGroupManagersOptions.start() != null) { + builder.query("start", String.valueOf(listInstanceGroupManagersOptions.start())); } - if (createReservationOptions.resourceGroup() != null) { - contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createReservationOptions.resourceGroup())); + if (listInstanceGroupManagersOptions.limit() != null) { + builder.query("limit", String.valueOf(listInstanceGroupManagersOptions.limit())); } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a reservation. + * List memberships for an instance group. * - * This request deletes a reservation. This operation cannot be reversed. Reservations with a `status` of `active` are - * not allowed to be deleted. + * This request lists instance group memberships for an instance group. * - * @param deleteReservationOptions the {@link DeleteReservationOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Reservation} + * @param listInstanceGroupMembershipsOptions the {@link ListInstanceGroupMembershipsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceGroupMembershipCollection} */ - public ServiceCall deleteReservation(DeleteReservationOptions deleteReservationOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteReservationOptions, - "deleteReservationOptions cannot be null"); + public ServiceCall listInstanceGroupMemberships(ListInstanceGroupMembershipsOptions listInstanceGroupMembershipsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listInstanceGroupMembershipsOptions, + "listInstanceGroupMembershipsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteReservationOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/reservations/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteReservation"); + pathParamsMap.put("instance_group_id", listInstanceGroupMembershipsOptions.instanceGroupId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/memberships", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceGroupMemberships"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listInstanceGroupMembershipsOptions.start() != null) { + builder.query("start", String.valueOf(listInstanceGroupMembershipsOptions.start())); + } + if (listInstanceGroupMembershipsOptions.limit() != null) { + builder.query("limit", String.valueOf(listInstanceGroupMembershipsOptions.limit())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a reservation. + * List instance groups. * - * This request retrieves a single reservation specified by identifier in the URL. + * This request lists instance groups in the region. * - * @param getReservationOptions the {@link GetReservationOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Reservation} + * @param listInstanceGroupsOptions the {@link ListInstanceGroupsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceGroupCollection} */ - public ServiceCall getReservation(GetReservationOptions getReservationOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getReservationOptions, - "getReservationOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getReservationOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/reservations/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getReservation"); + public ServiceCall listInstanceGroups(ListInstanceGroupsOptions listInstanceGroupsOptions) { + if (listInstanceGroupsOptions == null) { + listInstanceGroupsOptions = new ListInstanceGroupsOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceGroups"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listInstanceGroupsOptions.start() != null) { + builder.query("start", String.valueOf(listInstanceGroupsOptions.start())); + } + if (listInstanceGroupsOptions.limit() != null) { + builder.query("limit", String.valueOf(listInstanceGroupsOptions.limit())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a reservation. + * List instance groups. * - * This request updates a reservation with the information provided in a reservation patch object. The patch object is - * structured in the same way as a retrieved reservation and needs to contain only the information to be updated. + * This request lists instance groups in the region. * - * @param updateReservationOptions the {@link UpdateReservationOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Reservation} + * @return a {@link ServiceCall} with a result of type {@link InstanceGroupCollection} */ - public ServiceCall updateReservation(UpdateReservationOptions updateReservationOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateReservationOptions, - "updateReservationOptions cannot be null"); + public ServiceCall listInstanceGroups() { + return listInstanceGroups(null); + } + + /** + * Update an instance group. + * + * This request updates an instance group with the information provided instance group patch. The instance group patch + * object is structured in the same way as a retrieved instance group and contains only the information to be updated. + * + * @param updateInstanceGroupOptions the {@link UpdateInstanceGroupOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceGroup} + */ + public ServiceCall updateInstanceGroup(UpdateInstanceGroupOptions updateInstanceGroupOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateInstanceGroupOptions, + "updateInstanceGroupOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateReservationOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/reservations/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateReservation"); + pathParamsMap.put("id", updateInstanceGroupOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateInstanceGroup"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateReservationOptions.reservationPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateInstanceGroupOptions.instanceGroupPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Activate a reservation. + * Update an instance group manager. * - * This request activates a reservation. For this request to succeed, the reservation status must be `inactive`. + * This request updates an instance group manager with the information provided instance group manager patch. * - * @param activateReservationOptions the {@link ActivateReservationOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param updateInstanceGroupManagerOptions the {@link UpdateInstanceGroupManagerOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceGroupManager} */ - public ServiceCall activateReservation(ActivateReservationOptions activateReservationOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(activateReservationOptions, - "activateReservationOptions cannot be null"); + public ServiceCall updateInstanceGroupManager(UpdateInstanceGroupManagerOptions updateInstanceGroupManagerOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateInstanceGroupManagerOptions, + "updateInstanceGroupManagerOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", activateReservationOptions.id()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/reservations/{id}/activate", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "activateReservation"); + pathParamsMap.put("instance_group_id", updateInstanceGroupManagerOptions.instanceGroupId()); + pathParamsMap.put("id", updateInstanceGroupManagerOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateInstanceGroupManager"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateInstanceGroupManagerOptions.instanceGroupManagerPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List dedicated host groups. + * Update specified instance group manager action. * - * This request lists dedicated host groups in the region. Each dedicated host must belong to exactly one group, which - * controls placement of instances. Dedicated host groups do not span zones. + * This request updates an instance group manager action. * - * @param listDedicatedHostGroupsOptions the {@link ListDedicatedHostGroupsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link DedicatedHostGroupCollection} + * @param updateInstanceGroupManagerActionOptions the {@link UpdateInstanceGroupManagerActionOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceGroupManagerAction} */ - public ServiceCall listDedicatedHostGroups(ListDedicatedHostGroupsOptions listDedicatedHostGroupsOptions) { - if (listDedicatedHostGroupsOptions == null) { - listDedicatedHostGroupsOptions = new ListDedicatedHostGroupsOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_host/groups")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listDedicatedHostGroups"); + public ServiceCall updateInstanceGroupManagerAction(UpdateInstanceGroupManagerActionOptions updateInstanceGroupManagerActionOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateInstanceGroupManagerActionOptions, + "updateInstanceGroupManagerActionOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("instance_group_id", updateInstanceGroupManagerActionOptions.instanceGroupId()); + pathParamsMap.put("instance_group_manager_id", updateInstanceGroupManagerActionOptions.instanceGroupManagerId()); + pathParamsMap.put("id", updateInstanceGroupManagerActionOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateInstanceGroupManagerAction"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listDedicatedHostGroupsOptions.start() != null) { - builder.query("start", String.valueOf(listDedicatedHostGroupsOptions.start())); - } - if (listDedicatedHostGroupsOptions.limit() != null) { - builder.query("limit", String.valueOf(listDedicatedHostGroupsOptions.limit())); - } - if (listDedicatedHostGroupsOptions.resourceGroupId() != null) { - builder.query("resource_group.id", String.valueOf(listDedicatedHostGroupsOptions.resourceGroupId())); - } - if (listDedicatedHostGroupsOptions.zoneName() != null) { - builder.query("zone.name", String.valueOf(listDedicatedHostGroupsOptions.zoneName())); - } - if (listDedicatedHostGroupsOptions.name() != null) { - builder.query("name", String.valueOf(listDedicatedHostGroupsOptions.name())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateInstanceGroupManagerActionOptions.instanceGroupManagerActionPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List dedicated host groups. - * - * This request lists dedicated host groups in the region. Each dedicated host must belong to exactly one group, which - * controls placement of instances. Dedicated host groups do not span zones. - * - * @return a {@link ServiceCall} with a result of type {@link DedicatedHostGroupCollection} - */ - public ServiceCall listDedicatedHostGroups() { - return listDedicatedHostGroups(null); - } - - /** - * Create a dedicated host group. + * Update an instance group manager policy. * - * This request creates a new dedicated host group. + * This request updates an instance group manager policy. * - * @param createDedicatedHostGroupOptions the {@link CreateDedicatedHostGroupOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link DedicatedHostGroup} + * @param updateInstanceGroupManagerPolicyOptions the {@link UpdateInstanceGroupManagerPolicyOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceGroupManagerPolicy} */ - public ServiceCall createDedicatedHostGroup(CreateDedicatedHostGroupOptions createDedicatedHostGroupOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createDedicatedHostGroupOptions, - "createDedicatedHostGroupOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_host/groups")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createDedicatedHostGroup"); + public ServiceCall updateInstanceGroupManagerPolicy(UpdateInstanceGroupManagerPolicyOptions updateInstanceGroupManagerPolicyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateInstanceGroupManagerPolicyOptions, + "updateInstanceGroupManagerPolicyOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("instance_group_id", updateInstanceGroupManagerPolicyOptions.instanceGroupId()); + pathParamsMap.put("instance_group_manager_id", updateInstanceGroupManagerPolicyOptions.instanceGroupManagerId()); + pathParamsMap.put("id", updateInstanceGroupManagerPolicyOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateInstanceGroupManagerPolicy"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("class", createDedicatedHostGroupOptions.xClass()); - contentJson.addProperty("family", createDedicatedHostGroupOptions.family()); - contentJson.add("zone", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createDedicatedHostGroupOptions.zone())); - if (createDedicatedHostGroupOptions.name() != null) { - contentJson.addProperty("name", createDedicatedHostGroupOptions.name()); - } - if (createDedicatedHostGroupOptions.resourceGroup() != null) { - contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createDedicatedHostGroupOptions.resourceGroup())); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateInstanceGroupManagerPolicyOptions.instanceGroupManagerPolicyPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a dedicated host group. + * Update an instance group membership. * - * This request deletes a dedicated host group. + * This request updates an instance group membership with the information provided instance group membership patch. * - * @param deleteDedicatedHostGroupOptions the {@link DeleteDedicatedHostGroupOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param updateInstanceGroupMembershipOptions the {@link UpdateInstanceGroupMembershipOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceGroupMembership} */ - public ServiceCall deleteDedicatedHostGroup(DeleteDedicatedHostGroupOptions deleteDedicatedHostGroupOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteDedicatedHostGroupOptions, - "deleteDedicatedHostGroupOptions cannot be null"); + public ServiceCall updateInstanceGroupMembership(UpdateInstanceGroupMembershipOptions updateInstanceGroupMembershipOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateInstanceGroupMembershipOptions, + "updateInstanceGroupMembershipOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteDedicatedHostGroupOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_host/groups/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteDedicatedHostGroup"); + pathParamsMap.put("instance_group_id", updateInstanceGroupMembershipOptions.instanceGroupId()); + pathParamsMap.put("id", updateInstanceGroupMembershipOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance_groups/{instance_group_id}/memberships/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateInstanceGroupMembership"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateInstanceGroupMembershipOptions.instanceGroupMembershipPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a dedicated host group. + * Create an instance template. * - * This request retrieves a single dedicated host group specified by the identifier in the URL. + * This request creates a new instance template. The prototype object is structured in the same way as a retrieved + * instance template, and contains the information necessary to provision a new instance from the template. * - * @param getDedicatedHostGroupOptions the {@link GetDedicatedHostGroupOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link DedicatedHostGroup} + * If a `source_template` is specified in the prototype object, its contents are copied into the new template prior to + * copying any other properties provided in the prototype object. + * + * @param createInstanceTemplateOptions the {@link CreateInstanceTemplateOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceTemplate} */ - public ServiceCall getDedicatedHostGroup(GetDedicatedHostGroupOptions getDedicatedHostGroupOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getDedicatedHostGroupOptions, - "getDedicatedHostGroupOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getDedicatedHostGroupOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_host/groups/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getDedicatedHostGroup"); + public ServiceCall createInstanceTemplate(CreateInstanceTemplateOptions createInstanceTemplateOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createInstanceTemplateOptions, + "createInstanceTemplateOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance/templates")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createInstanceTemplate"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createInstanceTemplateOptions.instanceTemplatePrototype()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a dedicated host group. + * Delete an instance template. * - * This request updates a dedicated host group with the information in a provided dedicated host group patch. The - * dedicated host group patch object is structured in the same way as a retrieved dedicated host group and contains - * only the information to be updated. + * This request deletes the instance template. This operation cannot be reversed. * - * @param updateDedicatedHostGroupOptions the {@link UpdateDedicatedHostGroupOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link DedicatedHostGroup} + * @param deleteInstanceTemplateOptions the {@link DeleteInstanceTemplateOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall updateDedicatedHostGroup(UpdateDedicatedHostGroupOptions updateDedicatedHostGroupOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateDedicatedHostGroupOptions, - "updateDedicatedHostGroupOptions cannot be null"); + public ServiceCall deleteInstanceTemplate(DeleteInstanceTemplateOptions deleteInstanceTemplateOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteInstanceTemplateOptions, + "deleteInstanceTemplateOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateDedicatedHostGroupOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_host/groups/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateDedicatedHostGroup"); + pathParamsMap.put("id", deleteInstanceTemplateOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance/templates/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteInstanceTemplate"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateDedicatedHostGroupOptions.dedicatedHostGroupPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * List dedicated host profiles. + * Retrieve an instance template. * - * This request lists provisionable [dedicated host profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-dh-profiles) in - * the region. A dedicated host profile specifies the hardware characteristics for a dedicated host. + * This request retrieves a single instance template specified by the identifier in the URL. * - * @param listDedicatedHostProfilesOptions the {@link ListDedicatedHostProfilesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link DedicatedHostProfileCollection} + * @param getInstanceTemplateOptions the {@link GetInstanceTemplateOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceTemplate} */ - public ServiceCall listDedicatedHostProfiles(ListDedicatedHostProfilesOptions listDedicatedHostProfilesOptions) { - if (listDedicatedHostProfilesOptions == null) { - listDedicatedHostProfilesOptions = new ListDedicatedHostProfilesOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_host/profiles")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listDedicatedHostProfiles"); + public ServiceCall getInstanceTemplate(GetInstanceTemplateOptions getInstanceTemplateOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceTemplateOptions, + "getInstanceTemplateOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", getInstanceTemplateOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance/templates/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceTemplate"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listDedicatedHostProfilesOptions.start() != null) { - builder.query("start", String.valueOf(listDedicatedHostProfilesOptions.start())); - } - if (listDedicatedHostProfilesOptions.limit() != null) { - builder.query("limit", String.valueOf(listDedicatedHostProfilesOptions.limit())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List dedicated host profiles. - * - * This request lists provisionable [dedicated host profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-dh-profiles) in - * the region. A dedicated host profile specifies the hardware characteristics for a dedicated host. - * - * @return a {@link ServiceCall} with a result of type {@link DedicatedHostProfileCollection} - */ - public ServiceCall listDedicatedHostProfiles() { - return listDedicatedHostProfiles(null); - } - - /** - * Retrieve a dedicated host profile. + * List instance templates. * - * This request retrieves a single dedicated host profile specified by the name in the URL. + * This request lists instance templates in the region. * - * @param getDedicatedHostProfileOptions the {@link GetDedicatedHostProfileOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link DedicatedHostProfile} + * @param listInstanceTemplatesOptions the {@link ListInstanceTemplatesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceTemplateCollection} */ - public ServiceCall getDedicatedHostProfile(GetDedicatedHostProfileOptions getDedicatedHostProfileOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getDedicatedHostProfileOptions, - "getDedicatedHostProfileOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("name", getDedicatedHostProfileOptions.name()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_host/profiles/{name}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getDedicatedHostProfile"); + public ServiceCall listInstanceTemplates(ListInstanceTemplatesOptions listInstanceTemplatesOptions) { + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance/templates")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceTemplates"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List dedicated hosts. + * List instance templates. * - * This request lists dedicated hosts in the region. + * This request lists instance templates in the region. * - * @param listDedicatedHostsOptions the {@link ListDedicatedHostsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link DedicatedHostCollection} + * @return a {@link ServiceCall} with a result of type {@link InstanceTemplateCollection} */ - public ServiceCall listDedicatedHosts(ListDedicatedHostsOptions listDedicatedHostsOptions) { - if (listDedicatedHostsOptions == null) { - listDedicatedHostsOptions = new ListDedicatedHostsOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_hosts")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listDedicatedHosts"); + public ServiceCall listInstanceTemplates() { + return listInstanceTemplates(null); + } + + /** + * Update an instance template. + * + * This request updates an instance template with the information provided in the instance template patch. The + * instance template patch object is structured in the same way as a retrieved instance template and contains only the + * information to be updated. + * + * @param updateInstanceTemplateOptions the {@link UpdateInstanceTemplateOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceTemplate} + */ + public ServiceCall updateInstanceTemplate(UpdateInstanceTemplateOptions updateInstanceTemplateOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateInstanceTemplateOptions, + "updateInstanceTemplateOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", updateInstanceTemplateOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance/templates/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateInstanceTemplate"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listDedicatedHostsOptions.dedicatedHostGroupId() != null) { - builder.query("dedicated_host_group.id", String.valueOf(listDedicatedHostsOptions.dedicatedHostGroupId())); - } - if (listDedicatedHostsOptions.start() != null) { - builder.query("start", String.valueOf(listDedicatedHostsOptions.start())); - } - if (listDedicatedHostsOptions.limit() != null) { - builder.query("limit", String.valueOf(listDedicatedHostsOptions.limit())); - } - if (listDedicatedHostsOptions.resourceGroupId() != null) { - builder.query("resource_group.id", String.valueOf(listDedicatedHostsOptions.resourceGroupId())); - } - if (listDedicatedHostsOptions.zoneName() != null) { - builder.query("zone.name", String.valueOf(listDedicatedHostsOptions.zoneName())); - } - if (listDedicatedHostsOptions.name() != null) { - builder.query("name", String.valueOf(listDedicatedHostsOptions.name())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateInstanceTemplateOptions.instanceTemplatePatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List dedicated hosts. + * Associate a floating IP with an instance network interface. * - * This request lists dedicated hosts in the region. + * This request associates the specified floating IP with the specified instance network interface, replacing any + * existing association. * - * @return a {@link ServiceCall} with a result of type {@link DedicatedHostCollection} - */ - public ServiceCall listDedicatedHosts() { - return listDedicatedHosts(null); - } - - /** - * Create a dedicated host. + * The existing floating IP must: + * - not be required by another resource, such as a public gateway + * - be in the same `zone` as the instance * - * This request creates a new dedicated host. + * A request body is not required, and if provided, is ignored. * - * @param createDedicatedHostOptions the {@link CreateDedicatedHostOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link DedicatedHost} + * @param addInstanceNetworkInterfaceFloatingIpOptions the {@link AddInstanceNetworkInterfaceFloatingIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link FloatingIP} */ - public ServiceCall createDedicatedHost(CreateDedicatedHostOptions createDedicatedHostOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createDedicatedHostOptions, - "createDedicatedHostOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_hosts")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createDedicatedHost"); + public ServiceCall addInstanceNetworkInterfaceFloatingIp(AddInstanceNetworkInterfaceFloatingIpOptions addInstanceNetworkInterfaceFloatingIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(addInstanceNetworkInterfaceFloatingIpOptions, + "addInstanceNetworkInterfaceFloatingIpOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("instance_id", addInstanceNetworkInterfaceFloatingIpOptions.instanceId()); + pathParamsMap.put("network_interface_id", addInstanceNetworkInterfaceFloatingIpOptions.networkInterfaceId()); + pathParamsMap.put("id", addInstanceNetworkInterfaceFloatingIpOptions.id()); + RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "addInstanceNetworkInterfaceFloatingIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createDedicatedHostOptions.dedicatedHostPrototype()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List disks on a dedicated host. + * Create a cluster network attachment. * - * This request lists disks on a dedicated host. A disk is a physical device that is locally attached to the compute - * node. By default, the listed disks are sorted by their - * `created_at` property values, with the newest disk first. + * This request creates a cluster network attachment from an instance cluster network attachment prototype object. A + * cluster network attachment will attach the instance to a cluster network. The cluster network attachment prototype + * must specify a cluster network interface identity or a cluster network interface prototype. * - * @param listDedicatedHostDisksOptions the {@link ListDedicatedHostDisksOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link DedicatedHostDiskCollection} + * The instance must be in a `stopped` or `stopping` state to create an instance cluster network attachment. + * + * @param createClusterNetworkAttachmentOptions the {@link CreateClusterNetworkAttachmentOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceClusterNetworkAttachment} */ - public ServiceCall listDedicatedHostDisks(ListDedicatedHostDisksOptions listDedicatedHostDisksOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listDedicatedHostDisksOptions, - "listDedicatedHostDisksOptions cannot be null"); + public ServiceCall createClusterNetworkAttachment(CreateClusterNetworkAttachmentOptions createClusterNetworkAttachmentOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createClusterNetworkAttachmentOptions, + "createClusterNetworkAttachmentOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("dedicated_host_id", listDedicatedHostDisksOptions.dedicatedHostId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_hosts/{dedicated_host_id}/disks", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listDedicatedHostDisks"); + pathParamsMap.put("instance_id", createClusterNetworkAttachmentOptions.instanceId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/cluster_network_attachments", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createClusterNetworkAttachment"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + final JsonObject contentJson = new JsonObject(); + contentJson.add("cluster_network_interface", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createClusterNetworkAttachmentOptions.clusterNetworkInterface())); + if (createClusterNetworkAttachmentOptions.before() != null) { + contentJson.add("before", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createClusterNetworkAttachmentOptions.before())); + } + if (createClusterNetworkAttachmentOptions.name() != null) { + contentJson.addProperty("name", createClusterNetworkAttachmentOptions.name()); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a dedicated host disk. + * Create an instance. * - * This request retrieves a single dedicated host disk specified by the identifier in the URL. + * This request provisions a new instance from an instance prototype object. The prototype object is structured in the + * same way as a retrieved instance, and contains the information necessary to provision the new instance. The + * instance is automatically started. * - * @param getDedicatedHostDiskOptions the {@link GetDedicatedHostDiskOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link DedicatedHostDisk} + * For this request to succeed, the properties in the request must adhere to the source's + * `allowed_use` property. + * + * @param createInstanceOptions the {@link CreateInstanceOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Instance} */ - public ServiceCall getDedicatedHostDisk(GetDedicatedHostDiskOptions getDedicatedHostDiskOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getDedicatedHostDiskOptions, - "getDedicatedHostDiskOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("dedicated_host_id", getDedicatedHostDiskOptions.dedicatedHostId()); - pathParamsMap.put("id", getDedicatedHostDiskOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_hosts/{dedicated_host_id}/disks/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getDedicatedHostDisk"); + public ServiceCall createInstance(CreateInstanceOptions createInstanceOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createInstanceOptions, + "createInstanceOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createInstance"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createInstanceOptions.instancePrototype()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a dedicated host disk. + * Create an instance action. * - * This request updates the dedicated host disk with the information in a provided patch. + * This request creates a new action which will be queued up to run as soon as any pending or running actions have + * completed. * - * @param updateDedicatedHostDiskOptions the {@link UpdateDedicatedHostDiskOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link DedicatedHostDisk} + * @param createInstanceActionOptions the {@link CreateInstanceActionOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceAction} */ - public ServiceCall updateDedicatedHostDisk(UpdateDedicatedHostDiskOptions updateDedicatedHostDiskOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateDedicatedHostDiskOptions, - "updateDedicatedHostDiskOptions cannot be null"); + public ServiceCall createInstanceAction(CreateInstanceActionOptions createInstanceActionOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createInstanceActionOptions, + "createInstanceActionOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("dedicated_host_id", updateDedicatedHostDiskOptions.dedicatedHostId()); - pathParamsMap.put("id", updateDedicatedHostDiskOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_hosts/{dedicated_host_id}/disks/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateDedicatedHostDisk"); + pathParamsMap.put("instance_id", createInstanceActionOptions.instanceId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/actions", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createInstanceAction"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateDedicatedHostDiskOptions.dedicatedHostDiskPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + final JsonObject contentJson = new JsonObject(); + contentJson.addProperty("type", createInstanceActionOptions.type()); + if (createInstanceActionOptions.force() != null) { + contentJson.addProperty("force", createInstanceActionOptions.force()); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a dedicated host. + * Create a console access token for an instance. * - * This request deletes a dedicated host. This operation cannot be reversed. For this request to succeed, `instances` - * must be empty and `instance_placement_enabled` must be `false`. + * This request creates a new single-use console access token for an instance. All console configuration is provided + * at token create time, and the token is subsequently used in the `access_token` query parameter for the WebSocket + * request. The access token is only valid for a short period of time, and a maximum of one token is valid for a + * given instance at a time. * - * @param deleteDedicatedHostOptions the {@link DeleteDedicatedHostOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param createInstanceConsoleAccessTokenOptions the {@link CreateInstanceConsoleAccessTokenOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceConsoleAccessToken} */ - public ServiceCall deleteDedicatedHost(DeleteDedicatedHostOptions deleteDedicatedHostOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteDedicatedHostOptions, - "deleteDedicatedHostOptions cannot be null"); + public ServiceCall createInstanceConsoleAccessToken(CreateInstanceConsoleAccessTokenOptions createInstanceConsoleAccessTokenOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createInstanceConsoleAccessTokenOptions, + "createInstanceConsoleAccessTokenOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteDedicatedHostOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_hosts/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteDedicatedHost"); + pathParamsMap.put("instance_id", createInstanceConsoleAccessTokenOptions.instanceId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/console_access_token", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createInstanceConsoleAccessToken"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + final JsonObject contentJson = new JsonObject(); + contentJson.addProperty("console_type", createInstanceConsoleAccessTokenOptions.consoleType()); + if (createInstanceConsoleAccessTokenOptions.force() != null) { + contentJson.addProperty("force", createInstanceConsoleAccessTokenOptions.force()); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a dedicated host. + * Create a network attachment on an instance. * - * This request retrieves a single dedicated host specified by the identifiers in the URL. + * This request creates a new instance network attachment from an instance network attachment prototype object. The + * prototype object is structured in the same way as a retrieved instance network attachment, and contains the + * information necessary to create the new instance network attachment. * - * @param getDedicatedHostOptions the {@link GetDedicatedHostOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link DedicatedHost} + * @param createInstanceNetworkAttachmentOptions the {@link CreateInstanceNetworkAttachmentOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceNetworkAttachment} */ - public ServiceCall getDedicatedHost(GetDedicatedHostOptions getDedicatedHostOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getDedicatedHostOptions, - "getDedicatedHostOptions cannot be null"); + public ServiceCall createInstanceNetworkAttachment(CreateInstanceNetworkAttachmentOptions createInstanceNetworkAttachmentOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createInstanceNetworkAttachmentOptions, + "createInstanceNetworkAttachmentOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getDedicatedHostOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_hosts/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getDedicatedHost"); + pathParamsMap.put("instance_id", createInstanceNetworkAttachmentOptions.instanceId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_attachments", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createInstanceNetworkAttachment"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + final JsonObject contentJson = new JsonObject(); + contentJson.add("virtual_network_interface", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createInstanceNetworkAttachmentOptions.virtualNetworkInterface())); + if (createInstanceNetworkAttachmentOptions.name() != null) { + contentJson.addProperty("name", createInstanceNetworkAttachmentOptions.name()); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a dedicated host. + * Create a network interface on an instance. * - * This request updates a dedicated host with the information in a provided dedicated host patch. The dedicated host - * patch object is structured in the same way as a retrieved dedicated host and contains only the information to be - * updated. + * This request creates a new instance network interface from an instance network interface prototype object. The + * prototype object is structured in the same way as a retrieved instance network interface, and contains the + * information necessary to create the new instance network interface. Any subnet in the instance's VPC may be + * specified. Addresses on the instance network interface must be within the specified subnet's CIDR blocks. * - * @param updateDedicatedHostOptions the {@link UpdateDedicatedHostOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link DedicatedHost} + * If this instance has network attachments, each network interface is a [read-only + * representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding + * network attachment and its attached virtual network interface, and new network interfaces are not allowed to be + * created. + * + * @param createInstanceNetworkInterfaceOptions the {@link CreateInstanceNetworkInterfaceOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link NetworkInterface} */ - public ServiceCall updateDedicatedHost(UpdateDedicatedHostOptions updateDedicatedHostOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateDedicatedHostOptions, - "updateDedicatedHostOptions cannot be null"); + public ServiceCall createInstanceNetworkInterface(CreateInstanceNetworkInterfaceOptions createInstanceNetworkInterfaceOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createInstanceNetworkInterfaceOptions, + "createInstanceNetworkInterfaceOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateDedicatedHostOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/dedicated_hosts/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateDedicatedHost"); + pathParamsMap.put("instance_id", createInstanceNetworkInterfaceOptions.instanceId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_interfaces", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createInstanceNetworkInterface"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateDedicatedHostOptions.dedicatedHostPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + final JsonObject contentJson = new JsonObject(); + contentJson.add("subnet", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createInstanceNetworkInterfaceOptions.subnet())); + if (createInstanceNetworkInterfaceOptions.allowIpSpoofing() != null) { + contentJson.addProperty("allow_ip_spoofing", createInstanceNetworkInterfaceOptions.allowIpSpoofing()); + } + if (createInstanceNetworkInterfaceOptions.name() != null) { + contentJson.addProperty("name", createInstanceNetworkInterfaceOptions.name()); + } + if (createInstanceNetworkInterfaceOptions.primaryIp() != null) { + contentJson.add("primary_ip", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createInstanceNetworkInterfaceOptions.primaryIp())); + } + if (createInstanceNetworkInterfaceOptions.securityGroups() != null) { + contentJson.add("security_groups", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createInstanceNetworkInterfaceOptions.securityGroups())); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List placement groups. + * Create a volume attachment on an instance. * - * This request lists placement groups in the region. + * This request creates a new volume attachment from a volume attachment prototype object, connecting a volume to an + * instance. For this request to succeed, the specified volume must not be busy. The prototype object is structured in + * the same way as a retrieved volume attachment, and contains the information necessary to create the new volume + * attachment. * - * @param listPlacementGroupsOptions the {@link ListPlacementGroupsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link PlacementGroupCollection} + * @param createInstanceVolumeAttachmentOptions the {@link CreateInstanceVolumeAttachmentOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VolumeAttachment} */ - public ServiceCall listPlacementGroups(ListPlacementGroupsOptions listPlacementGroupsOptions) { - if (listPlacementGroupsOptions == null) { - listPlacementGroupsOptions = new ListPlacementGroupsOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/placement_groups")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listPlacementGroups"); + public ServiceCall createInstanceVolumeAttachment(CreateInstanceVolumeAttachmentOptions createInstanceVolumeAttachmentOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createInstanceVolumeAttachmentOptions, + "createInstanceVolumeAttachmentOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("instance_id", createInstanceVolumeAttachmentOptions.instanceId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/volume_attachments", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createInstanceVolumeAttachment"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listPlacementGroupsOptions.start() != null) { - builder.query("start", String.valueOf(listPlacementGroupsOptions.start())); + final JsonObject contentJson = new JsonObject(); + contentJson.add("volume", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createInstanceVolumeAttachmentOptions.volume())); + if (createInstanceVolumeAttachmentOptions.deleteVolumeOnInstanceDelete() != null) { + contentJson.addProperty("delete_volume_on_instance_delete", createInstanceVolumeAttachmentOptions.deleteVolumeOnInstanceDelete()); } - if (listPlacementGroupsOptions.limit() != null) { - builder.query("limit", String.valueOf(listPlacementGroupsOptions.limit())); + if (createInstanceVolumeAttachmentOptions.name() != null) { + contentJson.addProperty("name", createInstanceVolumeAttachmentOptions.name()); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List placement groups. + * Delete an instance. * - * This request lists placement groups in the region. + * This request deletes an instance. This operation cannot be reversed. Any floating IPs associated with instance + * network interfaces are implicitly disassociated. All virtual network interfaces with `auto_delete` set to `true` + * targeting instance network attachments on the instance are automatically deleted. All flow log collectors with + * `auto_delete` set to `true` targeting the instance, the instance network attachments, the instance network + * interfaces, or the automatically deleted virtual network interfaces are automatically deleted. * - * @return a {@link ServiceCall} with a result of type {@link PlacementGroupCollection} + * @param deleteInstanceOptions the {@link DeleteInstanceOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall listPlacementGroups() { - return listPlacementGroups(null); + public ServiceCall deleteInstance(DeleteInstanceOptions deleteInstanceOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteInstanceOptions, + "deleteInstanceOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", deleteInstanceOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteInstance"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + if (deleteInstanceOptions.ifMatch() != null) { + builder.header("If-Match", deleteInstanceOptions.ifMatch()); + } + builder.query("version", String.valueOf(this.version)); + builder.query("generation", String.valueOf(this.generation)); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + return createServiceCall(builder.build(), responseConverter); } /** - * Create a placement group. + * Delete an instance cluster network attachment. * - * This request creates a new placement group. + * This request deletes an instance cluster network attachment. The instance must be in a + * `stopped` or `stopping` state to delete an instance cluster network attachment. * - * @param createPlacementGroupOptions the {@link CreatePlacementGroupOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link PlacementGroup} + * This operation cannot be reversed. + * + * @param deleteInstanceClusterNetworkAttachmentOptions the {@link DeleteInstanceClusterNetworkAttachmentOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceClusterNetworkAttachment} */ - public ServiceCall createPlacementGroup(CreatePlacementGroupOptions createPlacementGroupOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createPlacementGroupOptions, - "createPlacementGroupOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/placement_groups")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createPlacementGroup"); + public ServiceCall deleteInstanceClusterNetworkAttachment(DeleteInstanceClusterNetworkAttachmentOptions deleteInstanceClusterNetworkAttachmentOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteInstanceClusterNetworkAttachmentOptions, + "deleteInstanceClusterNetworkAttachmentOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("instance_id", deleteInstanceClusterNetworkAttachmentOptions.instanceId()); + pathParamsMap.put("id", deleteInstanceClusterNetworkAttachmentOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/cluster_network_attachments/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteInstanceClusterNetworkAttachment"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("strategy", createPlacementGroupOptions.strategy()); - if (createPlacementGroupOptions.name() != null) { - contentJson.addProperty("name", createPlacementGroupOptions.name()); - } - if (createPlacementGroupOptions.resourceGroup() != null) { - contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createPlacementGroupOptions.resourceGroup())); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a placement group. + * Delete an instance network attachment. * - * This request deletes a placement group. This operation cannot be reversed. For this request to succeed, the - * placement group must not be associated with an instance. + * This request deletes an instance network attachment. This operation cannot be reversed. Any floating IPs associated + * with the instance network attachment are implicitly disassociated. All flow log collectors with `auto_delete` set + * to `true` targeting the instance network attachment are automatically deleted. The primary instance network + * attachment is not allowed to be deleted. * - * @param deletePlacementGroupOptions the {@link DeletePlacementGroupOptions} containing the options for the call + * @param deleteInstanceNetworkAttachmentOptions the {@link DeleteInstanceNetworkAttachmentOptions} containing the options for the call * @return a {@link ServiceCall} with a void result */ - public ServiceCall deletePlacementGroup(DeletePlacementGroupOptions deletePlacementGroupOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deletePlacementGroupOptions, - "deletePlacementGroupOptions cannot be null"); + public ServiceCall deleteInstanceNetworkAttachment(DeleteInstanceNetworkAttachmentOptions deleteInstanceNetworkAttachmentOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteInstanceNetworkAttachmentOptions, + "deleteInstanceNetworkAttachmentOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deletePlacementGroupOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/placement_groups/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deletePlacementGroup"); + pathParamsMap.put("instance_id", deleteInstanceNetworkAttachmentOptions.instanceId()); + pathParamsMap.put("id", deleteInstanceNetworkAttachmentOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_attachments/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteInstanceNetworkAttachment"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } @@ -6106,712 +6163,705 @@ public ServiceCall deletePlacementGroup(DeletePlacementGroupOptions delete } /** - * Retrieve a placement group. + * Delete an instance network interface. * - * This request retrieves a single placement group specified by identifier in the URL. + * This request deletes an instance network interface. This operation cannot be reversed. Any floating IPs associated + * with the instance network interface are implicitly disassociated. All flow log collectors with `auto_delete` set to + * `true` targeting the instance network interface are automatically deleted. The primary instance network interface + * is not allowed to be deleted. * - * @param getPlacementGroupOptions the {@link GetPlacementGroupOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link PlacementGroup} + * If this instance has network attachments, this network interface is a [read-only + * representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding + * network attachment and its attached virtual network interface, and is not allowed to be deleted. + * + * @param deleteInstanceNetworkInterfaceOptions the {@link DeleteInstanceNetworkInterfaceOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall getPlacementGroup(GetPlacementGroupOptions getPlacementGroupOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getPlacementGroupOptions, - "getPlacementGroupOptions cannot be null"); + public ServiceCall deleteInstanceNetworkInterface(DeleteInstanceNetworkInterfaceOptions deleteInstanceNetworkInterfaceOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteInstanceNetworkInterfaceOptions, + "deleteInstanceNetworkInterfaceOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getPlacementGroupOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/placement_groups/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getPlacementGroup"); + pathParamsMap.put("instance_id", deleteInstanceNetworkInterfaceOptions.instanceId()); + pathParamsMap.put("id", deleteInstanceNetworkInterfaceOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_interfaces/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteInstanceNetworkInterface"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Update a placement group. + * Delete a volume attachment. * - * This request updates a placement group with the information provided placement group patch. The placement group - * patch object is structured in the same way as a retrieved placement group and contains only the information to be - * updated. + * This request deletes a volume attachment. This operation cannot be reversed, but a new volume attachment may + * subsequently be created for the volume. For this request to succeed, the volume must not be busy. * - * @param updatePlacementGroupOptions the {@link UpdatePlacementGroupOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link PlacementGroup} + * @param deleteInstanceVolumeAttachmentOptions the {@link DeleteInstanceVolumeAttachmentOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall updatePlacementGroup(UpdatePlacementGroupOptions updatePlacementGroupOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updatePlacementGroupOptions, - "updatePlacementGroupOptions cannot be null"); + public ServiceCall deleteInstanceVolumeAttachment(DeleteInstanceVolumeAttachmentOptions deleteInstanceVolumeAttachmentOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteInstanceVolumeAttachmentOptions, + "deleteInstanceVolumeAttachmentOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updatePlacementGroupOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/placement_groups/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updatePlacementGroup"); + pathParamsMap.put("instance_id", deleteInstanceVolumeAttachmentOptions.instanceId()); + pathParamsMap.put("id", deleteInstanceVolumeAttachmentOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/volume_attachments/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteInstanceVolumeAttachment"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updatePlacementGroupOptions.placementGroupPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * List bare metal server profiles. + * Retrieve an instance. * - * This request lists [bare metal server - * profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-servers-profile) available in the region. A bare - * metal server profile specifies the performance characteristics and pricing model for a bare metal server. + * This request retrieves a single instance specified by the identifier in the URL. * - * @param listBareMetalServerProfilesOptions the {@link ListBareMetalServerProfilesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BareMetalServerProfileCollection} + * @param getInstanceOptions the {@link GetInstanceOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Instance} */ - public ServiceCall listBareMetalServerProfiles(ListBareMetalServerProfilesOptions listBareMetalServerProfilesOptions) { - if (listBareMetalServerProfilesOptions == null) { - listBareMetalServerProfilesOptions = new ListBareMetalServerProfilesOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_server/profiles")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listBareMetalServerProfiles"); + public ServiceCall getInstance(GetInstanceOptions getInstanceOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceOptions, + "getInstanceOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", getInstanceOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstance"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listBareMetalServerProfilesOptions.start() != null) { - builder.query("start", String.valueOf(listBareMetalServerProfilesOptions.start())); - } - if (listBareMetalServerProfilesOptions.limit() != null) { - builder.query("limit", String.valueOf(listBareMetalServerProfilesOptions.limit())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List bare metal server profiles. - * - * This request lists [bare metal server - * profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-servers-profile) available in the region. A bare - * metal server profile specifies the performance characteristics and pricing model for a bare metal server. - * - * @return a {@link ServiceCall} with a result of type {@link BareMetalServerProfileCollection} - */ - public ServiceCall listBareMetalServerProfiles() { - return listBareMetalServerProfiles(null); - } - - /** - * Retrieve a bare metal server profile. + * Retrieve an instance cluster network attachment. * - * This request retrieves a single bare metal server profile specified by the name in the URL. + * This request retrieves a single instance cluster network attachment specified by the identifier in the URL. * - * @param getBareMetalServerProfileOptions the {@link GetBareMetalServerProfileOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BareMetalServerProfile} + * @param getInstanceClusterNetworkAttachmentOptions the {@link GetInstanceClusterNetworkAttachmentOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceClusterNetworkAttachment} */ - public ServiceCall getBareMetalServerProfile(GetBareMetalServerProfileOptions getBareMetalServerProfileOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getBareMetalServerProfileOptions, - "getBareMetalServerProfileOptions cannot be null"); + public ServiceCall getInstanceClusterNetworkAttachment(GetInstanceClusterNetworkAttachmentOptions getInstanceClusterNetworkAttachmentOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceClusterNetworkAttachmentOptions, + "getInstanceClusterNetworkAttachmentOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("name", getBareMetalServerProfileOptions.name()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_server/profiles/{name}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getBareMetalServerProfile"); + pathParamsMap.put("instance_id", getInstanceClusterNetworkAttachmentOptions.instanceId()); + pathParamsMap.put("id", getInstanceClusterNetworkAttachmentOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/cluster_network_attachments/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceClusterNetworkAttachment"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List bare metal servers. + * Retrieve an instance disk. * - * This request lists bare metal servers in the region. + * This request retrieves a single instance disk specified by the identifier in the URL. * - * @param listBareMetalServersOptions the {@link ListBareMetalServersOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BareMetalServerCollection} + * @param getInstanceDiskOptions the {@link GetInstanceDiskOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceDisk} */ - public ServiceCall listBareMetalServers(ListBareMetalServersOptions listBareMetalServersOptions) { - if (listBareMetalServersOptions == null) { - listBareMetalServersOptions = new ListBareMetalServersOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listBareMetalServers"); + public ServiceCall getInstanceDisk(GetInstanceDiskOptions getInstanceDiskOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceDiskOptions, + "getInstanceDiskOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("instance_id", getInstanceDiskOptions.instanceId()); + pathParamsMap.put("id", getInstanceDiskOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/disks/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceDisk"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listBareMetalServersOptions.start() != null) { - builder.query("start", String.valueOf(listBareMetalServersOptions.start())); - } - if (listBareMetalServersOptions.limit() != null) { - builder.query("limit", String.valueOf(listBareMetalServersOptions.limit())); - } - if (listBareMetalServersOptions.resourceGroupId() != null) { - builder.query("resource_group.id", String.valueOf(listBareMetalServersOptions.resourceGroupId())); - } - if (listBareMetalServersOptions.name() != null) { - builder.query("name", String.valueOf(listBareMetalServersOptions.name())); - } - if (listBareMetalServersOptions.reservationId() != null) { - builder.query("reservation.id", String.valueOf(listBareMetalServersOptions.reservationId())); - } - if (listBareMetalServersOptions.reservationCrn() != null) { - builder.query("reservation.crn", String.valueOf(listBareMetalServersOptions.reservationCrn())); - } - if (listBareMetalServersOptions.reservationName() != null) { - builder.query("reservation.name", String.valueOf(listBareMetalServersOptions.reservationName())); - } - if (listBareMetalServersOptions.vpcId() != null) { - builder.query("vpc.id", String.valueOf(listBareMetalServersOptions.vpcId())); - } - if (listBareMetalServersOptions.vpcCrn() != null) { - builder.query("vpc.crn", String.valueOf(listBareMetalServersOptions.vpcCrn())); - } - if (listBareMetalServersOptions.vpcName() != null) { - builder.query("vpc.name", String.valueOf(listBareMetalServersOptions.vpcName())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List bare metal servers. - * - * This request lists bare metal servers in the region. - * - * @return a {@link ServiceCall} with a result of type {@link BareMetalServerCollection} - */ - public ServiceCall listBareMetalServers() { - return listBareMetalServers(null); - } - - /** - * Create a bare metal server. + * Retrieve initialization configuration for an instance. * - * This request provisions a new bare metal server from a prototype object. The prototype object is structured in the - * same way as a retrieved bare metal server, and contains the information necessary to provision the new bare metal - * server. The bare metal server is automatically started. + * This request retrieves configuration used to initialize the instance, such as SSH keys and the Windows + * administrator password. These can subsequently be changed on the instance and therefore may not be current. * - * @param createBareMetalServerOptions the {@link CreateBareMetalServerOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BareMetalServer} + * @param getInstanceInitializationOptions the {@link GetInstanceInitializationOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceInitialization} */ - public ServiceCall createBareMetalServer(CreateBareMetalServerOptions createBareMetalServerOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createBareMetalServerOptions, - "createBareMetalServerOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createBareMetalServer"); + public ServiceCall getInstanceInitialization(GetInstanceInitializationOptions getInstanceInitializationOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceInitializationOptions, + "getInstanceInitializationOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", getInstanceInitializationOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{id}/initialization", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceInitialization"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createBareMetalServerOptions.bareMetalServerPrototype()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create a console access token for a bare metal server. + * Retrieve an instance network attachment. * - * This request creates a new single-use console access token for a bare metal server. All console configuration is - * provided at token create time, and the token is subsequently used in the `access_token` query parameter for the - * WebSocket request. The access token is only valid for a short period of time, and a maximum of one token is valid - * for a given bare metal server at a time. For this request to succeed, the server must have a `status` of - * `stopped`, `starting`, or `running`. + * This request retrieves a single instance network attachment specified by the identifier in the URL. * - * @param createBareMetalServerConsoleAccessTokenOptions the {@link CreateBareMetalServerConsoleAccessTokenOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BareMetalServerConsoleAccessToken} + * @param getInstanceNetworkAttachmentOptions the {@link GetInstanceNetworkAttachmentOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceNetworkAttachment} */ - public ServiceCall createBareMetalServerConsoleAccessToken(CreateBareMetalServerConsoleAccessTokenOptions createBareMetalServerConsoleAccessTokenOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createBareMetalServerConsoleAccessTokenOptions, - "createBareMetalServerConsoleAccessTokenOptions cannot be null"); + public ServiceCall getInstanceNetworkAttachment(GetInstanceNetworkAttachmentOptions getInstanceNetworkAttachmentOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceNetworkAttachmentOptions, + "getInstanceNetworkAttachmentOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("bare_metal_server_id", createBareMetalServerConsoleAccessTokenOptions.bareMetalServerId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/console_access_token", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createBareMetalServerConsoleAccessToken"); + pathParamsMap.put("instance_id", getInstanceNetworkAttachmentOptions.instanceId()); + pathParamsMap.put("id", getInstanceNetworkAttachmentOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_attachments/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceNetworkAttachment"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("console_type", createBareMetalServerConsoleAccessTokenOptions.consoleType()); - if (createBareMetalServerConsoleAccessTokenOptions.force() != null) { - contentJson.addProperty("force", createBareMetalServerConsoleAccessTokenOptions.force()); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List disks on a bare metal server. + * Retrieve an instance network interface. * - * This request lists disks on a bare metal server. A disk is a block device that is locally attached to the - * physical server. By default, the listed disks are sorted by their `created_at` property values, with the newest - * disk first. + * This request retrieves a single instance network interface specified by the identifier in the URL. * - * @param listBareMetalServerDisksOptions the {@link ListBareMetalServerDisksOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BareMetalServerDiskCollection} + * If this instance has network attachments, the retrieved network interface is a + * [read-only representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its + * corresponding network attachment and its attached virtual network interface. + * + * @param getInstanceNetworkInterfaceOptions the {@link GetInstanceNetworkInterfaceOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link NetworkInterface} */ - public ServiceCall listBareMetalServerDisks(ListBareMetalServerDisksOptions listBareMetalServerDisksOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listBareMetalServerDisksOptions, - "listBareMetalServerDisksOptions cannot be null"); + public ServiceCall getInstanceNetworkInterface(GetInstanceNetworkInterfaceOptions getInstanceNetworkInterfaceOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceNetworkInterfaceOptions, + "getInstanceNetworkInterfaceOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("bare_metal_server_id", listBareMetalServerDisksOptions.bareMetalServerId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/disks", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listBareMetalServerDisks"); + pathParamsMap.put("instance_id", getInstanceNetworkInterfaceOptions.instanceId()); + pathParamsMap.put("id", getInstanceNetworkInterfaceOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_interfaces/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceNetworkInterface"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a bare metal server disk. + * Retrieve associated floating IP. * - * This request retrieves a single disk specified by the identifier in the URL. + * This request retrieves a specified floating IP address if it is associated with the instance network interface and + * instance specified in the URL. * - * @param getBareMetalServerDiskOptions the {@link GetBareMetalServerDiskOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BareMetalServerDisk} + * @param getInstanceNetworkInterfaceFloatingIpOptions the {@link GetInstanceNetworkInterfaceFloatingIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link FloatingIP} */ - public ServiceCall getBareMetalServerDisk(GetBareMetalServerDiskOptions getBareMetalServerDiskOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getBareMetalServerDiskOptions, - "getBareMetalServerDiskOptions cannot be null"); + public ServiceCall getInstanceNetworkInterfaceFloatingIp(GetInstanceNetworkInterfaceFloatingIpOptions getInstanceNetworkInterfaceFloatingIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceNetworkInterfaceFloatingIpOptions, + "getInstanceNetworkInterfaceFloatingIpOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("bare_metal_server_id", getBareMetalServerDiskOptions.bareMetalServerId()); - pathParamsMap.put("id", getBareMetalServerDiskOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/disks/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getBareMetalServerDisk"); + pathParamsMap.put("instance_id", getInstanceNetworkInterfaceFloatingIpOptions.instanceId()); + pathParamsMap.put("network_interface_id", getInstanceNetworkInterfaceFloatingIpOptions.networkInterfaceId()); + pathParamsMap.put("id", getInstanceNetworkInterfaceFloatingIpOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceNetworkInterfaceFloatingIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a bare metal server disk. + * Retrieve the primary reserved IP. * - * This request updates the bare metal server disk with the information in a provided patch. + * This request retrieves the primary reserved IP for an instance network interface. * - * @param updateBareMetalServerDiskOptions the {@link UpdateBareMetalServerDiskOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BareMetalServerDisk} + * @param getInstanceNetworkInterfaceIpOptions the {@link GetInstanceNetworkInterfaceIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ReservedIP} + * @deprecated this method is deprecated and may be removed in a future release */ - public ServiceCall updateBareMetalServerDisk(UpdateBareMetalServerDiskOptions updateBareMetalServerDiskOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateBareMetalServerDiskOptions, - "updateBareMetalServerDiskOptions cannot be null"); + @Deprecated + public ServiceCall getInstanceNetworkInterfaceIp(GetInstanceNetworkInterfaceIpOptions getInstanceNetworkInterfaceIpOptions) { + LOGGER.warning("A deprecated operation has been invoked: getInstanceNetworkInterfaceIp"); + com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceNetworkInterfaceIpOptions, + "getInstanceNetworkInterfaceIpOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("bare_metal_server_id", updateBareMetalServerDiskOptions.bareMetalServerId()); - pathParamsMap.put("id", updateBareMetalServerDiskOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/disks/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateBareMetalServerDisk"); + pathParamsMap.put("instance_id", getInstanceNetworkInterfaceIpOptions.instanceId()); + pathParamsMap.put("network_interface_id", getInstanceNetworkInterfaceIpOptions.networkInterfaceId()); + pathParamsMap.put("id", getInstanceNetworkInterfaceIpOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_interfaces/{network_interface_id}/ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceNetworkInterfaceIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateBareMetalServerDiskOptions.bareMetalServerDiskPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List network attachments on a bare metal server. - * - * This request lists network attachments on a bare metal server. A bare metal server network attachment is an - * abstract representation of a network device and attaches a bare metal server to a single subnet. Each network - * interface on a bare metal server can attach to any subnet in the zone, including subnets that are already attached - * to the bare metal server. + * Retrieve an instance profile. * - * The network attachments will be sorted by their `created_at` property values, with newest network attachments - * first. Network attachments with identical `created_at` property values will in turn be sorted by ascending `name` - * property values. + * This request retrieves a single instance profile specified by the name in the URL. * - * @param listBareMetalServerNetworkAttachmentsOptions the {@link ListBareMetalServerNetworkAttachmentsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BareMetalServerNetworkAttachmentCollection} + * @param getInstanceProfileOptions the {@link GetInstanceProfileOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceProfile} */ - public ServiceCall listBareMetalServerNetworkAttachments(ListBareMetalServerNetworkAttachmentsOptions listBareMetalServerNetworkAttachmentsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listBareMetalServerNetworkAttachmentsOptions, - "listBareMetalServerNetworkAttachmentsOptions cannot be null"); + public ServiceCall getInstanceProfile(GetInstanceProfileOptions getInstanceProfileOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceProfileOptions, + "getInstanceProfileOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("bare_metal_server_id", listBareMetalServerNetworkAttachmentsOptions.bareMetalServerId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_attachments", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listBareMetalServerNetworkAttachments"); + pathParamsMap.put("name", getInstanceProfileOptions.name()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance/profiles/{name}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceProfile"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listBareMetalServerNetworkAttachmentsOptions.start() != null) { - builder.query("start", String.valueOf(listBareMetalServerNetworkAttachmentsOptions.start())); - } - if (listBareMetalServerNetworkAttachmentsOptions.limit() != null) { - builder.query("limit", String.valueOf(listBareMetalServerNetworkAttachmentsOptions.limit())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create a network attachment on a bare metal server. + * Retrieve a volume attachment. * - * This request creates a new bare metal server network attachment from a bare metal server network attachment - * prototype object. The prototype object is structured in the same way as a retrieved bare metal server network - * attachment, and contains the information necessary to create the new bare metal server network attachment. + * This request retrieves a single volume attachment specified by the identifier in the URL. * - * @param createBareMetalServerNetworkAttachmentOptions the {@link CreateBareMetalServerNetworkAttachmentOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BareMetalServerNetworkAttachment} + * @param getInstanceVolumeAttachmentOptions the {@link GetInstanceVolumeAttachmentOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VolumeAttachment} */ - public ServiceCall createBareMetalServerNetworkAttachment(CreateBareMetalServerNetworkAttachmentOptions createBareMetalServerNetworkAttachmentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createBareMetalServerNetworkAttachmentOptions, - "createBareMetalServerNetworkAttachmentOptions cannot be null"); + public ServiceCall getInstanceVolumeAttachment(GetInstanceVolumeAttachmentOptions getInstanceVolumeAttachmentOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getInstanceVolumeAttachmentOptions, + "getInstanceVolumeAttachmentOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("bare_metal_server_id", createBareMetalServerNetworkAttachmentOptions.bareMetalServerId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_attachments", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createBareMetalServerNetworkAttachment"); + pathParamsMap.put("instance_id", getInstanceVolumeAttachmentOptions.instanceId()); + pathParamsMap.put("id", getInstanceVolumeAttachmentOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/volume_attachments/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getInstanceVolumeAttachment"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createBareMetalServerNetworkAttachmentOptions.bareMetalServerNetworkAttachmentPrototype()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a bare metal server network attachment. - * - * This request deletes a bare metal server network attachment. This operation cannot be reversed. Any floating IPs - * associated with the bare metal server network attachment are implicitly disassociated. + * List cluster network attachments on an instance. * - * The bare metal server's primary network attachment cannot be deleted. + * This request lists cluster network attachments on an instance. A cluster network attachment represents a device on + * the instance to which a cluster network interface is attached. * - * @param deleteBareMetalServerNetworkAttachmentOptions the {@link DeleteBareMetalServerNetworkAttachmentOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param listInstanceClusterNetworkAttachmentsOptions the {@link ListInstanceClusterNetworkAttachmentsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceClusterNetworkAttachmentCollection} */ - public ServiceCall deleteBareMetalServerNetworkAttachment(DeleteBareMetalServerNetworkAttachmentOptions deleteBareMetalServerNetworkAttachmentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteBareMetalServerNetworkAttachmentOptions, - "deleteBareMetalServerNetworkAttachmentOptions cannot be null"); + public ServiceCall listInstanceClusterNetworkAttachments(ListInstanceClusterNetworkAttachmentsOptions listInstanceClusterNetworkAttachmentsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listInstanceClusterNetworkAttachmentsOptions, + "listInstanceClusterNetworkAttachmentsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("bare_metal_server_id", deleteBareMetalServerNetworkAttachmentOptions.bareMetalServerId()); - pathParamsMap.put("id", deleteBareMetalServerNetworkAttachmentOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_attachments/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteBareMetalServerNetworkAttachment"); + pathParamsMap.put("instance_id", listInstanceClusterNetworkAttachmentsOptions.instanceId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/cluster_network_attachments", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceClusterNetworkAttachments"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + if (listInstanceClusterNetworkAttachmentsOptions.start() != null) { + builder.query("start", String.valueOf(listInstanceClusterNetworkAttachmentsOptions.start())); + } + if (listInstanceClusterNetworkAttachmentsOptions.limit() != null) { + builder.query("limit", String.valueOf(listInstanceClusterNetworkAttachmentsOptions.limit())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a bare metal server network attachment. + * List disks on an instance. * - * This request retrieves a single bare metal server network attachment specified by the identifier in the URL. + * This request lists disks on an instance. A disk is a block device that is locally attached to the instance's + * physical host and is also referred to as instance storage. By default, the listed disks are sorted by their + * `created_at` property values, with the newest disk first. * - * @param getBareMetalServerNetworkAttachmentOptions the {@link GetBareMetalServerNetworkAttachmentOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BareMetalServerNetworkAttachment} + * @param listInstanceDisksOptions the {@link ListInstanceDisksOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceDiskCollection} */ - public ServiceCall getBareMetalServerNetworkAttachment(GetBareMetalServerNetworkAttachmentOptions getBareMetalServerNetworkAttachmentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getBareMetalServerNetworkAttachmentOptions, - "getBareMetalServerNetworkAttachmentOptions cannot be null"); + public ServiceCall listInstanceDisks(ListInstanceDisksOptions listInstanceDisksOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listInstanceDisksOptions, + "listInstanceDisksOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("bare_metal_server_id", getBareMetalServerNetworkAttachmentOptions.bareMetalServerId()); - pathParamsMap.put("id", getBareMetalServerNetworkAttachmentOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_attachments/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getBareMetalServerNetworkAttachment"); + pathParamsMap.put("instance_id", listInstanceDisksOptions.instanceId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/disks", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceDisks"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a bare metal server network attachment. + * List network attachments on an instance. * - * This request updates a bare metal server network attachment with the information provided in a bare metal server - * network attachment patch object. The bare metal server network attachment patch object is structured in the same - * way as a retrieved bare metal server network attachment and contains only the information to be updated. + * This request lists network attachments on an instance. A network attachment represents a device on the instance to + * which a virtual network interface is attached. * - * @param updateBareMetalServerNetworkAttachmentOptions the {@link UpdateBareMetalServerNetworkAttachmentOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BareMetalServerNetworkAttachment} + * The network attachments will be sorted by their `created_at` property values, with newest network attachments + * first. Network attachments with identical `created_at` property values will in turn be sorted by ascending `name` + * property values. + * + * @param listInstanceNetworkAttachmentsOptions the {@link ListInstanceNetworkAttachmentsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceNetworkAttachmentCollection} */ - public ServiceCall updateBareMetalServerNetworkAttachment(UpdateBareMetalServerNetworkAttachmentOptions updateBareMetalServerNetworkAttachmentOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateBareMetalServerNetworkAttachmentOptions, - "updateBareMetalServerNetworkAttachmentOptions cannot be null"); + public ServiceCall listInstanceNetworkAttachments(ListInstanceNetworkAttachmentsOptions listInstanceNetworkAttachmentsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listInstanceNetworkAttachmentsOptions, + "listInstanceNetworkAttachmentsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("bare_metal_server_id", updateBareMetalServerNetworkAttachmentOptions.bareMetalServerId()); - pathParamsMap.put("id", updateBareMetalServerNetworkAttachmentOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_attachments/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateBareMetalServerNetworkAttachment"); + pathParamsMap.put("instance_id", listInstanceNetworkAttachmentsOptions.instanceId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_attachments", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceNetworkAttachments"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateBareMetalServerNetworkAttachmentOptions.bareMetalServerNetworkAttachmentPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List network interfaces on a bare metal server. - * - * This request lists network interfaces on a bare metal server. A bare metal server network interface is an abstract - * representation of a network device and attaches a bare metal server to a single subnet. Each network interface on a - * bare metal server can attach to any subnet in the zone, including subnets that are already attached to the bare - * metal server. + * List floating IPs associated with an instance network interface. * - * If this bare metal server has network attachments, each returned network interface is a [read-only - * representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding - * network attachment and its attached virtual network interface. + * This request lists floating IPs associated with an instance network interface. * - * @param listBareMetalServerNetworkInterfacesOptions the {@link ListBareMetalServerNetworkInterfacesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BareMetalServerNetworkInterfaceCollection} + * @param listInstanceNetworkInterfaceFloatingIpsOptions the {@link ListInstanceNetworkInterfaceFloatingIpsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link FloatingIPUnpaginatedCollection} */ - public ServiceCall listBareMetalServerNetworkInterfaces(ListBareMetalServerNetworkInterfacesOptions listBareMetalServerNetworkInterfacesOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listBareMetalServerNetworkInterfacesOptions, - "listBareMetalServerNetworkInterfacesOptions cannot be null"); + public ServiceCall listInstanceNetworkInterfaceFloatingIps(ListInstanceNetworkInterfaceFloatingIpsOptions listInstanceNetworkInterfaceFloatingIpsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listInstanceNetworkInterfaceFloatingIpsOptions, + "listInstanceNetworkInterfaceFloatingIpsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("bare_metal_server_id", listBareMetalServerNetworkInterfacesOptions.bareMetalServerId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_interfaces", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listBareMetalServerNetworkInterfaces"); + pathParamsMap.put("instance_id", listInstanceNetworkInterfaceFloatingIpsOptions.instanceId()); + pathParamsMap.put("network_interface_id", listInstanceNetworkInterfaceFloatingIpsOptions.networkInterfaceId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceNetworkInterfaceFloatingIps"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listBareMetalServerNetworkInterfacesOptions.start() != null) { - builder.query("start", String.valueOf(listBareMetalServerNetworkInterfacesOptions.start())); - } - if (listBareMetalServerNetworkInterfacesOptions.limit() != null) { - builder.query("limit", String.valueOf(listBareMetalServerNetworkInterfacesOptions.limit())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create a network interface on a bare metal server. - * - * This request creates a new bare metal server network interface from a bare metal server network interface prototype - * object. The prototype object is structured in the same way as a retrieved bare metal server network interface, and - * contains the information necessary to create the new bare metal server network interface. Any subnet in the bare - * metal server's VPC may be specified, even if it is already attached to another bare metal server network interface. - * Addresses on the bare metal server network interface must be within the specified subnet's CIDR blocks. + * List the primary reserved IP for an instance network interface. * - * If this bare metal server has network attachments, each network interface is a [read-only - * representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding - * network attachment and its attached virtual network interface, and new network interfaces are not allowed to be - * created. + * This request lists the primary reserved IP for an instance network interface. * - * @param createBareMetalServerNetworkInterfaceOptions the {@link CreateBareMetalServerNetworkInterfaceOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BareMetalServerNetworkInterface} + * @param listInstanceNetworkInterfaceIpsOptions the {@link ListInstanceNetworkInterfaceIpsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ReservedIPCollectionInstanceNetworkInterfaceContext} + * @deprecated this method is deprecated and may be removed in a future release */ - public ServiceCall createBareMetalServerNetworkInterface(CreateBareMetalServerNetworkInterfaceOptions createBareMetalServerNetworkInterfaceOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createBareMetalServerNetworkInterfaceOptions, - "createBareMetalServerNetworkInterfaceOptions cannot be null"); + @Deprecated + public ServiceCall listInstanceNetworkInterfaceIps(ListInstanceNetworkInterfaceIpsOptions listInstanceNetworkInterfaceIpsOptions) { + LOGGER.warning("A deprecated operation has been invoked: listInstanceNetworkInterfaceIps"); + com.ibm.cloud.sdk.core.util.Validator.notNull(listInstanceNetworkInterfaceIpsOptions, + "listInstanceNetworkInterfaceIpsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("bare_metal_server_id", createBareMetalServerNetworkInterfaceOptions.bareMetalServerId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_interfaces", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createBareMetalServerNetworkInterface"); + pathParamsMap.put("instance_id", listInstanceNetworkInterfaceIpsOptions.instanceId()); + pathParamsMap.put("network_interface_id", listInstanceNetworkInterfaceIpsOptions.networkInterfaceId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_interfaces/{network_interface_id}/ips", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceNetworkInterfaceIps"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createBareMetalServerNetworkInterfaceOptions.bareMetalServerNetworkInterfacePrototype()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listInstanceNetworkInterfaceIpsOptions.start() != null) { + builder.query("start", String.valueOf(listInstanceNetworkInterfaceIpsOptions.start())); + } + if (listInstanceNetworkInterfaceIpsOptions.limit() != null) { + builder.query("limit", String.valueOf(listInstanceNetworkInterfaceIpsOptions.limit())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a bare metal server network interface. + * List network interfaces on an instance. * - * This request deletes a bare metal server network interface. This operation cannot be reversed. Any floating IPs - * associated with the bare metal server network interface are implicitly disassociated. The primary bare metal - * server network interface is not allowed to be deleted. + * This request lists network interfaces on an instance. An instance network interface is an abstract representation + * of a network device and attaches an instance to a single subnet. Each network interface on an instance can attach + * to any subnet in the zone, including subnets that are already attached to the instance. Multiple network interfaces + * on the instance may also attach to the same subnet. * - * If this bare metal server has network attachments, this network interface is a [read-only + * If this instance has network attachments, each returned network interface is a [read-only * representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding - * network attachment and its attached virtual network interface, and is not allowed to be deleted. + * network attachment and its attached virtual network interface. * - * @param deleteBareMetalServerNetworkInterfaceOptions the {@link DeleteBareMetalServerNetworkInterfaceOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param listInstanceNetworkInterfacesOptions the {@link ListInstanceNetworkInterfacesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link NetworkInterfaceUnpaginatedCollection} */ - public ServiceCall deleteBareMetalServerNetworkInterface(DeleteBareMetalServerNetworkInterfaceOptions deleteBareMetalServerNetworkInterfaceOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteBareMetalServerNetworkInterfaceOptions, - "deleteBareMetalServerNetworkInterfaceOptions cannot be null"); + public ServiceCall listInstanceNetworkInterfaces(ListInstanceNetworkInterfacesOptions listInstanceNetworkInterfacesOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listInstanceNetworkInterfacesOptions, + "listInstanceNetworkInterfacesOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("bare_metal_server_id", deleteBareMetalServerNetworkInterfaceOptions.bareMetalServerId()); - pathParamsMap.put("id", deleteBareMetalServerNetworkInterfaceOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteBareMetalServerNetworkInterface"); + pathParamsMap.put("instance_id", listInstanceNetworkInterfacesOptions.instanceId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_interfaces", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceNetworkInterfaces"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a bare metal server network interface. - * - * This request retrieves a single bare metal server network interface specified by the identifier in the URL. + * List instance profiles. * - * If this bare metal server has network attachments, the retrieved network interface is a [read-only - * representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding - * network attachment and its attached virtual network interface. + * This request lists provisionable [instance profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) in the + * region. An instance profile specifies the performance characteristics and pricing model for an instance. * - * @param getBareMetalServerNetworkInterfaceOptions the {@link GetBareMetalServerNetworkInterfaceOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BareMetalServerNetworkInterface} + * @param listInstanceProfilesOptions the {@link ListInstanceProfilesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceProfileCollection} */ - public ServiceCall getBareMetalServerNetworkInterface(GetBareMetalServerNetworkInterfaceOptions getBareMetalServerNetworkInterfaceOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getBareMetalServerNetworkInterfaceOptions, - "getBareMetalServerNetworkInterfaceOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("bare_metal_server_id", getBareMetalServerNetworkInterfaceOptions.bareMetalServerId()); - pathParamsMap.put("id", getBareMetalServerNetworkInterfaceOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getBareMetalServerNetworkInterface"); + public ServiceCall listInstanceProfiles(ListInstanceProfilesOptions listInstanceProfilesOptions) { + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instance/profiles")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceProfiles"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a bare metal server network interface. - * - * This request updates a bare metal server network interface with the information provided in a bare metal server - * network interface patch object. The bare metal server network interface patch object is structured in the same way - * as a retrieved bare metal server network interface and needs to contain only the information to be updated. + * List instance profiles. * - * If this bare metal server has network attachments, this network interface is a [read-only - * representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding - * network attachment and its attached virtual network interface, and is not allowed to be updated. + * This request lists provisionable [instance profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) in the + * region. An instance profile specifies the performance characteristics and pricing model for an instance. * - * @param updateBareMetalServerNetworkInterfaceOptions the {@link UpdateBareMetalServerNetworkInterfaceOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BareMetalServerNetworkInterface} + * @return a {@link ServiceCall} with a result of type {@link InstanceProfileCollection} */ - public ServiceCall updateBareMetalServerNetworkInterface(UpdateBareMetalServerNetworkInterfaceOptions updateBareMetalServerNetworkInterfaceOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateBareMetalServerNetworkInterfaceOptions, - "updateBareMetalServerNetworkInterfaceOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("bare_metal_server_id", updateBareMetalServerNetworkInterfaceOptions.bareMetalServerId()); - pathParamsMap.put("id", updateBareMetalServerNetworkInterfaceOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateBareMetalServerNetworkInterface"); + public ServiceCall listInstanceProfiles() { + return listInstanceProfiles(null); + } + + /** + * List volumes attachments on an instance. + * + * This request lists volume attachments on an instance. A volume attachment connects a volume to an instance. Each + * instance may have many volume attachments but each volume attachment connects exactly one instance to exactly one + * volume. + * + * @param listInstanceVolumeAttachmentsOptions the {@link ListInstanceVolumeAttachmentsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VolumeAttachmentCollection} + */ + public ServiceCall listInstanceVolumeAttachments(ListInstanceVolumeAttachmentsOptions listInstanceVolumeAttachmentsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listInstanceVolumeAttachmentsOptions, + "listInstanceVolumeAttachmentsOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("instance_id", listInstanceVolumeAttachmentsOptions.instanceId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/volume_attachments", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstanceVolumeAttachments"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateBareMetalServerNetworkInterfaceOptions.bareMetalServerNetworkInterfacePatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List floating IPs associated with a bare metal server network interface. + * List instances. * - * This request lists floating IPs associated with a bare metal server network interface. + * This request lists instances in the region. * - * @param listBareMetalServerNetworkInterfaceFloatingIpsOptions the {@link ListBareMetalServerNetworkInterfaceFloatingIpsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link FloatingIPUnpaginatedCollection} + * @param listInstancesOptions the {@link ListInstancesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceCollection} */ - public ServiceCall listBareMetalServerNetworkInterfaceFloatingIps(ListBareMetalServerNetworkInterfaceFloatingIpsOptions listBareMetalServerNetworkInterfaceFloatingIpsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listBareMetalServerNetworkInterfaceFloatingIpsOptions, - "listBareMetalServerNetworkInterfaceFloatingIpsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("bare_metal_server_id", listBareMetalServerNetworkInterfaceFloatingIpsOptions.bareMetalServerId()); - pathParamsMap.put("network_interface_id", listBareMetalServerNetworkInterfaceFloatingIpsOptions.networkInterfaceId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/floating_ips", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listBareMetalServerNetworkInterfaceFloatingIps"); + public ServiceCall listInstances(ListInstancesOptions listInstancesOptions) { + if (listInstancesOptions == null) { + listInstancesOptions = new ListInstancesOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listInstances"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listInstancesOptions.start() != null) { + builder.query("start", String.valueOf(listInstancesOptions.start())); + } + if (listInstancesOptions.limit() != null) { + builder.query("limit", String.valueOf(listInstancesOptions.limit())); + } + if (listInstancesOptions.resourceGroupId() != null) { + builder.query("resource_group.id", String.valueOf(listInstancesOptions.resourceGroupId())); + } + if (listInstancesOptions.name() != null) { + builder.query("name", String.valueOf(listInstancesOptions.name())); + } + if (listInstancesOptions.clusterNetworkId() != null) { + builder.query("cluster_network.id", String.valueOf(listInstancesOptions.clusterNetworkId())); + } + if (listInstancesOptions.clusterNetworkCrn() != null) { + builder.query("cluster_network.crn", String.valueOf(listInstancesOptions.clusterNetworkCrn())); + } + if (listInstancesOptions.clusterNetworkName() != null) { + builder.query("cluster_network.name", String.valueOf(listInstancesOptions.clusterNetworkName())); + } + if (listInstancesOptions.dedicatedHostId() != null) { + builder.query("dedicated_host.id", String.valueOf(listInstancesOptions.dedicatedHostId())); + } + if (listInstancesOptions.dedicatedHostCrn() != null) { + builder.query("dedicated_host.crn", String.valueOf(listInstancesOptions.dedicatedHostCrn())); + } + if (listInstancesOptions.dedicatedHostName() != null) { + builder.query("dedicated_host.name", String.valueOf(listInstancesOptions.dedicatedHostName())); + } + if (listInstancesOptions.placementGroupId() != null) { + builder.query("placement_group.id", String.valueOf(listInstancesOptions.placementGroupId())); + } + if (listInstancesOptions.placementGroupCrn() != null) { + builder.query("placement_group.crn", String.valueOf(listInstancesOptions.placementGroupCrn())); + } + if (listInstancesOptions.placementGroupName() != null) { + builder.query("placement_group.name", String.valueOf(listInstancesOptions.placementGroupName())); + } + if (listInstancesOptions.reservationAffinityPolicy() != null) { + builder.query("reservation_affinity.policy", String.valueOf(listInstancesOptions.reservationAffinityPolicy())); + } + if (listInstancesOptions.reservationId() != null) { + builder.query("reservation.id", String.valueOf(listInstancesOptions.reservationId())); + } + if (listInstancesOptions.reservationCrn() != null) { + builder.query("reservation.crn", String.valueOf(listInstancesOptions.reservationCrn())); + } + if (listInstancesOptions.reservationName() != null) { + builder.query("reservation.name", String.valueOf(listInstancesOptions.reservationName())); + } + if (listInstancesOptions.vpcId() != null) { + builder.query("vpc.id", String.valueOf(listInstancesOptions.vpcId())); + } + if (listInstancesOptions.vpcCrn() != null) { + builder.query("vpc.crn", String.valueOf(listInstancesOptions.vpcCrn())); + } + if (listInstancesOptions.vpcName() != null) { + builder.query("vpc.name", String.valueOf(listInstancesOptions.vpcName())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Disassociate a floating IP from a bare metal server network interface. + * List instances. * - * This request disassociates the specified floating IP from the specified bare metal server network interface. + * This request lists instances in the region. * - * @param removeBareMetalServerNetworkInterfaceFloatingIpOptions the {@link RemoveBareMetalServerNetworkInterfaceFloatingIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceCollection} + */ + public ServiceCall listInstances() { + return listInstances(null); + } + + /** + * Disassociate a floating IP from an instance network interface. + * + * This request disassociates the specified floating IP from the specified instance network interface. + * + * @param removeInstanceNetworkInterfaceFloatingIpOptions the {@link RemoveInstanceNetworkInterfaceFloatingIpOptions} containing the options for the call * @return a {@link ServiceCall} with a void result */ - public ServiceCall removeBareMetalServerNetworkInterfaceFloatingIp(RemoveBareMetalServerNetworkInterfaceFloatingIpOptions removeBareMetalServerNetworkInterfaceFloatingIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(removeBareMetalServerNetworkInterfaceFloatingIpOptions, - "removeBareMetalServerNetworkInterfaceFloatingIpOptions cannot be null"); + public ServiceCall removeInstanceNetworkInterfaceFloatingIp(RemoveInstanceNetworkInterfaceFloatingIpOptions removeInstanceNetworkInterfaceFloatingIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(removeInstanceNetworkInterfaceFloatingIpOptions, + "removeInstanceNetworkInterfaceFloatingIpOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("bare_metal_server_id", removeBareMetalServerNetworkInterfaceFloatingIpOptions.bareMetalServerId()); - pathParamsMap.put("network_interface_id", removeBareMetalServerNetworkInterfaceFloatingIpOptions.networkInterfaceId()); - pathParamsMap.put("id", removeBareMetalServerNetworkInterfaceFloatingIpOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/floating_ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "removeBareMetalServerNetworkInterfaceFloatingIp"); + pathParamsMap.put("instance_id", removeInstanceNetworkInterfaceFloatingIpOptions.instanceId()); + pathParamsMap.put("network_interface_id", removeInstanceNetworkInterfaceFloatingIpOptions.networkInterfaceId()); + pathParamsMap.put("id", removeInstanceNetworkInterfaceFloatingIpOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "removeInstanceNetworkInterfaceFloatingIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } @@ -6822,561 +6872,651 @@ public ServiceCall removeBareMetalServerNetworkInterfaceFloatingIp(RemoveB } /** - * Retrieve associated floating IP. + * Update an instance. * - * This request retrieves a specified floating IP if it is associated with the bare metal server network interface - * specified in the URL. + * This request updates an instance with the information in a provided instance patch. The instance patch object is + * structured in the same way as a retrieved instance and contains only the information to be updated. * - * @param getBareMetalServerNetworkInterfaceFloatingIpOptions the {@link GetBareMetalServerNetworkInterfaceFloatingIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link FloatingIP} + * For this request to succeed, the properties in the request must adhere to the + * `allowed_use` property in the volume referenced by `boot_volume_attachment.volume`. + * + * @param updateInstanceOptions the {@link UpdateInstanceOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Instance} */ - public ServiceCall getBareMetalServerNetworkInterfaceFloatingIp(GetBareMetalServerNetworkInterfaceFloatingIpOptions getBareMetalServerNetworkInterfaceFloatingIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getBareMetalServerNetworkInterfaceFloatingIpOptions, - "getBareMetalServerNetworkInterfaceFloatingIpOptions cannot be null"); + public ServiceCall updateInstance(UpdateInstanceOptions updateInstanceOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateInstanceOptions, + "updateInstanceOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("bare_metal_server_id", getBareMetalServerNetworkInterfaceFloatingIpOptions.bareMetalServerId()); - pathParamsMap.put("network_interface_id", getBareMetalServerNetworkInterfaceFloatingIpOptions.networkInterfaceId()); - pathParamsMap.put("id", getBareMetalServerNetworkInterfaceFloatingIpOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/floating_ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getBareMetalServerNetworkInterfaceFloatingIp"); + pathParamsMap.put("id", updateInstanceOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateInstance"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); + if (updateInstanceOptions.ifMatch() != null) { + builder.header("If-Match", updateInstanceOptions.ifMatch()); + } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateInstanceOptions.instancePatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Associate a floating IP with a bare metal server network interface. - * - * This request associates the specified floating IP with the specified bare metal server network interface. If - * `enable_infrastructure_nat` is `false`, this adds the IP to any existing associations. If - * `enable_infrastructure_nat` is `true`, this replaces any existing association. - * - * The existing floating IP must: - * - not be required by another resource, such as a public gateway - * - be in the same `zone` as the bare metal server + * Update an instance cluster network attachment. * - * A request body is not required, and if provided, is ignored. + * This request updates an instance cluster network attachment with the information provided in an instance network + * interface patch object. The instance cluster network attachment patch object is structured in the same way as a + * retrieved instance cluster network attachment and needs to contain only the information to be updated. * - * @param addBareMetalServerNetworkInterfaceFloatingIpOptions the {@link AddBareMetalServerNetworkInterfaceFloatingIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link FloatingIP} + * @param updateInstanceClusterNetworkAttachmentOptions the {@link UpdateInstanceClusterNetworkAttachmentOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceClusterNetworkAttachment} */ - public ServiceCall addBareMetalServerNetworkInterfaceFloatingIp(AddBareMetalServerNetworkInterfaceFloatingIpOptions addBareMetalServerNetworkInterfaceFloatingIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(addBareMetalServerNetworkInterfaceFloatingIpOptions, - "addBareMetalServerNetworkInterfaceFloatingIpOptions cannot be null"); + public ServiceCall updateInstanceClusterNetworkAttachment(UpdateInstanceClusterNetworkAttachmentOptions updateInstanceClusterNetworkAttachmentOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateInstanceClusterNetworkAttachmentOptions, + "updateInstanceClusterNetworkAttachmentOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("bare_metal_server_id", addBareMetalServerNetworkInterfaceFloatingIpOptions.bareMetalServerId()); - pathParamsMap.put("network_interface_id", addBareMetalServerNetworkInterfaceFloatingIpOptions.networkInterfaceId()); - pathParamsMap.put("id", addBareMetalServerNetworkInterfaceFloatingIpOptions.id()); - RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/floating_ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "addBareMetalServerNetworkInterfaceFloatingIp"); + pathParamsMap.put("instance_id", updateInstanceClusterNetworkAttachmentOptions.instanceId()); + pathParamsMap.put("id", updateInstanceClusterNetworkAttachmentOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/cluster_network_attachments/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateInstanceClusterNetworkAttachment"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateInstanceClusterNetworkAttachmentOptions.instanceClusterNetworkAttachmentPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List the primary reserved IP for a bare metal server network interface. + * Update an instance disk. * - * This request lists the primary reserved IP for a bare metal server network interface. + * This request updates the instance disk with the information in a provided patch. * - * @param listBareMetalServerNetworkInterfaceIpsOptions the {@link ListBareMetalServerNetworkInterfaceIpsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ReservedIPCollectionBareMetalServerNetworkInterfaceContext} - * @deprecated this method is deprecated and may be removed in a future release + * @param updateInstanceDiskOptions the {@link UpdateInstanceDiskOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceDisk} */ - @Deprecated - public ServiceCall listBareMetalServerNetworkInterfaceIps(ListBareMetalServerNetworkInterfaceIpsOptions listBareMetalServerNetworkInterfaceIpsOptions) { - LOGGER.warning("A deprecated operation has been invoked: listBareMetalServerNetworkInterfaceIps"); - com.ibm.cloud.sdk.core.util.Validator.notNull(listBareMetalServerNetworkInterfaceIpsOptions, - "listBareMetalServerNetworkInterfaceIpsOptions cannot be null"); + public ServiceCall updateInstanceDisk(UpdateInstanceDiskOptions updateInstanceDiskOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateInstanceDiskOptions, + "updateInstanceDiskOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("bare_metal_server_id", listBareMetalServerNetworkInterfaceIpsOptions.bareMetalServerId()); - pathParamsMap.put("network_interface_id", listBareMetalServerNetworkInterfaceIpsOptions.networkInterfaceId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/ips", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listBareMetalServerNetworkInterfaceIps"); + pathParamsMap.put("instance_id", updateInstanceDiskOptions.instanceId()); + pathParamsMap.put("id", updateInstanceDiskOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/disks/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateInstanceDisk"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateInstanceDiskOptions.instanceDiskPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve the primary reserved IP. + * Update an instance network attachment. * - * This request retrieves the primary reserved IP for a bare metal server network interface. + * This request updates an instance network attachment with the information provided in an instance network interface + * patch object. The instance network attachment patch object is structured in the same way as a retrieved instance + * network attachment and needs to contain only the information to be updated. * - * @param getBareMetalServerNetworkInterfaceIpOptions the {@link GetBareMetalServerNetworkInterfaceIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ReservedIP} - * @deprecated this method is deprecated and may be removed in a future release - */ - @Deprecated - public ServiceCall getBareMetalServerNetworkInterfaceIp(GetBareMetalServerNetworkInterfaceIpOptions getBareMetalServerNetworkInterfaceIpOptions) { - LOGGER.warning("A deprecated operation has been invoked: getBareMetalServerNetworkInterfaceIp"); - com.ibm.cloud.sdk.core.util.Validator.notNull(getBareMetalServerNetworkInterfaceIpOptions, - "getBareMetalServerNetworkInterfaceIpOptions cannot be null"); + * @param updateInstanceNetworkAttachmentOptions the {@link UpdateInstanceNetworkAttachmentOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link InstanceNetworkAttachment} + */ + public ServiceCall updateInstanceNetworkAttachment(UpdateInstanceNetworkAttachmentOptions updateInstanceNetworkAttachmentOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateInstanceNetworkAttachmentOptions, + "updateInstanceNetworkAttachmentOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("bare_metal_server_id", getBareMetalServerNetworkInterfaceIpOptions.bareMetalServerId()); - pathParamsMap.put("network_interface_id", getBareMetalServerNetworkInterfaceIpOptions.networkInterfaceId()); - pathParamsMap.put("id", getBareMetalServerNetworkInterfaceIpOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getBareMetalServerNetworkInterfaceIp"); + pathParamsMap.put("instance_id", updateInstanceNetworkAttachmentOptions.instanceId()); + pathParamsMap.put("id", updateInstanceNetworkAttachmentOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_attachments/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateInstanceNetworkAttachment"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateInstanceNetworkAttachmentOptions.instanceNetworkAttachmentPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a bare metal server. + * Update an instance network interface. * - * This request deletes a bare metal server. This operation cannot be reversed. Any floating IPs associated with the - * bare metal server network interfaces are implicitly disassociated. + * This request updates an instance network interface with the information provided in an instance network interface + * patch object. The instance network interface patch object is structured in the same way as a retrieved instance + * network interface and needs to contain only the information to be updated. * - * @param deleteBareMetalServerOptions the {@link DeleteBareMetalServerOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * If this instance has network attachments, this network interface is a [read-only + * representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding + * network attachment and its attached virtual network interface, and is not allowed to be updated. + * + * @param updateInstanceNetworkInterfaceOptions the {@link UpdateInstanceNetworkInterfaceOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link NetworkInterface} */ - public ServiceCall deleteBareMetalServer(DeleteBareMetalServerOptions deleteBareMetalServerOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteBareMetalServerOptions, - "deleteBareMetalServerOptions cannot be null"); + public ServiceCall updateInstanceNetworkInterface(UpdateInstanceNetworkInterfaceOptions updateInstanceNetworkInterfaceOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateInstanceNetworkInterfaceOptions, + "updateInstanceNetworkInterfaceOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteBareMetalServerOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteBareMetalServer"); + pathParamsMap.put("instance_id", updateInstanceNetworkInterfaceOptions.instanceId()); + pathParamsMap.put("id", updateInstanceNetworkInterfaceOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/network_interfaces/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateInstanceNetworkInterface"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateInstanceNetworkInterfaceOptions.networkInterfacePatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a bare metal server. + * Update a volume attachment. * - * This request retrieves a single bare metal server specified by the identifier in the URL. + * This request updates a volume attachment with the information provided in a volume attachment patch object. The + * volume attachment patch object is structured in the same way as a retrieved volume attachment and needs to contain + * only the information to be updated. * - * @param getBareMetalServerOptions the {@link GetBareMetalServerOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BareMetalServer} + * @param updateInstanceVolumeAttachmentOptions the {@link UpdateInstanceVolumeAttachmentOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VolumeAttachment} */ - public ServiceCall getBareMetalServer(GetBareMetalServerOptions getBareMetalServerOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getBareMetalServerOptions, - "getBareMetalServerOptions cannot be null"); + public ServiceCall updateInstanceVolumeAttachment(UpdateInstanceVolumeAttachmentOptions updateInstanceVolumeAttachmentOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateInstanceVolumeAttachmentOptions, + "updateInstanceVolumeAttachmentOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getBareMetalServerOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getBareMetalServer"); + pathParamsMap.put("instance_id", updateInstanceVolumeAttachmentOptions.instanceId()); + pathParamsMap.put("id", updateInstanceVolumeAttachmentOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/instances/{instance_id}/volume_attachments/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateInstanceVolumeAttachment"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateInstanceVolumeAttachmentOptions.volumeAttachmentPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a bare metal server. + * Create a key. * - * This request updates a bare metal server with the information in a provided patch. The bare metal server patch - * object is structured in the same way as a retrieved bare metal server and contains only the information to be - * updated. + * This request creates a new SSH key from an key prototype object. The prototype object is structured in the same way + * as a retrieved key, and contains the information necessary to create the new key. The public key value must be + * provided. * - * @param updateBareMetalServerOptions the {@link UpdateBareMetalServerOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BareMetalServer} + * @param createKeyOptions the {@link CreateKeyOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Key} */ - public ServiceCall updateBareMetalServer(UpdateBareMetalServerOptions updateBareMetalServerOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateBareMetalServerOptions, - "updateBareMetalServerOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateBareMetalServerOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateBareMetalServer"); + public ServiceCall createKey(CreateKeyOptions createKeyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createKeyOptions, + "createKeyOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/keys")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createKey"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateBareMetalServerOptions.bareMetalServerPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + final JsonObject contentJson = new JsonObject(); + contentJson.addProperty("public_key", createKeyOptions.publicKey()); + if (createKeyOptions.name() != null) { + contentJson.addProperty("name", createKeyOptions.name()); + } + if (createKeyOptions.resourceGroup() != null) { + contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createKeyOptions.resourceGroup())); + } + if (createKeyOptions.type() != null) { + contentJson.addProperty("type", createKeyOptions.type()); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update firmware for a bare metal server. + * Delete a key. * - * This request updates a bare metal server to the latest available firmware. The server must be stopped. + * This request deletes a key. This operation cannot be reversed. * - * @param updateFirmwareForBareMetalServerOptions the {@link UpdateFirmwareForBareMetalServerOptions} containing the options for the call + * @param deleteKeyOptions the {@link DeleteKeyOptions} containing the options for the call * @return a {@link ServiceCall} with a void result */ - public ServiceCall updateFirmwareForBareMetalServer(UpdateFirmwareForBareMetalServerOptions updateFirmwareForBareMetalServerOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateFirmwareForBareMetalServerOptions, - "updateFirmwareForBareMetalServerOptions cannot be null"); + public ServiceCall deleteKey(DeleteKeyOptions deleteKeyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteKeyOptions, + "deleteKeyOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateFirmwareForBareMetalServerOptions.id()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{id}/firmware/update", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateFirmwareForBareMetalServer"); + pathParamsMap.put("id", deleteKeyOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/keys/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteKey"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - if (updateFirmwareForBareMetalServerOptions.autoStart() != null) { - contentJson.addProperty("auto_start", updateFirmwareForBareMetalServerOptions.autoStart()); - } - builder.bodyJson(contentJson); ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve initialization configuration for a bare metal server. + * Retrieve a key. * - * This request retrieves configuration used to initialize the bare metal server, such as the image used, SSH keys, - * and any configured usernames and passwords. These can subsequently be changed on the server and therefore may not - * be current. + * This request retrieves a single key specified by the identifier in the URL. * - * @param getBareMetalServerInitializationOptions the {@link GetBareMetalServerInitializationOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BareMetalServerInitialization} + * @param getKeyOptions the {@link GetKeyOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Key} */ - public ServiceCall getBareMetalServerInitialization(GetBareMetalServerInitializationOptions getBareMetalServerInitializationOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getBareMetalServerInitializationOptions, - "getBareMetalServerInitializationOptions cannot be null"); + public ServiceCall getKey(GetKeyOptions getKeyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getKeyOptions, + "getKeyOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getBareMetalServerInitializationOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{id}/initialization", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getBareMetalServerInitialization"); + pathParamsMap.put("id", getKeyOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/keys/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getKey"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Reinitialize a bare metal server. + * List keys. * - * This request reinitializes a bare metal server with the specified image and SSH keys. The server must be stopped. - * Upon successful reinitiatilization, the bare metal server will be started automatically. + * This request lists keys in the region. A key contains a public SSH key which may be installed on instances when + * they are created. Private keys are not stored. * - * @param replaceBareMetalServerInitializationOptions the {@link ReplaceBareMetalServerInitializationOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BareMetalServerInitialization} + * @param listKeysOptions the {@link ListKeysOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link KeyCollection} */ - public ServiceCall replaceBareMetalServerInitialization(ReplaceBareMetalServerInitializationOptions replaceBareMetalServerInitializationOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(replaceBareMetalServerInitializationOptions, - "replaceBareMetalServerInitializationOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", replaceBareMetalServerInitializationOptions.id()); - RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{id}/initialization", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "replaceBareMetalServerInitialization"); + public ServiceCall listKeys(ListKeysOptions listKeysOptions) { + if (listKeysOptions == null) { + listKeysOptions = new ListKeysOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/keys")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listKeys"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.add("image", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(replaceBareMetalServerInitializationOptions.image())); - contentJson.add("keys", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(replaceBareMetalServerInitializationOptions.keys())); - if (replaceBareMetalServerInitializationOptions.userData() != null) { - contentJson.addProperty("user_data", replaceBareMetalServerInitializationOptions.userData()); + if (listKeysOptions.start() != null) { + builder.query("start", String.valueOf(listKeysOptions.start())); } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listKeysOptions.limit() != null) { + builder.query("limit", String.valueOf(listKeysOptions.limit())); + } + if (listKeysOptions.resourceGroupId() != null) { + builder.query("resource_group.id", String.valueOf(listKeysOptions.resourceGroupId())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Restart a bare metal server. + * List keys. * - * This request immediately restarts a bare metal server. For this request to succeed, the server must have a - * `status` of `running`. + * This request lists keys in the region. A key contains a public SSH key which may be installed on instances when + * they are created. Private keys are not stored. * - * @param restartBareMetalServerOptions the {@link RestartBareMetalServerOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @return a {@link ServiceCall} with a result of type {@link KeyCollection} */ - public ServiceCall restartBareMetalServer(RestartBareMetalServerOptions restartBareMetalServerOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(restartBareMetalServerOptions, - "restartBareMetalServerOptions cannot be null"); + public ServiceCall listKeys() { + return listKeys(null); + } + + /** + * Update a key. + * + * This request updates a key's name. + * + * @param updateKeyOptions the {@link UpdateKeyOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Key} + */ + public ServiceCall updateKey(UpdateKeyOptions updateKeyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateKeyOptions, + "updateKeyOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", restartBareMetalServerOptions.id()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{id}/restart", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "restartBareMetalServer"); + pathParamsMap.put("id", updateKeyOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/keys/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateKey"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateKeyOptions.keyPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Start a bare metal server. + * Create a load balancer. * - * This request starts a bare metal server. It will run immediately provided the server is stopped. + * This request creates and provisions a new load balancer. * - * @param startBareMetalServerOptions the {@link StartBareMetalServerOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param createLoadBalancerOptions the {@link CreateLoadBalancerOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancer} */ - public ServiceCall startBareMetalServer(StartBareMetalServerOptions startBareMetalServerOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(startBareMetalServerOptions, - "startBareMetalServerOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", startBareMetalServerOptions.id()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{id}/start", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "startBareMetalServer"); + public ServiceCall createLoadBalancer(CreateLoadBalancerOptions createLoadBalancerOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createLoadBalancerOptions, + "createLoadBalancerOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createLoadBalancer"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + final JsonObject contentJson = new JsonObject(); + contentJson.addProperty("is_public", createLoadBalancerOptions.isPublic()); + contentJson.add("subnets", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerOptions.subnets())); + if (createLoadBalancerOptions.dns() != null) { + contentJson.add("dns", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerOptions.dns())); + } + if (createLoadBalancerOptions.isPrivatePath() != null) { + contentJson.addProperty("is_private_path", createLoadBalancerOptions.isPrivatePath()); + } + if (createLoadBalancerOptions.listeners() != null) { + contentJson.add("listeners", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerOptions.listeners())); + } + if (createLoadBalancerOptions.logging() != null) { + contentJson.add("logging", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerOptions.logging())); + } + if (createLoadBalancerOptions.name() != null) { + contentJson.addProperty("name", createLoadBalancerOptions.name()); + } + if (createLoadBalancerOptions.pools() != null) { + contentJson.add("pools", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerOptions.pools())); + } + if (createLoadBalancerOptions.profile() != null) { + contentJson.add("profile", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerOptions.profile())); + } + if (createLoadBalancerOptions.resourceGroup() != null) { + contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerOptions.resourceGroup())); + } + if (createLoadBalancerOptions.routeMode() != null) { + contentJson.addProperty("route_mode", createLoadBalancerOptions.routeMode()); + } + if (createLoadBalancerOptions.securityGroups() != null) { + contentJson.add("security_groups", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerOptions.securityGroups())); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Stop a bare metal server. + * Create a listener for a load balancer. * - * This request stops a bare metal server. It will run immediately provided the server is running. Note: A soft stop - * may not complete as it relies on the operating system to perform the operation. + * This request creates a new listener for a load balancer. * - * @param stopBareMetalServerOptions the {@link StopBareMetalServerOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param createLoadBalancerListenerOptions the {@link CreateLoadBalancerListenerOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerListener} */ - public ServiceCall stopBareMetalServer(StopBareMetalServerOptions stopBareMetalServerOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(stopBareMetalServerOptions, - "stopBareMetalServerOptions cannot be null"); + public ServiceCall createLoadBalancerListener(CreateLoadBalancerListenerOptions createLoadBalancerListenerOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createLoadBalancerListenerOptions, + "createLoadBalancerListenerOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", stopBareMetalServerOptions.id()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/bare_metal_servers/{id}/stop", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "stopBareMetalServer"); + pathParamsMap.put("load_balancer_id", createLoadBalancerListenerOptions.loadBalancerId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createLoadBalancerListener"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("type", stopBareMetalServerOptions.type()); + contentJson.addProperty("protocol", createLoadBalancerListenerOptions.protocol()); + if (createLoadBalancerListenerOptions.acceptProxyProtocol() != null) { + contentJson.addProperty("accept_proxy_protocol", createLoadBalancerListenerOptions.acceptProxyProtocol()); + } + if (createLoadBalancerListenerOptions.certificateInstance() != null) { + contentJson.add("certificate_instance", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerListenerOptions.certificateInstance())); + } + if (createLoadBalancerListenerOptions.connectionLimit() != null) { + contentJson.addProperty("connection_limit", createLoadBalancerListenerOptions.connectionLimit()); + } + if (createLoadBalancerListenerOptions.defaultPool() != null) { + contentJson.add("default_pool", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerListenerOptions.defaultPool())); + } + if (createLoadBalancerListenerOptions.httpsRedirect() != null) { + contentJson.add("https_redirect", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerListenerOptions.httpsRedirect())); + } + if (createLoadBalancerListenerOptions.idleConnectionTimeout() != null) { + contentJson.addProperty("idle_connection_timeout", createLoadBalancerListenerOptions.idleConnectionTimeout()); + } + if (createLoadBalancerListenerOptions.policies() != null) { + contentJson.add("policies", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerListenerOptions.policies())); + } + if (createLoadBalancerListenerOptions.port() != null) { + contentJson.addProperty("port", createLoadBalancerListenerOptions.port()); + } + if (createLoadBalancerListenerOptions.portMax() != null) { + contentJson.addProperty("port_max", createLoadBalancerListenerOptions.portMax()); + } + if (createLoadBalancerListenerOptions.portMin() != null) { + contentJson.addProperty("port_min", createLoadBalancerListenerOptions.portMin()); + } builder.bodyJson(contentJson); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List volume profiles. + * Create a policy for a load balancer listener. * - * This request lists [volume profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-block-storage-profiles) available in - * the region. A volume profile specifies the performance characteristics and pricing model for a volume. + * This request creates a new policy from a load balancer listener policy object. The prototype object is structured + * in the same way as a retrieved policy, and contains the information necessary to create the new policy. For this + * request to succeed, the load balancer must be in the `application` family. * - * @param listVolumeProfilesOptions the {@link ListVolumeProfilesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VolumeProfileCollection} + * @param createLoadBalancerListenerPolicyOptions the {@link CreateLoadBalancerListenerPolicyOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerListenerPolicy} */ - public ServiceCall listVolumeProfiles(ListVolumeProfilesOptions listVolumeProfilesOptions) { - if (listVolumeProfilesOptions == null) { - listVolumeProfilesOptions = new ListVolumeProfilesOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/volume/profiles")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVolumeProfiles"); + public ServiceCall createLoadBalancerListenerPolicy(CreateLoadBalancerListenerPolicyOptions createLoadBalancerListenerPolicyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createLoadBalancerListenerPolicyOptions, + "createLoadBalancerListenerPolicyOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("load_balancer_id", createLoadBalancerListenerPolicyOptions.loadBalancerId()); + pathParamsMap.put("listener_id", createLoadBalancerListenerPolicyOptions.listenerId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createLoadBalancerListenerPolicy"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listVolumeProfilesOptions.start() != null) { - builder.query("start", String.valueOf(listVolumeProfilesOptions.start())); + final JsonObject contentJson = new JsonObject(); + contentJson.addProperty("action", createLoadBalancerListenerPolicyOptions.action()); + contentJson.addProperty("priority", createLoadBalancerListenerPolicyOptions.priority()); + if (createLoadBalancerListenerPolicyOptions.name() != null) { + contentJson.addProperty("name", createLoadBalancerListenerPolicyOptions.name()); } - if (listVolumeProfilesOptions.limit() != null) { - builder.query("limit", String.valueOf(listVolumeProfilesOptions.limit())); + if (createLoadBalancerListenerPolicyOptions.rules() != null) { + contentJson.add("rules", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerListenerPolicyOptions.rules())); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (createLoadBalancerListenerPolicyOptions.target() != null) { + contentJson.add("target", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerListenerPolicyOptions.target())); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List volume profiles. - * - * This request lists [volume profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-block-storage-profiles) available in - * the region. A volume profile specifies the performance characteristics and pricing model for a volume. - * - * @return a {@link ServiceCall} with a result of type {@link VolumeProfileCollection} - */ - public ServiceCall listVolumeProfiles() { - return listVolumeProfiles(null); - } - - /** - * Retrieve a volume profile. + * Create a rule for a load balancer listener policy. * - * This request retrieves a single volume profile specified by the name in the URL. + * Creates a new rule for the load balancer listener policy. * - * @param getVolumeProfileOptions the {@link GetVolumeProfileOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VolumeProfile} + * @param createLoadBalancerListenerPolicyRuleOptions the {@link CreateLoadBalancerListenerPolicyRuleOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerListenerPolicyRule} */ - public ServiceCall getVolumeProfile(GetVolumeProfileOptions getVolumeProfileOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getVolumeProfileOptions, - "getVolumeProfileOptions cannot be null"); + public ServiceCall createLoadBalancerListenerPolicyRule(CreateLoadBalancerListenerPolicyRuleOptions createLoadBalancerListenerPolicyRuleOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createLoadBalancerListenerPolicyRuleOptions, + "createLoadBalancerListenerPolicyRuleOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("name", getVolumeProfileOptions.name()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/volume/profiles/{name}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVolumeProfile"); + pathParamsMap.put("load_balancer_id", createLoadBalancerListenerPolicyRuleOptions.loadBalancerId()); + pathParamsMap.put("listener_id", createLoadBalancerListenerPolicyRuleOptions.listenerId()); + pathParamsMap.put("policy_id", createLoadBalancerListenerPolicyRuleOptions.policyId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createLoadBalancerListenerPolicyRule"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + final JsonObject contentJson = new JsonObject(); + contentJson.addProperty("condition", createLoadBalancerListenerPolicyRuleOptions.condition()); + contentJson.addProperty("type", createLoadBalancerListenerPolicyRuleOptions.type()); + contentJson.addProperty("value", createLoadBalancerListenerPolicyRuleOptions.value()); + if (createLoadBalancerListenerPolicyRuleOptions.field() != null) { + contentJson.addProperty("field", createLoadBalancerListenerPolicyRuleOptions.field()); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List volumes. + * Create a load balancer pool. * - * This request lists volumes in the region. Volumes are network-connected block storage devices that may be attached - * to one or more instances in the same region. + * This request creates a new pool from a pool prototype object. * - * @param listVolumesOptions the {@link ListVolumesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VolumeCollection} + * @param createLoadBalancerPoolOptions the {@link CreateLoadBalancerPoolOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerPool} */ - public ServiceCall listVolumes(ListVolumesOptions listVolumesOptions) { - if (listVolumesOptions == null) { - listVolumesOptions = new ListVolumesOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/volumes")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVolumes"); + public ServiceCall createLoadBalancerPool(CreateLoadBalancerPoolOptions createLoadBalancerPoolOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createLoadBalancerPoolOptions, + "createLoadBalancerPoolOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("load_balancer_id", createLoadBalancerPoolOptions.loadBalancerId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/pools", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createLoadBalancerPool"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listVolumesOptions.start() != null) { - builder.query("start", String.valueOf(listVolumesOptions.start())); - } - if (listVolumesOptions.limit() != null) { - builder.query("limit", String.valueOf(listVolumesOptions.limit())); - } - if (listVolumesOptions.attachmentState() != null) { - builder.query("attachment_state", String.valueOf(listVolumesOptions.attachmentState())); + final JsonObject contentJson = new JsonObject(); + contentJson.addProperty("algorithm", createLoadBalancerPoolOptions.algorithm()); + contentJson.add("health_monitor", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerPoolOptions.healthMonitor())); + contentJson.addProperty("protocol", createLoadBalancerPoolOptions.protocol()); + if (createLoadBalancerPoolOptions.failsafePolicy() != null) { + contentJson.add("failsafe_policy", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerPoolOptions.failsafePolicy())); } - if (listVolumesOptions.encryption() != null) { - builder.query("encryption", String.valueOf(listVolumesOptions.encryption())); + if (createLoadBalancerPoolOptions.members() != null) { + contentJson.add("members", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerPoolOptions.members())); } - if (listVolumesOptions.name() != null) { - builder.query("name", String.valueOf(listVolumesOptions.name())); + if (createLoadBalancerPoolOptions.name() != null) { + contentJson.addProperty("name", createLoadBalancerPoolOptions.name()); } - if (listVolumesOptions.operatingSystemFamily() != null) { - builder.query("operating_system.family", String.valueOf(listVolumesOptions.operatingSystemFamily())); + if (createLoadBalancerPoolOptions.proxyProtocol() != null) { + contentJson.addProperty("proxy_protocol", createLoadBalancerPoolOptions.proxyProtocol()); } - if (listVolumesOptions.operatingSystemArchitecture() != null) { - builder.query("operating_system.architecture", String.valueOf(listVolumesOptions.operatingSystemArchitecture())); + if (createLoadBalancerPoolOptions.sessionPersistence() != null) { + contentJson.add("session_persistence", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerPoolOptions.sessionPersistence())); } - if (listVolumesOptions.tag() != null) { - builder.query("tag", String.valueOf(listVolumesOptions.tag())); - } - if (listVolumesOptions.zoneName() != null) { - builder.query("zone.name", String.valueOf(listVolumesOptions.zoneName())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List volumes. - * - * This request lists volumes in the region. Volumes are network-connected block storage devices that may be attached - * to one or more instances in the same region. + * Create a member in a load balancer pool. * - * @return a {@link ServiceCall} with a result of type {@link VolumeCollection} - */ - public ServiceCall listVolumes() { - return listVolumes(null); - } - - /** - * Create a volume. + * This request creates a new member and adds the member to the pool. * - * This request creates a new volume from a volume prototype object. The prototype object is structured in the same - * way as a retrieved volume, and contains the information necessary to create the new volume. + * The pool must not already have a member targeting a load balancer. * - * @param createVolumeOptions the {@link CreateVolumeOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Volume} + * @param createLoadBalancerPoolMemberOptions the {@link CreateLoadBalancerPoolMemberOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerPoolMember} */ - public ServiceCall createVolume(CreateVolumeOptions createVolumeOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createVolumeOptions, - "createVolumeOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/volumes")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createVolume"); + public ServiceCall createLoadBalancerPoolMember(CreateLoadBalancerPoolMemberOptions createLoadBalancerPoolMemberOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createLoadBalancerPoolMemberOptions, + "createLoadBalancerPoolMemberOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("load_balancer_id", createLoadBalancerPoolMemberOptions.loadBalancerId()); + pathParamsMap.put("pool_id", createLoadBalancerPoolMemberOptions.poolId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/pools/{pool_id}/members", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createLoadBalancerPoolMember"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createVolumeOptions.volumePrototype()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + final JsonObject contentJson = new JsonObject(); + contentJson.addProperty("port", createLoadBalancerPoolMemberOptions.port()); + contentJson.add("target", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerPoolMemberOptions.target())); + if (createLoadBalancerPoolMemberOptions.weight() != null) { + contentJson.addProperty("weight", createLoadBalancerPoolMemberOptions.weight()); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a volume. + * Delete a load balancer. * - * This request deletes a volume. This operation cannot be reversed. For this request to succeed, the volume must not - * be attached to any instances. + * This request deletes a load balancer. This operation cannot be reversed. A load balancer cannot be deleted if its + * `provisioning_status` is `delete_pending` or it is referenced by a resource. * - * @param deleteVolumeOptions the {@link DeleteVolumeOptions} containing the options for the call + * @param deleteLoadBalancerOptions the {@link DeleteLoadBalancerOptions} containing the options for the call * @return a {@link ServiceCall} with a void result */ - public ServiceCall deleteVolume(DeleteVolumeOptions deleteVolumeOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVolumeOptions, - "deleteVolumeOptions cannot be null"); + public ServiceCall deleteLoadBalancer(DeleteLoadBalancerOptions deleteLoadBalancerOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteLoadBalancerOptions, + "deleteLoadBalancerOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteVolumeOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/volumes/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVolume"); + pathParamsMap.put("id", deleteLoadBalancerOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteLoadBalancer"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - if (deleteVolumeOptions.ifMatch() != null) { - builder.header("If-Match", deleteVolumeOptions.ifMatch()); + if (deleteLoadBalancerOptions.ifMatch() != null) { + builder.header("If-Match", deleteLoadBalancerOptions.ifMatch()); } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); @@ -7385,1307 +7525,1134 @@ public ServiceCall deleteVolume(DeleteVolumeOptions deleteVolumeOptions) { } /** - * Retrieve a volume. + * Delete a load balancer listener. * - * This request retrieves a single volume specified by the identifier in the URL. + * This request deletes a load balancer listener. This operation cannot be reversed. For this operation to succeed, + * the listener must not be the target of another load balancer listener. * - * @param getVolumeOptions the {@link GetVolumeOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Volume} + * @param deleteLoadBalancerListenerOptions the {@link DeleteLoadBalancerListenerOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall getVolume(GetVolumeOptions getVolumeOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getVolumeOptions, - "getVolumeOptions cannot be null"); + public ServiceCall deleteLoadBalancerListener(DeleteLoadBalancerListenerOptions deleteLoadBalancerListenerOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteLoadBalancerListenerOptions, + "deleteLoadBalancerListenerOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getVolumeOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/volumes/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVolume"); + pathParamsMap.put("load_balancer_id", deleteLoadBalancerListenerOptions.loadBalancerId()); + pathParamsMap.put("id", deleteLoadBalancerListenerOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteLoadBalancerListener"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Update a volume. + * Delete a load balancer listener policy. * - * This request updates a volume with the information in a provided volume patch. The volume patch object is - * structured in the same way as a retrieved volume and contains only the information to be updated. + * Deletes a policy of the load balancer listener. This operation cannot be reversed. * - * @param updateVolumeOptions the {@link UpdateVolumeOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Volume} + * @param deleteLoadBalancerListenerPolicyOptions the {@link DeleteLoadBalancerListenerPolicyOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall updateVolume(UpdateVolumeOptions updateVolumeOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateVolumeOptions, - "updateVolumeOptions cannot be null"); + public ServiceCall deleteLoadBalancerListenerPolicy(DeleteLoadBalancerListenerPolicyOptions deleteLoadBalancerListenerPolicyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteLoadBalancerListenerPolicyOptions, + "deleteLoadBalancerListenerPolicyOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateVolumeOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/volumes/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateVolume"); + pathParamsMap.put("load_balancer_id", deleteLoadBalancerListenerPolicyOptions.loadBalancerId()); + pathParamsMap.put("listener_id", deleteLoadBalancerListenerPolicyOptions.listenerId()); + pathParamsMap.put("id", deleteLoadBalancerListenerPolicyOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteLoadBalancerListenerPolicy"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); - if (updateVolumeOptions.ifMatch() != null) { - builder.header("If-Match", updateVolumeOptions.ifMatch()); - } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateVolumeOptions.volumePatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * List snapshot consistency groups. + * Delete a load balancer listener policy rule. * - * This request lists snapshot consistency groups in the region. A snapshot consistency group is a collection of - * individual snapshots taken at the same time. + * Deletes a rule from the load balancer listener policy. This operation cannot be reversed. * - * @param listSnapshotConsistencyGroupsOptions the {@link ListSnapshotConsistencyGroupsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link SnapshotConsistencyGroupCollection} + * @param deleteLoadBalancerListenerPolicyRuleOptions the {@link DeleteLoadBalancerListenerPolicyRuleOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall listSnapshotConsistencyGroups(ListSnapshotConsistencyGroupsOptions listSnapshotConsistencyGroupsOptions) { - if (listSnapshotConsistencyGroupsOptions == null) { - listSnapshotConsistencyGroupsOptions = new ListSnapshotConsistencyGroupsOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshot_consistency_groups")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listSnapshotConsistencyGroups"); + public ServiceCall deleteLoadBalancerListenerPolicyRule(DeleteLoadBalancerListenerPolicyRuleOptions deleteLoadBalancerListenerPolicyRuleOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteLoadBalancerListenerPolicyRuleOptions, + "deleteLoadBalancerListenerPolicyRuleOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("load_balancer_id", deleteLoadBalancerListenerPolicyRuleOptions.loadBalancerId()); + pathParamsMap.put("listener_id", deleteLoadBalancerListenerPolicyRuleOptions.listenerId()); + pathParamsMap.put("policy_id", deleteLoadBalancerListenerPolicyRuleOptions.policyId()); + pathParamsMap.put("id", deleteLoadBalancerListenerPolicyRuleOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteLoadBalancerListenerPolicyRule"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listSnapshotConsistencyGroupsOptions.start() != null) { - builder.query("start", String.valueOf(listSnapshotConsistencyGroupsOptions.start())); - } - if (listSnapshotConsistencyGroupsOptions.limit() != null) { - builder.query("limit", String.valueOf(listSnapshotConsistencyGroupsOptions.limit())); - } - if (listSnapshotConsistencyGroupsOptions.resourceGroupId() != null) { - builder.query("resource_group.id", String.valueOf(listSnapshotConsistencyGroupsOptions.resourceGroupId())); - } - if (listSnapshotConsistencyGroupsOptions.name() != null) { - builder.query("name", String.valueOf(listSnapshotConsistencyGroupsOptions.name())); - } - if (listSnapshotConsistencyGroupsOptions.sort() != null) { - builder.query("sort", String.valueOf(listSnapshotConsistencyGroupsOptions.sort())); - } - if (listSnapshotConsistencyGroupsOptions.backupPolicyPlanId() != null) { - builder.query("backup_policy_plan.id", String.valueOf(listSnapshotConsistencyGroupsOptions.backupPolicyPlanId())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * List snapshot consistency groups. - * - * This request lists snapshot consistency groups in the region. A snapshot consistency group is a collection of - * individual snapshots taken at the same time. - * - * @return a {@link ServiceCall} with a result of type {@link SnapshotConsistencyGroupCollection} - */ - public ServiceCall listSnapshotConsistencyGroups() { - return listSnapshotConsistencyGroups(null); - } - - /** - * Create a snapshot consistency group. + * Delete a load balancer pool. * - * This request creates a new snapshot consistency group from a snapshot consistency group object. The prototype - * object is structured in the same way as a retrieved consistency group, and contains the information necessary to - * provision the new snapshot consistency group. + * This request deletes a load balancer pool. This operation cannot be reversed. The pool must not currently be the + * default pool for any listener in the load balancer, nor be the target pool in the failsafe policy for any other + * pool. * - * @param createSnapshotConsistencyGroupOptions the {@link CreateSnapshotConsistencyGroupOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link SnapshotConsistencyGroup} + * @param deleteLoadBalancerPoolOptions the {@link DeleteLoadBalancerPoolOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall createSnapshotConsistencyGroup(CreateSnapshotConsistencyGroupOptions createSnapshotConsistencyGroupOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createSnapshotConsistencyGroupOptions, - "createSnapshotConsistencyGroupOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshot_consistency_groups")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createSnapshotConsistencyGroup"); + public ServiceCall deleteLoadBalancerPool(DeleteLoadBalancerPoolOptions deleteLoadBalancerPoolOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteLoadBalancerPoolOptions, + "deleteLoadBalancerPoolOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("load_balancer_id", deleteLoadBalancerPoolOptions.loadBalancerId()); + pathParamsMap.put("id", deleteLoadBalancerPoolOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/pools/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteLoadBalancerPool"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createSnapshotConsistencyGroupOptions.snapshotConsistencyGroupPrototype()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a snapshot consistency group. + * Delete a load balancer pool member. * - * This request deletes snapshot consistency group. This operation cannot be reversed. If the - * `delete_snapshots_on_delete` property is `true`, all snapshots in the consistency group will also be deleted. + * This request deletes a member from the pool. This operation cannot be reversed. * - * @param deleteSnapshotConsistencyGroupOptions the {@link DeleteSnapshotConsistencyGroupOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link SnapshotConsistencyGroup} + * @param deleteLoadBalancerPoolMemberOptions the {@link DeleteLoadBalancerPoolMemberOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall deleteSnapshotConsistencyGroup(DeleteSnapshotConsistencyGroupOptions deleteSnapshotConsistencyGroupOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteSnapshotConsistencyGroupOptions, - "deleteSnapshotConsistencyGroupOptions cannot be null"); + public ServiceCall deleteLoadBalancerPoolMember(DeleteLoadBalancerPoolMemberOptions deleteLoadBalancerPoolMemberOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteLoadBalancerPoolMemberOptions, + "deleteLoadBalancerPoolMemberOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteSnapshotConsistencyGroupOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshot_consistency_groups/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteSnapshotConsistencyGroup"); + pathParamsMap.put("load_balancer_id", deleteLoadBalancerPoolMemberOptions.loadBalancerId()); + pathParamsMap.put("pool_id", deleteLoadBalancerPoolMemberOptions.poolId()); + pathParamsMap.put("id", deleteLoadBalancerPoolMemberOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteLoadBalancerPoolMember"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a snapshot consistency group. + * Retrieve a load balancer. * - * This request retrieves a single snapshot consistency group specified by the identifier in the URL. + * This request retrieves a single load balancer specified by the identifier in the URL path. * - * @param getSnapshotConsistencyGroupOptions the {@link GetSnapshotConsistencyGroupOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link SnapshotConsistencyGroup} + * @param getLoadBalancerOptions the {@link GetLoadBalancerOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancer} */ - public ServiceCall getSnapshotConsistencyGroup(GetSnapshotConsistencyGroupOptions getSnapshotConsistencyGroupOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getSnapshotConsistencyGroupOptions, - "getSnapshotConsistencyGroupOptions cannot be null"); + public ServiceCall getLoadBalancer(GetLoadBalancerOptions getLoadBalancerOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getLoadBalancerOptions, + "getLoadBalancerOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getSnapshotConsistencyGroupOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshot_consistency_groups/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getSnapshotConsistencyGroup"); + pathParamsMap.put("id", getLoadBalancerOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getLoadBalancer"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a snapshot consistency group. + * Retrieve a load balancer listener. * - * This request updates a snapshot consistency group with the information in a provided snapshot consistency group - * patch. The snapshot consistency group patch object is structured in the same way as a retrieved snapshot - * consistency group and contains only the information to be updated. + * This request retrieves a single listener specified by the identifier in the URL path. * - * @param updateSnapshotConsistencyGroupOptions the {@link UpdateSnapshotConsistencyGroupOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link SnapshotConsistencyGroup} + * @param getLoadBalancerListenerOptions the {@link GetLoadBalancerListenerOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerListener} */ - public ServiceCall updateSnapshotConsistencyGroup(UpdateSnapshotConsistencyGroupOptions updateSnapshotConsistencyGroupOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateSnapshotConsistencyGroupOptions, - "updateSnapshotConsistencyGroupOptions cannot be null"); + public ServiceCall getLoadBalancerListener(GetLoadBalancerListenerOptions getLoadBalancerListenerOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getLoadBalancerListenerOptions, + "getLoadBalancerListenerOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateSnapshotConsistencyGroupOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshot_consistency_groups/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateSnapshotConsistencyGroup"); + pathParamsMap.put("load_balancer_id", getLoadBalancerListenerOptions.loadBalancerId()); + pathParamsMap.put("id", getLoadBalancerListenerOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getLoadBalancerListener"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); - if (updateSnapshotConsistencyGroupOptions.ifMatch() != null) { - builder.header("If-Match", updateSnapshotConsistencyGroupOptions.ifMatch()); - } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateSnapshotConsistencyGroupOptions.snapshotConsistencyGroupPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a filtered collection of snapshots. + * Retrieve a load balancer listener policy. * - * This request deletes snapshots that match the specified filter. This operation cannot be reversed. + * Retrieve a single policy specified by the identifier in the URL path. * - * @param deleteSnapshotsOptions the {@link DeleteSnapshotsOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param getLoadBalancerListenerPolicyOptions the {@link GetLoadBalancerListenerPolicyOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerListenerPolicy} */ - public ServiceCall deleteSnapshots(DeleteSnapshotsOptions deleteSnapshotsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteSnapshotsOptions, - "deleteSnapshotsOptions cannot be null"); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshots")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteSnapshots"); + public ServiceCall getLoadBalancerListenerPolicy(GetLoadBalancerListenerPolicyOptions getLoadBalancerListenerPolicyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getLoadBalancerListenerPolicyOptions, + "getLoadBalancerListenerPolicyOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("load_balancer_id", getLoadBalancerListenerPolicyOptions.loadBalancerId()); + pathParamsMap.put("listener_id", getLoadBalancerListenerPolicyOptions.listenerId()); + pathParamsMap.put("id", getLoadBalancerListenerPolicyOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getLoadBalancerListenerPolicy"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.query("source_volume.id", String.valueOf(deleteSnapshotsOptions.sourceVolumeId())); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List snapshots. + * Retrieve a load balancer listener policy rule. * - * This request lists snapshots in the region. A snapshot preserves the data of a volume at the time the snapshot is - * created. + * Retrieves a single rule specified by the identifier in the URL path. * - * @param listSnapshotsOptions the {@link ListSnapshotsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link SnapshotCollection} + * @param getLoadBalancerListenerPolicyRuleOptions the {@link GetLoadBalancerListenerPolicyRuleOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerListenerPolicyRule} */ - public ServiceCall listSnapshots(ListSnapshotsOptions listSnapshotsOptions) { - if (listSnapshotsOptions == null) { - listSnapshotsOptions = new ListSnapshotsOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshots")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listSnapshots"); + public ServiceCall getLoadBalancerListenerPolicyRule(GetLoadBalancerListenerPolicyRuleOptions getLoadBalancerListenerPolicyRuleOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getLoadBalancerListenerPolicyRuleOptions, + "getLoadBalancerListenerPolicyRuleOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("load_balancer_id", getLoadBalancerListenerPolicyRuleOptions.loadBalancerId()); + pathParamsMap.put("listener_id", getLoadBalancerListenerPolicyRuleOptions.listenerId()); + pathParamsMap.put("policy_id", getLoadBalancerListenerPolicyRuleOptions.policyId()); + pathParamsMap.put("id", getLoadBalancerListenerPolicyRuleOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getLoadBalancerListenerPolicyRule"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listSnapshotsOptions.start() != null) { - builder.query("start", String.valueOf(listSnapshotsOptions.start())); - } - if (listSnapshotsOptions.limit() != null) { - builder.query("limit", String.valueOf(listSnapshotsOptions.limit())); - } - if (listSnapshotsOptions.tag() != null) { - builder.query("tag", String.valueOf(listSnapshotsOptions.tag())); - } - if (listSnapshotsOptions.resourceGroupId() != null) { - builder.query("resource_group.id", String.valueOf(listSnapshotsOptions.resourceGroupId())); - } - if (listSnapshotsOptions.name() != null) { - builder.query("name", String.valueOf(listSnapshotsOptions.name())); - } - if (listSnapshotsOptions.sourceVolumeId() != null) { - builder.query("source_volume.id", String.valueOf(listSnapshotsOptions.sourceVolumeId())); - } - if (listSnapshotsOptions.sourceVolumeCrn() != null) { - builder.query("source_volume.crn", String.valueOf(listSnapshotsOptions.sourceVolumeCrn())); - } - if (listSnapshotsOptions.sourceImageId() != null) { - builder.query("source_image.id", String.valueOf(listSnapshotsOptions.sourceImageId())); - } - if (listSnapshotsOptions.sourceImageCrn() != null) { - builder.query("source_image.crn", String.valueOf(listSnapshotsOptions.sourceImageCrn())); - } - if (listSnapshotsOptions.sort() != null) { - builder.query("sort", String.valueOf(listSnapshotsOptions.sort())); - } - if (listSnapshotsOptions.backupPolicyPlanId() != null) { - builder.query("backup_policy_plan.id", String.valueOf(listSnapshotsOptions.backupPolicyPlanId())); - } - if (listSnapshotsOptions.copiesId() != null) { - builder.query("copies[].id", String.valueOf(listSnapshotsOptions.copiesId())); - } - if (listSnapshotsOptions.copiesName() != null) { - builder.query("copies[].name", String.valueOf(listSnapshotsOptions.copiesName())); - } - if (listSnapshotsOptions.copiesCrn() != null) { - builder.query("copies[].crn", String.valueOf(listSnapshotsOptions.copiesCrn())); - } - if (listSnapshotsOptions.copiesRemoteRegionName() != null) { - builder.query("copies[].remote.region.name", String.valueOf(listSnapshotsOptions.copiesRemoteRegionName())); - } - if (listSnapshotsOptions.sourceSnapshotId() != null) { - builder.query("source_snapshot.id", String.valueOf(listSnapshotsOptions.sourceSnapshotId())); - } - if (listSnapshotsOptions.sourceSnapshotRemoteRegionName() != null) { - builder.query("source_snapshot.remote.region.name", String.valueOf(listSnapshotsOptions.sourceSnapshotRemoteRegionName())); - } - if (listSnapshotsOptions.sourceVolumeRemoteRegionName() != null) { - builder.query("source_volume.remote.region.name", String.valueOf(listSnapshotsOptions.sourceVolumeRemoteRegionName())); - } - if (listSnapshotsOptions.sourceImageRemoteRegionName() != null) { - builder.query("source_image.remote.region.name", String.valueOf(listSnapshotsOptions.sourceImageRemoteRegionName())); - } - if (listSnapshotsOptions.clonesZoneName() != null) { - builder.query("clones[].zone.name", String.valueOf(listSnapshotsOptions.clonesZoneName())); - } - if (listSnapshotsOptions.snapshotConsistencyGroupId() != null) { - builder.query("snapshot_consistency_group.id", String.valueOf(listSnapshotsOptions.snapshotConsistencyGroupId())); - } - if (listSnapshotsOptions.snapshotConsistencyGroupCrn() != null) { - builder.query("snapshot_consistency_group.crn", String.valueOf(listSnapshotsOptions.snapshotConsistencyGroupCrn())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List snapshots. - * - * This request lists snapshots in the region. A snapshot preserves the data of a volume at the time the snapshot is - * created. - * - * @return a {@link ServiceCall} with a result of type {@link SnapshotCollection} - */ - public ServiceCall listSnapshots() { - return listSnapshots(null); - } - - /** - * Create a snapshot. + * Retrieve a load balancer pool. * - * This request creates a new snapshot from a snapshot prototype object. The prototype object is structured in the - * same way as a retrieved snapshot, and contains the information necessary to provision the new snapshot. + * This request retrieves a single pool specified by the identifier in the URL path. * - * @param createSnapshotOptions the {@link CreateSnapshotOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Snapshot} + * @param getLoadBalancerPoolOptions the {@link GetLoadBalancerPoolOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerPool} */ - public ServiceCall createSnapshot(CreateSnapshotOptions createSnapshotOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createSnapshotOptions, - "createSnapshotOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshots")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createSnapshot"); + public ServiceCall getLoadBalancerPool(GetLoadBalancerPoolOptions getLoadBalancerPoolOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getLoadBalancerPoolOptions, + "getLoadBalancerPoolOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("load_balancer_id", getLoadBalancerPoolOptions.loadBalancerId()); + pathParamsMap.put("id", getLoadBalancerPoolOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/pools/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getLoadBalancerPool"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createSnapshotOptions.snapshotPrototype()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a snapshot. + * Retrieve a load balancer pool member. * - * This request deletes a snapshot. This operation cannot be reversed. + * This request retrieves a single member specified by the identifier in the URL path. * - * @param deleteSnapshotOptions the {@link DeleteSnapshotOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param getLoadBalancerPoolMemberOptions the {@link GetLoadBalancerPoolMemberOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerPoolMember} */ - public ServiceCall deleteSnapshot(DeleteSnapshotOptions deleteSnapshotOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteSnapshotOptions, - "deleteSnapshotOptions cannot be null"); + public ServiceCall getLoadBalancerPoolMember(GetLoadBalancerPoolMemberOptions getLoadBalancerPoolMemberOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getLoadBalancerPoolMemberOptions, + "getLoadBalancerPoolMemberOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteSnapshotOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshots/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteSnapshot"); + pathParamsMap.put("load_balancer_id", getLoadBalancerPoolMemberOptions.loadBalancerId()); + pathParamsMap.put("pool_id", getLoadBalancerPoolMemberOptions.poolId()); + pathParamsMap.put("id", getLoadBalancerPoolMemberOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getLoadBalancerPoolMember"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - if (deleteSnapshotOptions.ifMatch() != null) { - builder.header("If-Match", deleteSnapshotOptions.ifMatch()); - } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a snapshot. + * Retrieve a load balancer profile. * - * This request retrieves a single snapshot specified by the identifier in the URL. + * This request retrieves a load balancer profile specified by the name in the URL. * - * @param getSnapshotOptions the {@link GetSnapshotOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Snapshot} + * @param getLoadBalancerProfileOptions the {@link GetLoadBalancerProfileOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerProfile} */ - public ServiceCall getSnapshot(GetSnapshotOptions getSnapshotOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getSnapshotOptions, - "getSnapshotOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getSnapshotOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshots/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getSnapshot"); + public ServiceCall getLoadBalancerProfile(GetLoadBalancerProfileOptions getLoadBalancerProfileOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getLoadBalancerProfileOptions, + "getLoadBalancerProfileOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("name", getLoadBalancerProfileOptions.name()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancer/profiles/{name}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getLoadBalancerProfile"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a snapshot. + * List statistics of a load balancer. * - * This request updates a snapshot with the information in a provided snapshot patch. The snapshot consistency group - * patch object is structured in the same way as a retrieved snapshot and contains only the information to be updated. + * This request lists statistics of a load balancer. * - * @param updateSnapshotOptions the {@link UpdateSnapshotOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Snapshot} + * @param getLoadBalancerStatisticsOptions the {@link GetLoadBalancerStatisticsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerStatistics} */ - public ServiceCall updateSnapshot(UpdateSnapshotOptions updateSnapshotOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateSnapshotOptions, - "updateSnapshotOptions cannot be null"); + public ServiceCall getLoadBalancerStatistics(GetLoadBalancerStatisticsOptions getLoadBalancerStatisticsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getLoadBalancerStatisticsOptions, + "getLoadBalancerStatisticsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateSnapshotOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshots/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateSnapshot"); + pathParamsMap.put("id", getLoadBalancerStatisticsOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{id}/statistics", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getLoadBalancerStatistics"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); - if (updateSnapshotOptions.ifMatch() != null) { - builder.header("If-Match", updateSnapshotOptions.ifMatch()); + builder.query("version", String.valueOf(this.version)); + builder.query("generation", String.valueOf(this.generation)); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * List policies for a load balancer listener. + * + * This request lists policies for a load balancer listener. A policy consists of rules to match against each incoming + * request, and an action to apply to the request if a rule matches. + * + * @param listLoadBalancerListenerPoliciesOptions the {@link ListLoadBalancerListenerPoliciesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerListenerPolicyCollection} + */ + public ServiceCall listLoadBalancerListenerPolicies(ListLoadBalancerListenerPoliciesOptions listLoadBalancerListenerPoliciesOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listLoadBalancerListenerPoliciesOptions, + "listLoadBalancerListenerPoliciesOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("load_balancer_id", listLoadBalancerListenerPoliciesOptions.loadBalancerId()); + pathParamsMap.put("listener_id", listLoadBalancerListenerPoliciesOptions.listenerId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listLoadBalancerListenerPolicies"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateSnapshotOptions.snapshotPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List clones for a snapshot. + * List rules of a load balancer listener policy. * - * This request lists clones for a snapshot. Use a clone to quickly restore a snapshot within the clone's zone. + * This request lists rules of a load balancer listener policy. * - * @param listSnapshotClonesOptions the {@link ListSnapshotClonesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link SnapshotCloneCollection} + * @param listLoadBalancerListenerPolicyRulesOptions the {@link ListLoadBalancerListenerPolicyRulesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerListenerPolicyRuleCollection} */ - public ServiceCall listSnapshotClones(ListSnapshotClonesOptions listSnapshotClonesOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listSnapshotClonesOptions, - "listSnapshotClonesOptions cannot be null"); + public ServiceCall listLoadBalancerListenerPolicyRules(ListLoadBalancerListenerPolicyRulesOptions listLoadBalancerListenerPolicyRulesOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listLoadBalancerListenerPolicyRulesOptions, + "listLoadBalancerListenerPolicyRulesOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", listSnapshotClonesOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshots/{id}/clones", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listSnapshotClones"); + pathParamsMap.put("load_balancer_id", listLoadBalancerListenerPolicyRulesOptions.loadBalancerId()); + pathParamsMap.put("listener_id", listLoadBalancerListenerPolicyRulesOptions.listenerId()); + pathParamsMap.put("policy_id", listLoadBalancerListenerPolicyRulesOptions.policyId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listLoadBalancerListenerPolicyRules"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a snapshot clone. + * List listeners for a load balancer. * - * This request deletes a snapshot clone. This operation cannot be reversed, but an equivalent clone may be recreated - * from the snapshot. + * This request lists listeners for a load balancer. * - * @param deleteSnapshotCloneOptions the {@link DeleteSnapshotCloneOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param listLoadBalancerListenersOptions the {@link ListLoadBalancerListenersOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerListenerCollection} */ - public ServiceCall deleteSnapshotClone(DeleteSnapshotCloneOptions deleteSnapshotCloneOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteSnapshotCloneOptions, - "deleteSnapshotCloneOptions cannot be null"); + public ServiceCall listLoadBalancerListeners(ListLoadBalancerListenersOptions listLoadBalancerListenersOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listLoadBalancerListenersOptions, + "listLoadBalancerListenersOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteSnapshotCloneOptions.id()); - pathParamsMap.put("zone_name", deleteSnapshotCloneOptions.zoneName()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshots/{id}/clones/{zone_name}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteSnapshotClone"); + pathParamsMap.put("load_balancer_id", listLoadBalancerListenersOptions.loadBalancerId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listLoadBalancerListeners"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a snapshot clone. + * List members of a load balancer pool. * - * This request retrieves a single clone specified by the snapshot identifier and zone name in the URL. + * This request lists members of a load balancer pool. * - * @param getSnapshotCloneOptions the {@link GetSnapshotCloneOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link SnapshotClone} + * @param listLoadBalancerPoolMembersOptions the {@link ListLoadBalancerPoolMembersOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerPoolMemberCollection} */ - public ServiceCall getSnapshotClone(GetSnapshotCloneOptions getSnapshotCloneOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getSnapshotCloneOptions, - "getSnapshotCloneOptions cannot be null"); + public ServiceCall listLoadBalancerPoolMembers(ListLoadBalancerPoolMembersOptions listLoadBalancerPoolMembersOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listLoadBalancerPoolMembersOptions, + "listLoadBalancerPoolMembersOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getSnapshotCloneOptions.id()); - pathParamsMap.put("zone_name", getSnapshotCloneOptions.zoneName()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshots/{id}/clones/{zone_name}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getSnapshotClone"); + pathParamsMap.put("load_balancer_id", listLoadBalancerPoolMembersOptions.loadBalancerId()); + pathParamsMap.put("pool_id", listLoadBalancerPoolMembersOptions.poolId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/pools/{pool_id}/members", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listLoadBalancerPoolMembers"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create a clone for a snapshot. + * List pools of a load balancer. * - * This request creates a new clone for a snapshot in the specified zone. A request body is not required, and if - * provided, is ignored. If the snapshot already has a clone in the zone, it is returned. + * This request lists pools of a load balancer. * - * @param createSnapshotCloneOptions the {@link CreateSnapshotCloneOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link SnapshotClone} + * @param listLoadBalancerPoolsOptions the {@link ListLoadBalancerPoolsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerPoolCollection} */ - public ServiceCall createSnapshotClone(CreateSnapshotCloneOptions createSnapshotCloneOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createSnapshotCloneOptions, - "createSnapshotCloneOptions cannot be null"); + public ServiceCall listLoadBalancerPools(ListLoadBalancerPoolsOptions listLoadBalancerPoolsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listLoadBalancerPoolsOptions, + "listLoadBalancerPoolsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", createSnapshotCloneOptions.id()); - pathParamsMap.put("zone_name", createSnapshotCloneOptions.zoneName()); - RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshots/{id}/clones/{zone_name}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createSnapshotClone"); + pathParamsMap.put("load_balancer_id", listLoadBalancerPoolsOptions.loadBalancerId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/pools", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listLoadBalancerPools"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List file share profiles. + * List load balancer profiles. * - * This request lists [file share profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles) available - * in the region. A file share profile specifies the performance characteristics and pricing model for a file share. + * This request lists load balancer profiles available in the region. A load balancer profile specifies the + * performance characteristics and pricing model for a load balancer. * - * @param listShareProfilesOptions the {@link ListShareProfilesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ShareProfileCollection} + * @param listLoadBalancerProfilesOptions the {@link ListLoadBalancerProfilesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerProfileCollection} */ - public ServiceCall listShareProfiles(ListShareProfilesOptions listShareProfilesOptions) { - if (listShareProfilesOptions == null) { - listShareProfilesOptions = new ListShareProfilesOptions.Builder().build(); + public ServiceCall listLoadBalancerProfiles(ListLoadBalancerProfilesOptions listLoadBalancerProfilesOptions) { + if (listLoadBalancerProfilesOptions == null) { + listLoadBalancerProfilesOptions = new ListLoadBalancerProfilesOptions.Builder().build(); } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/share/profiles")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listShareProfiles"); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancer/profiles")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listLoadBalancerProfiles"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listShareProfilesOptions.start() != null) { - builder.query("start", String.valueOf(listShareProfilesOptions.start())); - } - if (listShareProfilesOptions.limit() != null) { - builder.query("limit", String.valueOf(listShareProfilesOptions.limit())); + if (listLoadBalancerProfilesOptions.start() != null) { + builder.query("start", String.valueOf(listLoadBalancerProfilesOptions.start())); } - if (listShareProfilesOptions.sort() != null) { - builder.query("sort", String.valueOf(listShareProfilesOptions.sort())); + if (listLoadBalancerProfilesOptions.limit() != null) { + builder.query("limit", String.valueOf(listLoadBalancerProfilesOptions.limit())); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List file share profiles. + * List load balancer profiles. * - * This request lists [file share profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles) available - * in the region. A file share profile specifies the performance characteristics and pricing model for a file share. + * This request lists load balancer profiles available in the region. A load balancer profile specifies the + * performance characteristics and pricing model for a load balancer. * - * @return a {@link ServiceCall} with a result of type {@link ShareProfileCollection} + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerProfileCollection} */ - public ServiceCall listShareProfiles() { - return listShareProfiles(null); + public ServiceCall listLoadBalancerProfiles() { + return listLoadBalancerProfiles(null); } /** - * Retrieve a file share profile. + * List load balancers. * - * This request retrieves a single file share profile specified by the name in the URL. + * This request lists load balancers in the region. * - * @param getShareProfileOptions the {@link GetShareProfileOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ShareProfile} + * @param listLoadBalancersOptions the {@link ListLoadBalancersOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerCollection} */ - public ServiceCall getShareProfile(GetShareProfileOptions getShareProfileOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getShareProfileOptions, - "getShareProfileOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("name", getShareProfileOptions.name()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/share/profiles/{name}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getShareProfile"); + public ServiceCall listLoadBalancers(ListLoadBalancersOptions listLoadBalancersOptions) { + if (listLoadBalancersOptions == null) { + listLoadBalancersOptions = new ListLoadBalancersOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listLoadBalancers"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listLoadBalancersOptions.start() != null) { + builder.query("start", String.valueOf(listLoadBalancersOptions.start())); + } + if (listLoadBalancersOptions.limit() != null) { + builder.query("limit", String.valueOf(listLoadBalancersOptions.limit())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List file shares. + * List load balancers. * - * This request lists file shares in the region. + * This request lists load balancers in the region. * - * @param listSharesOptions the {@link ListSharesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ShareCollection} - */ - public ServiceCall listShares(ListSharesOptions listSharesOptions) { - if (listSharesOptions == null) { - listSharesOptions = new ListSharesOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listShares"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - builder.query("generation", String.valueOf(this.generation)); - if (listSharesOptions.start() != null) { - builder.query("start", String.valueOf(listSharesOptions.start())); - } - if (listSharesOptions.limit() != null) { - builder.query("limit", String.valueOf(listSharesOptions.limit())); - } - if (listSharesOptions.resourceGroupId() != null) { - builder.query("resource_group.id", String.valueOf(listSharesOptions.resourceGroupId())); - } - if (listSharesOptions.name() != null) { - builder.query("name", String.valueOf(listSharesOptions.name())); - } - if (listSharesOptions.sort() != null) { - builder.query("sort", String.valueOf(listSharesOptions.sort())); - } - if (listSharesOptions.replicationRole() != null) { - builder.query("replication_role", String.valueOf(listSharesOptions.replicationRole())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * List file shares. - * - * This request lists file shares in the region. - * - * @return a {@link ServiceCall} with a result of type {@link ShareCollection} + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerCollection} */ - public ServiceCall listShares() { - return listShares(null); + public ServiceCall listLoadBalancers() { + return listLoadBalancers(null); } /** - * Create a file share. - * - * This request provisions new file shares from a share prototype object. The new file shares can be a standalone - * share, a replica share, or both a source and replica share. + * Replace load balancer pool members. * - * The prototype object is structured in the same way as a retrieved share, and contains the information necessary to - * provision the new file shares. + * This request replaces the existing members of the load balancer pool with new members created from the collection + * of member prototype objects. * - * @param createShareOptions the {@link CreateShareOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Share} + * @param replaceLoadBalancerPoolMembersOptions the {@link ReplaceLoadBalancerPoolMembersOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerPoolMemberCollection} */ - public ServiceCall createShare(CreateShareOptions createShareOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createShareOptions, - "createShareOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createShare"); + public ServiceCall replaceLoadBalancerPoolMembers(ReplaceLoadBalancerPoolMembersOptions replaceLoadBalancerPoolMembersOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(replaceLoadBalancerPoolMembersOptions, + "replaceLoadBalancerPoolMembersOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("load_balancer_id", replaceLoadBalancerPoolMembersOptions.loadBalancerId()); + pathParamsMap.put("pool_id", replaceLoadBalancerPoolMembersOptions.poolId()); + RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/pools/{pool_id}/members", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "replaceLoadBalancerPoolMembers"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createShareOptions.sharePrototype()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + final JsonObject contentJson = new JsonObject(); + contentJson.add("members", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(replaceLoadBalancerPoolMembersOptions.members())); + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a file share. - * - * This request deletes a share. This operation cannot be reversed. A share cannot be deleted if it: - * - has share mount targets - * - has a `lifecycle_state` of `updating` - * - has a replication operation in progress + * Update a load balancer. * - * If the request is accepted, the share `lifecycle_state` will be set to `deleting`. Once deletion processing - * completes, it will no longer be retrievable. + * This request updates a load balancer with the information in a provided load balancer patch. The load balancer + * patch object is structured in the same way as a retrieved load balancer and contains only the information to be + * updated. A load balancer can only be updated if its `provisioning_status` is `active`. * - * @param deleteShareOptions the {@link DeleteShareOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Share} + * @param updateLoadBalancerOptions the {@link UpdateLoadBalancerOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancer} */ - public ServiceCall deleteShare(DeleteShareOptions deleteShareOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteShareOptions, - "deleteShareOptions cannot be null"); + public ServiceCall updateLoadBalancer(UpdateLoadBalancerOptions updateLoadBalancerOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateLoadBalancerOptions, + "updateLoadBalancerOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteShareOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteShare"); + pathParamsMap.put("id", updateLoadBalancerOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateLoadBalancer"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); - if (deleteShareOptions.ifMatch() != null) { - builder.header("If-Match", deleteShareOptions.ifMatch()); + if (updateLoadBalancerOptions.ifMatch() != null) { + builder.header("If-Match", updateLoadBalancerOptions.ifMatch()); } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateLoadBalancerOptions.loadBalancerPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a file share. + * Update a load balancer listener. * - * This request retrieves a single file share specified by the identifier in the URL. + * This request updates a load balancer listener from a listener patch. * - * @param getShareOptions the {@link GetShareOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Share} + * @param updateLoadBalancerListenerOptions the {@link UpdateLoadBalancerListenerOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerListener} */ - public ServiceCall getShare(GetShareOptions getShareOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getShareOptions, - "getShareOptions cannot be null"); + public ServiceCall updateLoadBalancerListener(UpdateLoadBalancerListenerOptions updateLoadBalancerListenerOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateLoadBalancerListenerOptions, + "updateLoadBalancerListenerOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getShareOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getShare"); + pathParamsMap.put("load_balancer_id", updateLoadBalancerListenerOptions.loadBalancerId()); + pathParamsMap.put("id", updateLoadBalancerListenerOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateLoadBalancerListener"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateLoadBalancerListenerOptions.loadBalancerListenerPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a file share. + * Update a load balancer listener policy. * - * This request updates a share with the information in a provided share patch. The share patch object is structured - * in the same way as a retrieved share and contains only the information to be updated. + * This request updates a load balancer listener policy with the information in a provided policy patch. The policy + * patch object is structured in the same way as a retrieved policy and contains only the information to be updated. * - * @param updateShareOptions the {@link UpdateShareOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Share} + * @param updateLoadBalancerListenerPolicyOptions the {@link UpdateLoadBalancerListenerPolicyOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerListenerPolicy} */ - public ServiceCall updateShare(UpdateShareOptions updateShareOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateShareOptions, - "updateShareOptions cannot be null"); + public ServiceCall updateLoadBalancerListenerPolicy(UpdateLoadBalancerListenerPolicyOptions updateLoadBalancerListenerPolicyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateLoadBalancerListenerPolicyOptions, + "updateLoadBalancerListenerPolicyOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateShareOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateShare"); + pathParamsMap.put("load_balancer_id", updateLoadBalancerListenerPolicyOptions.loadBalancerId()); + pathParamsMap.put("listener_id", updateLoadBalancerListenerPolicyOptions.listenerId()); + pathParamsMap.put("id", updateLoadBalancerListenerPolicyOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateLoadBalancerListenerPolicy"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); - if (updateShareOptions.ifMatch() != null) { - builder.header("If-Match", updateShareOptions.ifMatch()); - } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateShareOptions.sharePatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateLoadBalancerListenerPolicyOptions.loadBalancerListenerPolicyPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List accessor bindings for a file share. - * - * This request lists accessor bindings for a share. Each accessor binding identifies a resource (possibly in another - * account) with access to this file share including its snapshots. + * Update a load balancer listener policy rule. * - * The share accessor bindings will be sorted by their `created_at` property values, with newest bindings first. + * Updates a rule of the load balancer listener policy. * - * @param listShareAccessorBindingsOptions the {@link ListShareAccessorBindingsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ShareAccessorBindingCollection} + * @param updateLoadBalancerListenerPolicyRuleOptions the {@link UpdateLoadBalancerListenerPolicyRuleOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerListenerPolicyRule} */ - public ServiceCall listShareAccessorBindings(ListShareAccessorBindingsOptions listShareAccessorBindingsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listShareAccessorBindingsOptions, - "listShareAccessorBindingsOptions cannot be null"); + public ServiceCall updateLoadBalancerListenerPolicyRule(UpdateLoadBalancerListenerPolicyRuleOptions updateLoadBalancerListenerPolicyRuleOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateLoadBalancerListenerPolicyRuleOptions, + "updateLoadBalancerListenerPolicyRuleOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", listShareAccessorBindingsOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{id}/accessor_bindings", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listShareAccessorBindings"); + pathParamsMap.put("load_balancer_id", updateLoadBalancerListenerPolicyRuleOptions.loadBalancerId()); + pathParamsMap.put("listener_id", updateLoadBalancerListenerPolicyRuleOptions.listenerId()); + pathParamsMap.put("policy_id", updateLoadBalancerListenerPolicyRuleOptions.policyId()); + pathParamsMap.put("id", updateLoadBalancerListenerPolicyRuleOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateLoadBalancerListenerPolicyRule"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listShareAccessorBindingsOptions.start() != null) { - builder.query("start", String.valueOf(listShareAccessorBindingsOptions.start())); - } - if (listShareAccessorBindingsOptions.limit() != null) { - builder.query("limit", String.valueOf(listShareAccessorBindingsOptions.limit())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateLoadBalancerListenerPolicyRuleOptions.loadBalancerListenerPolicyRulePatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a file share accessor binding. + * Update a load balancer pool. * - * This request deletes a share accessor binding. This operation cannot be reversed. + * This request updates a load balancer pool from a pool patch. * - * @param deleteShareAccessorBindingOptions the {@link DeleteShareAccessorBindingOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param updateLoadBalancerPoolOptions the {@link UpdateLoadBalancerPoolOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerPool} */ - public ServiceCall deleteShareAccessorBinding(DeleteShareAccessorBindingOptions deleteShareAccessorBindingOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteShareAccessorBindingOptions, - "deleteShareAccessorBindingOptions cannot be null"); + public ServiceCall updateLoadBalancerPool(UpdateLoadBalancerPoolOptions updateLoadBalancerPoolOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateLoadBalancerPoolOptions, + "updateLoadBalancerPoolOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("share_id", deleteShareAccessorBindingOptions.shareId()); - pathParamsMap.put("id", deleteShareAccessorBindingOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/accessor_bindings/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteShareAccessorBinding"); + pathParamsMap.put("load_balancer_id", updateLoadBalancerPoolOptions.loadBalancerId()); + pathParamsMap.put("id", updateLoadBalancerPoolOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/pools/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateLoadBalancerPool"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateLoadBalancerPoolOptions.loadBalancerPoolPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a file share accessor binding. + * Update a load balancer pool member. * - * This request retrieves a single accessor binding specified by the identifier in the URL. + * This request updates an existing member from a member patch. * - * @param getShareAccessorBindingOptions the {@link GetShareAccessorBindingOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ShareAccessorBinding} + * @param updateLoadBalancerPoolMemberOptions the {@link UpdateLoadBalancerPoolMemberOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link LoadBalancerPoolMember} */ - public ServiceCall getShareAccessorBinding(GetShareAccessorBindingOptions getShareAccessorBindingOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getShareAccessorBindingOptions, - "getShareAccessorBindingOptions cannot be null"); + public ServiceCall updateLoadBalancerPoolMember(UpdateLoadBalancerPoolMemberOptions updateLoadBalancerPoolMemberOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateLoadBalancerPoolMemberOptions, + "updateLoadBalancerPoolMemberOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("share_id", getShareAccessorBindingOptions.shareId()); - pathParamsMap.put("id", getShareAccessorBindingOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/accessor_bindings/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getShareAccessorBinding"); + pathParamsMap.put("load_balancer_id", updateLoadBalancerPoolMemberOptions.loadBalancerId()); + pathParamsMap.put("pool_id", updateLoadBalancerPoolMemberOptions.poolId()); + pathParamsMap.put("id", updateLoadBalancerPoolMemberOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateLoadBalancerPoolMember"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateLoadBalancerPoolMemberOptions.loadBalancerPoolMemberPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Failover to replica file share. - * - * This request triggers a failover to the replica file share specified by the identifier in the URL. The failover - * cannot be started if a source share or the replica share has a `lifecycle_state` of `updating`, or has a - * replication operation in progress. + * Create a network ACL. * - * If `fallback_policy` is specified as `split`, and the request is accepted but the failover operation cannot be - * performed, a split will be triggered. + * This request creates a new stateless network ACL from a network ACL prototype object. The prototype object is + * structured in the same way as a retrieved network ACL, and contains the information necessary to create the new + * network ACL. * - * @param failoverShareOptions the {@link FailoverShareOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param createNetworkAclOptions the {@link CreateNetworkAclOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link NetworkACL} */ - public ServiceCall failoverShare(FailoverShareOptions failoverShareOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(failoverShareOptions, - "failoverShareOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("share_id", failoverShareOptions.shareId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/failover", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "failoverShare"); + public ServiceCall createNetworkAcl(CreateNetworkAclOptions createNetworkAclOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createNetworkAclOptions, + "createNetworkAclOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/network_acls")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createNetworkAcl"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - if (failoverShareOptions.fallbackPolicy() != null) { - contentJson.addProperty("fallback_policy", failoverShareOptions.fallbackPolicy()); - } - if (failoverShareOptions.timeout() != null) { - contentJson.addProperty("timeout", failoverShareOptions.timeout()); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createNetworkAclOptions.networkAclPrototype()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List mount targets for a file share. - * - * This request lists mount targets for a file share. A mount target is a network endpoint at which a file share may - * be mounted. The file share can be mounted by clients in the same VPC and zone after creating share mount targets. + * Create a rule for a network ACL. * - * The share mount targets will be sorted by their `created_at` property values, with newest targets first. + * This request creates a new rule from a network ACL rule prototype object. The prototype object is structured in the + * same way as a retrieved rule, and contains the information necessary to create the new rule. * - * @param listShareMountTargetsOptions the {@link ListShareMountTargetsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ShareMountTargetCollection} + * @param createNetworkAclRuleOptions the {@link CreateNetworkAclRuleOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link NetworkACLRule} */ - public ServiceCall listShareMountTargets(ListShareMountTargetsOptions listShareMountTargetsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listShareMountTargetsOptions, - "listShareMountTargetsOptions cannot be null"); + public ServiceCall createNetworkAclRule(CreateNetworkAclRuleOptions createNetworkAclRuleOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createNetworkAclRuleOptions, + "createNetworkAclRuleOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("share_id", listShareMountTargetsOptions.shareId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/mount_targets", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listShareMountTargets"); + pathParamsMap.put("network_acl_id", createNetworkAclRuleOptions.networkAclId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/network_acls/{network_acl_id}/rules", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createNetworkAclRule"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listShareMountTargetsOptions.name() != null) { - builder.query("name", String.valueOf(listShareMountTargetsOptions.name())); - } - if (listShareMountTargetsOptions.start() != null) { - builder.query("start", String.valueOf(listShareMountTargetsOptions.start())); - } - if (listShareMountTargetsOptions.limit() != null) { - builder.query("limit", String.valueOf(listShareMountTargetsOptions.limit())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createNetworkAclRuleOptions.networkAclRulePrototype()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create a mount target for a file share. - * - * This request creates a new share mount target from a share mount target prototype object. + * Delete a network ACL. * - * The prototype object is structured in the same way as a retrieved share mount target, and contains the information - * necessary to provision the new file share mount target. + * This request deletes a network ACL. This operation cannot be reversed. For this request to succeed, the network ACL + * must not be the default network ACL for any VPCs, and the network ACL must not be attached to any subnets. * - * @param createShareMountTargetOptions the {@link CreateShareMountTargetOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ShareMountTarget} + * @param deleteNetworkAclOptions the {@link DeleteNetworkAclOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall createShareMountTarget(CreateShareMountTargetOptions createShareMountTargetOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createShareMountTargetOptions, - "createShareMountTargetOptions cannot be null"); + public ServiceCall deleteNetworkAcl(DeleteNetworkAclOptions deleteNetworkAclOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteNetworkAclOptions, + "deleteNetworkAclOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("share_id", createShareMountTargetOptions.shareId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/mount_targets", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createShareMountTarget"); + pathParamsMap.put("id", deleteNetworkAclOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/network_acls/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteNetworkAcl"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createShareMountTargetOptions.shareMountTargetPrototype()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a file share mount target. - * - * This request deletes a share mount target. This operation cannot be reversed. + * Delete a network ACL rule. * - * If the request is accepted, the share mount target `lifecycle_state` will be set to - * `deleting`. Once deletion processing completes, it will no longer be retrievable. + * This request deletes a rule. This operation cannot be reversed. * - * @param deleteShareMountTargetOptions the {@link DeleteShareMountTargetOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ShareMountTarget} + * @param deleteNetworkAclRuleOptions the {@link DeleteNetworkAclRuleOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall deleteShareMountTarget(DeleteShareMountTargetOptions deleteShareMountTargetOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteShareMountTargetOptions, - "deleteShareMountTargetOptions cannot be null"); + public ServiceCall deleteNetworkAclRule(DeleteNetworkAclRuleOptions deleteNetworkAclRuleOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteNetworkAclRuleOptions, + "deleteNetworkAclRuleOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("share_id", deleteShareMountTargetOptions.shareId()); - pathParamsMap.put("id", deleteShareMountTargetOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/mount_targets/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteShareMountTarget"); + pathParamsMap.put("network_acl_id", deleteNetworkAclRuleOptions.networkAclId()); + pathParamsMap.put("id", deleteNetworkAclRuleOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/network_acls/{network_acl_id}/rules/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteNetworkAclRule"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a file share mount target. + * Retrieve a network ACL. * - * This request retrieves a single share mount target specified by the identifier in the URL. + * This request retrieves a single network ACL specified by the identifier in the URL. * - * @param getShareMountTargetOptions the {@link GetShareMountTargetOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ShareMountTarget} + * @param getNetworkAclOptions the {@link GetNetworkAclOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link NetworkACL} */ - public ServiceCall getShareMountTarget(GetShareMountTargetOptions getShareMountTargetOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getShareMountTargetOptions, - "getShareMountTargetOptions cannot be null"); + public ServiceCall getNetworkAcl(GetNetworkAclOptions getNetworkAclOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getNetworkAclOptions, + "getNetworkAclOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("share_id", getShareMountTargetOptions.shareId()); - pathParamsMap.put("id", getShareMountTargetOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/mount_targets/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getShareMountTarget"); + pathParamsMap.put("id", getNetworkAclOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/network_acls/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getNetworkAcl"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a file share mount target. + * Retrieve a network ACL rule. * - * This request updates a share mount target with the information provided in a share mount target patch object. The - * share mount target patch object is structured in the same way as a retrieved share mount target and needs to - * contain only the information to be updated. + * This request retrieves a single rule specified by the identifier in the URL. * - * @param updateShareMountTargetOptions the {@link UpdateShareMountTargetOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ShareMountTarget} + * @param getNetworkAclRuleOptions the {@link GetNetworkAclRuleOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link NetworkACLRule} */ - public ServiceCall updateShareMountTarget(UpdateShareMountTargetOptions updateShareMountTargetOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateShareMountTargetOptions, - "updateShareMountTargetOptions cannot be null"); + public ServiceCall getNetworkAclRule(GetNetworkAclRuleOptions getNetworkAclRuleOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getNetworkAclRuleOptions, + "getNetworkAclRuleOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("share_id", updateShareMountTargetOptions.shareId()); - pathParamsMap.put("id", updateShareMountTargetOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/mount_targets/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateShareMountTarget"); + pathParamsMap.put("network_acl_id", getNetworkAclRuleOptions.networkAclId()); + pathParamsMap.put("id", getNetworkAclRuleOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/network_acls/{network_acl_id}/rules/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getNetworkAclRule"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateShareMountTargetOptions.shareMountTargetPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List file share snapshots. - * - * This request lists snapshots for the specified file share, or across all accessible file shares. A snapshot - * preserves the data of a share at the time the snapshot was captured. + * List rules for a network ACL. * - * If the file share is a replica, the list will contain snapshots corresponding to snapshots on the source. + * This request lists rules for a network ACL. These rules can allow or deny traffic between a source CIDR block and a + * destination CIDR block over a particular protocol and port range. * - * @param listShareSnapshotsOptions the {@link ListShareSnapshotsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ShareSnapshotCollection} + * @param listNetworkAclRulesOptions the {@link ListNetworkAclRulesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link NetworkACLRuleCollection} */ - public ServiceCall listShareSnapshots(ListShareSnapshotsOptions listShareSnapshotsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listShareSnapshotsOptions, - "listShareSnapshotsOptions cannot be null"); + public ServiceCall listNetworkAclRules(ListNetworkAclRulesOptions listNetworkAclRulesOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listNetworkAclRulesOptions, + "listNetworkAclRulesOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("share_id", listShareSnapshotsOptions.shareId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/snapshots", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listShareSnapshots"); + pathParamsMap.put("network_acl_id", listNetworkAclRulesOptions.networkAclId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/network_acls/{network_acl_id}/rules", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listNetworkAclRules"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listShareSnapshotsOptions.backupPolicyPlanId() != null) { - builder.query("backup_policy_plan.id", String.valueOf(listShareSnapshotsOptions.backupPolicyPlanId())); - } - if (listShareSnapshotsOptions.name() != null) { - builder.query("name", String.valueOf(listShareSnapshotsOptions.name())); - } - if (listShareSnapshotsOptions.start() != null) { - builder.query("start", String.valueOf(listShareSnapshotsOptions.start())); + if (listNetworkAclRulesOptions.start() != null) { + builder.query("start", String.valueOf(listNetworkAclRulesOptions.start())); } - if (listShareSnapshotsOptions.limit() != null) { - builder.query("limit", String.valueOf(listShareSnapshotsOptions.limit())); + if (listNetworkAclRulesOptions.limit() != null) { + builder.query("limit", String.valueOf(listNetworkAclRulesOptions.limit())); } - if (listShareSnapshotsOptions.sort() != null) { - builder.query("sort", String.valueOf(listShareSnapshotsOptions.sort())); + if (listNetworkAclRulesOptions.direction() != null) { + builder.query("direction", String.valueOf(listNetworkAclRulesOptions.direction())); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create a snapshot for a file share. - * - * This request creates a new share snapshot from a share snapshot prototype object. The prototype object is - * structured in the same way as a retrieved share snapshot, and contains the information necessary to create the new - * share snapshot. - * - * The share must have an `access_control_mode` of `security_group` and a `replication_role` of `source` or `none`. + * List network ACLs. * - * The snapshot will inherit its `resource_group` and encryption settings from the share. - * - * If the share has a `replication_role` of `source`, a corresponding snapshot on the replica share will be created - * with a `status` of `pending`. It will remain in - * `pending` until the data is synchronized per the replication schedule determined by the replica share's - * `replication_cron_spec`. + * This request lists network ACLs in the region. A network ACL defines a set of packet filtering rules for traffic in + * and out of the subnets the network ACL is attached to. No traffic is allowed by default. Both allow and deny rules + * can be defined, and rules are stateless so that reverse traffic in response to allowed traffic is not automatically + * allowed. * - * @param createShareSnapshotOptions the {@link CreateShareSnapshotOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ShareSnapshot} + * @param listNetworkAclsOptions the {@link ListNetworkAclsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link NetworkACLCollection} */ - public ServiceCall createShareSnapshot(CreateShareSnapshotOptions createShareSnapshotOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createShareSnapshotOptions, - "createShareSnapshotOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("share_id", createShareSnapshotOptions.shareId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/snapshots", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createShareSnapshot"); + public ServiceCall listNetworkAcls(ListNetworkAclsOptions listNetworkAclsOptions) { + if (listNetworkAclsOptions == null) { + listNetworkAclsOptions = new ListNetworkAclsOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/network_acls")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listNetworkAcls"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - if (createShareSnapshotOptions.name() != null) { - contentJson.addProperty("name", createShareSnapshotOptions.name()); + if (listNetworkAclsOptions.start() != null) { + builder.query("start", String.valueOf(listNetworkAclsOptions.start())); } - if (createShareSnapshotOptions.userTags() != null) { - contentJson.add("user_tags", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createShareSnapshotOptions.userTags())); + if (listNetworkAclsOptions.limit() != null) { + builder.query("limit", String.valueOf(listNetworkAclsOptions.limit())); } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listNetworkAclsOptions.resourceGroupId() != null) { + builder.query("resource_group.id", String.valueOf(listNetworkAclsOptions.resourceGroupId())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a share snapshot. - * - * This request deletes a share snapshot. This operation cannot be reversed. For this request to succeed, the share - * must have a `replication_role` of `source` or `none`. + * List network ACLs. * - * If the request is accepted, the share snapshot `lifecycle_state` will be set to - * `deleting`. Once deletion processing completes, the share snapshot will no longer be retrievable. + * This request lists network ACLs in the region. A network ACL defines a set of packet filtering rules for traffic in + * and out of the subnets the network ACL is attached to. No traffic is allowed by default. Both allow and deny rules + * can be defined, and rules are stateless so that reverse traffic in response to allowed traffic is not automatically + * allowed. * - * Deleting a share snapshot will not affect any previously-accepted requests to create a share from it. + * @return a {@link ServiceCall} with a result of type {@link NetworkACLCollection} + */ + public ServiceCall listNetworkAcls() { + return listNetworkAcls(null); + } + + /** + * Update a network ACL. * - * If the share has a `replication_role` of `source`, the corresponding snapshot on the replica share will be - * subsequently moved to a `lifecycle_state` of `deleting`. If the data for the corresponding snapshot has already - * been synchronized via the replication schedule determined by `replication_cron_spec`, the snapshot will remain - * available in the replica share's `.snapshot` directory until the next replication sync. + * This request updates a network ACL's name. * - * @param deleteShareSnapshotOptions the {@link DeleteShareSnapshotOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ShareSnapshot} + * @param updateNetworkAclOptions the {@link UpdateNetworkAclOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link NetworkACL} */ - public ServiceCall deleteShareSnapshot(DeleteShareSnapshotOptions deleteShareSnapshotOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteShareSnapshotOptions, - "deleteShareSnapshotOptions cannot be null"); + public ServiceCall updateNetworkAcl(UpdateNetworkAclOptions updateNetworkAclOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateNetworkAclOptions, + "updateNetworkAclOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("share_id", deleteShareSnapshotOptions.shareId()); - pathParamsMap.put("id", deleteShareSnapshotOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/snapshots/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteShareSnapshot"); + pathParamsMap.put("id", updateNetworkAclOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/network_acls/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateNetworkAcl"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateNetworkAclOptions.networkAclPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a share snapshot. + * Update a network ACL rule. * - * This request retrieves a single share snapshot specified by the identifier in the URL. + * This request updates a rule with the information in a provided rule patch. The rule patch object contains only the + * information to be updated. The request will fail if the provided patch includes properties that are not used by the + * rule's protocol. * - * @param getShareSnapshotOptions the {@link GetShareSnapshotOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ShareSnapshot} + * @param updateNetworkAclRuleOptions the {@link UpdateNetworkAclRuleOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link NetworkACLRule} */ - public ServiceCall getShareSnapshot(GetShareSnapshotOptions getShareSnapshotOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getShareSnapshotOptions, - "getShareSnapshotOptions cannot be null"); + public ServiceCall updateNetworkAclRule(UpdateNetworkAclRuleOptions updateNetworkAclRuleOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateNetworkAclRuleOptions, + "updateNetworkAclRuleOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("share_id", getShareSnapshotOptions.shareId()); - pathParamsMap.put("id", getShareSnapshotOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/snapshots/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getShareSnapshot"); + pathParamsMap.put("network_acl_id", updateNetworkAclRuleOptions.networkAclId()); + pathParamsMap.put("id", updateNetworkAclRuleOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/network_acls/{network_acl_id}/rules/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateNetworkAclRule"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateNetworkAclRuleOptions.networkAclRulePatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a share snapshot. + * Create a placement group. * - * This request updates a share snapshot with the information provided in a share snapshot patch object. The share - * snapshot patch object is structured in the same way as a retrieved share snapshot and needs to contain only the - * information to be updated. + * This request creates a new placement group. * - * @param updateShareSnapshotOptions the {@link UpdateShareSnapshotOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ShareSnapshot} + * @param createPlacementGroupOptions the {@link CreatePlacementGroupOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PlacementGroup} */ - public ServiceCall updateShareSnapshot(UpdateShareSnapshotOptions updateShareSnapshotOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateShareSnapshotOptions, - "updateShareSnapshotOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("share_id", updateShareSnapshotOptions.shareId()); - pathParamsMap.put("id", updateShareSnapshotOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/snapshots/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateShareSnapshot"); + public ServiceCall createPlacementGroup(CreatePlacementGroupOptions createPlacementGroupOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createPlacementGroupOptions, + "createPlacementGroupOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/placement_groups")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createPlacementGroup"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); - if (updateShareSnapshotOptions.ifMatch() != null) { - builder.header("If-Match", updateShareSnapshotOptions.ifMatch()); - } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateShareSnapshotOptions.shareSnapshotPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + final JsonObject contentJson = new JsonObject(); + contentJson.addProperty("strategy", createPlacementGroupOptions.strategy()); + if (createPlacementGroupOptions.name() != null) { + contentJson.addProperty("name", createPlacementGroupOptions.name()); + } + if (createPlacementGroupOptions.resourceGroup() != null) { + contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createPlacementGroupOptions.resourceGroup())); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Split the source file share from a replica file share. - * - * This request removes the replication relationship between a source share and the replica share specified by the - * identifier in the URL. The replication relationship cannot be removed if a source share or the replica share has a - * `lifecycle_state` of `updating`, or has a replication operation in progress. + * Delete a placement group. * - * This operation cannot be reversed. + * This request deletes a placement group. This operation cannot be reversed. For this request to succeed, the + * placement group must not be associated with an instance. * - * @param deleteShareSourceOptions the {@link DeleteShareSourceOptions} containing the options for the call + * @param deletePlacementGroupOptions the {@link DeletePlacementGroupOptions} containing the options for the call * @return a {@link ServiceCall} with a void result */ - public ServiceCall deleteShareSource(DeleteShareSourceOptions deleteShareSourceOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteShareSourceOptions, - "deleteShareSourceOptions cannot be null"); + public ServiceCall deletePlacementGroup(DeletePlacementGroupOptions deletePlacementGroupOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deletePlacementGroupOptions, + "deletePlacementGroupOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("share_id", deleteShareSourceOptions.shareId()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/source", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteShareSource"); + pathParamsMap.put("id", deletePlacementGroupOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/placement_groups/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deletePlacementGroup"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } @@ -8696,974 +8663,882 @@ public ServiceCall deleteShareSource(DeleteShareSourceOptions deleteShareS } /** - * Retrieve the source file share for a replica file share. + * Retrieve a placement group. * - * This request retrieves the source file share associated with the replica file share specified by the identifier in - * the URL. + * This request retrieves a single placement group specified by identifier in the URL. * - * @param getShareSourceOptions the {@link GetShareSourceOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ShareReference} + * @param getPlacementGroupOptions the {@link GetPlacementGroupOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PlacementGroup} */ - public ServiceCall getShareSource(GetShareSourceOptions getShareSourceOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getShareSourceOptions, - "getShareSourceOptions cannot be null"); + public ServiceCall getPlacementGroup(GetPlacementGroupOptions getPlacementGroupOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getPlacementGroupOptions, + "getPlacementGroupOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("share_id", getShareSourceOptions.shareId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/source", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getShareSource"); + pathParamsMap.put("id", getPlacementGroupOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/placement_groups/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getPlacementGroup"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List backup policies. + * List placement groups. * - * This request lists backup policies in the region. Backup policies control which sources are selected for backup and - * include a set of backup policy plans that provide the backup schedules and deletion triggers. + * This request lists placement groups in the region. * - * @param listBackupPoliciesOptions the {@link ListBackupPoliciesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BackupPolicyCollection} + * @param listPlacementGroupsOptions the {@link ListPlacementGroupsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PlacementGroupCollection} */ - public ServiceCall listBackupPolicies(ListBackupPoliciesOptions listBackupPoliciesOptions) { - if (listBackupPoliciesOptions == null) { - listBackupPoliciesOptions = new ListBackupPoliciesOptions.Builder().build(); + public ServiceCall listPlacementGroups(ListPlacementGroupsOptions listPlacementGroupsOptions) { + if (listPlacementGroupsOptions == null) { + listPlacementGroupsOptions = new ListPlacementGroupsOptions.Builder().build(); } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/backup_policies")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listBackupPolicies"); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/placement_groups")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listPlacementGroups"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listBackupPoliciesOptions.start() != null) { - builder.query("start", String.valueOf(listBackupPoliciesOptions.start())); - } - if (listBackupPoliciesOptions.limit() != null) { - builder.query("limit", String.valueOf(listBackupPoliciesOptions.limit())); - } - if (listBackupPoliciesOptions.resourceGroupId() != null) { - builder.query("resource_group.id", String.valueOf(listBackupPoliciesOptions.resourceGroupId())); - } - if (listBackupPoliciesOptions.name() != null) { - builder.query("name", String.valueOf(listBackupPoliciesOptions.name())); + if (listPlacementGroupsOptions.start() != null) { + builder.query("start", String.valueOf(listPlacementGroupsOptions.start())); } - if (listBackupPoliciesOptions.tag() != null) { - builder.query("tag", String.valueOf(listBackupPoliciesOptions.tag())); + if (listPlacementGroupsOptions.limit() != null) { + builder.query("limit", String.valueOf(listPlacementGroupsOptions.limit())); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List backup policies. + * List placement groups. * - * This request lists backup policies in the region. Backup policies control which sources are selected for backup and - * include a set of backup policy plans that provide the backup schedules and deletion triggers. + * This request lists placement groups in the region. * - * @return a {@link ServiceCall} with a result of type {@link BackupPolicyCollection} + * @return a {@link ServiceCall} with a result of type {@link PlacementGroupCollection} */ - public ServiceCall listBackupPolicies() { - return listBackupPolicies(null); + public ServiceCall listPlacementGroups() { + return listPlacementGroups(null); } /** - * Create a backup policy. + * Update a placement group. * - * This request creates a new backup policy from a backup policy prototype object. The prototype object is structured - * in the same way as a retrieved backup policy, and contains the information necessary to create the new backup - * policy. + * This request updates a placement group with the information provided placement group patch. The placement group + * patch object is structured in the same way as a retrieved placement group and contains only the information to be + * updated. * - * @param createBackupPolicyOptions the {@link CreateBackupPolicyOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BackupPolicy} + * @param updatePlacementGroupOptions the {@link UpdatePlacementGroupOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PlacementGroup} */ - public ServiceCall createBackupPolicy(CreateBackupPolicyOptions createBackupPolicyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createBackupPolicyOptions, - "createBackupPolicyOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/backup_policies")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createBackupPolicy"); + public ServiceCall updatePlacementGroup(UpdatePlacementGroupOptions updatePlacementGroupOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updatePlacementGroupOptions, + "updatePlacementGroupOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", updatePlacementGroupOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/placement_groups/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updatePlacementGroup"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createBackupPolicyOptions.backupPolicyPrototype()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updatePlacementGroupOptions.placementGroupPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List jobs for a backup policy. + * Create a private path service gateway. * - * This request retrieves jobs for a backup policy. A backup job represents the execution of a backup policy plan for - * a resource matching the policy's criteria. + * This request creates a private path service gateway from a private path service gateway prototype object. The + * prototype object is structured in the same way as a retrieved private path service gateway, and contains the + * information necessary to create the new private path service gateway. * - * @param listBackupPolicyJobsOptions the {@link ListBackupPolicyJobsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BackupPolicyJobCollection} + * @param createPrivatePathServiceGatewayOptions the {@link CreatePrivatePathServiceGatewayOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PrivatePathServiceGateway} */ - public ServiceCall listBackupPolicyJobs(ListBackupPolicyJobsOptions listBackupPolicyJobsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listBackupPolicyJobsOptions, - "listBackupPolicyJobsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("backup_policy_id", listBackupPolicyJobsOptions.backupPolicyId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/backup_policies/{backup_policy_id}/jobs", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listBackupPolicyJobs"); + public ServiceCall createPrivatePathServiceGateway(CreatePrivatePathServiceGatewayOptions createPrivatePathServiceGatewayOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createPrivatePathServiceGatewayOptions, + "createPrivatePathServiceGatewayOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createPrivatePathServiceGateway"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listBackupPolicyJobsOptions.status() != null) { - builder.query("status", String.valueOf(listBackupPolicyJobsOptions.status())); - } - if (listBackupPolicyJobsOptions.backupPolicyPlanId() != null) { - builder.query("backup_policy_plan.id", String.valueOf(listBackupPolicyJobsOptions.backupPolicyPlanId())); - } - if (listBackupPolicyJobsOptions.start() != null) { - builder.query("start", String.valueOf(listBackupPolicyJobsOptions.start())); - } - if (listBackupPolicyJobsOptions.limit() != null) { - builder.query("limit", String.valueOf(listBackupPolicyJobsOptions.limit())); - } - if (listBackupPolicyJobsOptions.sort() != null) { - builder.query("sort", String.valueOf(listBackupPolicyJobsOptions.sort())); + final JsonObject contentJson = new JsonObject(); + contentJson.add("load_balancer", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createPrivatePathServiceGatewayOptions.loadBalancer())); + contentJson.add("service_endpoints", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createPrivatePathServiceGatewayOptions.serviceEndpoints())); + if (createPrivatePathServiceGatewayOptions.defaultAccessPolicy() != null) { + contentJson.addProperty("default_access_policy", createPrivatePathServiceGatewayOptions.defaultAccessPolicy()); } - if (listBackupPolicyJobsOptions.sourceId() != null) { - builder.query("source.id", String.valueOf(listBackupPolicyJobsOptions.sourceId())); + if (createPrivatePathServiceGatewayOptions.name() != null) { + contentJson.addProperty("name", createPrivatePathServiceGatewayOptions.name()); } - if (listBackupPolicyJobsOptions.targetSnapshotsId() != null) { - builder.query("target_snapshots[].id", String.valueOf(listBackupPolicyJobsOptions.targetSnapshotsId())); + if (createPrivatePathServiceGatewayOptions.resourceGroup() != null) { + contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createPrivatePathServiceGatewayOptions.resourceGroup())); } - if (listBackupPolicyJobsOptions.targetSnapshotsCrn() != null) { - builder.query("target_snapshots[].crn", String.valueOf(listBackupPolicyJobsOptions.targetSnapshotsCrn())); + if (createPrivatePathServiceGatewayOptions.zonalAffinity() != null) { + contentJson.addProperty("zonal_affinity", createPrivatePathServiceGatewayOptions.zonalAffinity()); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a backup policy job. + * Create an account policy for a private path service gateway. * - * This request retrieves a single backup policy job specified by the identifier in the URL. + * This request creates an account policy from an account policy prototype object. The prototype object is structured + * in the same way as a retrieved account policy, and contains the information necessary to create the new account + * policy. * - * @param getBackupPolicyJobOptions the {@link GetBackupPolicyJobOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BackupPolicyJob} + * @param createPrivatePathServiceGatewayAccountPolicyOptions the {@link CreatePrivatePathServiceGatewayAccountPolicyOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PrivatePathServiceGatewayAccountPolicy} */ - public ServiceCall getBackupPolicyJob(GetBackupPolicyJobOptions getBackupPolicyJobOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getBackupPolicyJobOptions, - "getBackupPolicyJobOptions cannot be null"); + public ServiceCall createPrivatePathServiceGatewayAccountPolicy(CreatePrivatePathServiceGatewayAccountPolicyOptions createPrivatePathServiceGatewayAccountPolicyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createPrivatePathServiceGatewayAccountPolicyOptions, + "createPrivatePathServiceGatewayAccountPolicyOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("backup_policy_id", getBackupPolicyJobOptions.backupPolicyId()); - pathParamsMap.put("id", getBackupPolicyJobOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/backup_policies/{backup_policy_id}/jobs/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getBackupPolicyJob"); + pathParamsMap.put("private_path_service_gateway_id", createPrivatePathServiceGatewayAccountPolicyOptions.privatePathServiceGatewayId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{private_path_service_gateway_id}/account_policies", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createPrivatePathServiceGatewayAccountPolicy"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + final JsonObject contentJson = new JsonObject(); + contentJson.addProperty("access_policy", createPrivatePathServiceGatewayAccountPolicyOptions.accessPolicy()); + contentJson.add("account", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createPrivatePathServiceGatewayAccountPolicyOptions.account())); + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List plans for a backup policy. + * Delete a private path service gateway. * - * This request retrieves plans for a backup policy. Backup plans provide the backup schedule and deletion triggers. + * This request deletes a private path service gateway. For this request to succeed, the value of + * `endpoint_gateway_count` must be `0`. This operation cannot be reversed. * - * @param listBackupPolicyPlansOptions the {@link ListBackupPolicyPlansOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BackupPolicyPlanCollection} + * @param deletePrivatePathServiceGatewayOptions the {@link DeletePrivatePathServiceGatewayOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall listBackupPolicyPlans(ListBackupPolicyPlansOptions listBackupPolicyPlansOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listBackupPolicyPlansOptions, - "listBackupPolicyPlansOptions cannot be null"); + public ServiceCall deletePrivatePathServiceGateway(DeletePrivatePathServiceGatewayOptions deletePrivatePathServiceGatewayOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deletePrivatePathServiceGatewayOptions, + "deletePrivatePathServiceGatewayOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("backup_policy_id", listBackupPolicyPlansOptions.backupPolicyId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/backup_policies/{backup_policy_id}/plans", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listBackupPolicyPlans"); + pathParamsMap.put("id", deletePrivatePathServiceGatewayOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deletePrivatePathServiceGateway"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listBackupPolicyPlansOptions.name() != null) { - builder.query("name", String.valueOf(listBackupPolicyPlansOptions.name())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Create a plan for a backup policy. - * - * This request creates a new backup policy plan from a backup policy plan prototype object. The prototype object is - * structured in the same way as a retrieved backup policy plan, and contains the information necessary to create the - * new backup policy plan. - * - * Backups created by this plan will use the resource group of the source being backed up. + * Delete an account policy for a private path service gateway. * - * Backups created by this plan will use the plan's name truncated to 46 characters, followed by a unique 16-character - * suffix. + * This request deletes an account policy. This operation cannot be reversed and it does not affect the `status` of + * any existing endpoint gateway bindings. * - * @param createBackupPolicyPlanOptions the {@link CreateBackupPolicyPlanOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BackupPolicyPlan} + * @param deletePrivatePathServiceGatewayAccountPolicyOptions the {@link DeletePrivatePathServiceGatewayAccountPolicyOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall createBackupPolicyPlan(CreateBackupPolicyPlanOptions createBackupPolicyPlanOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createBackupPolicyPlanOptions, - "createBackupPolicyPlanOptions cannot be null"); + public ServiceCall deletePrivatePathServiceGatewayAccountPolicy(DeletePrivatePathServiceGatewayAccountPolicyOptions deletePrivatePathServiceGatewayAccountPolicyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deletePrivatePathServiceGatewayAccountPolicyOptions, + "deletePrivatePathServiceGatewayAccountPolicyOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("backup_policy_id", createBackupPolicyPlanOptions.backupPolicyId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/backup_policies/{backup_policy_id}/plans", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createBackupPolicyPlan"); + pathParamsMap.put("private_path_service_gateway_id", deletePrivatePathServiceGatewayAccountPolicyOptions.privatePathServiceGatewayId()); + pathParamsMap.put("id", deletePrivatePathServiceGatewayAccountPolicyOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{private_path_service_gateway_id}/account_policies/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deletePrivatePathServiceGatewayAccountPolicy"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("cron_spec", createBackupPolicyPlanOptions.cronSpec()); - if (createBackupPolicyPlanOptions.active() != null) { - contentJson.addProperty("active", createBackupPolicyPlanOptions.active()); - } - if (createBackupPolicyPlanOptions.attachUserTags() != null) { - contentJson.add("attach_user_tags", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createBackupPolicyPlanOptions.attachUserTags())); - } - if (createBackupPolicyPlanOptions.clonePolicy() != null) { - contentJson.add("clone_policy", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createBackupPolicyPlanOptions.clonePolicy())); - } - if (createBackupPolicyPlanOptions.copyUserTags() != null) { - contentJson.addProperty("copy_user_tags", createBackupPolicyPlanOptions.copyUserTags()); - } - if (createBackupPolicyPlanOptions.deletionTrigger() != null) { - contentJson.add("deletion_trigger", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createBackupPolicyPlanOptions.deletionTrigger())); - } - if (createBackupPolicyPlanOptions.name() != null) { - contentJson.addProperty("name", createBackupPolicyPlanOptions.name()); - } - if (createBackupPolicyPlanOptions.remoteRegionPolicies() != null) { - contentJson.add("remote_region_policies", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createBackupPolicyPlanOptions.remoteRegionPolicies())); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a backup policy plan. - * - * This request deletes a backup policy plan. This operation cannot be reversed. Any backups that have been created by - * the plan will remain but will no longer be subject to the plan's deletion trigger. Any running jobs associated with - * the plan will run to completion before the plan is deleted. + * Deny an endpoint gateway binding for a private path service gateway. * - * If the request is accepted, the backup policy plan `status` will be set to `deleting`. Once deletion processing - * completes, the backup policy plan will no longer be retrievable. + * This request denies a `pending` endpoint gateway request, and optionally sets the policy to deny future requests + * from the same account. * - * @param deleteBackupPolicyPlanOptions the {@link DeleteBackupPolicyPlanOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BackupPolicyPlan} + * @param denyPrivatePathServiceGatewayEndpointGatewayBindingOptions the {@link DenyPrivatePathServiceGatewayEndpointGatewayBindingOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall deleteBackupPolicyPlan(DeleteBackupPolicyPlanOptions deleteBackupPolicyPlanOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteBackupPolicyPlanOptions, - "deleteBackupPolicyPlanOptions cannot be null"); + public ServiceCall denyPrivatePathServiceGatewayEndpointGatewayBinding(DenyPrivatePathServiceGatewayEndpointGatewayBindingOptions denyPrivatePathServiceGatewayEndpointGatewayBindingOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(denyPrivatePathServiceGatewayEndpointGatewayBindingOptions, + "denyPrivatePathServiceGatewayEndpointGatewayBindingOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("backup_policy_id", deleteBackupPolicyPlanOptions.backupPolicyId()); - pathParamsMap.put("id", deleteBackupPolicyPlanOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/backup_policies/{backup_policy_id}/plans/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteBackupPolicyPlan"); + pathParamsMap.put("private_path_service_gateway_id", denyPrivatePathServiceGatewayEndpointGatewayBindingOptions.privatePathServiceGatewayId()); + pathParamsMap.put("id", denyPrivatePathServiceGatewayEndpointGatewayBindingOptions.id()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{private_path_service_gateway_id}/endpoint_gateway_bindings/{id}/deny", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "denyPrivatePathServiceGatewayEndpointGatewayBinding"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); - if (deleteBackupPolicyPlanOptions.ifMatch() != null) { - builder.header("If-Match", deleteBackupPolicyPlanOptions.ifMatch()); - } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + final JsonObject contentJson = new JsonObject(); + if (denyPrivatePathServiceGatewayEndpointGatewayBindingOptions.setAccountPolicy() != null) { + contentJson.addProperty("set_account_policy", denyPrivatePathServiceGatewayEndpointGatewayBindingOptions.setAccountPolicy()); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a backup policy plan. + * Retrieve a private path service gateway. * - * This request retrieves a single backup policy plan specified by the identifier in the URL. + * This request retrieves the private path service gateway specified by the identifier in the URL. * - * @param getBackupPolicyPlanOptions the {@link GetBackupPolicyPlanOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BackupPolicyPlan} + * @param getPrivatePathServiceGatewayOptions the {@link GetPrivatePathServiceGatewayOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PrivatePathServiceGateway} */ - public ServiceCall getBackupPolicyPlan(GetBackupPolicyPlanOptions getBackupPolicyPlanOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getBackupPolicyPlanOptions, - "getBackupPolicyPlanOptions cannot be null"); + public ServiceCall getPrivatePathServiceGateway(GetPrivatePathServiceGatewayOptions getPrivatePathServiceGatewayOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getPrivatePathServiceGatewayOptions, + "getPrivatePathServiceGatewayOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("backup_policy_id", getBackupPolicyPlanOptions.backupPolicyId()); - pathParamsMap.put("id", getBackupPolicyPlanOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/backup_policies/{backup_policy_id}/plans/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getBackupPolicyPlan"); + pathParamsMap.put("id", getPrivatePathServiceGatewayOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getPrivatePathServiceGateway"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a backup policy plan. + * Retrieve an account policy for a private path service gateway. * - * This request updates a backup policy plan with the information in a provided plan patch. The plan patch object is - * structured in the same way as a retrieved backup policy plan and can contains only the information to be updated. + * This request retrieves a single account policy specified by the identifier in the URL. * - * @param updateBackupPolicyPlanOptions the {@link UpdateBackupPolicyPlanOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BackupPolicyPlan} + * @param getPrivatePathServiceGatewayAccountPolicyOptions the {@link GetPrivatePathServiceGatewayAccountPolicyOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PrivatePathServiceGatewayAccountPolicy} */ - public ServiceCall updateBackupPolicyPlan(UpdateBackupPolicyPlanOptions updateBackupPolicyPlanOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateBackupPolicyPlanOptions, - "updateBackupPolicyPlanOptions cannot be null"); + public ServiceCall getPrivatePathServiceGatewayAccountPolicy(GetPrivatePathServiceGatewayAccountPolicyOptions getPrivatePathServiceGatewayAccountPolicyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getPrivatePathServiceGatewayAccountPolicyOptions, + "getPrivatePathServiceGatewayAccountPolicyOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("backup_policy_id", updateBackupPolicyPlanOptions.backupPolicyId()); - pathParamsMap.put("id", updateBackupPolicyPlanOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/backup_policies/{backup_policy_id}/plans/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateBackupPolicyPlan"); + pathParamsMap.put("private_path_service_gateway_id", getPrivatePathServiceGatewayAccountPolicyOptions.privatePathServiceGatewayId()); + pathParamsMap.put("id", getPrivatePathServiceGatewayAccountPolicyOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{private_path_service_gateway_id}/account_policies/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getPrivatePathServiceGatewayAccountPolicy"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); - if (updateBackupPolicyPlanOptions.ifMatch() != null) { - builder.header("If-Match", updateBackupPolicyPlanOptions.ifMatch()); - } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateBackupPolicyPlanOptions.backupPolicyPlanPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a backup policy. - * - * This request deletes a backup policy. This operation cannot be reversed. + * Retrieve an endpoint gateway binding for a private path service gateway. * - * If the request is accepted, the backup policy `status` will be set to `deleting`. Once deletion processing - * completes, the backup policy will no longer be retrievable. + * This request retrieves a single endpoint gateway binding specified by the identifier in the URL. * - * @param deleteBackupPolicyOptions the {@link DeleteBackupPolicyOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BackupPolicy} + * @param getPrivatePathServiceGatewayEndpointGatewayBindingOptions the {@link GetPrivatePathServiceGatewayEndpointGatewayBindingOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PrivatePathServiceGatewayEndpointGatewayBinding} */ - public ServiceCall deleteBackupPolicy(DeleteBackupPolicyOptions deleteBackupPolicyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteBackupPolicyOptions, - "deleteBackupPolicyOptions cannot be null"); + public ServiceCall getPrivatePathServiceGatewayEndpointGatewayBinding(GetPrivatePathServiceGatewayEndpointGatewayBindingOptions getPrivatePathServiceGatewayEndpointGatewayBindingOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getPrivatePathServiceGatewayEndpointGatewayBindingOptions, + "getPrivatePathServiceGatewayEndpointGatewayBindingOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteBackupPolicyOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/backup_policies/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteBackupPolicy"); + pathParamsMap.put("private_path_service_gateway_id", getPrivatePathServiceGatewayEndpointGatewayBindingOptions.privatePathServiceGatewayId()); + pathParamsMap.put("id", getPrivatePathServiceGatewayEndpointGatewayBindingOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{private_path_service_gateway_id}/endpoint_gateway_bindings/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getPrivatePathServiceGatewayEndpointGatewayBinding"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); - if (deleteBackupPolicyOptions.ifMatch() != null) { - builder.header("If-Match", deleteBackupPolicyOptions.ifMatch()); - } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a backup policy. + * List account policies for a private path service gateway. * - * This request retrieves a single backup policy specified by the identifier in the URL. + * This request lists account policies for a private path service gateway. Each policy defines how requests to use the + * private path service gateway from that account will be handled. * - * @param getBackupPolicyOptions the {@link GetBackupPolicyOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BackupPolicy} + * The account policies will be sorted by their `created_at` property values, with newest account policies first. + * Account policies with identical `created_at` property values will in turn be sorted by ascending `id` property + * values. + * + * @param listPrivatePathServiceGatewayAccountPoliciesOptions the {@link ListPrivatePathServiceGatewayAccountPoliciesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PrivatePathServiceGatewayAccountPolicyCollection} */ - public ServiceCall getBackupPolicy(GetBackupPolicyOptions getBackupPolicyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getBackupPolicyOptions, - "getBackupPolicyOptions cannot be null"); + public ServiceCall listPrivatePathServiceGatewayAccountPolicies(ListPrivatePathServiceGatewayAccountPoliciesOptions listPrivatePathServiceGatewayAccountPoliciesOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listPrivatePathServiceGatewayAccountPoliciesOptions, + "listPrivatePathServiceGatewayAccountPoliciesOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getBackupPolicyOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/backup_policies/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getBackupPolicy"); + pathParamsMap.put("private_path_service_gateway_id", listPrivatePathServiceGatewayAccountPoliciesOptions.privatePathServiceGatewayId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{private_path_service_gateway_id}/account_policies", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listPrivatePathServiceGatewayAccountPolicies"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listPrivatePathServiceGatewayAccountPoliciesOptions.start() != null) { + builder.query("start", String.valueOf(listPrivatePathServiceGatewayAccountPoliciesOptions.start())); + } + if (listPrivatePathServiceGatewayAccountPoliciesOptions.limit() != null) { + builder.query("limit", String.valueOf(listPrivatePathServiceGatewayAccountPoliciesOptions.limit())); + } + if (listPrivatePathServiceGatewayAccountPoliciesOptions.accountId() != null) { + builder.query("account.id", String.valueOf(listPrivatePathServiceGatewayAccountPoliciesOptions.accountId())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a backup policy. + * List endpoint gateway bindings for a private path service gateway. * - * This request updates a backup policy with the information in a provided backup policy patch. The backup policy - * patch object is structured in the same way as a retrieved backup policy and contains only the information to be - * updated. + * This request lists endpoint gateway bindings for a private path service gateway. Each endpoint gateway binding is + * implicitly created when an endpoint gateway is created targeting the private path service gateway. The associated + * account policy is applied to all new endpoint gateway bindings. If an associated account policy doesn't exist, the + * private path service gateway's `default_access_policy` is used. * - * @param updateBackupPolicyOptions the {@link UpdateBackupPolicyOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link BackupPolicy} + * The endpoint gateway bindings will be sorted by their `created_at` property values, with newest endpoint gateway + * bindings first. Endpoint gateway bindings with identical + * `created_at` property values will in turn be sorted by ascending `name` property values. + * + * @param listPrivatePathServiceGatewayEndpointGatewayBindingsOptions the {@link ListPrivatePathServiceGatewayEndpointGatewayBindingsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PrivatePathServiceGatewayEndpointGatewayBindingCollection} */ - public ServiceCall updateBackupPolicy(UpdateBackupPolicyOptions updateBackupPolicyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateBackupPolicyOptions, - "updateBackupPolicyOptions cannot be null"); + public ServiceCall listPrivatePathServiceGatewayEndpointGatewayBindings(ListPrivatePathServiceGatewayEndpointGatewayBindingsOptions listPrivatePathServiceGatewayEndpointGatewayBindingsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listPrivatePathServiceGatewayEndpointGatewayBindingsOptions, + "listPrivatePathServiceGatewayEndpointGatewayBindingsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateBackupPolicyOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/backup_policies/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateBackupPolicy"); + pathParamsMap.put("private_path_service_gateway_id", listPrivatePathServiceGatewayEndpointGatewayBindingsOptions.privatePathServiceGatewayId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{private_path_service_gateway_id}/endpoint_gateway_bindings", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listPrivatePathServiceGatewayEndpointGatewayBindings"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); - if (updateBackupPolicyOptions.ifMatch() != null) { - builder.header("If-Match", updateBackupPolicyOptions.ifMatch()); - } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateBackupPolicyOptions.backupPolicyPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listPrivatePathServiceGatewayEndpointGatewayBindingsOptions.start() != null) { + builder.query("start", String.valueOf(listPrivatePathServiceGatewayEndpointGatewayBindingsOptions.start())); + } + if (listPrivatePathServiceGatewayEndpointGatewayBindingsOptions.limit() != null) { + builder.query("limit", String.valueOf(listPrivatePathServiceGatewayEndpointGatewayBindingsOptions.limit())); + } + if (listPrivatePathServiceGatewayEndpointGatewayBindingsOptions.status() != null) { + builder.query("status", String.valueOf(listPrivatePathServiceGatewayEndpointGatewayBindingsOptions.status())); + } + if (listPrivatePathServiceGatewayEndpointGatewayBindingsOptions.accountId() != null) { + builder.query("account.id", String.valueOf(listPrivatePathServiceGatewayEndpointGatewayBindingsOptions.accountId())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List regions. + * List private path service gateways. * - * This request lists regions. Each region is a separate geographic area that contains multiple isolated zones. - * Resources can be provisioned into one or more zones in a region. Each zone is isolated, but connected to other - * zones in the same region with low-latency and high-bandwidth links. Regions represent the top-level of fault - * isolation available. Resources deployed within a single region also benefit from the low latency afforded by - * geographic proximity. + * This request lists private path service gateways in the region. Private path service gateways allow + * [service + * providers](https://cloud.ibm.com/docs/private-path?topic=private-path-private-path-service-architecture#private-path-service-components) + * to make their services available using + * [private path + * connectivity](https://cloud.ibm.com/docs/private-path?topic=private-path-private-path-service-architecture#private-path-service-components). + * Private path service gateways are used to facilitate and manage the private path connectivity between private path + * network load balancers and their associated endpoint gateways. * - * @param listRegionsOptions the {@link ListRegionsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link RegionCollection} + * @param listPrivatePathServiceGatewaysOptions the {@link ListPrivatePathServiceGatewaysOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PrivatePathServiceGatewayCollection} */ - public ServiceCall listRegions(ListRegionsOptions listRegionsOptions) { - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/regions")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listRegions"); + public ServiceCall listPrivatePathServiceGateways(ListPrivatePathServiceGatewaysOptions listPrivatePathServiceGatewaysOptions) { + if (listPrivatePathServiceGatewaysOptions == null) { + listPrivatePathServiceGatewaysOptions = new ListPrivatePathServiceGatewaysOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listPrivatePathServiceGateways"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listPrivatePathServiceGatewaysOptions.start() != null) { + builder.query("start", String.valueOf(listPrivatePathServiceGatewaysOptions.start())); + } + if (listPrivatePathServiceGatewaysOptions.limit() != null) { + builder.query("limit", String.valueOf(listPrivatePathServiceGatewaysOptions.limit())); + } + if (listPrivatePathServiceGatewaysOptions.resourceGroupId() != null) { + builder.query("resource_group.id", String.valueOf(listPrivatePathServiceGatewaysOptions.resourceGroupId())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List regions. + * List private path service gateways. * - * This request lists regions. Each region is a separate geographic area that contains multiple isolated zones. - * Resources can be provisioned into one or more zones in a region. Each zone is isolated, but connected to other - * zones in the same region with low-latency and high-bandwidth links. Regions represent the top-level of fault - * isolation available. Resources deployed within a single region also benefit from the low latency afforded by - * geographic proximity. + * This request lists private path service gateways in the region. Private path service gateways allow + * [service + * providers](https://cloud.ibm.com/docs/private-path?topic=private-path-private-path-service-architecture#private-path-service-components) + * to make their services available using + * [private path + * connectivity](https://cloud.ibm.com/docs/private-path?topic=private-path-private-path-service-architecture#private-path-service-components). + * Private path service gateways are used to facilitate and manage the private path connectivity between private path + * network load balancers and their associated endpoint gateways. * - * @return a {@link ServiceCall} with a result of type {@link RegionCollection} + * @return a {@link ServiceCall} with a result of type {@link PrivatePathServiceGatewayCollection} */ - public ServiceCall listRegions() { - return listRegions(null); + public ServiceCall listPrivatePathServiceGateways() { + return listPrivatePathServiceGateways(null); } /** - * Retrieve a region. + * Permit an endpoint gateway binding for a private path service gateway. * - * This request retrieves a single region specified by the name in the URL. + * This request permits a `pending` endpoint gateway request, and optionally sets the policy to permit future requests + * from the same account. * - * @param getRegionOptions the {@link GetRegionOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Region} + * @param permitPrivatePathServiceGatewayEndpointGatewayBindingOptions the {@link PermitPrivatePathServiceGatewayEndpointGatewayBindingOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall getRegion(GetRegionOptions getRegionOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getRegionOptions, - "getRegionOptions cannot be null"); + public ServiceCall permitPrivatePathServiceGatewayEndpointGatewayBinding(PermitPrivatePathServiceGatewayEndpointGatewayBindingOptions permitPrivatePathServiceGatewayEndpointGatewayBindingOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(permitPrivatePathServiceGatewayEndpointGatewayBindingOptions, + "permitPrivatePathServiceGatewayEndpointGatewayBindingOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("name", getRegionOptions.name()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/regions/{name}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getRegion"); + pathParamsMap.put("private_path_service_gateway_id", permitPrivatePathServiceGatewayEndpointGatewayBindingOptions.privatePathServiceGatewayId()); + pathParamsMap.put("id", permitPrivatePathServiceGatewayEndpointGatewayBindingOptions.id()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{private_path_service_gateway_id}/endpoint_gateway_bindings/{id}/permit", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "permitPrivatePathServiceGatewayEndpointGatewayBinding"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); - return createServiceCall(builder.build(), responseConverter); - } - + final JsonObject contentJson = new JsonObject(); + if (permitPrivatePathServiceGatewayEndpointGatewayBindingOptions.setAccountPolicy() != null) { + contentJson.addProperty("set_account_policy", permitPrivatePathServiceGatewayEndpointGatewayBindingOptions.setAccountPolicy()); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + return createServiceCall(builder.build(), responseConverter); + } + /** - * List zones in a region. + * Publish a private path service gateway. * - * This request lists zones in a region. Zones represent logically-isolated data centers with high-bandwidth and - * low-latency interconnects to other zones in the same region. Faults in a zone do not affect other zones. + * This request publishes a private path service gateway, allowing any account to request access to it. * - * @param listRegionZonesOptions the {@link ListRegionZonesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ZoneCollection} + * @param publishPrivatePathServiceGatewayOptions the {@link PublishPrivatePathServiceGatewayOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall listRegionZones(ListRegionZonesOptions listRegionZonesOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listRegionZonesOptions, - "listRegionZonesOptions cannot be null"); + public ServiceCall publishPrivatePathServiceGateway(PublishPrivatePathServiceGatewayOptions publishPrivatePathServiceGatewayOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(publishPrivatePathServiceGatewayOptions, + "publishPrivatePathServiceGatewayOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("region_name", listRegionZonesOptions.regionName()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/regions/{region_name}/zones", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listRegionZones"); + pathParamsMap.put("private_path_service_gateway_id", publishPrivatePathServiceGatewayOptions.privatePathServiceGatewayId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{private_path_service_gateway_id}/publish", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "publishPrivatePathServiceGateway"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a zone. + * Revoke access to a private path service gateway for an account. * - * This request retrieves a single zone specified by the region and zone names in the URL. + * This request revokes a consumer account. This operation cannot be reversed. The `status` of all endpoint gateway + * bindings associated with the specified private path service gateway become `denied`. If the specified account has + * an existing access policy, that policy will be updated to `denied`. Otherwise, a new `deny` access policy will be + * created for the account. * - * @param getRegionZoneOptions the {@link GetRegionZoneOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link Zone} + * @param revokeAccountForPrivatePathServiceGatewayOptions the {@link RevokeAccountForPrivatePathServiceGatewayOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall getRegionZone(GetRegionZoneOptions getRegionZoneOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getRegionZoneOptions, - "getRegionZoneOptions cannot be null"); + public ServiceCall revokeAccountForPrivatePathServiceGateway(RevokeAccountForPrivatePathServiceGatewayOptions revokeAccountForPrivatePathServiceGatewayOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(revokeAccountForPrivatePathServiceGatewayOptions, + "revokeAccountForPrivatePathServiceGatewayOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("region_name", getRegionZoneOptions.regionName()); - pathParamsMap.put("name", getRegionZoneOptions.name()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/regions/{region_name}/zones/{name}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getRegionZone"); + pathParamsMap.put("private_path_service_gateway_id", revokeAccountForPrivatePathServiceGatewayOptions.privatePathServiceGatewayId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{private_path_service_gateway_id}/revoke_account", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "revokeAccountForPrivatePathServiceGateway"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + final JsonObject contentJson = new JsonObject(); + contentJson.add("account", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(revokeAccountForPrivatePathServiceGatewayOptions.account())); + builder.bodyJson(contentJson); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * List virtual network interfaces. - * - * This request lists virtual network interfaces in the region. A virtual network interface is a logical abstraction - * of a virtual network interface in a subnet, and may be attached to a target resource. + * Unpublish a private path service gateway. * - * The virtual network interfaces will be sorted by their `created_at` property values, with newest virtual network - * interfaces first. Virtual network interfaces with identical - * `created_at` property values will in turn be sorted by ascending `name` property values. + * This request unpublishes a private path service gateway. For this request to succeed, any existing access from + * other accounts must first be revoked. Once unpublished, access will again be restricted to the account that created + * this private path service gateway. * - * @param listVirtualNetworkInterfacesOptions the {@link ListVirtualNetworkInterfacesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VirtualNetworkInterfaceCollection} + * @param unpublishPrivatePathServiceGatewayOptions the {@link UnpublishPrivatePathServiceGatewayOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall listVirtualNetworkInterfaces(ListVirtualNetworkInterfacesOptions listVirtualNetworkInterfacesOptions) { - if (listVirtualNetworkInterfacesOptions == null) { - listVirtualNetworkInterfacesOptions = new ListVirtualNetworkInterfacesOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVirtualNetworkInterfaces"); + public ServiceCall unpublishPrivatePathServiceGateway(UnpublishPrivatePathServiceGatewayOptions unpublishPrivatePathServiceGatewayOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(unpublishPrivatePathServiceGatewayOptions, + "unpublishPrivatePathServiceGatewayOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("private_path_service_gateway_id", unpublishPrivatePathServiceGatewayOptions.privatePathServiceGatewayId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{private_path_service_gateway_id}/unpublish", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "unpublishPrivatePathServiceGateway"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listVirtualNetworkInterfacesOptions.start() != null) { - builder.query("start", String.valueOf(listVirtualNetworkInterfacesOptions.start())); - } - if (listVirtualNetworkInterfacesOptions.limit() != null) { - builder.query("limit", String.valueOf(listVirtualNetworkInterfacesOptions.limit())); - } - if (listVirtualNetworkInterfacesOptions.resourceGroupId() != null) { - builder.query("resource_group.id", String.valueOf(listVirtualNetworkInterfacesOptions.resourceGroupId())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * List virtual network interfaces. - * - * This request lists virtual network interfaces in the region. A virtual network interface is a logical abstraction - * of a virtual network interface in a subnet, and may be attached to a target resource. - * - * The virtual network interfaces will be sorted by their `created_at` property values, with newest virtual network - * interfaces first. Virtual network interfaces with identical - * `created_at` property values will in turn be sorted by ascending `name` property values. - * - * @return a {@link ServiceCall} with a result of type {@link VirtualNetworkInterfaceCollection} - */ - public ServiceCall listVirtualNetworkInterfaces() { - return listVirtualNetworkInterfaces(null); - } - - /** - * Create a virtual network interface. + * Update a private path service gateway. * - * This request creates a new virtual network interface from a virtual network interface prototype object. The - * prototype object is structured in the same way as a retrieved virtual network interface, and contains the - * information necessary to create the new virtual network interface. + * This request updates a private path service gateway with the information provided in a private path service gateway + * patch object. The private path service gateway patch object is structured in the same way as a retrieved private + * path service gateway and contains only the information to be updated. * - * @param createVirtualNetworkInterfaceOptions the {@link CreateVirtualNetworkInterfaceOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VirtualNetworkInterface} + * @param updatePrivatePathServiceGatewayOptions the {@link UpdatePrivatePathServiceGatewayOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PrivatePathServiceGateway} */ - public ServiceCall createVirtualNetworkInterface(CreateVirtualNetworkInterfaceOptions createVirtualNetworkInterfaceOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createVirtualNetworkInterfaceOptions, - "createVirtualNetworkInterfaceOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createVirtualNetworkInterface"); + public ServiceCall updatePrivatePathServiceGateway(UpdatePrivatePathServiceGatewayOptions updatePrivatePathServiceGatewayOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updatePrivatePathServiceGatewayOptions, + "updatePrivatePathServiceGatewayOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", updatePrivatePathServiceGatewayOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updatePrivatePathServiceGateway"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - if (createVirtualNetworkInterfaceOptions.allowIpSpoofing() != null) { - contentJson.addProperty("allow_ip_spoofing", createVirtualNetworkInterfaceOptions.allowIpSpoofing()); - } - if (createVirtualNetworkInterfaceOptions.autoDelete() != null) { - contentJson.addProperty("auto_delete", createVirtualNetworkInterfaceOptions.autoDelete()); - } - if (createVirtualNetworkInterfaceOptions.enableInfrastructureNat() != null) { - contentJson.addProperty("enable_infrastructure_nat", createVirtualNetworkInterfaceOptions.enableInfrastructureNat()); - } - if (createVirtualNetworkInterfaceOptions.ips() != null) { - contentJson.add("ips", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVirtualNetworkInterfaceOptions.ips())); - } - if (createVirtualNetworkInterfaceOptions.name() != null) { - contentJson.addProperty("name", createVirtualNetworkInterfaceOptions.name()); - } - if (createVirtualNetworkInterfaceOptions.primaryIp() != null) { - contentJson.add("primary_ip", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVirtualNetworkInterfaceOptions.primaryIp())); - } - if (createVirtualNetworkInterfaceOptions.protocolStateFilteringMode() != null) { - contentJson.addProperty("protocol_state_filtering_mode", createVirtualNetworkInterfaceOptions.protocolStateFilteringMode()); - } - if (createVirtualNetworkInterfaceOptions.resourceGroup() != null) { - contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVirtualNetworkInterfaceOptions.resourceGroup())); - } - if (createVirtualNetworkInterfaceOptions.securityGroups() != null) { - contentJson.add("security_groups", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVirtualNetworkInterfaceOptions.securityGroups())); - } - if (createVirtualNetworkInterfaceOptions.subnet() != null) { - contentJson.add("subnet", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVirtualNetworkInterfaceOptions.subnet())); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updatePrivatePathServiceGatewayOptions.privatePathServiceGatewayPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create a virtual network interface. - * - * This request creates a new virtual network interface from a virtual network interface prototype object. The - * prototype object is structured in the same way as a retrieved virtual network interface, and contains the - * information necessary to create the new virtual network interface. - * - * @return a {@link ServiceCall} with a result of type {@link VirtualNetworkInterface} - */ - public ServiceCall createVirtualNetworkInterface() { - return createVirtualNetworkInterface(null); - } - - /** - * Delete a virtual network interface. + * Update an account policy for a private path service gateway. * - * This request deletes a virtual network interface. This operation cannot be reversed. For this request to succeed, - * the virtual network interface must not be required by another resource, such as the primary network attachment for - * an instance. + * This request updates an account policy with the information in a provided account policy patch. The account policy + * patch object is structured in the same way as a retrieved account policy and contains only the information to be + * updated. * - * @param deleteVirtualNetworkInterfacesOptions the {@link DeleteVirtualNetworkInterfacesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VirtualNetworkInterface} + * @param updatePrivatePathServiceGatewayAccountPolicyOptions the {@link UpdatePrivatePathServiceGatewayAccountPolicyOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PrivatePathServiceGatewayAccountPolicy} */ - public ServiceCall deleteVirtualNetworkInterfaces(DeleteVirtualNetworkInterfacesOptions deleteVirtualNetworkInterfacesOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVirtualNetworkInterfacesOptions, - "deleteVirtualNetworkInterfacesOptions cannot be null"); + public ServiceCall updatePrivatePathServiceGatewayAccountPolicy(UpdatePrivatePathServiceGatewayAccountPolicyOptions updatePrivatePathServiceGatewayAccountPolicyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updatePrivatePathServiceGatewayAccountPolicyOptions, + "updatePrivatePathServiceGatewayAccountPolicyOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteVirtualNetworkInterfacesOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVirtualNetworkInterfaces"); + pathParamsMap.put("private_path_service_gateway_id", updatePrivatePathServiceGatewayAccountPolicyOptions.privatePathServiceGatewayId()); + pathParamsMap.put("id", updatePrivatePathServiceGatewayAccountPolicyOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{private_path_service_gateway_id}/account_policies/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updatePrivatePathServiceGatewayAccountPolicy"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updatePrivatePathServiceGatewayAccountPolicyOptions.privatePathServiceGatewayAccountPolicyPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a virtual network interface. + * Create a public address range. * - * This request retrieves a single virtual network interface specified by the identifier in the URL. + * This request creates a new public address range from a public address range prototype object. The prototype object + * is structured in the same way as a retrieved public address range, and contains the information necessary to create + * the new public address range. * - * @param getVirtualNetworkInterfaceOptions the {@link GetVirtualNetworkInterfaceOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VirtualNetworkInterface} + * @param createPublicAddressRangeOptions the {@link CreatePublicAddressRangeOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PublicAddressRange} */ - public ServiceCall getVirtualNetworkInterface(GetVirtualNetworkInterfaceOptions getVirtualNetworkInterfaceOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getVirtualNetworkInterfaceOptions, - "getVirtualNetworkInterfaceOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getVirtualNetworkInterfaceOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVirtualNetworkInterface"); + public ServiceCall createPublicAddressRange(CreatePublicAddressRangeOptions createPublicAddressRangeOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createPublicAddressRangeOptions, + "createPublicAddressRangeOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/public_address_ranges")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createPublicAddressRange"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Update a virtual network interface. - * - * This request updates a virtual network interface with the information in a provided virtual network interface - * patch. The virtual network interface patch object is structured in the same way as a retrieved virtual network - * interface and contains only the information to be updated. - * - * @param updateVirtualNetworkInterfaceOptions the {@link UpdateVirtualNetworkInterfaceOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VirtualNetworkInterface} - */ - public ServiceCall updateVirtualNetworkInterface(UpdateVirtualNetworkInterfaceOptions updateVirtualNetworkInterfaceOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateVirtualNetworkInterfaceOptions, - "updateVirtualNetworkInterfaceOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateVirtualNetworkInterfaceOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateVirtualNetworkInterface"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); + final JsonObject contentJson = new JsonObject(); + contentJson.addProperty("ipv4_address_count", createPublicAddressRangeOptions.ipv4AddressCount()); + if (createPublicAddressRangeOptions.name() != null) { + contentJson.addProperty("name", createPublicAddressRangeOptions.name()); } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateVirtualNetworkInterfaceOptions.virtualNetworkInterfacePatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (createPublicAddressRangeOptions.resourceGroup() != null) { + contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createPublicAddressRangeOptions.resourceGroup())); + } + if (createPublicAddressRangeOptions.target() != null) { + contentJson.add("target", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createPublicAddressRangeOptions.target())); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List floating IPs associated with a virtual network interface. + * Delete a public address range. * - * This request lists floating IPs associated with a virtual network interface. + * This request deletes a public address range. If the public address range is bound to a + * `target`, it will be unbound. This operation cannot be reversed. * - * @param listNetworkInterfaceFloatingIpsOptions the {@link ListNetworkInterfaceFloatingIpsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link FloatingIPCollectionVirtualNetworkInterfaceContext} + * @param deletePublicAddressRangeOptions the {@link DeletePublicAddressRangeOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PublicAddressRange} */ - public ServiceCall listNetworkInterfaceFloatingIps(ListNetworkInterfaceFloatingIpsOptions listNetworkInterfaceFloatingIpsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listNetworkInterfaceFloatingIpsOptions, - "listNetworkInterfaceFloatingIpsOptions cannot be null"); + public ServiceCall deletePublicAddressRange(DeletePublicAddressRangeOptions deletePublicAddressRangeOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deletePublicAddressRangeOptions, + "deletePublicAddressRangeOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("virtual_network_interface_id", listNetworkInterfaceFloatingIpsOptions.virtualNetworkInterfaceId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces/{virtual_network_interface_id}/floating_ips", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listNetworkInterfaceFloatingIps"); + pathParamsMap.put("id", deletePublicAddressRangeOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/public_address_ranges/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deletePublicAddressRange"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listNetworkInterfaceFloatingIpsOptions.start() != null) { - builder.query("start", String.valueOf(listNetworkInterfaceFloatingIpsOptions.start())); - } - if (listNetworkInterfaceFloatingIpsOptions.limit() != null) { - builder.query("limit", String.valueOf(listNetworkInterfaceFloatingIpsOptions.limit())); - } - if (listNetworkInterfaceFloatingIpsOptions.sort() != null) { - builder.query("sort", String.valueOf(listNetworkInterfaceFloatingIpsOptions.sort())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Disassociate a floating IP from a virtual network interface. + * Retrieve a public address range. * - * This request disassociates the specified floating IP from the specified virtual network interface. + * This request retrieves a single public address range specified by the identifier in the URL. * - * @param removeNetworkInterfaceFloatingIpOptions the {@link RemoveNetworkInterfaceFloatingIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param getPublicAddressRangeOptions the {@link GetPublicAddressRangeOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PublicAddressRange} */ - public ServiceCall removeNetworkInterfaceFloatingIp(RemoveNetworkInterfaceFloatingIpOptions removeNetworkInterfaceFloatingIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(removeNetworkInterfaceFloatingIpOptions, - "removeNetworkInterfaceFloatingIpOptions cannot be null"); + public ServiceCall getPublicAddressRange(GetPublicAddressRangeOptions getPublicAddressRangeOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getPublicAddressRangeOptions, + "getPublicAddressRangeOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("virtual_network_interface_id", removeNetworkInterfaceFloatingIpOptions.virtualNetworkInterfaceId()); - pathParamsMap.put("id", removeNetworkInterfaceFloatingIpOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces/{virtual_network_interface_id}/floating_ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "removeNetworkInterfaceFloatingIp"); + pathParamsMap.put("id", getPublicAddressRangeOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/public_address_ranges/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getPublicAddressRange"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve associated floating IP. + * List public address ranges. * - * This request retrieves a specified floating IP if it is associated with the virtual network interface specified in - * the URL. + * This request lists [public address ranges](https://cloud.ibm.com/docs/vpc?topic=vpc-about-par) in the region. A + * public address range is a contiguous block of public IP addresses that can be bound to a `target` that specifies a + * `vpc` and a `zone`. Incoming traffic for these IP addresses will be routed according to the VPC's ingress routing + * table. * - * @param getNetworkInterfaceFloatingIpOptions the {@link GetNetworkInterfaceFloatingIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link FloatingIPReference} + * @param listPublicAddressRangesOptions the {@link ListPublicAddressRangesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PublicAddressRangeCollection} */ - public ServiceCall getNetworkInterfaceFloatingIp(GetNetworkInterfaceFloatingIpOptions getNetworkInterfaceFloatingIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getNetworkInterfaceFloatingIpOptions, - "getNetworkInterfaceFloatingIpOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("virtual_network_interface_id", getNetworkInterfaceFloatingIpOptions.virtualNetworkInterfaceId()); - pathParamsMap.put("id", getNetworkInterfaceFloatingIpOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces/{virtual_network_interface_id}/floating_ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getNetworkInterfaceFloatingIp"); + public ServiceCall listPublicAddressRanges(ListPublicAddressRangesOptions listPublicAddressRangesOptions) { + if (listPublicAddressRangesOptions == null) { + listPublicAddressRangesOptions = new ListPublicAddressRangesOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/public_address_ranges")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listPublicAddressRanges"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listPublicAddressRangesOptions.start() != null) { + builder.query("start", String.valueOf(listPublicAddressRangesOptions.start())); + } + if (listPublicAddressRangesOptions.limit() != null) { + builder.query("limit", String.valueOf(listPublicAddressRangesOptions.limit())); + } + if (listPublicAddressRangesOptions.resourceGroupId() != null) { + builder.query("resource_group.id", String.valueOf(listPublicAddressRangesOptions.resourceGroupId())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Add an association between a floating IP and a virtual network interface. - * - * This request adds an association between the specified floating IP and the specified virtual network interface. - * - * If the virtual network interface has `enable_infrastructure_nat` set to `true`, no more than one floating IP can be - * associated, and network address translation is performed between the floating IP address and the virtual network - * interface's `primary_ip` address. - * - * If the virtual network interface has `enable_infrastructure_nat` set to `false`, packets are passed unchanged - * to/from the virtual network interface. + * List public address ranges. * - * The floating IP must: - * - be in the same `zone` as the virtual network interface - * - not currently be associated with another resource + * This request lists [public address ranges](https://cloud.ibm.com/docs/vpc?topic=vpc-about-par) in the region. A + * public address range is a contiguous block of public IP addresses that can be bound to a `target` that specifies a + * `vpc` and a `zone`. Incoming traffic for these IP addresses will be routed according to the VPC's ingress routing + * table. * - * The virtual network interface's `target` must not currently be a file share mount target. + * @return a {@link ServiceCall} with a result of type {@link PublicAddressRangeCollection} + */ + public ServiceCall listPublicAddressRanges() { + return listPublicAddressRanges(null); + } + + /** + * Update a public address range. * - * A request body is not required, and if provided, is ignored. + * This request updates a public address range with the information in a provided public address range patch. The + * public address range patch object is structured in the same way as a retrieved public address range and contains + * only the information to be updated. * - * @param addNetworkInterfaceFloatingIpOptions the {@link AddNetworkInterfaceFloatingIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link FloatingIPReference} + * @param updatePublicAddressRangeOptions the {@link UpdatePublicAddressRangeOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PublicAddressRange} */ - public ServiceCall addNetworkInterfaceFloatingIp(AddNetworkInterfaceFloatingIpOptions addNetworkInterfaceFloatingIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(addNetworkInterfaceFloatingIpOptions, - "addNetworkInterfaceFloatingIpOptions cannot be null"); + public ServiceCall updatePublicAddressRange(UpdatePublicAddressRangeOptions updatePublicAddressRangeOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updatePublicAddressRangeOptions, + "updatePublicAddressRangeOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("virtual_network_interface_id", addNetworkInterfaceFloatingIpOptions.virtualNetworkInterfaceId()); - pathParamsMap.put("id", addNetworkInterfaceFloatingIpOptions.id()); - RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces/{virtual_network_interface_id}/floating_ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "addNetworkInterfaceFloatingIp"); + pathParamsMap.put("id", updatePublicAddressRangeOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/public_address_ranges/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updatePublicAddressRange"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updatePublicAddressRangeOptions.publicAddressRangePatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List reserved IPs bound to a virtual network interface. + * Create a public gateway. * - * This request lists reserved IPs bound to a virtual network interface. + * This request creates a new public gateway from a public gateway prototype object. For this to succeed, the VPC must + * not already have a public gateway in the specified zone. * - * @param listVirtualNetworkInterfaceIpsOptions the {@link ListVirtualNetworkInterfaceIpsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ReservedIPCollectionVirtualNetworkInterfaceContext} + * If a floating IP is provided, it must be unbound. If a floating IP is not provided, one will be created and bound + * to the public gateway. Once a public gateway has been created, its floating IP cannot be unbound. A public gateway + * must be explicitly attached to each subnet it will provide connectivity for. + * + * @param createPublicGatewayOptions the {@link CreatePublicGatewayOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PublicGateway} */ - public ServiceCall listVirtualNetworkInterfaceIps(ListVirtualNetworkInterfaceIpsOptions listVirtualNetworkInterfaceIpsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listVirtualNetworkInterfaceIpsOptions, - "listVirtualNetworkInterfaceIpsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("virtual_network_interface_id", listVirtualNetworkInterfaceIpsOptions.virtualNetworkInterfaceId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces/{virtual_network_interface_id}/ips", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVirtualNetworkInterfaceIps"); + public ServiceCall createPublicGateway(CreatePublicGatewayOptions createPublicGatewayOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createPublicGatewayOptions, + "createPublicGatewayOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/public_gateways")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createPublicGateway"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listVirtualNetworkInterfaceIpsOptions.start() != null) { - builder.query("start", String.valueOf(listVirtualNetworkInterfaceIpsOptions.start())); + final JsonObject contentJson = new JsonObject(); + contentJson.add("vpc", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createPublicGatewayOptions.vpc())); + contentJson.add("zone", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createPublicGatewayOptions.zone())); + if (createPublicGatewayOptions.floatingIp() != null) { + contentJson.add("floating_ip", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createPublicGatewayOptions.floatingIp())); } - if (listVirtualNetworkInterfaceIpsOptions.limit() != null) { - builder.query("limit", String.valueOf(listVirtualNetworkInterfaceIpsOptions.limit())); + if (createPublicGatewayOptions.name() != null) { + contentJson.addProperty("name", createPublicGatewayOptions.name()); } - if (listVirtualNetworkInterfaceIpsOptions.sort() != null) { - builder.query("sort", String.valueOf(listVirtualNetworkInterfaceIpsOptions.sort())); + if (createPublicGatewayOptions.resourceGroup() != null) { + contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createPublicGatewayOptions.resourceGroup())); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Unbind a reserved IP from a virtual network interface. - * - * This request unbinds the specified reserved IP from the specified virtual network interface. If the reserved IP has - * `auto_delete` set to `true`, the reserved IP will be deleted. + * Delete a public gateway. * - * The reserved IP for the `primary_ip` cannot be unbound. + * This request deletes a public gateway. This operation cannot be reversed. For this request to succeed, the public + * gateway must not be attached to any subnets. The public gateway's floating IP will be automatically unbound. If the + * floating IP was created when the public gateway was created, it will be deleted. * - * @param removeVirtualNetworkInterfaceIpOptions the {@link RemoveVirtualNetworkInterfaceIpOptions} containing the options for the call + * @param deletePublicGatewayOptions the {@link DeletePublicGatewayOptions} containing the options for the call * @return a {@link ServiceCall} with a void result */ - public ServiceCall removeVirtualNetworkInterfaceIp(RemoveVirtualNetworkInterfaceIpOptions removeVirtualNetworkInterfaceIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(removeVirtualNetworkInterfaceIpOptions, - "removeVirtualNetworkInterfaceIpOptions cannot be null"); + public ServiceCall deletePublicGateway(DeletePublicGatewayOptions deletePublicGatewayOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deletePublicGatewayOptions, + "deletePublicGatewayOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("virtual_network_interface_id", removeVirtualNetworkInterfaceIpOptions.virtualNetworkInterfaceId()); - pathParamsMap.put("id", removeVirtualNetworkInterfaceIpOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces/{virtual_network_interface_id}/ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "removeVirtualNetworkInterfaceIp"); + pathParamsMap.put("id", deletePublicGatewayOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/public_gateways/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deletePublicGateway"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } @@ -9674,940 +9549,927 @@ public ServiceCall removeVirtualNetworkInterfaceIp(RemoveVirtualNetworkInt } /** - * Retrieve bound reserved IP. + * Retrieve a public gateway. * - * This request retrieves the specified reserved IP address if it is bound to the virtual network interface specified - * in the URL. + * This request retrieves a single public gateway specified by the identifier in the URL. * - * @param getVirtualNetworkInterfaceIpOptions the {@link GetVirtualNetworkInterfaceIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ReservedIPReference} + * @param getPublicGatewayOptions the {@link GetPublicGatewayOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PublicGateway} */ - public ServiceCall getVirtualNetworkInterfaceIp(GetVirtualNetworkInterfaceIpOptions getVirtualNetworkInterfaceIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getVirtualNetworkInterfaceIpOptions, - "getVirtualNetworkInterfaceIpOptions cannot be null"); + public ServiceCall getPublicGateway(GetPublicGatewayOptions getPublicGatewayOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getPublicGatewayOptions, + "getPublicGatewayOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("virtual_network_interface_id", getVirtualNetworkInterfaceIpOptions.virtualNetworkInterfaceId()); - pathParamsMap.put("id", getVirtualNetworkInterfaceIpOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces/{virtual_network_interface_id}/ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVirtualNetworkInterfaceIp"); + pathParamsMap.put("id", getPublicGatewayOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/public_gateways/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getPublicGateway"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Bind a reserved IP to a virtual network interface. - * - * This request binds the specified reserved IP to the specified virtual network interface. + * List public gateways. * - * The reserved IP must currently be unbound and in the primary IP's subnet. The virtual network interface's `target` - * must not currently be a file share mount target. + * This request lists public gateways in the region. A public gateway is a virtual network device associated with a + * VPC, which allows access to the Internet. A public gateway resides in a zone and can be connected to subnets in the + * same zone only. * - * @param addVirtualNetworkInterfaceIpOptions the {@link AddVirtualNetworkInterfaceIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ReservedIPReference} + * @param listPublicGatewaysOptions the {@link ListPublicGatewaysOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PublicGatewayCollection} */ - public ServiceCall addVirtualNetworkInterfaceIp(AddVirtualNetworkInterfaceIpOptions addVirtualNetworkInterfaceIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(addVirtualNetworkInterfaceIpOptions, - "addVirtualNetworkInterfaceIpOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("virtual_network_interface_id", addVirtualNetworkInterfaceIpOptions.virtualNetworkInterfaceId()); - pathParamsMap.put("id", addVirtualNetworkInterfaceIpOptions.id()); - RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces/{virtual_network_interface_id}/ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "addVirtualNetworkInterfaceIp"); + public ServiceCall listPublicGateways(ListPublicGatewaysOptions listPublicGatewaysOptions) { + if (listPublicGatewaysOptions == null) { + listPublicGatewaysOptions = new ListPublicGatewaysOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/public_gateways")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listPublicGateways"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listPublicGatewaysOptions.start() != null) { + builder.query("start", String.valueOf(listPublicGatewaysOptions.start())); + } + if (listPublicGatewaysOptions.limit() != null) { + builder.query("limit", String.valueOf(listPublicGatewaysOptions.limit())); + } + if (listPublicGatewaysOptions.resourceGroupId() != null) { + builder.query("resource_group.id", String.valueOf(listPublicGatewaysOptions.resourceGroupId())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List cluster network profiles. + * List public gateways. * - * This request lists cluster network profiles available in the region. A cluster network profile specifies the - * performance characteristics and capabilities for a cluster network. + * This request lists public gateways in the region. A public gateway is a virtual network device associated with a + * VPC, which allows access to the Internet. A public gateway resides in a zone and can be connected to subnets in the + * same zone only. * - * @param listClusterNetworkProfilesOptions the {@link ListClusterNetworkProfilesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkProfileCollection} + * @return a {@link ServiceCall} with a result of type {@link PublicGatewayCollection} */ - public ServiceCall listClusterNetworkProfiles(ListClusterNetworkProfilesOptions listClusterNetworkProfilesOptions) { - if (listClusterNetworkProfilesOptions == null) { - listClusterNetworkProfilesOptions = new ListClusterNetworkProfilesOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_network/profiles")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listClusterNetworkProfiles"); + public ServiceCall listPublicGateways() { + return listPublicGateways(null); + } + + /** + * Update a public gateway. + * + * This request updates a public gateway's name. + * + * @param updatePublicGatewayOptions the {@link UpdatePublicGatewayOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PublicGateway} + */ + public ServiceCall updatePublicGateway(UpdatePublicGatewayOptions updatePublicGatewayOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updatePublicGatewayOptions, + "updatePublicGatewayOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", updatePublicGatewayOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/public_gateways/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updatePublicGateway"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listClusterNetworkProfilesOptions.start() != null) { - builder.query("start", String.valueOf(listClusterNetworkProfilesOptions.start())); - } - if (listClusterNetworkProfilesOptions.limit() != null) { - builder.query("limit", String.valueOf(listClusterNetworkProfilesOptions.limit())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updatePublicGatewayOptions.publicGatewayPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List cluster network profiles. - * - * This request lists cluster network profiles available in the region. A cluster network profile specifies the - * performance characteristics and capabilities for a cluster network. - * - * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkProfileCollection} - */ - public ServiceCall listClusterNetworkProfiles() { - return listClusterNetworkProfiles(null); - } - - /** - * Retrieve a cluster network profile. + * Activate a reservation. * - * This request retrieves a single cluster network profile specified by the name in the URL. + * This request activates a reservation. For this request to succeed, the reservation status must be `inactive`. * - * @param getClusterNetworkProfileOptions the {@link GetClusterNetworkProfileOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkProfile} + * @param activateReservationOptions the {@link ActivateReservationOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall getClusterNetworkProfile(GetClusterNetworkProfileOptions getClusterNetworkProfileOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getClusterNetworkProfileOptions, - "getClusterNetworkProfileOptions cannot be null"); + public ServiceCall activateReservation(ActivateReservationOptions activateReservationOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(activateReservationOptions, + "activateReservationOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("name", getClusterNetworkProfileOptions.name()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_network/profiles/{name}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getClusterNetworkProfile"); + pathParamsMap.put("id", activateReservationOptions.id()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/reservations/{id}/activate", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "activateReservation"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * List cluster networks. + * Create a reservation. * - * This request lists [cluster networks](https://cloud.ibm.com/docs/vpc?topic=vpc-about-cluster-network) in the - * region. A cluster network is a grouping of resources in a separate networking space for high performance computing - * and networking. + * This request creates a new reservation from a reservation prototype object. The prototype object is structured in + * the same way as a retrieved reservation, and contains the information necessary to create the new reservation. * - * @param listClusterNetworksOptions the {@link ListClusterNetworksOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkCollection} + * @param createReservationOptions the {@link CreateReservationOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Reservation} */ - public ServiceCall listClusterNetworks(ListClusterNetworksOptions listClusterNetworksOptions) { - if (listClusterNetworksOptions == null) { - listClusterNetworksOptions = new ListClusterNetworksOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listClusterNetworks"); + public ServiceCall createReservation(CreateReservationOptions createReservationOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createReservationOptions, + "createReservationOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/reservations")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createReservation"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listClusterNetworksOptions.start() != null) { - builder.query("start", String.valueOf(listClusterNetworksOptions.start())); - } - if (listClusterNetworksOptions.limit() != null) { - builder.query("limit", String.valueOf(listClusterNetworksOptions.limit())); - } - if (listClusterNetworksOptions.resourceGroupId() != null) { - builder.query("resource_group.id", String.valueOf(listClusterNetworksOptions.resourceGroupId())); - } - if (listClusterNetworksOptions.name() != null) { - builder.query("name", String.valueOf(listClusterNetworksOptions.name())); - } - if (listClusterNetworksOptions.sort() != null) { - builder.query("sort", String.valueOf(listClusterNetworksOptions.sort())); - } - if (listClusterNetworksOptions.vpcId() != null) { - builder.query("vpc.id", String.valueOf(listClusterNetworksOptions.vpcId())); + final JsonObject contentJson = new JsonObject(); + contentJson.add("capacity", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createReservationOptions.capacity())); + contentJson.add("committed_use", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createReservationOptions.committedUse())); + contentJson.add("profile", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createReservationOptions.profile())); + contentJson.add("zone", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createReservationOptions.zone())); + if (createReservationOptions.affinityPolicy() != null) { + contentJson.addProperty("affinity_policy", createReservationOptions.affinityPolicy()); } - if (listClusterNetworksOptions.vpcCrn() != null) { - builder.query("vpc.crn", String.valueOf(listClusterNetworksOptions.vpcCrn())); + if (createReservationOptions.name() != null) { + contentJson.addProperty("name", createReservationOptions.name()); } - if (listClusterNetworksOptions.vpcName() != null) { - builder.query("vpc.name", String.valueOf(listClusterNetworksOptions.vpcName())); + if (createReservationOptions.resourceGroup() != null) { + contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createReservationOptions.resourceGroup())); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List cluster networks. + * Delete a reservation. * - * This request lists [cluster networks](https://cloud.ibm.com/docs/vpc?topic=vpc-about-cluster-network) in the - * region. A cluster network is a grouping of resources in a separate networking space for high performance computing - * and networking. + * This request deletes a reservation. This operation cannot be reversed. Reservations with a `status` of `active` are + * not allowed to be deleted. * - * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkCollection} + * @param deleteReservationOptions the {@link DeleteReservationOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Reservation} */ - public ServiceCall listClusterNetworks() { - return listClusterNetworks(null); + public ServiceCall deleteReservation(DeleteReservationOptions deleteReservationOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteReservationOptions, + "deleteReservationOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", deleteReservationOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/reservations/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteReservation"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + builder.query("generation", String.valueOf(this.generation)); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + return createServiceCall(builder.build(), responseConverter); } /** - * Create a cluster network. + * Retrieve a reservation. * - * This request creates a new cluster network from a cluster network prototype object. The prototype object is - * structured in the same way as a retrieved cluster network, and contains the information necessary to create the new - * cluster network. + * This request retrieves a single reservation specified by identifier in the URL. * - * @param createClusterNetworkOptions the {@link CreateClusterNetworkOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ClusterNetwork} + * @param getReservationOptions the {@link GetReservationOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Reservation} */ - public ServiceCall createClusterNetwork(CreateClusterNetworkOptions createClusterNetworkOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createClusterNetworkOptions, - "createClusterNetworkOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createClusterNetwork"); + public ServiceCall getReservation(GetReservationOptions getReservationOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getReservationOptions, + "getReservationOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", getReservationOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/reservations/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getReservation"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.add("profile", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createClusterNetworkOptions.profile())); - contentJson.add("vpc", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createClusterNetworkOptions.vpc())); - contentJson.add("zone", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createClusterNetworkOptions.zone())); - if (createClusterNetworkOptions.name() != null) { - contentJson.addProperty("name", createClusterNetworkOptions.name()); - } - if (createClusterNetworkOptions.resourceGroup() != null) { - contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createClusterNetworkOptions.resourceGroup())); - } - if (createClusterNetworkOptions.subnetPrefixes() != null) { - contentJson.add("subnet_prefixes", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createClusterNetworkOptions.subnetPrefixes())); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List cluster network interfaces. + * List reservations. * - * This request lists cluster network interfaces in the region. A cluster network interface is a logical abstraction - * of a cluster network interface in a subnet, and may be attached to a target resource. + * This request lists reservations in the region. A reservation provides reserved capacity for a specified profile in + * a specified zone. A reservation can also include a long-term committed use discount. * - * The cluster network interfaces will be sorted by their `created_at` property values, with newest cluster network - * interfaces first. Cluster network interfaces with identical - * `created_at` property values will in turn be sorted by ascending `name` property values. + * The reservations will be sorted by their `created_at` property values, with newest reservations first. Reservations + * with identical `created_at` property values will in turn be sorted by ascending `name` property values. * - * @param listClusterNetworkInterfacesOptions the {@link ListClusterNetworkInterfacesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkInterfaceCollection} + * @param listReservationsOptions the {@link ListReservationsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ReservationCollection} */ - public ServiceCall listClusterNetworkInterfaces(ListClusterNetworkInterfacesOptions listClusterNetworkInterfacesOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listClusterNetworkInterfacesOptions, - "listClusterNetworkInterfacesOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("cluster_network_id", listClusterNetworkInterfacesOptions.clusterNetworkId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/interfaces", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listClusterNetworkInterfaces"); + public ServiceCall listReservations(ListReservationsOptions listReservationsOptions) { + if (listReservationsOptions == null) { + listReservationsOptions = new ListReservationsOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/reservations")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listReservations"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listClusterNetworkInterfacesOptions.start() != null) { - builder.query("start", String.valueOf(listClusterNetworkInterfacesOptions.start())); + if (listReservationsOptions.start() != null) { + builder.query("start", String.valueOf(listReservationsOptions.start())); } - if (listClusterNetworkInterfacesOptions.limit() != null) { - builder.query("limit", String.valueOf(listClusterNetworkInterfacesOptions.limit())); + if (listReservationsOptions.limit() != null) { + builder.query("limit", String.valueOf(listReservationsOptions.limit())); } - if (listClusterNetworkInterfacesOptions.name() != null) { - builder.query("name", String.valueOf(listClusterNetworkInterfacesOptions.name())); + if (listReservationsOptions.name() != null) { + builder.query("name", String.valueOf(listReservationsOptions.name())); } - if (listClusterNetworkInterfacesOptions.sort() != null) { - builder.query("sort", String.valueOf(listClusterNetworkInterfacesOptions.sort())); + if (listReservationsOptions.profileResourceType() != null) { + builder.query("profile.resource_type", String.valueOf(listReservationsOptions.profileResourceType())); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listReservationsOptions.affinityPolicy() != null) { + builder.query("affinity_policy", String.valueOf(listReservationsOptions.affinityPolicy())); + } + if (listReservationsOptions.resourceGroupId() != null) { + builder.query("resource_group.id", String.valueOf(listReservationsOptions.resourceGroupId())); + } + if (listReservationsOptions.zoneName() != null) { + builder.query("zone.name", String.valueOf(listReservationsOptions.zoneName())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create a cluster network interface. + * List reservations. * - * This request creates a new cluster network interface from a cluster network interface prototype object. The - * prototype object is structured in the same way as a retrieved cluster network interface, and contains the - * information necessary to create the new cluster network interface. + * This request lists reservations in the region. A reservation provides reserved capacity for a specified profile in + * a specified zone. A reservation can also include a long-term committed use discount. * - * @param createClusterNetworkInterfaceOptions the {@link CreateClusterNetworkInterfaceOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkInterface} + * The reservations will be sorted by their `created_at` property values, with newest reservations first. Reservations + * with identical `created_at` property values will in turn be sorted by ascending `name` property values. + * + * @return a {@link ServiceCall} with a result of type {@link ReservationCollection} */ - public ServiceCall createClusterNetworkInterface(CreateClusterNetworkInterfaceOptions createClusterNetworkInterfaceOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createClusterNetworkInterfaceOptions, - "createClusterNetworkInterfaceOptions cannot be null"); + public ServiceCall listReservations() { + return listReservations(null); + } + + /** + * Update a reservation. + * + * This request updates a reservation with the information provided in a reservation patch object. The patch object is + * structured in the same way as a retrieved reservation and needs to contain only the information to be updated. + * + * @param updateReservationOptions the {@link UpdateReservationOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Reservation} + */ + public ServiceCall updateReservation(UpdateReservationOptions updateReservationOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateReservationOptions, + "updateReservationOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("cluster_network_id", createClusterNetworkInterfaceOptions.clusterNetworkId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/interfaces", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createClusterNetworkInterface"); + pathParamsMap.put("id", updateReservationOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/reservations/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateReservation"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - if (createClusterNetworkInterfaceOptions.name() != null) { - contentJson.addProperty("name", createClusterNetworkInterfaceOptions.name()); - } - if (createClusterNetworkInterfaceOptions.primaryIp() != null) { - contentJson.add("primary_ip", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createClusterNetworkInterfaceOptions.primaryIp())); - } - if (createClusterNetworkInterfaceOptions.subnet() != null) { - contentJson.add("subnet", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createClusterNetworkInterfaceOptions.subnet())); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateReservationOptions.reservationPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a cluster network interface. + * Create a security group. * - * This request deletes a cluster network interface. This operation cannot be reversed. For this request to succeed, - * the cluster network interface must not be required by another resource, such as a cluster network attachment for a - * virtual server instance. + * This request creates a new security group from a security group prototype object. The prototype object is + * structured in the same way as a retrieved security group, and contains the information necessary to create the new + * security group. If security group rules are included in the prototype object, those rules will be added to the + * security group. Each security group is scoped to one VPC. Only resources in that VPC can be added to the security + * group. * - * @param deleteClusterNetworkInterfaceOptions the {@link DeleteClusterNetworkInterfaceOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkInterface} + * @param createSecurityGroupOptions the {@link CreateSecurityGroupOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link SecurityGroup} */ - public ServiceCall deleteClusterNetworkInterface(DeleteClusterNetworkInterfaceOptions deleteClusterNetworkInterfaceOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteClusterNetworkInterfaceOptions, - "deleteClusterNetworkInterfaceOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("cluster_network_id", deleteClusterNetworkInterfaceOptions.clusterNetworkId()); - pathParamsMap.put("id", deleteClusterNetworkInterfaceOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/interfaces/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteClusterNetworkInterface"); + public ServiceCall createSecurityGroup(CreateSecurityGroupOptions createSecurityGroupOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createSecurityGroupOptions, + "createSecurityGroupOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createSecurityGroup"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); - if (deleteClusterNetworkInterfaceOptions.ifMatch() != null) { - builder.header("If-Match", deleteClusterNetworkInterfaceOptions.ifMatch()); - } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + final JsonObject contentJson = new JsonObject(); + contentJson.add("vpc", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createSecurityGroupOptions.vpc())); + if (createSecurityGroupOptions.name() != null) { + contentJson.addProperty("name", createSecurityGroupOptions.name()); + } + if (createSecurityGroupOptions.resourceGroup() != null) { + contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createSecurityGroupOptions.resourceGroup())); + } + if (createSecurityGroupOptions.rules() != null) { + contentJson.add("rules", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createSecurityGroupOptions.rules())); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a cluster network interface. + * Create a rule for a security group. * - * This request retrieves a single cluster network interface specified by the identifier in the URL. + * This request creates a new security group rule from a security group rule prototype object. The prototype object is + * structured in the same way as a retrieved security group rule and contains the information necessary to create the + * rule. As part of creating a new rule in a security group, the rule is applied to all the networking interfaces in + * the security group. Rules specify which IP traffic a security group will allow. Security group rules are stateful, + * such that reverse traffic in response to allowed traffic is automatically permitted. A rule allowing inbound TCP + * traffic on port 80 also allows outbound TCP traffic on port 80 without the need for an additional rule. * - * @param getClusterNetworkInterfaceOptions the {@link GetClusterNetworkInterfaceOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkInterface} + * @param createSecurityGroupRuleOptions the {@link CreateSecurityGroupRuleOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link SecurityGroupRule} */ - public ServiceCall getClusterNetworkInterface(GetClusterNetworkInterfaceOptions getClusterNetworkInterfaceOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getClusterNetworkInterfaceOptions, - "getClusterNetworkInterfaceOptions cannot be null"); + public ServiceCall createSecurityGroupRule(CreateSecurityGroupRuleOptions createSecurityGroupRuleOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createSecurityGroupRuleOptions, + "createSecurityGroupRuleOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("cluster_network_id", getClusterNetworkInterfaceOptions.clusterNetworkId()); - pathParamsMap.put("id", getClusterNetworkInterfaceOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/interfaces/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getClusterNetworkInterface"); + pathParamsMap.put("security_group_id", createSecurityGroupRuleOptions.securityGroupId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups/{security_group_id}/rules", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createSecurityGroupRule"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createSecurityGroupRuleOptions.securityGroupRulePrototype()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a cluster network interface. + * Add a target to a security group. * - * This request updates a cluster network interface with the information provided in a cluster network interface patch - * object. The patch object is structured in the same way as a retrieved cluster network interface and needs to - * contain only the information to be updated. + * This request adds a resource to an existing security group. The specified target identifier can be: * - * @param updateClusterNetworkInterfaceOptions the {@link UpdateClusterNetworkInterfaceOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkInterface} + * - A bare metal server network interface identifier + * - A virtual network interface identifier + * - A VPN server identifier + * - A load balancer identifier + * - An endpoint gateway identifier + * - An instance network interface identifier + * + * When a target is added to a security group, the security group rules are applied to the target. A request body is + * not required, and if provided, is ignored. + * + * @param createSecurityGroupTargetBindingOptions the {@link CreateSecurityGroupTargetBindingOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link SecurityGroupTargetReference} */ - public ServiceCall updateClusterNetworkInterface(UpdateClusterNetworkInterfaceOptions updateClusterNetworkInterfaceOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateClusterNetworkInterfaceOptions, - "updateClusterNetworkInterfaceOptions cannot be null"); + public ServiceCall createSecurityGroupTargetBinding(CreateSecurityGroupTargetBindingOptions createSecurityGroupTargetBindingOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createSecurityGroupTargetBindingOptions, + "createSecurityGroupTargetBindingOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("cluster_network_id", updateClusterNetworkInterfaceOptions.clusterNetworkId()); - pathParamsMap.put("id", updateClusterNetworkInterfaceOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/interfaces/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateClusterNetworkInterface"); + pathParamsMap.put("security_group_id", createSecurityGroupTargetBindingOptions.securityGroupId()); + pathParamsMap.put("id", createSecurityGroupTargetBindingOptions.id()); + RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups/{security_group_id}/targets/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createSecurityGroupTargetBinding"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); - if (updateClusterNetworkInterfaceOptions.ifMatch() != null) { - builder.header("If-Match", updateClusterNetworkInterfaceOptions.ifMatch()); - } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateClusterNetworkInterfaceOptions.clusterNetworkInterfacePatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List cluster network subnets. + * Delete a security group. * - * This request lists cluster network subnets in the cluster network. A cluster network subnet provides network - * routing between other cluster network subnets within a cluster network. + * This request deletes a security group. A security group cannot be deleted if it is referenced by any security group + * targets or rules. Additionally, a VPC's default security group cannot be deleted. This operation cannot be + * reversed. * - * @param listClusterNetworkSubnetsOptions the {@link ListClusterNetworkSubnetsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkSubnetCollection} + * @param deleteSecurityGroupOptions the {@link DeleteSecurityGroupOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall listClusterNetworkSubnets(ListClusterNetworkSubnetsOptions listClusterNetworkSubnetsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listClusterNetworkSubnetsOptions, - "listClusterNetworkSubnetsOptions cannot be null"); + public ServiceCall deleteSecurityGroup(DeleteSecurityGroupOptions deleteSecurityGroupOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteSecurityGroupOptions, + "deleteSecurityGroupOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("cluster_network_id", listClusterNetworkSubnetsOptions.clusterNetworkId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/subnets", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listClusterNetworkSubnets"); + pathParamsMap.put("id", deleteSecurityGroupOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteSecurityGroup"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listClusterNetworkSubnetsOptions.start() != null) { - builder.query("start", String.valueOf(listClusterNetworkSubnetsOptions.start())); - } - if (listClusterNetworkSubnetsOptions.limit() != null) { - builder.query("limit", String.valueOf(listClusterNetworkSubnetsOptions.limit())); - } - if (listClusterNetworkSubnetsOptions.name() != null) { - builder.query("name", String.valueOf(listClusterNetworkSubnetsOptions.name())); - } - if (listClusterNetworkSubnetsOptions.sort() != null) { - builder.query("sort", String.valueOf(listClusterNetworkSubnetsOptions.sort())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Create a cluster network subnet. + * Delete a security group rule. * - * This request creates a new cluster network subnet from a cluster network subnet prototype object. The prototype - * object is structured in the same way as a retrieved cluster network subnet, and contains the information necessary - * to create the new cluster network subnet. + * This request deletes a security group rule. This operation cannot be reversed. Removing a security group rule will + * not end existing connections allowed by that rule. * - * @param createClusterNetworkSubnetOptions the {@link CreateClusterNetworkSubnetOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkSubnet} + * @param deleteSecurityGroupRuleOptions the {@link DeleteSecurityGroupRuleOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall createClusterNetworkSubnet(CreateClusterNetworkSubnetOptions createClusterNetworkSubnetOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createClusterNetworkSubnetOptions, - "createClusterNetworkSubnetOptions cannot be null"); + public ServiceCall deleteSecurityGroupRule(DeleteSecurityGroupRuleOptions deleteSecurityGroupRuleOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteSecurityGroupRuleOptions, + "deleteSecurityGroupRuleOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("cluster_network_id", createClusterNetworkSubnetOptions.clusterNetworkId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/subnets", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createClusterNetworkSubnet"); + pathParamsMap.put("security_group_id", deleteSecurityGroupRuleOptions.securityGroupId()); + pathParamsMap.put("id", deleteSecurityGroupRuleOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups/{security_group_id}/rules/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteSecurityGroupRule"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createClusterNetworkSubnetOptions.clusterNetworkSubnetPrototype()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * List cluster network subnet reserved IPs. + * Remove a target from a security group. * - * This request lists cluster network subnet reserved IPs in the cluster network. + * This request removes a target from a security group. For this request to succeed, the target must be attached to at + * least one other security group. The specified target identifier can be: * - * @param listClusterNetworkSubnetReservedIpsOptions the {@link ListClusterNetworkSubnetReservedIpsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkSubnetReservedIPCollection} + * - A bare metal server network interface identifier + * - A virtual network interface identifier + * - A VPN server identifier + * - A load balancer identifier + * - An endpoint gateway identifier + * - An instance network interface identifier + * + * Security groups are stateful, so any changes to a target's security groups are applied to new connections. Existing + * connections are not affected. + * + * @param deleteSecurityGroupTargetBindingOptions the {@link DeleteSecurityGroupTargetBindingOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall listClusterNetworkSubnetReservedIps(ListClusterNetworkSubnetReservedIpsOptions listClusterNetworkSubnetReservedIpsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listClusterNetworkSubnetReservedIpsOptions, - "listClusterNetworkSubnetReservedIpsOptions cannot be null"); + public ServiceCall deleteSecurityGroupTargetBinding(DeleteSecurityGroupTargetBindingOptions deleteSecurityGroupTargetBindingOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteSecurityGroupTargetBindingOptions, + "deleteSecurityGroupTargetBindingOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("cluster_network_id", listClusterNetworkSubnetReservedIpsOptions.clusterNetworkId()); - pathParamsMap.put("cluster_network_subnet_id", listClusterNetworkSubnetReservedIpsOptions.clusterNetworkSubnetId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/subnets/{cluster_network_subnet_id}/reserved_ips", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listClusterNetworkSubnetReservedIps"); + pathParamsMap.put("security_group_id", deleteSecurityGroupTargetBindingOptions.securityGroupId()); + pathParamsMap.put("id", deleteSecurityGroupTargetBindingOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups/{security_group_id}/targets/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteSecurityGroupTargetBinding"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listClusterNetworkSubnetReservedIpsOptions.start() != null) { - builder.query("start", String.valueOf(listClusterNetworkSubnetReservedIpsOptions.start())); - } - if (listClusterNetworkSubnetReservedIpsOptions.limit() != null) { - builder.query("limit", String.valueOf(listClusterNetworkSubnetReservedIpsOptions.limit())); - } - if (listClusterNetworkSubnetReservedIpsOptions.name() != null) { - builder.query("name", String.valueOf(listClusterNetworkSubnetReservedIpsOptions.name())); - } - if (listClusterNetworkSubnetReservedIpsOptions.sort() != null) { - builder.query("sort", String.valueOf(listClusterNetworkSubnetReservedIpsOptions.sort())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Create a cluster network subnet reserved IP. + * Retrieve a security group. * - * This request creates a new cluster network subnet reserved IP from a cluster network subnet reserved IP prototype - * object. The prototype object is structured in the same way as a retrieved cluster network subnet reserved IP, and - * contains the information necessary to create the new cluster network subnet reserved IP. + * This request retrieves a single security group specified by the identifier in the URL path. * - * @param createClusterNetworkSubnetReservedIpOptions the {@link CreateClusterNetworkSubnetReservedIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkSubnetReservedIP} + * @param getSecurityGroupOptions the {@link GetSecurityGroupOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link SecurityGroup} */ - public ServiceCall createClusterNetworkSubnetReservedIp(CreateClusterNetworkSubnetReservedIpOptions createClusterNetworkSubnetReservedIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createClusterNetworkSubnetReservedIpOptions, - "createClusterNetworkSubnetReservedIpOptions cannot be null"); + public ServiceCall getSecurityGroup(GetSecurityGroupOptions getSecurityGroupOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getSecurityGroupOptions, + "getSecurityGroupOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("cluster_network_id", createClusterNetworkSubnetReservedIpOptions.clusterNetworkId()); - pathParamsMap.put("cluster_network_subnet_id", createClusterNetworkSubnetReservedIpOptions.clusterNetworkSubnetId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/subnets/{cluster_network_subnet_id}/reserved_ips", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createClusterNetworkSubnetReservedIp"); + pathParamsMap.put("id", getSecurityGroupOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getSecurityGroup"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - if (createClusterNetworkSubnetReservedIpOptions.address() != null) { - contentJson.addProperty("address", createClusterNetworkSubnetReservedIpOptions.address()); - } - if (createClusterNetworkSubnetReservedIpOptions.name() != null) { - contentJson.addProperty("name", createClusterNetworkSubnetReservedIpOptions.name()); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a cluster network subnet reserved IP. - * - * This request deletes a cluster network subnet reserved IP. This operation cannot be reversed. + * Retrieve a security group rule. * - * For this request to succeed, the reserved IP must be unbound. A provider-owned reserved IP is not allowed to be - * deleted. + * This request retrieves a single security group rule specified by the identifier in the URL path. * - * @param deleteClusterNetworkSubnetReservedIpOptions the {@link DeleteClusterNetworkSubnetReservedIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkSubnetReservedIP} + * @param getSecurityGroupRuleOptions the {@link GetSecurityGroupRuleOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link SecurityGroupRule} */ - public ServiceCall deleteClusterNetworkSubnetReservedIp(DeleteClusterNetworkSubnetReservedIpOptions deleteClusterNetworkSubnetReservedIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteClusterNetworkSubnetReservedIpOptions, - "deleteClusterNetworkSubnetReservedIpOptions cannot be null"); + public ServiceCall getSecurityGroupRule(GetSecurityGroupRuleOptions getSecurityGroupRuleOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getSecurityGroupRuleOptions, + "getSecurityGroupRuleOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("cluster_network_id", deleteClusterNetworkSubnetReservedIpOptions.clusterNetworkId()); - pathParamsMap.put("cluster_network_subnet_id", deleteClusterNetworkSubnetReservedIpOptions.clusterNetworkSubnetId()); - pathParamsMap.put("id", deleteClusterNetworkSubnetReservedIpOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/subnets/{cluster_network_subnet_id}/reserved_ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteClusterNetworkSubnetReservedIp"); + pathParamsMap.put("security_group_id", getSecurityGroupRuleOptions.securityGroupId()); + pathParamsMap.put("id", getSecurityGroupRuleOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups/{security_group_id}/rules/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getSecurityGroupRule"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); - if (deleteClusterNetworkSubnetReservedIpOptions.ifMatch() != null) { - builder.header("If-Match", deleteClusterNetworkSubnetReservedIpOptions.ifMatch()); - } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a cluster network subnet reserved IP. + * Retrieve a security group target. * - * This request retrieves a single cluster network subnet reserved IP specified by the identifier in the URL. + * This request retrieves a single target specified by the identifier in the URL path. The target must be an existing + * target of the security group. * - * @param getClusterNetworkSubnetReservedIpOptions the {@link GetClusterNetworkSubnetReservedIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkSubnetReservedIP} + * @param getSecurityGroupTargetOptions the {@link GetSecurityGroupTargetOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link SecurityGroupTargetReference} */ - public ServiceCall getClusterNetworkSubnetReservedIp(GetClusterNetworkSubnetReservedIpOptions getClusterNetworkSubnetReservedIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getClusterNetworkSubnetReservedIpOptions, - "getClusterNetworkSubnetReservedIpOptions cannot be null"); + public ServiceCall getSecurityGroupTarget(GetSecurityGroupTargetOptions getSecurityGroupTargetOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getSecurityGroupTargetOptions, + "getSecurityGroupTargetOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("cluster_network_id", getClusterNetworkSubnetReservedIpOptions.clusterNetworkId()); - pathParamsMap.put("cluster_network_subnet_id", getClusterNetworkSubnetReservedIpOptions.clusterNetworkSubnetId()); - pathParamsMap.put("id", getClusterNetworkSubnetReservedIpOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/subnets/{cluster_network_subnet_id}/reserved_ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getClusterNetworkSubnetReservedIp"); + pathParamsMap.put("security_group_id", getSecurityGroupTargetOptions.securityGroupId()); + pathParamsMap.put("id", getSecurityGroupTargetOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups/{security_group_id}/targets/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getSecurityGroupTarget"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a cluster network subnet reserved IP. + * List rules in a security group. * - * This request updates a cluster network subnet reserved IP with the information provided in a cluster network subnet - * reserved IP patch object. The patch object is structured in the same way as a retrieved cluster network subnet - * reserved IP and needs to contain only the information to be updated. + * This request lists rules in a security group. These rules define what traffic the security group permits. Security + * group rules are stateful, such that reverse traffic in response to allowed traffic is automatically permitted. * - * @param updateClusterNetworkSubnetReservedIpOptions the {@link UpdateClusterNetworkSubnetReservedIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkSubnetReservedIP} + * @param listSecurityGroupRulesOptions the {@link ListSecurityGroupRulesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link SecurityGroupRuleCollection} */ - public ServiceCall updateClusterNetworkSubnetReservedIp(UpdateClusterNetworkSubnetReservedIpOptions updateClusterNetworkSubnetReservedIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateClusterNetworkSubnetReservedIpOptions, - "updateClusterNetworkSubnetReservedIpOptions cannot be null"); + public ServiceCall listSecurityGroupRules(ListSecurityGroupRulesOptions listSecurityGroupRulesOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listSecurityGroupRulesOptions, + "listSecurityGroupRulesOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("cluster_network_id", updateClusterNetworkSubnetReservedIpOptions.clusterNetworkId()); - pathParamsMap.put("cluster_network_subnet_id", updateClusterNetworkSubnetReservedIpOptions.clusterNetworkSubnetId()); - pathParamsMap.put("id", updateClusterNetworkSubnetReservedIpOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/subnets/{cluster_network_subnet_id}/reserved_ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateClusterNetworkSubnetReservedIp"); + pathParamsMap.put("security_group_id", listSecurityGroupRulesOptions.securityGroupId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups/{security_group_id}/rules", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listSecurityGroupRules"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); - if (updateClusterNetworkSubnetReservedIpOptions.ifMatch() != null) { - builder.header("If-Match", updateClusterNetworkSubnetReservedIpOptions.ifMatch()); - } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateClusterNetworkSubnetReservedIpOptions.clusterNetworkSubnetReservedIpPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a cluster network subnet. - * - * This request deletes a cluster network subnet. This operation cannot be reversed. + * List targets associated with a security group. * - * For this request to succeed, this cluster subnet must not be attached to a cluster network interface. + * This request lists targets associated with a security group, to which the rules in the security group are applied. * - * @param deleteClusterNetworkSubnetOptions the {@link DeleteClusterNetworkSubnetOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkSubnet} + * @param listSecurityGroupTargetsOptions the {@link ListSecurityGroupTargetsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link SecurityGroupTargetCollection} */ - public ServiceCall deleteClusterNetworkSubnet(DeleteClusterNetworkSubnetOptions deleteClusterNetworkSubnetOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteClusterNetworkSubnetOptions, - "deleteClusterNetworkSubnetOptions cannot be null"); + public ServiceCall listSecurityGroupTargets(ListSecurityGroupTargetsOptions listSecurityGroupTargetsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listSecurityGroupTargetsOptions, + "listSecurityGroupTargetsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("cluster_network_id", deleteClusterNetworkSubnetOptions.clusterNetworkId()); - pathParamsMap.put("id", deleteClusterNetworkSubnetOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/subnets/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteClusterNetworkSubnet"); + pathParamsMap.put("security_group_id", listSecurityGroupTargetsOptions.securityGroupId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups/{security_group_id}/targets", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listSecurityGroupTargets"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); - if (deleteClusterNetworkSubnetOptions.ifMatch() != null) { - builder.header("If-Match", deleteClusterNetworkSubnetOptions.ifMatch()); - } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listSecurityGroupTargetsOptions.start() != null) { + builder.query("start", String.valueOf(listSecurityGroupTargetsOptions.start())); + } + if (listSecurityGroupTargetsOptions.limit() != null) { + builder.query("limit", String.valueOf(listSecurityGroupTargetsOptions.limit())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a cluster network subnet. + * List security groups. * - * This request retrieves a single cluster network subnet specified by the identifier in the URL. + * This request lists security groups in the region. A security group defines a set of packet filtering rules to allow + * traffic in and out of the resources targeted by the security group. No traffic is allowed by default. Security + * group rules are stateful so that reverse traffic in response to allowed traffic is automatically allowed. * - * @param getClusterNetworkSubnetOptions the {@link GetClusterNetworkSubnetOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkSubnet} + * @param listSecurityGroupsOptions the {@link ListSecurityGroupsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link SecurityGroupCollection} */ - public ServiceCall getClusterNetworkSubnet(GetClusterNetworkSubnetOptions getClusterNetworkSubnetOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getClusterNetworkSubnetOptions, - "getClusterNetworkSubnetOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("cluster_network_id", getClusterNetworkSubnetOptions.clusterNetworkId()); - pathParamsMap.put("id", getClusterNetworkSubnetOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/subnets/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getClusterNetworkSubnet"); + public ServiceCall listSecurityGroups(ListSecurityGroupsOptions listSecurityGroupsOptions) { + if (listSecurityGroupsOptions == null) { + listSecurityGroupsOptions = new ListSecurityGroupsOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listSecurityGroups"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listSecurityGroupsOptions.start() != null) { + builder.query("start", String.valueOf(listSecurityGroupsOptions.start())); + } + if (listSecurityGroupsOptions.limit() != null) { + builder.query("limit", String.valueOf(listSecurityGroupsOptions.limit())); + } + if (listSecurityGroupsOptions.resourceGroupId() != null) { + builder.query("resource_group.id", String.valueOf(listSecurityGroupsOptions.resourceGroupId())); + } + if (listSecurityGroupsOptions.vpcId() != null) { + builder.query("vpc.id", String.valueOf(listSecurityGroupsOptions.vpcId())); + } + if (listSecurityGroupsOptions.vpcCrn() != null) { + builder.query("vpc.crn", String.valueOf(listSecurityGroupsOptions.vpcCrn())); + } + if (listSecurityGroupsOptions.vpcName() != null) { + builder.query("vpc.name", String.valueOf(listSecurityGroupsOptions.vpcName())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a cluster network subnet. + * List security groups. * - * This request updates a cluster network subnet with the information provided in a cluster network subnet patch - * object. The patch object is structured in the same way as a retrieved cluster network subnet and needs to contain - * only the information to be updated. + * This request lists security groups in the region. A security group defines a set of packet filtering rules to allow + * traffic in and out of the resources targeted by the security group. No traffic is allowed by default. Security + * group rules are stateful so that reverse traffic in response to allowed traffic is automatically allowed. * - * @param updateClusterNetworkSubnetOptions the {@link UpdateClusterNetworkSubnetOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ClusterNetworkSubnet} + * @return a {@link ServiceCall} with a result of type {@link SecurityGroupCollection} */ - public ServiceCall updateClusterNetworkSubnet(UpdateClusterNetworkSubnetOptions updateClusterNetworkSubnetOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateClusterNetworkSubnetOptions, - "updateClusterNetworkSubnetOptions cannot be null"); + public ServiceCall listSecurityGroups() { + return listSecurityGroups(null); + } + + /** + * Update a security group. + * + * This request updates a security group with the information provided in a security group patch object. The security + * group patch object is structured in the same way as a retrieved security group and contains only the information to + * be updated. + * + * @param updateSecurityGroupOptions the {@link UpdateSecurityGroupOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link SecurityGroup} + */ + public ServiceCall updateSecurityGroup(UpdateSecurityGroupOptions updateSecurityGroupOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateSecurityGroupOptions, + "updateSecurityGroupOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("cluster_network_id", updateClusterNetworkSubnetOptions.clusterNetworkId()); - pathParamsMap.put("id", updateClusterNetworkSubnetOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{cluster_network_id}/subnets/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateClusterNetworkSubnet"); + pathParamsMap.put("id", updateSecurityGroupOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateSecurityGroup"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); - if (updateClusterNetworkSubnetOptions.ifMatch() != null) { - builder.header("If-Match", updateClusterNetworkSubnetOptions.ifMatch()); - } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateClusterNetworkSubnetOptions.clusterNetworkSubnetPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateSecurityGroupOptions.securityGroupPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a cluster network. - * - * This request deletes a cluster network. This operation cannot be reversed. + * Update a security group rule. * - * For this request to succeed, virtual server instances must not reside in this cluster network. + * This request updates a security group rule with the information in a provided rule patch object. The rule patch + * object contains only the information to be updated. The request will fail if the provided patch includes properties + * that are not used by the rule's protocol. * - * @param deleteClusterNetworkOptions the {@link DeleteClusterNetworkOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ClusterNetwork} + * @param updateSecurityGroupRuleOptions the {@link UpdateSecurityGroupRuleOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link SecurityGroupRule} */ - public ServiceCall deleteClusterNetwork(DeleteClusterNetworkOptions deleteClusterNetworkOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteClusterNetworkOptions, - "deleteClusterNetworkOptions cannot be null"); + public ServiceCall updateSecurityGroupRule(UpdateSecurityGroupRuleOptions updateSecurityGroupRuleOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateSecurityGroupRuleOptions, + "updateSecurityGroupRuleOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteClusterNetworkOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteClusterNetwork"); + pathParamsMap.put("security_group_id", updateSecurityGroupRuleOptions.securityGroupId()); + pathParamsMap.put("id", updateSecurityGroupRuleOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups/{security_group_id}/rules/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateSecurityGroupRule"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); - if (deleteClusterNetworkOptions.ifMatch() != null) { - builder.header("If-Match", deleteClusterNetworkOptions.ifMatch()); - } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateSecurityGroupRuleOptions.securityGroupRulePatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a cluster network. + * Create a file share. * - * This request retrieves a single cluster network specified by the identifier in the URL. + * This request provisions new file shares from a share prototype object. The new file shares can be a standalone + * share, a replica share, or both a source and replica share. * - * @param getClusterNetworkOptions the {@link GetClusterNetworkOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ClusterNetwork} + * The prototype object is structured in the same way as a retrieved share, and contains the information necessary to + * provision the new file shares. + * + * @param createShareOptions the {@link CreateShareOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Share} */ - public ServiceCall getClusterNetwork(GetClusterNetworkOptions getClusterNetworkOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getClusterNetworkOptions, - "getClusterNetworkOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getClusterNetworkOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getClusterNetwork"); + public ServiceCall createShare(CreateShareOptions createShareOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createShareOptions, + "createShareOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createShare"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createShareOptions.sharePrototype()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a cluster. + * Create a mount target for a file share. * - * This request updates a cluster network with the information provided in a cluster network patch object. The patch - * object is structured in the same way as a retrieved cluster network and needs to contain only the information to be - * updated. + * This request creates a new share mount target from a share mount target prototype object. * - * @param updateClusterNetworkOptions the {@link UpdateClusterNetworkOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ClusterNetwork} + * The prototype object is structured in the same way as a retrieved share mount target, and contains the information + * necessary to provision the new file share mount target. + * + * @param createShareMountTargetOptions the {@link CreateShareMountTargetOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ShareMountTarget} */ - public ServiceCall updateClusterNetwork(UpdateClusterNetworkOptions updateClusterNetworkOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateClusterNetworkOptions, - "updateClusterNetworkOptions cannot be null"); + public ServiceCall createShareMountTarget(CreateShareMountTargetOptions createShareMountTargetOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createShareMountTargetOptions, + "createShareMountTargetOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateClusterNetworkOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/cluster_networks/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateClusterNetwork"); + pathParamsMap.put("share_id", createShareMountTargetOptions.shareId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/mount_targets", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createShareMountTarget"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); - if (updateClusterNetworkOptions.ifMatch() != null) { - builder.header("If-Match", updateClusterNetworkOptions.ifMatch()); - } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateClusterNetworkOptions.clusterNetworkPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createShareMountTargetOptions.shareMountTargetPrototype()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List public gateways. + * Create a snapshot for a file share. * - * This request lists public gateways in the region. A public gateway is a virtual network device associated with a - * VPC, which allows access to the Internet. A public gateway resides in a zone and can be connected to subnets in the - * same zone only. + * This request creates a new share snapshot from a share snapshot prototype object. The prototype object is + * structured in the same way as a retrieved share snapshot, and contains the information necessary to create the new + * share snapshot. * - * @param listPublicGatewaysOptions the {@link ListPublicGatewaysOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link PublicGatewayCollection} + * The share must have an `access_control_mode` of `security_group`, and a + * `replication_role` of `source` or `none`. + * + * The snapshot will inherit its `resource_group` and encryption settings from the share. + * + * If the share has a `replication_role` of `source`, a corresponding snapshot on the replica share will be created + * with a `status` of `pending`. It will remain in + * `pending` until the data is synchronized per the replication schedule determined by the replica share's + * `replication_cron_spec`. + * + * @param createShareSnapshotOptions the {@link CreateShareSnapshotOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ShareSnapshot} */ - public ServiceCall listPublicGateways(ListPublicGatewaysOptions listPublicGatewaysOptions) { - if (listPublicGatewaysOptions == null) { - listPublicGatewaysOptions = new ListPublicGatewaysOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/public_gateways")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listPublicGateways"); + public ServiceCall createShareSnapshot(CreateShareSnapshotOptions createShareSnapshotOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createShareSnapshotOptions, + "createShareSnapshotOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("share_id", createShareSnapshotOptions.shareId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/snapshots", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createShareSnapshot"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listPublicGatewaysOptions.start() != null) { - builder.query("start", String.valueOf(listPublicGatewaysOptions.start())); - } - if (listPublicGatewaysOptions.limit() != null) { - builder.query("limit", String.valueOf(listPublicGatewaysOptions.limit())); + final JsonObject contentJson = new JsonObject(); + if (createShareSnapshotOptions.name() != null) { + contentJson.addProperty("name", createShareSnapshotOptions.name()); } - if (listPublicGatewaysOptions.resourceGroupId() != null) { - builder.query("resource_group.id", String.valueOf(listPublicGatewaysOptions.resourceGroupId())); + if (createShareSnapshotOptions.userTags() != null) { + contentJson.add("user_tags", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createShareSnapshotOptions.userTags())); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * List public gateways. - * - * This request lists public gateways in the region. A public gateway is a virtual network device associated with a - * VPC, which allows access to the Internet. A public gateway resides in a zone and can be connected to subnets in the - * same zone only. - * - * @return a {@link ServiceCall} with a result of type {@link PublicGatewayCollection} - */ - public ServiceCall listPublicGateways() { - return listPublicGateways(null); + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + return createServiceCall(builder.build(), responseConverter); } /** - * Create a public gateway. + * Delete a file share. * - * This request creates a new public gateway from a public gateway prototype object. For this to succeed, the VPC must - * not already have a public gateway in the specified zone. + * This request deletes a share. This operation cannot be reversed. A share cannot be deleted if it: + * - has share mount targets + * - has a `lifecycle_state` of `updating` + * - has a replication operation in progress * - * If a floating IP is provided, it must be unbound. If a floating IP is not provided, one will be created and bound - * to the public gateway. Once a public gateway has been created, its floating IP cannot be unbound. A public gateway - * must be explicitly attached to each subnet it will provide connectivity for. + * If the request is accepted, the share `lifecycle_state` will be set to `deleting`. Once deletion processing + * completes, it will no longer be retrievable. * - * @param createPublicGatewayOptions the {@link CreatePublicGatewayOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link PublicGateway} + * @param deleteShareOptions the {@link DeleteShareOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Share} */ - public ServiceCall createPublicGateway(CreatePublicGatewayOptions createPublicGatewayOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createPublicGatewayOptions, - "createPublicGatewayOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/public_gateways")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createPublicGateway"); + public ServiceCall deleteShare(DeleteShareOptions deleteShareOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteShareOptions, + "deleteShareOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", deleteShareOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteShare"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); + if (deleteShareOptions.ifMatch() != null) { + builder.header("If-Match", deleteShareOptions.ifMatch()); + } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.add("vpc", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createPublicGatewayOptions.vpc())); - contentJson.add("zone", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createPublicGatewayOptions.zone())); - if (createPublicGatewayOptions.floatingIp() != null) { - contentJson.add("floating_ip", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createPublicGatewayOptions.floatingIp())); - } - if (createPublicGatewayOptions.name() != null) { - contentJson.addProperty("name", createPublicGatewayOptions.name()); - } - if (createPublicGatewayOptions.resourceGroup() != null) { - contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createPublicGatewayOptions.resourceGroup())); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a public gateway. + * Delete a file share accessor binding. * - * This request deletes a public gateway. This operation cannot be reversed. For this request to succeed, the public - * gateway must not be attached to any subnets. The public gateway's floating IP will be automatically unbound. If the - * floating IP was created when the public gateway was created, it will be deleted. + * This request deletes a share accessor binding. This operation cannot be reversed. * - * @param deletePublicGatewayOptions the {@link DeletePublicGatewayOptions} containing the options for the call + * @param deleteShareAccessorBindingOptions the {@link DeleteShareAccessorBindingOptions} containing the options for the call * @return a {@link ServiceCall} with a void result */ - public ServiceCall deletePublicGateway(DeletePublicGatewayOptions deletePublicGatewayOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deletePublicGatewayOptions, - "deletePublicGatewayOptions cannot be null"); + public ServiceCall deleteShareAccessorBinding(DeleteShareAccessorBindingOptions deleteShareAccessorBindingOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteShareAccessorBindingOptions, + "deleteShareAccessorBindingOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deletePublicGatewayOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/public_gateways/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deletePublicGateway"); + pathParamsMap.put("share_id", deleteShareAccessorBindingOptions.shareId()); + pathParamsMap.put("id", deleteShareAccessorBindingOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/accessor_bindings/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteShareAccessorBinding"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } @@ -10618,811 +10480,1244 @@ public ServiceCall deletePublicGateway(DeletePublicGatewayOptions deletePu } /** - * Retrieve a public gateway. + * Delete a file share mount target. * - * This request retrieves a single public gateway specified by the identifier in the URL. + * This request deletes a share mount target. This operation cannot be reversed. * - * @param getPublicGatewayOptions the {@link GetPublicGatewayOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link PublicGateway} + * If the request is accepted, the share mount target `lifecycle_state` will be set to + * `deleting`. Once deletion processing completes, it will no longer be retrievable. + * + * @param deleteShareMountTargetOptions the {@link DeleteShareMountTargetOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ShareMountTarget} */ - public ServiceCall getPublicGateway(GetPublicGatewayOptions getPublicGatewayOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getPublicGatewayOptions, - "getPublicGatewayOptions cannot be null"); + public ServiceCall deleteShareMountTarget(DeleteShareMountTargetOptions deleteShareMountTargetOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteShareMountTargetOptions, + "deleteShareMountTargetOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getPublicGatewayOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/public_gateways/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getPublicGateway"); + pathParamsMap.put("share_id", deleteShareMountTargetOptions.shareId()); + pathParamsMap.put("id", deleteShareMountTargetOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/mount_targets/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteShareMountTarget"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a public gateway. + * Delete a share snapshot. * - * This request updates a public gateway's name. + * This request deletes a share snapshot. This operation cannot be reversed. For this request to succeed, the share + * must have a `replication_role` of `source` or `none`. * - * @param updatePublicGatewayOptions the {@link UpdatePublicGatewayOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link PublicGateway} + * If the request is accepted, the share snapshot `lifecycle_state` will be set to + * `deleting`. Once deletion processing completes, the share snapshot will no longer be retrievable. + * + * Deleting a share snapshot will not affect any previously-accepted requests to create a share from it. + * + * If the share has a `replication_role` of `source`, the corresponding snapshot on the replica share will be + * subsequently moved to a `lifecycle_state` of `deleting`. If the data for the corresponding snapshot has already + * been synchronized via the replication schedule determined by `replication_cron_spec`, the snapshot will remain + * available in the replica share's `.snapshot` directory until the next replication sync. + * + * @param deleteShareSnapshotOptions the {@link DeleteShareSnapshotOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ShareSnapshot} */ - public ServiceCall updatePublicGateway(UpdatePublicGatewayOptions updatePublicGatewayOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updatePublicGatewayOptions, - "updatePublicGatewayOptions cannot be null"); + public ServiceCall deleteShareSnapshot(DeleteShareSnapshotOptions deleteShareSnapshotOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteShareSnapshotOptions, + "deleteShareSnapshotOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updatePublicGatewayOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/public_gateways/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updatePublicGateway"); + pathParamsMap.put("share_id", deleteShareSnapshotOptions.shareId()); + pathParamsMap.put("id", deleteShareSnapshotOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/snapshots/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteShareSnapshot"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updatePublicGatewayOptions.publicGatewayPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List floating IPs. + * Split the source file share from a replica file share. * - * This request lists floating IPs in the region. Floating IPs allow inbound and outbound traffic from the Internet to - * an instance. + * This request removes the replication relationship between a source share and the replica share specified by the + * identifier in the URL. The replication relationship cannot be removed if a source share or the replica share has a + * `lifecycle_state` of `updating`, or has a replication operation in progress. * - * @param listFloatingIpsOptions the {@link ListFloatingIpsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link FloatingIPCollection} + * This operation cannot be reversed. + * + * @param deleteShareSourceOptions the {@link DeleteShareSourceOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall listFloatingIps(ListFloatingIpsOptions listFloatingIpsOptions) { - if (listFloatingIpsOptions == null) { - listFloatingIpsOptions = new ListFloatingIpsOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/floating_ips")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listFloatingIps"); + public ServiceCall deleteShareSource(DeleteShareSourceOptions deleteShareSourceOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteShareSourceOptions, + "deleteShareSourceOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("share_id", deleteShareSourceOptions.shareId()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/source", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteShareSource"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listFloatingIpsOptions.start() != null) { - builder.query("start", String.valueOf(listFloatingIpsOptions.start())); - } - if (listFloatingIpsOptions.limit() != null) { - builder.query("limit", String.valueOf(listFloatingIpsOptions.limit())); - } - if (listFloatingIpsOptions.resourceGroupId() != null) { - builder.query("resource_group.id", String.valueOf(listFloatingIpsOptions.resourceGroupId())); - } - if (listFloatingIpsOptions.sort() != null) { - builder.query("sort", String.valueOf(listFloatingIpsOptions.sort())); - } - if (listFloatingIpsOptions.targetId() != null) { - builder.query("target.id", String.valueOf(listFloatingIpsOptions.targetId())); - } - if (listFloatingIpsOptions.targetCrn() != null) { - builder.query("target.crn", String.valueOf(listFloatingIpsOptions.targetCrn())); - } - if (listFloatingIpsOptions.targetName() != null) { - builder.query("target.name", String.valueOf(listFloatingIpsOptions.targetName())); - } - if (listFloatingIpsOptions.targetResourceType() != null) { - builder.query("target.resource_type", String.valueOf(listFloatingIpsOptions.targetResourceType())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * List floating IPs. - * - * This request lists floating IPs in the region. Floating IPs allow inbound and outbound traffic from the Internet to - * an instance. + * Failover to replica file share. * - * @return a {@link ServiceCall} with a result of type {@link FloatingIPCollection} - */ - public ServiceCall listFloatingIps() { - return listFloatingIps(null); - } - - /** - * Reserve a floating IP. + * This request triggers a failover to the replica file share specified by the identifier in the URL. The failover + * cannot be started if a source share or the replica share has a `lifecycle_state` of `updating`, or has a + * replication operation in progress. * - * This request reserves a new floating IP. + * If `fallback_policy` is specified as `split`, and the request is accepted but the failover operation cannot be + * performed, a split will be triggered. * - * @param createFloatingIpOptions the {@link CreateFloatingIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link FloatingIP} + * @param failoverShareOptions the {@link FailoverShareOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall createFloatingIp(CreateFloatingIpOptions createFloatingIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createFloatingIpOptions, - "createFloatingIpOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/floating_ips")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createFloatingIp"); + public ServiceCall failoverShare(FailoverShareOptions failoverShareOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(failoverShareOptions, + "failoverShareOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("share_id", failoverShareOptions.shareId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/failover", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "failoverShare"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createFloatingIpOptions.floatingIpPrototype()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + final JsonObject contentJson = new JsonObject(); + if (failoverShareOptions.fallbackPolicy() != null) { + contentJson.addProperty("fallback_policy", failoverShareOptions.fallbackPolicy()); + } + if (failoverShareOptions.timeout() != null) { + contentJson.addProperty("timeout", failoverShareOptions.timeout()); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a floating IP. + * Retrieve a file share. * - * This request disassociates (if associated) and releases a floating IP. This operation cannot be reversed. For this - * request to succeed, the floating IP must not be required by another resource, such as a public gateway. + * This request retrieves a single file share specified by the identifier in the URL. * - * @param deleteFloatingIpOptions the {@link DeleteFloatingIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param getShareOptions the {@link GetShareOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Share} */ - public ServiceCall deleteFloatingIp(DeleteFloatingIpOptions deleteFloatingIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteFloatingIpOptions, - "deleteFloatingIpOptions cannot be null"); + public ServiceCall getShare(GetShareOptions getShareOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getShareOptions, + "getShareOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteFloatingIpOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/floating_ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteFloatingIp"); + pathParamsMap.put("id", getShareOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getShare"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a floating IP. + * Retrieve a file share accessor binding. * - * This request retrieves a single floating IP specified by the identifier in the URL. + * This request retrieves a single accessor binding specified by the identifier in the URL. * - * @param getFloatingIpOptions the {@link GetFloatingIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link FloatingIP} + * @param getShareAccessorBindingOptions the {@link GetShareAccessorBindingOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ShareAccessorBinding} */ - public ServiceCall getFloatingIp(GetFloatingIpOptions getFloatingIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getFloatingIpOptions, - "getFloatingIpOptions cannot be null"); + public ServiceCall getShareAccessorBinding(GetShareAccessorBindingOptions getShareAccessorBindingOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getShareAccessorBindingOptions, + "getShareAccessorBindingOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getFloatingIpOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/floating_ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getFloatingIp"); + pathParamsMap.put("share_id", getShareAccessorBindingOptions.shareId()); + pathParamsMap.put("id", getShareAccessorBindingOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/accessor_bindings/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getShareAccessorBinding"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a floating IP. + * Retrieve a file share mount target. * - * This request updates a floating IP's name and/or target. + * This request retrieves a single share mount target specified by the identifier in the URL. * - * @param updateFloatingIpOptions the {@link UpdateFloatingIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link FloatingIP} + * @param getShareMountTargetOptions the {@link GetShareMountTargetOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ShareMountTarget} */ - public ServiceCall updateFloatingIp(UpdateFloatingIpOptions updateFloatingIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateFloatingIpOptions, - "updateFloatingIpOptions cannot be null"); + public ServiceCall getShareMountTarget(GetShareMountTargetOptions getShareMountTargetOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getShareMountTargetOptions, + "getShareMountTargetOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateFloatingIpOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/floating_ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateFloatingIp"); + pathParamsMap.put("share_id", getShareMountTargetOptions.shareId()); + pathParamsMap.put("id", getShareMountTargetOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/mount_targets/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getShareMountTarget"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateFloatingIpOptions.floatingIpPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List public address ranges. + * Retrieve a file share profile. * - * This request lists [public address ranges](https://cloud.ibm.com/docs/vpc?topic=vpc-about-par) in the region. A - * public address range is a contiguous block of public IP addresses that can be bound to a `target` that specifies a - * `vpc` and a `zone`. Incoming traffic for these IP addresses will be routed according to the VPC's ingress routing - * table. + * This request retrieves a single file share profile specified by the name in the URL. * - * @param listPublicAddressRangesOptions the {@link ListPublicAddressRangesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link PublicAddressRangeCollection} + * @param getShareProfileOptions the {@link GetShareProfileOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ShareProfile} */ - public ServiceCall listPublicAddressRanges(ListPublicAddressRangesOptions listPublicAddressRangesOptions) { - if (listPublicAddressRangesOptions == null) { - listPublicAddressRangesOptions = new ListPublicAddressRangesOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/public_address_ranges")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listPublicAddressRanges"); + public ServiceCall getShareProfile(GetShareProfileOptions getShareProfileOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getShareProfileOptions, + "getShareProfileOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("name", getShareProfileOptions.name()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/share/profiles/{name}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getShareProfile"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listPublicAddressRangesOptions.start() != null) { - builder.query("start", String.valueOf(listPublicAddressRangesOptions.start())); - } - if (listPublicAddressRangesOptions.limit() != null) { - builder.query("limit", String.valueOf(listPublicAddressRangesOptions.limit())); - } - if (listPublicAddressRangesOptions.resourceGroupId() != null) { - builder.query("resource_group.id", String.valueOf(listPublicAddressRangesOptions.resourceGroupId())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List public address ranges. - * - * This request lists [public address ranges](https://cloud.ibm.com/docs/vpc?topic=vpc-about-par) in the region. A - * public address range is a contiguous block of public IP addresses that can be bound to a `target` that specifies a - * `vpc` and a `zone`. Incoming traffic for these IP addresses will be routed according to the VPC's ingress routing - * table. - * - * @return a {@link ServiceCall} with a result of type {@link PublicAddressRangeCollection} - */ - public ServiceCall listPublicAddressRanges() { - return listPublicAddressRanges(null); - } - - /** - * Create a public address range. + * Retrieve a share snapshot. * - * This request creates a new public address range from a public address range prototype object. The prototype object - * is structured in the same way as a retrieved public address range, and contains the information necessary to create - * the new public address range. + * This request retrieves a single share snapshot specified by the identifier in the URL. * - * @param createPublicAddressRangeOptions the {@link CreatePublicAddressRangeOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link PublicAddressRange} + * @param getShareSnapshotOptions the {@link GetShareSnapshotOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ShareSnapshot} */ - public ServiceCall createPublicAddressRange(CreatePublicAddressRangeOptions createPublicAddressRangeOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createPublicAddressRangeOptions, - "createPublicAddressRangeOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/public_address_ranges")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createPublicAddressRange"); + public ServiceCall getShareSnapshot(GetShareSnapshotOptions getShareSnapshotOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getShareSnapshotOptions, + "getShareSnapshotOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("share_id", getShareSnapshotOptions.shareId()); + pathParamsMap.put("id", getShareSnapshotOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/snapshots/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getShareSnapshot"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("ipv4_address_count", createPublicAddressRangeOptions.ipv4AddressCount()); - if (createPublicAddressRangeOptions.name() != null) { - contentJson.addProperty("name", createPublicAddressRangeOptions.name()); - } - if (createPublicAddressRangeOptions.resourceGroup() != null) { - contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createPublicAddressRangeOptions.resourceGroup())); - } - if (createPublicAddressRangeOptions.target() != null) { - contentJson.add("target", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createPublicAddressRangeOptions.target())); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a public address range. + * Retrieve the source file share for a replica file share. * - * This request deletes a public address range. If the public address range is bound to a - * `target`, it will be unbound. This operation cannot be reversed. + * This request retrieves the source file share associated with the replica file share specified by the identifier in + * the URL. * - * @param deletePublicAddressRangeOptions the {@link DeletePublicAddressRangeOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link PublicAddressRange} + * @param getShareSourceOptions the {@link GetShareSourceOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ShareReference} */ - public ServiceCall deletePublicAddressRange(DeletePublicAddressRangeOptions deletePublicAddressRangeOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deletePublicAddressRangeOptions, - "deletePublicAddressRangeOptions cannot be null"); + public ServiceCall getShareSource(GetShareSourceOptions getShareSourceOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getShareSourceOptions, + "getShareSourceOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deletePublicAddressRangeOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/public_address_ranges/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deletePublicAddressRange"); + pathParamsMap.put("share_id", getShareSourceOptions.shareId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/source", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getShareSource"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a public address range. + * List accessor bindings for a file share. * - * This request retrieves a single public address range specified by the identifier in the URL. + * This request lists accessor bindings for a share. Each accessor binding identifies a resource (possibly in another + * account) with access to this file share including its snapshots. * - * @param getPublicAddressRangeOptions the {@link GetPublicAddressRangeOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link PublicAddressRange} + * The share accessor bindings will be sorted by their `created_at` property values, with newest bindings first. + * + * @param listShareAccessorBindingsOptions the {@link ListShareAccessorBindingsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ShareAccessorBindingCollection} */ - public ServiceCall getPublicAddressRange(GetPublicAddressRangeOptions getPublicAddressRangeOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getPublicAddressRangeOptions, - "getPublicAddressRangeOptions cannot be null"); + public ServiceCall listShareAccessorBindings(ListShareAccessorBindingsOptions listShareAccessorBindingsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listShareAccessorBindingsOptions, + "listShareAccessorBindingsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getPublicAddressRangeOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/public_address_ranges/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getPublicAddressRange"); + pathParamsMap.put("id", listShareAccessorBindingsOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{id}/accessor_bindings", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listShareAccessorBindings"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listShareAccessorBindingsOptions.start() != null) { + builder.query("start", String.valueOf(listShareAccessorBindingsOptions.start())); + } + if (listShareAccessorBindingsOptions.limit() != null) { + builder.query("limit", String.valueOf(listShareAccessorBindingsOptions.limit())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a public address range. + * List mount targets for a file share. * - * This request updates a public address range with the information in a provided public address range patch. The - * public address range patch object is structured in the same way as a retrieved public address range and contains - * only the information to be updated. + * This request lists mount targets for a file share. A mount target is a network endpoint at which a file share may + * be mounted. The file share can be mounted by clients in the same VPC and zone after creating share mount targets. * - * @param updatePublicAddressRangeOptions the {@link UpdatePublicAddressRangeOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link PublicAddressRange} + * The share mount targets will be sorted by their `created_at` property values, with newest targets first. + * + * @param listShareMountTargetsOptions the {@link ListShareMountTargetsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ShareMountTargetCollection} */ - public ServiceCall updatePublicAddressRange(UpdatePublicAddressRangeOptions updatePublicAddressRangeOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updatePublicAddressRangeOptions, - "updatePublicAddressRangeOptions cannot be null"); + public ServiceCall listShareMountTargets(ListShareMountTargetsOptions listShareMountTargetsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listShareMountTargetsOptions, + "listShareMountTargetsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updatePublicAddressRangeOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/public_address_ranges/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updatePublicAddressRange"); + pathParamsMap.put("share_id", listShareMountTargetsOptions.shareId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/mount_targets", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listShareMountTargets"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updatePublicAddressRangeOptions.publicAddressRangePatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * List network ACLs. - * - * This request lists network ACLs in the region. A network ACL defines a set of packet filtering rules for traffic in - * and out of the subnets the network ACL is attached to. No traffic is allowed by default. Both allow and deny rules - * can be defined, and rules are stateless so that reverse traffic in response to allowed traffic is not automatically - * allowed. + if (listShareMountTargetsOptions.name() != null) { + builder.query("name", String.valueOf(listShareMountTargetsOptions.name())); + } + if (listShareMountTargetsOptions.start() != null) { + builder.query("start", String.valueOf(listShareMountTargetsOptions.start())); + } + if (listShareMountTargetsOptions.limit() != null) { + builder.query("limit", String.valueOf(listShareMountTargetsOptions.limit())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * List file share profiles. * - * @param listNetworkAclsOptions the {@link ListNetworkAclsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link NetworkACLCollection} + * This request lists [file share profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles) available + * in the region. A file share profile specifies the performance characteristics and pricing model for a file share. + * + * @param listShareProfilesOptions the {@link ListShareProfilesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ShareProfileCollection} */ - public ServiceCall listNetworkAcls(ListNetworkAclsOptions listNetworkAclsOptions) { - if (listNetworkAclsOptions == null) { - listNetworkAclsOptions = new ListNetworkAclsOptions.Builder().build(); + public ServiceCall listShareProfiles(ListShareProfilesOptions listShareProfilesOptions) { + if (listShareProfilesOptions == null) { + listShareProfilesOptions = new ListShareProfilesOptions.Builder().build(); } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/network_acls")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listNetworkAcls"); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/share/profiles")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listShareProfiles"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listNetworkAclsOptions.start() != null) { - builder.query("start", String.valueOf(listNetworkAclsOptions.start())); + if (listShareProfilesOptions.start() != null) { + builder.query("start", String.valueOf(listShareProfilesOptions.start())); } - if (listNetworkAclsOptions.limit() != null) { - builder.query("limit", String.valueOf(listNetworkAclsOptions.limit())); + if (listShareProfilesOptions.limit() != null) { + builder.query("limit", String.valueOf(listShareProfilesOptions.limit())); } - if (listNetworkAclsOptions.resourceGroupId() != null) { - builder.query("resource_group.id", String.valueOf(listNetworkAclsOptions.resourceGroupId())); + if (listShareProfilesOptions.sort() != null) { + builder.query("sort", String.valueOf(listShareProfilesOptions.sort())); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List network ACLs. + * List file share profiles. * - * This request lists network ACLs in the region. A network ACL defines a set of packet filtering rules for traffic in - * and out of the subnets the network ACL is attached to. No traffic is allowed by default. Both allow and deny rules - * can be defined, and rules are stateless so that reverse traffic in response to allowed traffic is not automatically - * allowed. + * This request lists [file share profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles) available + * in the region. A file share profile specifies the performance characteristics and pricing model for a file share. * - * @return a {@link ServiceCall} with a result of type {@link NetworkACLCollection} + * @return a {@link ServiceCall} with a result of type {@link ShareProfileCollection} */ - public ServiceCall listNetworkAcls() { - return listNetworkAcls(null); + public ServiceCall listShareProfiles() { + return listShareProfiles(null); } /** - * Create a network ACL. + * List file share snapshots. * - * This request creates a new stateless network ACL from a network ACL prototype object. The prototype object is - * structured in the same way as a retrieved network ACL, and contains the information necessary to create the new - * network ACL. + * This request lists snapshots for the specified file share, or across all accessible file shares. A snapshot + * preserves the data of a share at the time the snapshot was captured. * - * @param createNetworkAclOptions the {@link CreateNetworkAclOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link NetworkACL} + * If the file share is a replica, the list will contain snapshots corresponding to snapshots on the source. + * + * @param listShareSnapshotsOptions the {@link ListShareSnapshotsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ShareSnapshotCollection} */ - public ServiceCall createNetworkAcl(CreateNetworkAclOptions createNetworkAclOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createNetworkAclOptions, - "createNetworkAclOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/network_acls")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createNetworkAcl"); + public ServiceCall listShareSnapshots(ListShareSnapshotsOptions listShareSnapshotsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listShareSnapshotsOptions, + "listShareSnapshotsOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("share_id", listShareSnapshotsOptions.shareId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/snapshots", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listShareSnapshots"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createNetworkAclOptions.networkAclPrototype()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listShareSnapshotsOptions.backupPolicyPlanId() != null) { + builder.query("backup_policy_plan.id", String.valueOf(listShareSnapshotsOptions.backupPolicyPlanId())); + } + if (listShareSnapshotsOptions.name() != null) { + builder.query("name", String.valueOf(listShareSnapshotsOptions.name())); + } + if (listShareSnapshotsOptions.start() != null) { + builder.query("start", String.valueOf(listShareSnapshotsOptions.start())); + } + if (listShareSnapshotsOptions.limit() != null) { + builder.query("limit", String.valueOf(listShareSnapshotsOptions.limit())); + } + if (listShareSnapshotsOptions.sort() != null) { + builder.query("sort", String.valueOf(listShareSnapshotsOptions.sort())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a network ACL. + * List file shares. * - * This request deletes a network ACL. This operation cannot be reversed. For this request to succeed, the network ACL - * must not be the default network ACL for any VPCs, and the network ACL must not be attached to any subnets. + * This request lists file shares in the region. * - * @param deleteNetworkAclOptions the {@link DeleteNetworkAclOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param listSharesOptions the {@link ListSharesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ShareCollection} */ - public ServiceCall deleteNetworkAcl(DeleteNetworkAclOptions deleteNetworkAclOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteNetworkAclOptions, - "deleteNetworkAclOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteNetworkAclOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/network_acls/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteNetworkAcl"); + public ServiceCall listShares(ListSharesOptions listSharesOptions) { + if (listSharesOptions == null) { + listSharesOptions = new ListSharesOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listShares"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + if (listSharesOptions.start() != null) { + builder.query("start", String.valueOf(listSharesOptions.start())); + } + if (listSharesOptions.limit() != null) { + builder.query("limit", String.valueOf(listSharesOptions.limit())); + } + if (listSharesOptions.resourceGroupId() != null) { + builder.query("resource_group.id", String.valueOf(listSharesOptions.resourceGroupId())); + } + if (listSharesOptions.name() != null) { + builder.query("name", String.valueOf(listSharesOptions.name())); + } + if (listSharesOptions.sort() != null) { + builder.query("sort", String.valueOf(listSharesOptions.sort())); + } + if (listSharesOptions.replicationRole() != null) { + builder.query("replication_role", String.valueOf(listSharesOptions.replicationRole())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a network ACL. + * List file shares. * - * This request retrieves a single network ACL specified by the identifier in the URL. + * This request lists file shares in the region. * - * @param getNetworkAclOptions the {@link GetNetworkAclOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link NetworkACL} + * @return a {@link ServiceCall} with a result of type {@link ShareCollection} */ - public ServiceCall getNetworkAcl(GetNetworkAclOptions getNetworkAclOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getNetworkAclOptions, - "getNetworkAclOptions cannot be null"); + public ServiceCall listShares() { + return listShares(null); + } + + /** + * Update a file share. + * + * This request updates a share with the information in a provided share patch. The share patch object is structured + * in the same way as a retrieved share and contains only the information to be updated. + * + * @param updateShareOptions the {@link UpdateShareOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Share} + */ + public ServiceCall updateShare(UpdateShareOptions updateShareOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateShareOptions, + "updateShareOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getNetworkAclOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/network_acls/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getNetworkAcl"); + pathParamsMap.put("id", updateShareOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateShare"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); + if (updateShareOptions.ifMatch() != null) { + builder.header("If-Match", updateShareOptions.ifMatch()); + } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateShareOptions.sharePatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a network ACL. + * Update a file share mount target. * - * This request updates a network ACL's name. + * This request updates a share mount target with the information provided in a share mount target patch object. The + * share mount target patch object is structured in the same way as a retrieved share mount target and needs to + * contain only the information to be updated. * - * @param updateNetworkAclOptions the {@link UpdateNetworkAclOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link NetworkACL} + * @param updateShareMountTargetOptions the {@link UpdateShareMountTargetOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ShareMountTarget} */ - public ServiceCall updateNetworkAcl(UpdateNetworkAclOptions updateNetworkAclOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateNetworkAclOptions, - "updateNetworkAclOptions cannot be null"); + public ServiceCall updateShareMountTarget(UpdateShareMountTargetOptions updateShareMountTargetOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateShareMountTargetOptions, + "updateShareMountTargetOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateNetworkAclOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/network_acls/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateNetworkAcl"); + pathParamsMap.put("share_id", updateShareMountTargetOptions.shareId()); + pathParamsMap.put("id", updateShareMountTargetOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/mount_targets/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateShareMountTarget"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateNetworkAclOptions.networkAclPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateShareMountTargetOptions.shareMountTargetPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List rules for a network ACL. + * Update a share snapshot. * - * This request lists rules for a network ACL. These rules can allow or deny traffic between a source CIDR block and a - * destination CIDR block over a particular protocol and port range. + * This request updates a share snapshot with the information provided in a share snapshot patch object. The share + * snapshot patch object is structured in the same way as a retrieved share snapshot and needs to contain only the + * information to be updated. * - * @param listNetworkAclRulesOptions the {@link ListNetworkAclRulesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link NetworkACLRuleCollection} + * @param updateShareSnapshotOptions the {@link UpdateShareSnapshotOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ShareSnapshot} */ - public ServiceCall listNetworkAclRules(ListNetworkAclRulesOptions listNetworkAclRulesOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listNetworkAclRulesOptions, - "listNetworkAclRulesOptions cannot be null"); + public ServiceCall updateShareSnapshot(UpdateShareSnapshotOptions updateShareSnapshotOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateShareSnapshotOptions, + "updateShareSnapshotOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("network_acl_id", listNetworkAclRulesOptions.networkAclId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/network_acls/{network_acl_id}/rules", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listNetworkAclRules"); + pathParamsMap.put("share_id", updateShareSnapshotOptions.shareId()); + pathParamsMap.put("id", updateShareSnapshotOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/shares/{share_id}/snapshots/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateShareSnapshot"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); + if (updateShareSnapshotOptions.ifMatch() != null) { + builder.header("If-Match", updateShareSnapshotOptions.ifMatch()); + } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listNetworkAclRulesOptions.start() != null) { - builder.query("start", String.valueOf(listNetworkAclRulesOptions.start())); - } - if (listNetworkAclRulesOptions.limit() != null) { - builder.query("limit", String.valueOf(listNetworkAclRulesOptions.limit())); - } - if (listNetworkAclRulesOptions.direction() != null) { - builder.query("direction", String.valueOf(listNetworkAclRulesOptions.direction())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateShareSnapshotOptions.shareSnapshotPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create a rule for a network ACL. + * Create a snapshot. * - * This request creates a new rule from a network ACL rule prototype object. The prototype object is structured in the - * same way as a retrieved rule, and contains the information necessary to create the new rule. + * This request creates a new snapshot from a snapshot prototype object. The prototype object is structured in the + * same way as a retrieved snapshot, and contains the information necessary to provision the new snapshot. * - * @param createNetworkAclRuleOptions the {@link CreateNetworkAclRuleOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link NetworkACLRule} + * @param createSnapshotOptions the {@link CreateSnapshotOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Snapshot} */ - public ServiceCall createNetworkAclRule(CreateNetworkAclRuleOptions createNetworkAclRuleOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createNetworkAclRuleOptions, - "createNetworkAclRuleOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("network_acl_id", createNetworkAclRuleOptions.networkAclId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/network_acls/{network_acl_id}/rules", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createNetworkAclRule"); + public ServiceCall createSnapshot(CreateSnapshotOptions createSnapshotOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createSnapshotOptions, + "createSnapshotOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshots")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createSnapshot"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createNetworkAclRuleOptions.networkAclRulePrototype()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createSnapshotOptions.snapshotPrototype()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a network ACL rule. + * Create a clone for a snapshot. * - * This request deletes a rule. This operation cannot be reversed. + * This request creates a new clone for a snapshot in the specified zone. A request body is not required, and if + * provided, is ignored. If the snapshot already has a clone in the zone, it is returned. * - * @param deleteNetworkAclRuleOptions the {@link DeleteNetworkAclRuleOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param createSnapshotCloneOptions the {@link CreateSnapshotCloneOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link SnapshotClone} */ - public ServiceCall deleteNetworkAclRule(DeleteNetworkAclRuleOptions deleteNetworkAclRuleOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteNetworkAclRuleOptions, - "deleteNetworkAclRuleOptions cannot be null"); + public ServiceCall createSnapshotClone(CreateSnapshotCloneOptions createSnapshotCloneOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createSnapshotCloneOptions, + "createSnapshotCloneOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("network_acl_id", deleteNetworkAclRuleOptions.networkAclId()); - pathParamsMap.put("id", deleteNetworkAclRuleOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/network_acls/{network_acl_id}/rules/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteNetworkAclRule"); + pathParamsMap.put("id", createSnapshotCloneOptions.id()); + pathParamsMap.put("zone_name", createSnapshotCloneOptions.zoneName()); + RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshots/{id}/clones/{zone_name}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createSnapshotClone"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a network ACL rule. + * Create a snapshot consistency group. * - * This request retrieves a single rule specified by the identifier in the URL. + * This request creates a new snapshot consistency group from a snapshot consistency group object. The prototype + * object is structured in the same way as a retrieved consistency group, and contains the information necessary to + * provision the new snapshot consistency group. * - * @param getNetworkAclRuleOptions the {@link GetNetworkAclRuleOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link NetworkACLRule} + * @param createSnapshotConsistencyGroupOptions the {@link CreateSnapshotConsistencyGroupOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link SnapshotConsistencyGroup} */ - public ServiceCall getNetworkAclRule(GetNetworkAclRuleOptions getNetworkAclRuleOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getNetworkAclRuleOptions, - "getNetworkAclRuleOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("network_acl_id", getNetworkAclRuleOptions.networkAclId()); - pathParamsMap.put("id", getNetworkAclRuleOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/network_acls/{network_acl_id}/rules/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getNetworkAclRule"); + public ServiceCall createSnapshotConsistencyGroup(CreateSnapshotConsistencyGroupOptions createSnapshotConsistencyGroupOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createSnapshotConsistencyGroupOptions, + "createSnapshotConsistencyGroupOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshot_consistency_groups")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createSnapshotConsistencyGroup"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createSnapshotConsistencyGroupOptions.snapshotConsistencyGroupPrototype()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a network ACL rule. + * Delete a snapshot. * - * This request updates a rule with the information in a provided rule patch. The rule patch object contains only the - * information to be updated. The request will fail if the provided patch includes properties that are not used by the - * rule's protocol. + * This request deletes a snapshot. This operation cannot be reversed. * - * @param updateNetworkAclRuleOptions the {@link UpdateNetworkAclRuleOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link NetworkACLRule} + * @param deleteSnapshotOptions the {@link DeleteSnapshotOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall updateNetworkAclRule(UpdateNetworkAclRuleOptions updateNetworkAclRuleOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateNetworkAclRuleOptions, - "updateNetworkAclRuleOptions cannot be null"); + public ServiceCall deleteSnapshot(DeleteSnapshotOptions deleteSnapshotOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteSnapshotOptions, + "deleteSnapshotOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("network_acl_id", updateNetworkAclRuleOptions.networkAclId()); - pathParamsMap.put("id", updateNetworkAclRuleOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/network_acls/{network_acl_id}/rules/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateNetworkAclRule"); + pathParamsMap.put("id", deleteSnapshotOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshots/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteSnapshot"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); + if (deleteSnapshotOptions.ifMatch() != null) { + builder.header("If-Match", deleteSnapshotOptions.ifMatch()); + } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateNetworkAclRuleOptions.networkAclRulePatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * List security groups. + * Delete a snapshot clone. * - * This request lists security groups in the region. A security group defines a set of packet filtering rules to allow - * traffic in and out of the resources targeted by the security group. No traffic is allowed by default. Security - * group rules are stateful so that reverse traffic in response to allowed traffic is automatically allowed. + * This request deletes a snapshot clone. This operation cannot be reversed, but an equivalent clone may be recreated + * from the snapshot. * - * @param listSecurityGroupsOptions the {@link ListSecurityGroupsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link SecurityGroupCollection} + * @param deleteSnapshotCloneOptions the {@link DeleteSnapshotCloneOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall listSecurityGroups(ListSecurityGroupsOptions listSecurityGroupsOptions) { - if (listSecurityGroupsOptions == null) { - listSecurityGroupsOptions = new ListSecurityGroupsOptions.Builder().build(); + public ServiceCall deleteSnapshotClone(DeleteSnapshotCloneOptions deleteSnapshotCloneOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteSnapshotCloneOptions, + "deleteSnapshotCloneOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", deleteSnapshotCloneOptions.id()); + pathParamsMap.put("zone_name", deleteSnapshotCloneOptions.zoneName()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshots/{id}/clones/{zone_name}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteSnapshotClone"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listSecurityGroups"); + builder.query("version", String.valueOf(this.version)); + builder.query("generation", String.valueOf(this.generation)); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * Delete a snapshot consistency group. + * + * This request deletes snapshot consistency group. This operation cannot be reversed. If the + * `delete_snapshots_on_delete` property is `true`, all snapshots in the consistency group will also be deleted. + * + * @param deleteSnapshotConsistencyGroupOptions the {@link DeleteSnapshotConsistencyGroupOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link SnapshotConsistencyGroup} + */ + public ServiceCall deleteSnapshotConsistencyGroup(DeleteSnapshotConsistencyGroupOptions deleteSnapshotConsistencyGroupOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteSnapshotConsistencyGroupOptions, + "deleteSnapshotConsistencyGroupOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", deleteSnapshotConsistencyGroupOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshot_consistency_groups/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteSnapshotConsistencyGroup"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listSecurityGroupsOptions.start() != null) { - builder.query("start", String.valueOf(listSecurityGroupsOptions.start())); - } - if (listSecurityGroupsOptions.limit() != null) { - builder.query("limit", String.valueOf(listSecurityGroupsOptions.limit())); - } - if (listSecurityGroupsOptions.resourceGroupId() != null) { - builder.query("resource_group.id", String.valueOf(listSecurityGroupsOptions.resourceGroupId())); - } - if (listSecurityGroupsOptions.vpcId() != null) { - builder.query("vpc.id", String.valueOf(listSecurityGroupsOptions.vpcId())); - } - if (listSecurityGroupsOptions.vpcCrn() != null) { - builder.query("vpc.crn", String.valueOf(listSecurityGroupsOptions.vpcCrn())); - } - if (listSecurityGroupsOptions.vpcName() != null) { - builder.query("vpc.name", String.valueOf(listSecurityGroupsOptions.vpcName())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List security groups. + * Delete a filtered collection of snapshots. * - * This request lists security groups in the region. A security group defines a set of packet filtering rules to allow - * traffic in and out of the resources targeted by the security group. No traffic is allowed by default. Security - * group rules are stateful so that reverse traffic in response to allowed traffic is automatically allowed. + * This request deletes snapshots that match the specified filter. This operation cannot be reversed. * - * @return a {@link ServiceCall} with a result of type {@link SecurityGroupCollection} + * @param deleteSnapshotsOptions the {@link DeleteSnapshotsOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall listSecurityGroups() { - return listSecurityGroups(null); + public ServiceCall deleteSnapshots(DeleteSnapshotsOptions deleteSnapshotsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteSnapshotsOptions, + "deleteSnapshotsOptions cannot be null"); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshots")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteSnapshots"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.query("version", String.valueOf(this.version)); + builder.query("generation", String.valueOf(this.generation)); + builder.query("source_volume.id", String.valueOf(deleteSnapshotsOptions.sourceVolumeId())); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + return createServiceCall(builder.build(), responseConverter); } /** - * Create a security group. + * Retrieve a snapshot. * - * This request creates a new security group from a security group prototype object. The prototype object is - * structured in the same way as a retrieved security group, and contains the information necessary to create the new - * security group. If security group rules are included in the prototype object, those rules will be added to the - * security group. Each security group is scoped to one VPC. Only resources in that VPC can be added to the security - * group. + * This request retrieves a single snapshot specified by the identifier in the URL. * - * @param createSecurityGroupOptions the {@link CreateSecurityGroupOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link SecurityGroup} + * @param getSnapshotOptions the {@link GetSnapshotOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Snapshot} */ - public ServiceCall createSecurityGroup(CreateSecurityGroupOptions createSecurityGroupOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createSecurityGroupOptions, - "createSecurityGroupOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createSecurityGroup"); + public ServiceCall getSnapshot(GetSnapshotOptions getSnapshotOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getSnapshotOptions, + "getSnapshotOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", getSnapshotOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshots/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getSnapshot"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.add("vpc", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createSecurityGroupOptions.vpc())); - if (createSecurityGroupOptions.name() != null) { - contentJson.addProperty("name", createSecurityGroupOptions.name()); - } - if (createSecurityGroupOptions.resourceGroup() != null) { - contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createSecurityGroupOptions.resourceGroup())); - } - if (createSecurityGroupOptions.rules() != null) { - contentJson.add("rules", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createSecurityGroupOptions.rules())); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * Retrieve a snapshot clone. + * + * This request retrieves a single clone specified by the snapshot identifier and zone name in the URL. + * + * @param getSnapshotCloneOptions the {@link GetSnapshotCloneOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link SnapshotClone} + */ + public ServiceCall getSnapshotClone(GetSnapshotCloneOptions getSnapshotCloneOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getSnapshotCloneOptions, + "getSnapshotCloneOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", getSnapshotCloneOptions.id()); + pathParamsMap.put("zone_name", getSnapshotCloneOptions.zoneName()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshots/{id}/clones/{zone_name}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getSnapshotClone"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + builder.query("generation", String.valueOf(this.generation)); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * Retrieve a snapshot consistency group. + * + * This request retrieves a single snapshot consistency group specified by the identifier in the URL. + * + * @param getSnapshotConsistencyGroupOptions the {@link GetSnapshotConsistencyGroupOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link SnapshotConsistencyGroup} + */ + public ServiceCall getSnapshotConsistencyGroup(GetSnapshotConsistencyGroupOptions getSnapshotConsistencyGroupOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getSnapshotConsistencyGroupOptions, + "getSnapshotConsistencyGroupOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", getSnapshotConsistencyGroupOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshot_consistency_groups/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getSnapshotConsistencyGroup"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + builder.query("generation", String.valueOf(this.generation)); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * List clones for a snapshot. + * + * This request lists clones for a snapshot. Use a clone to quickly restore a snapshot within the clone's zone. + * + * @param listSnapshotClonesOptions the {@link ListSnapshotClonesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link SnapshotCloneCollection} + */ + public ServiceCall listSnapshotClones(ListSnapshotClonesOptions listSnapshotClonesOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listSnapshotClonesOptions, + "listSnapshotClonesOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", listSnapshotClonesOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshots/{id}/clones", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listSnapshotClones"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + builder.query("generation", String.valueOf(this.generation)); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * List snapshot consistency groups. + * + * This request lists snapshot consistency groups in the region. A snapshot consistency group is a collection of + * individual snapshots taken at the same time. + * + * @param listSnapshotConsistencyGroupsOptions the {@link ListSnapshotConsistencyGroupsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link SnapshotConsistencyGroupCollection} + */ + public ServiceCall listSnapshotConsistencyGroups(ListSnapshotConsistencyGroupsOptions listSnapshotConsistencyGroupsOptions) { + if (listSnapshotConsistencyGroupsOptions == null) { + listSnapshotConsistencyGroupsOptions = new ListSnapshotConsistencyGroupsOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshot_consistency_groups")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listSnapshotConsistencyGroups"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + builder.query("generation", String.valueOf(this.generation)); + if (listSnapshotConsistencyGroupsOptions.start() != null) { + builder.query("start", String.valueOf(listSnapshotConsistencyGroupsOptions.start())); + } + if (listSnapshotConsistencyGroupsOptions.limit() != null) { + builder.query("limit", String.valueOf(listSnapshotConsistencyGroupsOptions.limit())); + } + if (listSnapshotConsistencyGroupsOptions.resourceGroupId() != null) { + builder.query("resource_group.id", String.valueOf(listSnapshotConsistencyGroupsOptions.resourceGroupId())); + } + if (listSnapshotConsistencyGroupsOptions.name() != null) { + builder.query("name", String.valueOf(listSnapshotConsistencyGroupsOptions.name())); + } + if (listSnapshotConsistencyGroupsOptions.sort() != null) { + builder.query("sort", String.valueOf(listSnapshotConsistencyGroupsOptions.sort())); + } + if (listSnapshotConsistencyGroupsOptions.backupPolicyPlanId() != null) { + builder.query("backup_policy_plan.id", String.valueOf(listSnapshotConsistencyGroupsOptions.backupPolicyPlanId())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * List snapshot consistency groups. + * + * This request lists snapshot consistency groups in the region. A snapshot consistency group is a collection of + * individual snapshots taken at the same time. + * + * @return a {@link ServiceCall} with a result of type {@link SnapshotConsistencyGroupCollection} + */ + public ServiceCall listSnapshotConsistencyGroups() { + return listSnapshotConsistencyGroups(null); + } + + /** + * List instance profiles compatible with a snapshot. + * + * This request lists instance profiles compatible with a snapshot's + * `allowed_use.instance`, `operating_system.architecture` and + * `operating_system.user_data_format` properties, sorted by ascending `name` property values. The specified snapshot + * must be bootable. + * + * @param listSnapshotInstanceProfilesOptions the {@link ListSnapshotInstanceProfilesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link SnapshotInstanceProfileCollection} + */ + public ServiceCall listSnapshotInstanceProfiles(ListSnapshotInstanceProfilesOptions listSnapshotInstanceProfilesOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listSnapshotInstanceProfilesOptions, + "listSnapshotInstanceProfilesOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", listSnapshotInstanceProfilesOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshots/{id}/instance_profiles", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listSnapshotInstanceProfiles"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + builder.query("generation", String.valueOf(this.generation)); + if (listSnapshotInstanceProfilesOptions.start() != null) { + builder.query("start", String.valueOf(listSnapshotInstanceProfilesOptions.start())); + } + if (listSnapshotInstanceProfilesOptions.limit() != null) { + builder.query("limit", String.valueOf(listSnapshotInstanceProfilesOptions.limit())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * List snapshots. + * + * This request lists snapshots in the region. A snapshot preserves the data of a volume at the time the snapshot is + * created. + * + * @param listSnapshotsOptions the {@link ListSnapshotsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link SnapshotCollection} + */ + public ServiceCall listSnapshots(ListSnapshotsOptions listSnapshotsOptions) { + if (listSnapshotsOptions == null) { + listSnapshotsOptions = new ListSnapshotsOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshots")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listSnapshots"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + builder.query("generation", String.valueOf(this.generation)); + if (listSnapshotsOptions.start() != null) { + builder.query("start", String.valueOf(listSnapshotsOptions.start())); + } + if (listSnapshotsOptions.limit() != null) { + builder.query("limit", String.valueOf(listSnapshotsOptions.limit())); + } + if (listSnapshotsOptions.tag() != null) { + builder.query("tag", String.valueOf(listSnapshotsOptions.tag())); + } + if (listSnapshotsOptions.resourceGroupId() != null) { + builder.query("resource_group.id", String.valueOf(listSnapshotsOptions.resourceGroupId())); + } + if (listSnapshotsOptions.name() != null) { + builder.query("name", String.valueOf(listSnapshotsOptions.name())); + } + if (listSnapshotsOptions.sourceVolumeId() != null) { + builder.query("source_volume.id", String.valueOf(listSnapshotsOptions.sourceVolumeId())); + } + if (listSnapshotsOptions.sourceVolumeCrn() != null) { + builder.query("source_volume.crn", String.valueOf(listSnapshotsOptions.sourceVolumeCrn())); + } + if (listSnapshotsOptions.sourceImageId() != null) { + builder.query("source_image.id", String.valueOf(listSnapshotsOptions.sourceImageId())); + } + if (listSnapshotsOptions.sourceImageCrn() != null) { + builder.query("source_image.crn", String.valueOf(listSnapshotsOptions.sourceImageCrn())); + } + if (listSnapshotsOptions.sort() != null) { + builder.query("sort", String.valueOf(listSnapshotsOptions.sort())); + } + if (listSnapshotsOptions.backupPolicyPlanId() != null) { + builder.query("backup_policy_plan.id", String.valueOf(listSnapshotsOptions.backupPolicyPlanId())); + } + if (listSnapshotsOptions.copiesId() != null) { + builder.query("copies[].id", String.valueOf(listSnapshotsOptions.copiesId())); + } + if (listSnapshotsOptions.copiesName() != null) { + builder.query("copies[].name", String.valueOf(listSnapshotsOptions.copiesName())); + } + if (listSnapshotsOptions.copiesCrn() != null) { + builder.query("copies[].crn", String.valueOf(listSnapshotsOptions.copiesCrn())); + } + if (listSnapshotsOptions.copiesRemoteRegionName() != null) { + builder.query("copies[].remote.region.name", String.valueOf(listSnapshotsOptions.copiesRemoteRegionName())); + } + if (listSnapshotsOptions.sourceSnapshotId() != null) { + builder.query("source_snapshot.id", String.valueOf(listSnapshotsOptions.sourceSnapshotId())); + } + if (listSnapshotsOptions.sourceSnapshotRemoteRegionName() != null) { + builder.query("source_snapshot.remote.region.name", String.valueOf(listSnapshotsOptions.sourceSnapshotRemoteRegionName())); + } + if (listSnapshotsOptions.sourceVolumeRemoteRegionName() != null) { + builder.query("source_volume.remote.region.name", String.valueOf(listSnapshotsOptions.sourceVolumeRemoteRegionName())); + } + if (listSnapshotsOptions.sourceImageRemoteRegionName() != null) { + builder.query("source_image.remote.region.name", String.valueOf(listSnapshotsOptions.sourceImageRemoteRegionName())); + } + if (listSnapshotsOptions.clonesZoneName() != null) { + builder.query("clones[].zone.name", String.valueOf(listSnapshotsOptions.clonesZoneName())); + } + if (listSnapshotsOptions.snapshotConsistencyGroupId() != null) { + builder.query("snapshot_consistency_group.id", String.valueOf(listSnapshotsOptions.snapshotConsistencyGroupId())); + } + if (listSnapshotsOptions.snapshotConsistencyGroupCrn() != null) { + builder.query("snapshot_consistency_group.crn", String.valueOf(listSnapshotsOptions.snapshotConsistencyGroupCrn())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * List snapshots. + * + * This request lists snapshots in the region. A snapshot preserves the data of a volume at the time the snapshot is + * created. + * + * @return a {@link ServiceCall} with a result of type {@link SnapshotCollection} + */ + public ServiceCall listSnapshots() { + return listSnapshots(null); + } + + /** + * Update a snapshot. + * + * This request updates a snapshot with the information in a provided snapshot patch. The snapshot consistency group + * patch object is structured in the same way as a retrieved snapshot and contains only the information to be updated. + * + * @param updateSnapshotOptions the {@link UpdateSnapshotOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Snapshot} + */ + public ServiceCall updateSnapshot(UpdateSnapshotOptions updateSnapshotOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateSnapshotOptions, + "updateSnapshotOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", updateSnapshotOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshots/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateSnapshot"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + if (updateSnapshotOptions.ifMatch() != null) { + builder.header("If-Match", updateSnapshotOptions.ifMatch()); + } + builder.query("version", String.valueOf(this.version)); + builder.query("generation", String.valueOf(this.generation)); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateSnapshotOptions.snapshotPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * Update a snapshot consistency group. + * + * This request updates a snapshot consistency group with the information in a provided snapshot consistency group + * patch. The snapshot consistency group patch object is structured in the same way as a retrieved snapshot + * consistency group and contains only the information to be updated. + * + * @param updateSnapshotConsistencyGroupOptions the {@link UpdateSnapshotConsistencyGroupOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link SnapshotConsistencyGroup} + */ + public ServiceCall updateSnapshotConsistencyGroup(UpdateSnapshotConsistencyGroupOptions updateSnapshotConsistencyGroupOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateSnapshotConsistencyGroupOptions, + "updateSnapshotConsistencyGroupOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", updateSnapshotConsistencyGroupOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/snapshot_consistency_groups/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateSnapshotConsistencyGroup"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + if (updateSnapshotConsistencyGroupOptions.ifMatch() != null) { + builder.header("If-Match", updateSnapshotConsistencyGroupOptions.ifMatch()); + } + builder.query("version", String.valueOf(this.version)); + builder.query("generation", String.valueOf(this.generation)); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateSnapshotConsistencyGroupOptions.snapshotConsistencyGroupPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * Create a subnet. + * + * This request creates a new subnet from a subnet prototype object. The prototype object is structured in the same + * way as a retrieved subnet, and contains the information necessary to create the new subnet. For this request to + * succeed, the prototype's CIDR block must not overlap with an existing subnet in the VPC. + * + * @param createSubnetOptions the {@link CreateSubnetOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Subnet} + */ + public ServiceCall createSubnet(CreateSubnetOptions createSubnetOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createSubnetOptions, + "createSubnetOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createSubnet"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + builder.query("generation", String.valueOf(this.generation)); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createSubnetOptions.subnetPrototype()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + return createServiceCall(builder.build(), responseConverter); + } + + /** + * Reserve an IP in a subnet. + * + * This request reserves an IP address in a subnet. If the provided prototype object includes an `address`, the + * address must not already be reserved. + * + * @param createSubnetReservedIpOptions the {@link CreateSubnetReservedIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ReservedIP} + */ + public ServiceCall createSubnetReservedIp(CreateSubnetReservedIpOptions createSubnetReservedIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createSubnetReservedIpOptions, + "createSubnetReservedIpOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("subnet_id", createSubnetReservedIpOptions.subnetId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{subnet_id}/reserved_ips", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createSubnetReservedIp"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + builder.query("version", String.valueOf(this.version)); + builder.query("generation", String.valueOf(this.generation)); + final JsonObject contentJson = new JsonObject(); + if (createSubnetReservedIpOptions.address() != null) { + contentJson.addProperty("address", createSubnetReservedIpOptions.address()); + } + if (createSubnetReservedIpOptions.autoDelete() != null) { + contentJson.addProperty("auto_delete", createSubnetReservedIpOptions.autoDelete()); + } + if (createSubnetReservedIpOptions.name() != null) { + contentJson.addProperty("name", createSubnetReservedIpOptions.name()); + } + if (createSubnetReservedIpOptions.target() != null) { + contentJson.add("target", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createSubnetReservedIpOptions.target())); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a security group. + * Delete a subnet. * - * This request deletes a security group. A security group cannot be deleted if it is referenced by any security group - * targets or rules. Additionally, a VPC's default security group cannot be deleted. This operation cannot be - * reversed. + * This request deletes a subnet. This operation cannot be reversed. For this request to succeed, the subnet must not + * be referenced by any bare metal server network interfaces, instance network interfaces, virtual network interfaces, + * VPN gateways, or load balancers. A delete operation automatically detaches the subnet from any network ACLs, public + * gateways, or endpoint gateways. All flow log collectors with `auto_delete` set to `true` targeting the subnet or + * any resource in the subnet are automatically deleted. * - * @param deleteSecurityGroupOptions the {@link DeleteSecurityGroupOptions} containing the options for the call + * @param deleteSubnetOptions the {@link DeleteSubnetOptions} containing the options for the call * @return a {@link ServiceCall} with a void result */ - public ServiceCall deleteSecurityGroup(DeleteSecurityGroupOptions deleteSecurityGroupOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteSecurityGroupOptions, - "deleteSecurityGroupOptions cannot be null"); + public ServiceCall deleteSubnet(DeleteSubnetOptions deleteSubnetOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteSubnetOptions, + "deleteSubnetOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteSecurityGroupOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteSecurityGroup"); + pathParamsMap.put("id", deleteSubnetOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteSubnet"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } @@ -11433,809 +11728,840 @@ public ServiceCall deleteSecurityGroup(DeleteSecurityGroupOptions deleteSe } /** - * Retrieve a security group. + * Delete a reserved IP. * - * This request retrieves a single security group specified by the identifier in the URL path. + * This request releases a reserved IP. This operation cannot be reversed. * - * @param getSecurityGroupOptions the {@link GetSecurityGroupOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link SecurityGroup} + * For this request to succeed, the reserved IP must not be required by another resource, such as a bare metal server + * network interface, instance network interface or virtual network interface for which it is the primary IP. A + * provider-owned reserved IP is not allowed to be deleted. + * + * @param deleteSubnetReservedIpOptions the {@link DeleteSubnetReservedIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall getSecurityGroup(GetSecurityGroupOptions getSecurityGroupOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getSecurityGroupOptions, - "getSecurityGroupOptions cannot be null"); + public ServiceCall deleteSubnetReservedIp(DeleteSubnetReservedIpOptions deleteSubnetReservedIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteSubnetReservedIpOptions, + "deleteSubnetReservedIpOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getSecurityGroupOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getSecurityGroup"); + pathParamsMap.put("subnet_id", deleteSubnetReservedIpOptions.subnetId()); + pathParamsMap.put("id", deleteSubnetReservedIpOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{subnet_id}/reserved_ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteSubnetReservedIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Update a security group. + * Retrieve a subnet. * - * This request updates a security group with the information provided in a security group patch object. The security - * group patch object is structured in the same way as a retrieved security group and contains only the information to - * be updated. + * This request retrieves a single subnet specified by the identifier in the URL. * - * @param updateSecurityGroupOptions the {@link UpdateSecurityGroupOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link SecurityGroup} + * @param getSubnetOptions the {@link GetSubnetOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Subnet} */ - public ServiceCall updateSecurityGroup(UpdateSecurityGroupOptions updateSecurityGroupOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateSecurityGroupOptions, - "updateSecurityGroupOptions cannot be null"); + public ServiceCall getSubnet(GetSubnetOptions getSubnetOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getSubnetOptions, + "getSubnetOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateSecurityGroupOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateSecurityGroup"); + pathParamsMap.put("id", getSubnetOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getSubnet"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateSecurityGroupOptions.securityGroupPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List rules in a security group. + * Retrieve a subnet's attached network ACL. * - * This request lists rules in a security group. These rules define what traffic the security group permits. Security - * group rules are stateful, such that reverse traffic in response to allowed traffic is automatically permitted. + * This request retrieves the network ACL attached to the subnet specified by the identifier in the URL. * - * @param listSecurityGroupRulesOptions the {@link ListSecurityGroupRulesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link SecurityGroupRuleCollection} + * @param getSubnetNetworkAclOptions the {@link GetSubnetNetworkAclOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link NetworkACL} */ - public ServiceCall listSecurityGroupRules(ListSecurityGroupRulesOptions listSecurityGroupRulesOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listSecurityGroupRulesOptions, - "listSecurityGroupRulesOptions cannot be null"); + public ServiceCall getSubnetNetworkAcl(GetSubnetNetworkAclOptions getSubnetNetworkAclOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getSubnetNetworkAclOptions, + "getSubnetNetworkAclOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("security_group_id", listSecurityGroupRulesOptions.securityGroupId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups/{security_group_id}/rules", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listSecurityGroupRules"); + pathParamsMap.put("id", getSubnetNetworkAclOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{id}/network_acl", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getSubnetNetworkAcl"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create a rule for a security group. + * Retrieve a subnet's attached public gateway. * - * This request creates a new security group rule from a security group rule prototype object. The prototype object is - * structured in the same way as a retrieved security group rule and contains the information necessary to create the - * rule. As part of creating a new rule in a security group, the rule is applied to all the networking interfaces in - * the security group. Rules specify which IP traffic a security group will allow. Security group rules are stateful, - * such that reverse traffic in response to allowed traffic is automatically permitted. A rule allowing inbound TCP - * traffic on port 80 also allows outbound TCP traffic on port 80 without the need for an additional rule. + * This request retrieves the public gateway attached to the subnet specified by the identifier in the URL. * - * @param createSecurityGroupRuleOptions the {@link CreateSecurityGroupRuleOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link SecurityGroupRule} + * @param getSubnetPublicGatewayOptions the {@link GetSubnetPublicGatewayOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PublicGateway} */ - public ServiceCall createSecurityGroupRule(CreateSecurityGroupRuleOptions createSecurityGroupRuleOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createSecurityGroupRuleOptions, - "createSecurityGroupRuleOptions cannot be null"); + public ServiceCall getSubnetPublicGateway(GetSubnetPublicGatewayOptions getSubnetPublicGatewayOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getSubnetPublicGatewayOptions, + "getSubnetPublicGatewayOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("security_group_id", createSecurityGroupRuleOptions.securityGroupId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups/{security_group_id}/rules", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createSecurityGroupRule"); + pathParamsMap.put("id", getSubnetPublicGatewayOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{id}/public_gateway", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getSubnetPublicGateway"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createSecurityGroupRuleOptions.securityGroupRulePrototype()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a security group rule. + * Retrieve a reserved IP. * - * This request deletes a security group rule. This operation cannot be reversed. Removing a security group rule will - * not end existing connections allowed by that rule. + * This request retrieves a single reserved IP specified by the identifier in the URL. * - * @param deleteSecurityGroupRuleOptions the {@link DeleteSecurityGroupRuleOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param getSubnetReservedIpOptions the {@link GetSubnetReservedIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ReservedIP} */ - public ServiceCall deleteSecurityGroupRule(DeleteSecurityGroupRuleOptions deleteSecurityGroupRuleOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteSecurityGroupRuleOptions, - "deleteSecurityGroupRuleOptions cannot be null"); + public ServiceCall getSubnetReservedIp(GetSubnetReservedIpOptions getSubnetReservedIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getSubnetReservedIpOptions, + "getSubnetReservedIpOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("security_group_id", deleteSecurityGroupRuleOptions.securityGroupId()); - pathParamsMap.put("id", deleteSecurityGroupRuleOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups/{security_group_id}/rules/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteSecurityGroupRule"); + pathParamsMap.put("subnet_id", getSubnetReservedIpOptions.subnetId()); + pathParamsMap.put("id", getSubnetReservedIpOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{subnet_id}/reserved_ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getSubnetReservedIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a security group rule. + * Retrieve a subnet's attached routing table. * - * This request retrieves a single security group rule specified by the identifier in the URL path. + * This request retrieves the routing table attached to the subnet specified by the identifier in the URL. * - * @param getSecurityGroupRuleOptions the {@link GetSecurityGroupRuleOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link SecurityGroupRule} + * @param getSubnetRoutingTableOptions the {@link GetSubnetRoutingTableOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link RoutingTable} */ - public ServiceCall getSecurityGroupRule(GetSecurityGroupRuleOptions getSecurityGroupRuleOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getSecurityGroupRuleOptions, - "getSecurityGroupRuleOptions cannot be null"); + public ServiceCall getSubnetRoutingTable(GetSubnetRoutingTableOptions getSubnetRoutingTableOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getSubnetRoutingTableOptions, + "getSubnetRoutingTableOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("security_group_id", getSecurityGroupRuleOptions.securityGroupId()); - pathParamsMap.put("id", getSecurityGroupRuleOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups/{security_group_id}/rules/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getSecurityGroupRule"); + pathParamsMap.put("id", getSubnetRoutingTableOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{id}/routing_table", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getSubnetRoutingTable"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a security group rule. + * List reserved IPs in a subnet. * - * This request updates a security group rule with the information in a provided rule patch object. The rule patch - * object contains only the information to be updated. The request will fail if the provided patch includes properties - * that are not used by the rule's protocol. + * This request lists reserved IPs in a subnet. A reserved IP resource will exist for every address in the subnet + * which is not available for use. * - * @param updateSecurityGroupRuleOptions the {@link UpdateSecurityGroupRuleOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link SecurityGroupRule} + * @param listSubnetReservedIpsOptions the {@link ListSubnetReservedIpsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ReservedIPCollection} */ - public ServiceCall updateSecurityGroupRule(UpdateSecurityGroupRuleOptions updateSecurityGroupRuleOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateSecurityGroupRuleOptions, - "updateSecurityGroupRuleOptions cannot be null"); + public ServiceCall listSubnetReservedIps(ListSubnetReservedIpsOptions listSubnetReservedIpsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listSubnetReservedIpsOptions, + "listSubnetReservedIpsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("security_group_id", updateSecurityGroupRuleOptions.securityGroupId()); - pathParamsMap.put("id", updateSecurityGroupRuleOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups/{security_group_id}/rules/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateSecurityGroupRule"); + pathParamsMap.put("subnet_id", listSubnetReservedIpsOptions.subnetId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{subnet_id}/reserved_ips", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listSubnetReservedIps"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateSecurityGroupRuleOptions.securityGroupRulePatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listSubnetReservedIpsOptions.start() != null) { + builder.query("start", String.valueOf(listSubnetReservedIpsOptions.start())); + } + if (listSubnetReservedIpsOptions.limit() != null) { + builder.query("limit", String.valueOf(listSubnetReservedIpsOptions.limit())); + } + if (listSubnetReservedIpsOptions.sort() != null) { + builder.query("sort", String.valueOf(listSubnetReservedIpsOptions.sort())); + } + if (listSubnetReservedIpsOptions.targetId() != null) { + builder.query("target.id", String.valueOf(listSubnetReservedIpsOptions.targetId())); + } + if (listSubnetReservedIpsOptions.targetCrn() != null) { + builder.query("target.crn", String.valueOf(listSubnetReservedIpsOptions.targetCrn())); + } + if (listSubnetReservedIpsOptions.targetName() != null) { + builder.query("target.name", String.valueOf(listSubnetReservedIpsOptions.targetName())); + } + if (listSubnetReservedIpsOptions.targetResourceType() != null) { + builder.query("target.resource_type", String.valueOf(listSubnetReservedIpsOptions.targetResourceType())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List targets associated with a security group. + * List subnets. * - * This request lists targets associated with a security group, to which the rules in the security group are applied. + * This request lists subnets in the region. Subnets are contiguous ranges of IP addresses specified in CIDR block + * notation. Each subnet is within a particular zone and cannot span multiple zones or regions. * - * @param listSecurityGroupTargetsOptions the {@link ListSecurityGroupTargetsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link SecurityGroupTargetCollection} + * @param listSubnetsOptions the {@link ListSubnetsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link SubnetCollection} */ - public ServiceCall listSecurityGroupTargets(ListSecurityGroupTargetsOptions listSecurityGroupTargetsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listSecurityGroupTargetsOptions, - "listSecurityGroupTargetsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("security_group_id", listSecurityGroupTargetsOptions.securityGroupId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups/{security_group_id}/targets", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listSecurityGroupTargets"); + public ServiceCall listSubnets(ListSubnetsOptions listSubnetsOptions) { + if (listSubnetsOptions == null) { + listSubnetsOptions = new ListSubnetsOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listSubnets"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listSecurityGroupTargetsOptions.start() != null) { - builder.query("start", String.valueOf(listSecurityGroupTargetsOptions.start())); + if (listSubnetsOptions.start() != null) { + builder.query("start", String.valueOf(listSubnetsOptions.start())); } - if (listSecurityGroupTargetsOptions.limit() != null) { - builder.query("limit", String.valueOf(listSecurityGroupTargetsOptions.limit())); + if (listSubnetsOptions.limit() != null) { + builder.query("limit", String.valueOf(listSubnetsOptions.limit())); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listSubnetsOptions.resourceGroupId() != null) { + builder.query("resource_group.id", String.valueOf(listSubnetsOptions.resourceGroupId())); + } + if (listSubnetsOptions.zoneName() != null) { + builder.query("zone.name", String.valueOf(listSubnetsOptions.zoneName())); + } + if (listSubnetsOptions.vpcId() != null) { + builder.query("vpc.id", String.valueOf(listSubnetsOptions.vpcId())); + } + if (listSubnetsOptions.vpcCrn() != null) { + builder.query("vpc.crn", String.valueOf(listSubnetsOptions.vpcCrn())); + } + if (listSubnetsOptions.vpcName() != null) { + builder.query("vpc.name", String.valueOf(listSubnetsOptions.vpcName())); + } + if (listSubnetsOptions.routingTableId() != null) { + builder.query("routing_table.id", String.valueOf(listSubnetsOptions.routingTableId())); + } + if (listSubnetsOptions.routingTableName() != null) { + builder.query("routing_table.name", String.valueOf(listSubnetsOptions.routingTableName())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Remove a target from a security group. + * List subnets. * - * This request removes a target from a security group. For this request to succeed, the target must be attached to at - * least one other security group. The specified target identifier can be: + * This request lists subnets in the region. Subnets are contiguous ranges of IP addresses specified in CIDR block + * notation. Each subnet is within a particular zone and cannot span multiple zones or regions. * - * - A bare metal server network interface identifier - * - A virtual network interface identifier - * - A VPN server identifier - * - A load balancer identifier - * - An endpoint gateway identifier - * - An instance network interface identifier + * @return a {@link ServiceCall} with a result of type {@link SubnetCollection} + */ + public ServiceCall listSubnets() { + return listSubnets(null); + } + + /** + * Replace the network ACL for a subnet. * - * Security groups are stateful, so any changes to a target's security groups are applied to new connections. Existing - * connections are not affected. + * This request replaces the existing network ACL for a subnet with the network ACL specified in the request body. * - * @param deleteSecurityGroupTargetBindingOptions the {@link DeleteSecurityGroupTargetBindingOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param replaceSubnetNetworkAclOptions the {@link ReplaceSubnetNetworkAclOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link NetworkACL} */ - public ServiceCall deleteSecurityGroupTargetBinding(DeleteSecurityGroupTargetBindingOptions deleteSecurityGroupTargetBindingOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteSecurityGroupTargetBindingOptions, - "deleteSecurityGroupTargetBindingOptions cannot be null"); + public ServiceCall replaceSubnetNetworkAcl(ReplaceSubnetNetworkAclOptions replaceSubnetNetworkAclOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(replaceSubnetNetworkAclOptions, + "replaceSubnetNetworkAclOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("security_group_id", deleteSecurityGroupTargetBindingOptions.securityGroupId()); - pathParamsMap.put("id", deleteSecurityGroupTargetBindingOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups/{security_group_id}/targets/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteSecurityGroupTargetBinding"); + pathParamsMap.put("id", replaceSubnetNetworkAclOptions.id()); + RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{id}/network_acl", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "replaceSubnetNetworkAcl"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(replaceSubnetNetworkAclOptions.networkAclIdentity()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a security group target. + * Replace the routing table for a subnet. * - * This request retrieves a single target specified by the identifier in the URL path. The target must be an existing - * target of the security group. + * This request replaces the existing routing table for a subnet with the routing table specified in the request body. * - * @param getSecurityGroupTargetOptions the {@link GetSecurityGroupTargetOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link SecurityGroupTargetReference} + * For this request to succeed, the routing table `route_direct_link_ingress`, + * `route_internet_ingress`, `route_transit_gateway_ingress`, and `route_vpc_zone_ingress` properties must be `false`. + * + * @param replaceSubnetRoutingTableOptions the {@link ReplaceSubnetRoutingTableOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link RoutingTable} */ - public ServiceCall getSecurityGroupTarget(GetSecurityGroupTargetOptions getSecurityGroupTargetOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getSecurityGroupTargetOptions, - "getSecurityGroupTargetOptions cannot be null"); + public ServiceCall replaceSubnetRoutingTable(ReplaceSubnetRoutingTableOptions replaceSubnetRoutingTableOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(replaceSubnetRoutingTableOptions, + "replaceSubnetRoutingTableOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("security_group_id", getSecurityGroupTargetOptions.securityGroupId()); - pathParamsMap.put("id", getSecurityGroupTargetOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups/{security_group_id}/targets/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getSecurityGroupTarget"); + pathParamsMap.put("id", replaceSubnetRoutingTableOptions.id()); + RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{id}/routing_table", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "replaceSubnetRoutingTable"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(replaceSubnetRoutingTableOptions.routingTableIdentity()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Add a target to a security group. - * - * This request adds a resource to an existing security group. The specified target identifier can be: - * - * - A bare metal server network interface identifier - * - A virtual network interface identifier - * - A VPN server identifier - * - A load balancer identifier - * - An endpoint gateway identifier - * - An instance network interface identifier + * Attach a public gateway to a subnet. * - * When a target is added to a security group, the security group rules are applied to the target. A request body is - * not required, and if provided, is ignored. + * This request attaches the public gateway, specified in the request body, to the subnet specified by the subnet + * identifier in the URL. The public gateway must have the same VPC and zone as the subnet. * - * @param createSecurityGroupTargetBindingOptions the {@link CreateSecurityGroupTargetBindingOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link SecurityGroupTargetReference} + * @param setSubnetPublicGatewayOptions the {@link SetSubnetPublicGatewayOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link PublicGateway} */ - public ServiceCall createSecurityGroupTargetBinding(CreateSecurityGroupTargetBindingOptions createSecurityGroupTargetBindingOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createSecurityGroupTargetBindingOptions, - "createSecurityGroupTargetBindingOptions cannot be null"); + public ServiceCall setSubnetPublicGateway(SetSubnetPublicGatewayOptions setSubnetPublicGatewayOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(setSubnetPublicGatewayOptions, + "setSubnetPublicGatewayOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("security_group_id", createSecurityGroupTargetBindingOptions.securityGroupId()); - pathParamsMap.put("id", createSecurityGroupTargetBindingOptions.id()); - RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/security_groups/{security_group_id}/targets/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createSecurityGroupTargetBinding"); + pathParamsMap.put("id", setSubnetPublicGatewayOptions.id()); + RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{id}/public_gateway", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "setSubnetPublicGateway"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(setSubnetPublicGatewayOptions.publicGatewayIdentity()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List IKE policies. + * Detach a public gateway from a subnet. * - * This request lists IKE policies in the region. + * This request detaches the public gateway from the subnet specified by the subnet identifier in the URL. * - * @param listIkePoliciesOptions the {@link ListIkePoliciesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link IKEPolicyCollection} + * @param unsetSubnetPublicGatewayOptions the {@link UnsetSubnetPublicGatewayOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall listIkePolicies(ListIkePoliciesOptions listIkePoliciesOptions) { - if (listIkePoliciesOptions == null) { - listIkePoliciesOptions = new ListIkePoliciesOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/ike_policies")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listIkePolicies"); + public ServiceCall unsetSubnetPublicGateway(UnsetSubnetPublicGatewayOptions unsetSubnetPublicGatewayOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(unsetSubnetPublicGatewayOptions, + "unsetSubnetPublicGatewayOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", unsetSubnetPublicGatewayOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{id}/public_gateway", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "unsetSubnetPublicGateway"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listIkePoliciesOptions.start() != null) { - builder.query("start", String.valueOf(listIkePoliciesOptions.start())); - } - if (listIkePoliciesOptions.limit() != null) { - builder.query("limit", String.valueOf(listIkePoliciesOptions.limit())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * List IKE policies. - * - * This request lists IKE policies in the region. - * - * @return a {@link ServiceCall} with a result of type {@link IKEPolicyCollection} - */ - public ServiceCall listIkePolicies() { - return listIkePolicies(null); - } - - /** - * Create an IKE policy. + * Update a subnet. * - * This request creates a new IKE policy. + * This request updates a subnet with the information in a provided subnet patch. The subnet patch object is + * structured in the same way as a retrieved subnet and contains only the information to be updated. * - * @param createIkePolicyOptions the {@link CreateIkePolicyOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link IKEPolicy} + * @param updateSubnetOptions the {@link UpdateSubnetOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Subnet} */ - public ServiceCall createIkePolicy(CreateIkePolicyOptions createIkePolicyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createIkePolicyOptions, - "createIkePolicyOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/ike_policies")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createIkePolicy"); + public ServiceCall updateSubnet(UpdateSubnetOptions updateSubnetOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateSubnetOptions, + "updateSubnetOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", updateSubnetOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateSubnet"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("authentication_algorithm", createIkePolicyOptions.authenticationAlgorithm()); - contentJson.addProperty("dh_group", createIkePolicyOptions.dhGroup()); - contentJson.addProperty("encryption_algorithm", createIkePolicyOptions.encryptionAlgorithm()); - contentJson.addProperty("ike_version", createIkePolicyOptions.ikeVersion()); - if (createIkePolicyOptions.keyLifetime() != null) { - contentJson.addProperty("key_lifetime", createIkePolicyOptions.keyLifetime()); - } - if (createIkePolicyOptions.name() != null) { - contentJson.addProperty("name", createIkePolicyOptions.name()); - } - if (createIkePolicyOptions.resourceGroup() != null) { - contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createIkePolicyOptions.resourceGroup())); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateSubnetOptions.subnetPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete an IKE policy. + * Update a reserved IP. * - * This request deletes an IKE policy. This operation cannot be reversed. For this request to succeed, there must not - * be any VPN gateway connections using this policy. + * This request updates a reserved IP with the information in a provided reserved IP patch. The reserved IP patch + * object is structured in the same way as a retrieved reserved IP and contains only the information to be updated. * - * @param deleteIkePolicyOptions the {@link DeleteIkePolicyOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * A provider-owned reserved IP is not allowed to be updated. + * + * @param updateSubnetReservedIpOptions the {@link UpdateSubnetReservedIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ReservedIP} */ - public ServiceCall deleteIkePolicy(DeleteIkePolicyOptions deleteIkePolicyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteIkePolicyOptions, - "deleteIkePolicyOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteIkePolicyOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/ike_policies/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteIkePolicy"); + public ServiceCall updateSubnetReservedIp(UpdateSubnetReservedIpOptions updateSubnetReservedIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateSubnetReservedIpOptions, + "updateSubnetReservedIpOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("subnet_id", updateSubnetReservedIpOptions.subnetId()); + pathParamsMap.put("id", updateSubnetReservedIpOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/subnets/{subnet_id}/reserved_ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateSubnetReservedIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateSubnetReservedIpOptions.reservedIpPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve an IKE policy. + * Add an association between a floating IP and a virtual network interface. * - * This request retrieves a single IKE policy specified by the identifier in the URL. + * This request adds an association between the specified floating IP and the specified virtual network interface. * - * @param getIkePolicyOptions the {@link GetIkePolicyOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link IKEPolicy} + * If the virtual network interface has `enable_infrastructure_nat` set to `true`, no more than one floating IP can be + * associated, and network address translation is performed between the floating IP address and the virtual network + * interface's `primary_ip` address. + * + * If the virtual network interface has `enable_infrastructure_nat` set to `false`, packets are passed unchanged + * to/from the virtual network interface. + * + * The floating IP must: + * - be in the same `zone` as the virtual network interface + * - not currently be associated with another resource + * + * The virtual network interface's `target` must not currently be a file share mount target. + * + * A request body is not required, and if provided, is ignored. + * + * @param addNetworkInterfaceFloatingIpOptions the {@link AddNetworkInterfaceFloatingIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link FloatingIPReference} */ - public ServiceCall getIkePolicy(GetIkePolicyOptions getIkePolicyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getIkePolicyOptions, - "getIkePolicyOptions cannot be null"); + public ServiceCall addNetworkInterfaceFloatingIp(AddNetworkInterfaceFloatingIpOptions addNetworkInterfaceFloatingIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(addNetworkInterfaceFloatingIpOptions, + "addNetworkInterfaceFloatingIpOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getIkePolicyOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/ike_policies/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getIkePolicy"); + pathParamsMap.put("virtual_network_interface_id", addNetworkInterfaceFloatingIpOptions.virtualNetworkInterfaceId()); + pathParamsMap.put("id", addNetworkInterfaceFloatingIpOptions.id()); + RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces/{virtual_network_interface_id}/floating_ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "addNetworkInterfaceFloatingIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update an IKE policy. + * Bind a reserved IP to a virtual network interface. * - * This request updates the properties of an existing IKE policy. + * This request binds the specified reserved IP to the specified virtual network interface. * - * @param updateIkePolicyOptions the {@link UpdateIkePolicyOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link IKEPolicy} + * The reserved IP must currently be unbound and in the primary IP's subnet. The virtual network interface's `target` + * must not currently be a file share mount target. + * + * @param addVirtualNetworkInterfaceIpOptions the {@link AddVirtualNetworkInterfaceIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ReservedIPReference} */ - public ServiceCall updateIkePolicy(UpdateIkePolicyOptions updateIkePolicyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateIkePolicyOptions, - "updateIkePolicyOptions cannot be null"); + public ServiceCall addVirtualNetworkInterfaceIp(AddVirtualNetworkInterfaceIpOptions addVirtualNetworkInterfaceIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(addVirtualNetworkInterfaceIpOptions, + "addVirtualNetworkInterfaceIpOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateIkePolicyOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/ike_policies/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateIkePolicy"); + pathParamsMap.put("virtual_network_interface_id", addVirtualNetworkInterfaceIpOptions.virtualNetworkInterfaceId()); + pathParamsMap.put("id", addVirtualNetworkInterfaceIpOptions.id()); + RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces/{virtual_network_interface_id}/ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "addVirtualNetworkInterfaceIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateIkePolicyOptions.ikePolicyPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List VPN gateway connections that use a specified IKE policy. + * Create a virtual network interface. * - * This request lists VPN gateway connections that use an IKE policy. + * This request creates a new virtual network interface from a virtual network interface prototype object. The + * prototype object is structured in the same way as a retrieved virtual network interface, and contains the + * information necessary to create the new virtual network interface. * - * @param listIkePolicyConnectionsOptions the {@link ListIkePolicyConnectionsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link IKEPolicyConnectionCollection} + * @param createVirtualNetworkInterfaceOptions the {@link CreateVirtualNetworkInterfaceOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VirtualNetworkInterface} */ - public ServiceCall listIkePolicyConnections(ListIkePolicyConnectionsOptions listIkePolicyConnectionsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listIkePolicyConnectionsOptions, - "listIkePolicyConnectionsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", listIkePolicyConnectionsOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/ike_policies/{id}/connections", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listIkePolicyConnections"); + public ServiceCall createVirtualNetworkInterface(CreateVirtualNetworkInterfaceOptions createVirtualNetworkInterfaceOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createVirtualNetworkInterfaceOptions, + "createVirtualNetworkInterfaceOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createVirtualNetworkInterface"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listIkePolicyConnectionsOptions.start() != null) { - builder.query("start", String.valueOf(listIkePolicyConnectionsOptions.start())); + final JsonObject contentJson = new JsonObject(); + if (createVirtualNetworkInterfaceOptions.allowIpSpoofing() != null) { + contentJson.addProperty("allow_ip_spoofing", createVirtualNetworkInterfaceOptions.allowIpSpoofing()); } - if (listIkePolicyConnectionsOptions.limit() != null) { - builder.query("limit", String.valueOf(listIkePolicyConnectionsOptions.limit())); + if (createVirtualNetworkInterfaceOptions.autoDelete() != null) { + contentJson.addProperty("auto_delete", createVirtualNetworkInterfaceOptions.autoDelete()); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (createVirtualNetworkInterfaceOptions.enableInfrastructureNat() != null) { + contentJson.addProperty("enable_infrastructure_nat", createVirtualNetworkInterfaceOptions.enableInfrastructureNat()); + } + if (createVirtualNetworkInterfaceOptions.ips() != null) { + contentJson.add("ips", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVirtualNetworkInterfaceOptions.ips())); + } + if (createVirtualNetworkInterfaceOptions.name() != null) { + contentJson.addProperty("name", createVirtualNetworkInterfaceOptions.name()); + } + if (createVirtualNetworkInterfaceOptions.primaryIp() != null) { + contentJson.add("primary_ip", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVirtualNetworkInterfaceOptions.primaryIp())); + } + if (createVirtualNetworkInterfaceOptions.protocolStateFilteringMode() != null) { + contentJson.addProperty("protocol_state_filtering_mode", createVirtualNetworkInterfaceOptions.protocolStateFilteringMode()); + } + if (createVirtualNetworkInterfaceOptions.resourceGroup() != null) { + contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVirtualNetworkInterfaceOptions.resourceGroup())); + } + if (createVirtualNetworkInterfaceOptions.securityGroups() != null) { + contentJson.add("security_groups", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVirtualNetworkInterfaceOptions.securityGroups())); + } + if (createVirtualNetworkInterfaceOptions.subnet() != null) { + contentJson.add("subnet", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVirtualNetworkInterfaceOptions.subnet())); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List IPsec policies. + * Create a virtual network interface. * - * This request lists IPsec policies in the region. + * This request creates a new virtual network interface from a virtual network interface prototype object. The + * prototype object is structured in the same way as a retrieved virtual network interface, and contains the + * information necessary to create the new virtual network interface. * - * @param listIpsecPoliciesOptions the {@link ListIpsecPoliciesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link IPsecPolicyCollection} + * @return a {@link ServiceCall} with a result of type {@link VirtualNetworkInterface} */ - public ServiceCall listIpsecPolicies(ListIpsecPoliciesOptions listIpsecPoliciesOptions) { - if (listIpsecPoliciesOptions == null) { - listIpsecPoliciesOptions = new ListIpsecPoliciesOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/ipsec_policies")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listIpsecPolicies"); + public ServiceCall createVirtualNetworkInterface() { + return createVirtualNetworkInterface(null); + } + + /** + * Delete a virtual network interface. + * + * This request deletes a virtual network interface. This operation cannot be reversed. For this request to succeed, + * the virtual network interface must not be required by another resource, such as the primary network attachment for + * an instance. + * + * @param deleteVirtualNetworkInterfacesOptions the {@link DeleteVirtualNetworkInterfacesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VirtualNetworkInterface} + */ + public ServiceCall deleteVirtualNetworkInterfaces(DeleteVirtualNetworkInterfacesOptions deleteVirtualNetworkInterfacesOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVirtualNetworkInterfacesOptions, + "deleteVirtualNetworkInterfacesOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", deleteVirtualNetworkInterfacesOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVirtualNetworkInterfaces"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listIpsecPoliciesOptions.start() != null) { - builder.query("start", String.valueOf(listIpsecPoliciesOptions.start())); - } - if (listIpsecPoliciesOptions.limit() != null) { - builder.query("limit", String.valueOf(listIpsecPoliciesOptions.limit())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List IPsec policies. - * - * This request lists IPsec policies in the region. - * - * @return a {@link ServiceCall} with a result of type {@link IPsecPolicyCollection} - */ - public ServiceCall listIpsecPolicies() { - return listIpsecPolicies(null); - } - - /** - * Create an IPsec policy. + * Retrieve associated floating IP. * - * This request creates a new IPsec policy. + * This request retrieves a specified floating IP if it is associated with the virtual network interface specified in + * the URL. * - * @param createIpsecPolicyOptions the {@link CreateIpsecPolicyOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link IPsecPolicy} + * @param getNetworkInterfaceFloatingIpOptions the {@link GetNetworkInterfaceFloatingIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link FloatingIPReference} */ - public ServiceCall createIpsecPolicy(CreateIpsecPolicyOptions createIpsecPolicyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createIpsecPolicyOptions, - "createIpsecPolicyOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/ipsec_policies")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createIpsecPolicy"); + public ServiceCall getNetworkInterfaceFloatingIp(GetNetworkInterfaceFloatingIpOptions getNetworkInterfaceFloatingIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getNetworkInterfaceFloatingIpOptions, + "getNetworkInterfaceFloatingIpOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("virtual_network_interface_id", getNetworkInterfaceFloatingIpOptions.virtualNetworkInterfaceId()); + pathParamsMap.put("id", getNetworkInterfaceFloatingIpOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces/{virtual_network_interface_id}/floating_ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getNetworkInterfaceFloatingIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("authentication_algorithm", createIpsecPolicyOptions.authenticationAlgorithm()); - contentJson.addProperty("encryption_algorithm", createIpsecPolicyOptions.encryptionAlgorithm()); - contentJson.addProperty("pfs", createIpsecPolicyOptions.pfs()); - if (createIpsecPolicyOptions.keyLifetime() != null) { - contentJson.addProperty("key_lifetime", createIpsecPolicyOptions.keyLifetime()); - } - if (createIpsecPolicyOptions.name() != null) { - contentJson.addProperty("name", createIpsecPolicyOptions.name()); - } - if (createIpsecPolicyOptions.resourceGroup() != null) { - contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createIpsecPolicyOptions.resourceGroup())); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete an IPsec policy. + * Retrieve a virtual network interface. * - * This request deletes an IPsec policy. This operation cannot be reversed. For this request to succeed, there must - * not be any VPN gateway connections using this policy. + * This request retrieves a single virtual network interface specified by the identifier in the URL. * - * @param deleteIpsecPolicyOptions the {@link DeleteIpsecPolicyOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param getVirtualNetworkInterfaceOptions the {@link GetVirtualNetworkInterfaceOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VirtualNetworkInterface} */ - public ServiceCall deleteIpsecPolicy(DeleteIpsecPolicyOptions deleteIpsecPolicyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteIpsecPolicyOptions, - "deleteIpsecPolicyOptions cannot be null"); + public ServiceCall getVirtualNetworkInterface(GetVirtualNetworkInterfaceOptions getVirtualNetworkInterfaceOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getVirtualNetworkInterfaceOptions, + "getVirtualNetworkInterfaceOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteIpsecPolicyOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/ipsec_policies/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteIpsecPolicy"); + pathParamsMap.put("id", getVirtualNetworkInterfaceOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVirtualNetworkInterface"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve an IPsec policy. + * Retrieve bound reserved IP. * - * This request retrieves a single IPsec policy specified by the identifier in the URL. + * This request retrieves the specified reserved IP address if it is bound to the virtual network interface specified + * in the URL. * - * @param getIpsecPolicyOptions the {@link GetIpsecPolicyOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link IPsecPolicy} + * @param getVirtualNetworkInterfaceIpOptions the {@link GetVirtualNetworkInterfaceIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ReservedIPReference} */ - public ServiceCall getIpsecPolicy(GetIpsecPolicyOptions getIpsecPolicyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getIpsecPolicyOptions, - "getIpsecPolicyOptions cannot be null"); + public ServiceCall getVirtualNetworkInterfaceIp(GetVirtualNetworkInterfaceIpOptions getVirtualNetworkInterfaceIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getVirtualNetworkInterfaceIpOptions, + "getVirtualNetworkInterfaceIpOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getIpsecPolicyOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/ipsec_policies/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getIpsecPolicy"); + pathParamsMap.put("virtual_network_interface_id", getVirtualNetworkInterfaceIpOptions.virtualNetworkInterfaceId()); + pathParamsMap.put("id", getVirtualNetworkInterfaceIpOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces/{virtual_network_interface_id}/ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVirtualNetworkInterfaceIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update an IPsec policy. + * List floating IPs associated with a virtual network interface. * - * This request updates the properties of an existing IPsec policy. + * This request lists floating IPs associated with a virtual network interface. * - * @param updateIpsecPolicyOptions the {@link UpdateIpsecPolicyOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link IPsecPolicy} + * @param listNetworkInterfaceFloatingIpsOptions the {@link ListNetworkInterfaceFloatingIpsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link FloatingIPCollectionVirtualNetworkInterfaceContext} */ - public ServiceCall updateIpsecPolicy(UpdateIpsecPolicyOptions updateIpsecPolicyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateIpsecPolicyOptions, - "updateIpsecPolicyOptions cannot be null"); + public ServiceCall listNetworkInterfaceFloatingIps(ListNetworkInterfaceFloatingIpsOptions listNetworkInterfaceFloatingIpsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listNetworkInterfaceFloatingIpsOptions, + "listNetworkInterfaceFloatingIpsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateIpsecPolicyOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/ipsec_policies/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateIpsecPolicy"); + pathParamsMap.put("virtual_network_interface_id", listNetworkInterfaceFloatingIpsOptions.virtualNetworkInterfaceId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces/{virtual_network_interface_id}/floating_ips", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listNetworkInterfaceFloatingIps"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateIpsecPolicyOptions.iPsecPolicyPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listNetworkInterfaceFloatingIpsOptions.start() != null) { + builder.query("start", String.valueOf(listNetworkInterfaceFloatingIpsOptions.start())); + } + if (listNetworkInterfaceFloatingIpsOptions.limit() != null) { + builder.query("limit", String.valueOf(listNetworkInterfaceFloatingIpsOptions.limit())); + } + if (listNetworkInterfaceFloatingIpsOptions.sort() != null) { + builder.query("sort", String.valueOf(listNetworkInterfaceFloatingIpsOptions.sort())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List VPN gateway connections that use a specified IPsec policy. + * List reserved IPs bound to a virtual network interface. * - * This request lists VPN gateway connections that use an IPsec policy. + * This request lists reserved IPs bound to a virtual network interface. * - * @param listIpsecPolicyConnectionsOptions the {@link ListIpsecPolicyConnectionsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link IPsecPolicyConnectionCollection} + * @param listVirtualNetworkInterfaceIpsOptions the {@link ListVirtualNetworkInterfaceIpsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link ReservedIPCollectionVirtualNetworkInterfaceContext} */ - public ServiceCall listIpsecPolicyConnections(ListIpsecPolicyConnectionsOptions listIpsecPolicyConnectionsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listIpsecPolicyConnectionsOptions, - "listIpsecPolicyConnectionsOptions cannot be null"); + public ServiceCall listVirtualNetworkInterfaceIps(ListVirtualNetworkInterfaceIpsOptions listVirtualNetworkInterfaceIpsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listVirtualNetworkInterfaceIpsOptions, + "listVirtualNetworkInterfaceIpsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", listIpsecPolicyConnectionsOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/ipsec_policies/{id}/connections", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listIpsecPolicyConnections"); + pathParamsMap.put("virtual_network_interface_id", listVirtualNetworkInterfaceIpsOptions.virtualNetworkInterfaceId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces/{virtual_network_interface_id}/ips", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVirtualNetworkInterfaceIps"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listIpsecPolicyConnectionsOptions.start() != null) { - builder.query("start", String.valueOf(listIpsecPolicyConnectionsOptions.start())); + if (listVirtualNetworkInterfaceIpsOptions.start() != null) { + builder.query("start", String.valueOf(listVirtualNetworkInterfaceIpsOptions.start())); } - if (listIpsecPolicyConnectionsOptions.limit() != null) { - builder.query("limit", String.valueOf(listIpsecPolicyConnectionsOptions.limit())); + if (listVirtualNetworkInterfaceIpsOptions.limit() != null) { + builder.query("limit", String.valueOf(listVirtualNetworkInterfaceIpsOptions.limit())); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listVirtualNetworkInterfaceIpsOptions.sort() != null) { + builder.query("sort", String.valueOf(listVirtualNetworkInterfaceIpsOptions.sort())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List VPN gateways. + * List virtual network interfaces. * - * This request lists VPN gateways in the region. + * This request lists virtual network interfaces in the region. A virtual network interface is a logical abstraction + * of a virtual network interface in a subnet, and may be attached to a target resource. * - * @param listVpnGatewaysOptions the {@link ListVpnGatewaysOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPNGatewayCollection} + * The virtual network interfaces will be sorted by their `created_at` property values, with newest virtual network + * interfaces first. Virtual network interfaces with identical + * `created_at` property values will in turn be sorted by ascending `name` property values. + * + * @param listVirtualNetworkInterfacesOptions the {@link ListVirtualNetworkInterfacesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VirtualNetworkInterfaceCollection} */ - public ServiceCall listVpnGateways(ListVpnGatewaysOptions listVpnGatewaysOptions) { - if (listVpnGatewaysOptions == null) { - listVpnGatewaysOptions = new ListVpnGatewaysOptions.Builder().build(); + public ServiceCall listVirtualNetworkInterfaces(ListVirtualNetworkInterfacesOptions listVirtualNetworkInterfacesOptions) { + if (listVirtualNetworkInterfacesOptions == null) { + listVirtualNetworkInterfacesOptions = new ListVirtualNetworkInterfacesOptions.Builder().build(); } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpnGateways"); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVirtualNetworkInterfaces"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listVpnGatewaysOptions.start() != null) { - builder.query("start", String.valueOf(listVpnGatewaysOptions.start())); - } - if (listVpnGatewaysOptions.limit() != null) { - builder.query("limit", String.valueOf(listVpnGatewaysOptions.limit())); - } - if (listVpnGatewaysOptions.resourceGroupId() != null) { - builder.query("resource_group.id", String.valueOf(listVpnGatewaysOptions.resourceGroupId())); + if (listVirtualNetworkInterfacesOptions.start() != null) { + builder.query("start", String.valueOf(listVirtualNetworkInterfacesOptions.start())); } - if (listVpnGatewaysOptions.sort() != null) { - builder.query("sort", String.valueOf(listVpnGatewaysOptions.sort())); + if (listVirtualNetworkInterfacesOptions.limit() != null) { + builder.query("limit", String.valueOf(listVirtualNetworkInterfacesOptions.limit())); } - if (listVpnGatewaysOptions.mode() != null) { - builder.query("mode", String.valueOf(listVpnGatewaysOptions.mode())); + if (listVirtualNetworkInterfacesOptions.resourceGroupId() != null) { + builder.query("resource_group.id", String.valueOf(listVirtualNetworkInterfacesOptions.resourceGroupId())); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List VPN gateways. - * - * This request lists VPN gateways in the region. + * List virtual network interfaces. * - * @return a {@link ServiceCall} with a result of type {@link VPNGatewayCollection} - */ - public ServiceCall listVpnGateways() { - return listVpnGateways(null); - } - - /** - * Create a VPN gateway. + * This request lists virtual network interfaces in the region. A virtual network interface is a logical abstraction + * of a virtual network interface in a subnet, and may be attached to a target resource. * - * This request creates a new VPN gateway. + * The virtual network interfaces will be sorted by their `created_at` property values, with newest virtual network + * interfaces first. Virtual network interfaces with identical + * `created_at` property values will in turn be sorted by ascending `name` property values. * - * @param createVpnGatewayOptions the {@link CreateVpnGatewayOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPNGateway} + * @return a {@link ServiceCall} with a result of type {@link VirtualNetworkInterfaceCollection} */ - public ServiceCall createVpnGateway(CreateVpnGatewayOptions createVpnGatewayOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createVpnGatewayOptions, - "createVpnGatewayOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createVpnGateway"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createVpnGatewayOptions.vpnGatewayPrototype()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); - return createServiceCall(builder.build(), responseConverter); + public ServiceCall listVirtualNetworkInterfaces() { + return listVirtualNetworkInterfaces(null); } /** - * Delete a VPN gateway. + * Disassociate a floating IP from a virtual network interface. * - * This request deletes a VPN gateway. This operation cannot be reversed. For this request to succeed, the VPN gateway - * must not have a `status` of `pending`, and there must not be any VPC routes using the VPN gateway's connections as - * a next hop. + * This request disassociates the specified floating IP from the specified virtual network interface. * - * @param deleteVpnGatewayOptions the {@link DeleteVpnGatewayOptions} containing the options for the call + * @param removeNetworkInterfaceFloatingIpOptions the {@link RemoveNetworkInterfaceFloatingIpOptions} containing the options for the call * @return a {@link ServiceCall} with a void result */ - public ServiceCall deleteVpnGateway(DeleteVpnGatewayOptions deleteVpnGatewayOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVpnGatewayOptions, - "deleteVpnGatewayOptions cannot be null"); + public ServiceCall removeNetworkInterfaceFloatingIp(RemoveNetworkInterfaceFloatingIpOptions removeNetworkInterfaceFloatingIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(removeNetworkInterfaceFloatingIpOptions, + "removeNetworkInterfaceFloatingIpOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteVpnGatewayOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVpnGateway"); + pathParamsMap.put("virtual_network_interface_id", removeNetworkInterfaceFloatingIpOptions.virtualNetworkInterfaceId()); + pathParamsMap.put("id", removeNetworkInterfaceFloatingIpOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces/{virtual_network_interface_id}/floating_ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "removeNetworkInterfaceFloatingIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } @@ -12246,140 +12572,110 @@ public ServiceCall deleteVpnGateway(DeleteVpnGatewayOptions deleteVpnGatew } /** - * Retrieve a VPN gateway. - * - * This request retrieves a single VPN gateway specified by the identifier in the URL. + * Unbind a reserved IP from a virtual network interface. * - * @param getVpnGatewayOptions the {@link GetVpnGatewayOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPNGateway} - */ - public ServiceCall getVpnGateway(GetVpnGatewayOptions getVpnGatewayOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getVpnGatewayOptions, - "getVpnGatewayOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getVpnGatewayOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpnGateway"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); - return createServiceCall(builder.build(), responseConverter); - } - - /** - * Update a VPN gateway. + * This request unbinds the specified reserved IP from the specified virtual network interface. If the reserved IP has + * `auto_delete` set to `true`, the reserved IP will be deleted. * - * This request updates the properties of an existing VPN gateway. + * The reserved IP for the `primary_ip` cannot be unbound. * - * @param updateVpnGatewayOptions the {@link UpdateVpnGatewayOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPNGateway} + * @param removeVirtualNetworkInterfaceIpOptions the {@link RemoveVirtualNetworkInterfaceIpOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall updateVpnGateway(UpdateVpnGatewayOptions updateVpnGatewayOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateVpnGatewayOptions, - "updateVpnGatewayOptions cannot be null"); + public ServiceCall removeVirtualNetworkInterfaceIp(RemoveVirtualNetworkInterfaceIpOptions removeVirtualNetworkInterfaceIpOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(removeVirtualNetworkInterfaceIpOptions, + "removeVirtualNetworkInterfaceIpOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateVpnGatewayOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateVpnGateway"); + pathParamsMap.put("virtual_network_interface_id", removeVirtualNetworkInterfaceIpOptions.virtualNetworkInterfaceId()); + pathParamsMap.put("id", removeVirtualNetworkInterfaceIpOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces/{virtual_network_interface_id}/ips/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "removeVirtualNetworkInterfaceIp"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateVpnGatewayOptions.vpnGatewayPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * List connections of a VPN gateway. + * Update a virtual network interface. * - * This request lists connections of a VPN gateway. + * This request updates a virtual network interface with the information in a provided virtual network interface + * patch. The virtual network interface patch object is structured in the same way as a retrieved virtual network + * interface and contains only the information to be updated. * - * @param listVpnGatewayConnectionsOptions the {@link ListVpnGatewayConnectionsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPNGatewayConnectionCollection} + * @param updateVirtualNetworkInterfaceOptions the {@link UpdateVirtualNetworkInterfaceOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VirtualNetworkInterface} */ - public ServiceCall listVpnGatewayConnections(ListVpnGatewayConnectionsOptions listVpnGatewayConnectionsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listVpnGatewayConnectionsOptions, - "listVpnGatewayConnectionsOptions cannot be null"); + public ServiceCall updateVirtualNetworkInterface(UpdateVirtualNetworkInterfaceOptions updateVirtualNetworkInterfaceOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateVirtualNetworkInterfaceOptions, + "updateVirtualNetworkInterfaceOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpn_gateway_id", listVpnGatewayConnectionsOptions.vpnGatewayId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpnGatewayConnections"); + pathParamsMap.put("id", updateVirtualNetworkInterfaceOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/virtual_network_interfaces/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateVirtualNetworkInterface"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listVpnGatewayConnectionsOptions.start() != null) { - builder.query("start", String.valueOf(listVpnGatewayConnectionsOptions.start())); - } - if (listVpnGatewayConnectionsOptions.limit() != null) { - builder.query("limit", String.valueOf(listVpnGatewayConnectionsOptions.limit())); - } - if (listVpnGatewayConnectionsOptions.status() != null) { - builder.query("status", String.valueOf(listVpnGatewayConnectionsOptions.status())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateVirtualNetworkInterfaceOptions.virtualNetworkInterfacePatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create a connection for a VPN gateway. + * Create a volume. * - * This request creates a new VPN gateway connection. + * This request creates a new volume from a volume prototype object. The prototype object is structured in the same + * way as a retrieved volume, and contains the information necessary to create the new volume. * - * @param createVpnGatewayConnectionOptions the {@link CreateVpnGatewayConnectionOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPNGatewayConnection} + * @param createVolumeOptions the {@link CreateVolumeOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Volume} */ - public ServiceCall createVpnGatewayConnection(CreateVpnGatewayConnectionOptions createVpnGatewayConnectionOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createVpnGatewayConnectionOptions, - "createVpnGatewayConnectionOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpn_gateway_id", createVpnGatewayConnectionOptions.vpnGatewayId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createVpnGatewayConnection"); + public ServiceCall createVolume(CreateVolumeOptions createVolumeOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createVolumeOptions, + "createVolumeOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/volumes")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createVolume"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createVpnGatewayConnectionOptions.vpnGatewayConnectionPrototype()), "application/json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createVolumeOptions.volumePrototype()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a VPN gateway connection. + * Delete a volume. * - * This request deletes a VPN gateway connection. This operation cannot be reversed. For this request to succeed, - * there must not be VPC routes using this VPN connection as a next hop. + * This request deletes a volume. This operation cannot be reversed. For this request to succeed, the volume must not + * be attached to any instances. * - * @param deleteVpnGatewayConnectionOptions the {@link DeleteVpnGatewayConnectionOptions} containing the options for the call + * @param deleteVolumeOptions the {@link DeleteVolumeOptions} containing the options for the call * @return a {@link ServiceCall} with a void result */ - public ServiceCall deleteVpnGatewayConnection(DeleteVpnGatewayConnectionOptions deleteVpnGatewayConnectionOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVpnGatewayConnectionOptions, - "deleteVpnGatewayConnectionOptions cannot be null"); + public ServiceCall deleteVolume(DeleteVolumeOptions deleteVolumeOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVolumeOptions, + "deleteVolumeOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpn_gateway_id", deleteVpnGatewayConnectionOptions.vpnGatewayId()); - pathParamsMap.put("id", deleteVpnGatewayConnectionOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVpnGatewayConnection"); + pathParamsMap.put("id", deleteVolumeOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/volumes/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVolume"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + if (deleteVolumeOptions.ifMatch() != null) { + builder.header("If-Match", deleteVolumeOptions.ifMatch()); + } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); @@ -12387,352 +12683,515 @@ public ServiceCall deleteVpnGatewayConnection(DeleteVpnGatewayConnectionOp } /** - * Retrieve a VPN gateway connection. + * Retrieve a volume. * - * This request retrieves a single VPN gateway connection specified by the identifier in the URL. + * This request retrieves a single volume specified by the identifier in the URL. * - * @param getVpnGatewayConnectionOptions the {@link GetVpnGatewayConnectionOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPNGatewayConnection} + * @param getVolumeOptions the {@link GetVolumeOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Volume} */ - public ServiceCall getVpnGatewayConnection(GetVpnGatewayConnectionOptions getVpnGatewayConnectionOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getVpnGatewayConnectionOptions, - "getVpnGatewayConnectionOptions cannot be null"); + public ServiceCall getVolume(GetVolumeOptions getVolumeOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getVolumeOptions, + "getVolumeOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpn_gateway_id", getVpnGatewayConnectionOptions.vpnGatewayId()); - pathParamsMap.put("id", getVpnGatewayConnectionOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpnGatewayConnection"); + pathParamsMap.put("id", getVolumeOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/volumes/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVolume"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a VPN gateway connection. + * Retrieve a volume profile. * - * This request updates the properties of an existing VPN gateway connection. + * This request retrieves a single volume profile specified by the name in the URL. * - * @param updateVpnGatewayConnectionOptions the {@link UpdateVpnGatewayConnectionOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPNGatewayConnection} + * @param getVolumeProfileOptions the {@link GetVolumeProfileOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VolumeProfile} */ - public ServiceCall updateVpnGatewayConnection(UpdateVpnGatewayConnectionOptions updateVpnGatewayConnectionOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateVpnGatewayConnectionOptions, - "updateVpnGatewayConnectionOptions cannot be null"); + public ServiceCall getVolumeProfile(GetVolumeProfileOptions getVolumeProfileOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getVolumeProfileOptions, + "getVolumeProfileOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpn_gateway_id", updateVpnGatewayConnectionOptions.vpnGatewayId()); - pathParamsMap.put("id", updateVpnGatewayConnectionOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateVpnGatewayConnection"); + pathParamsMap.put("name", getVolumeProfileOptions.name()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/volume/profiles/{name}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVolumeProfile"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateVpnGatewayConnectionOptions.vpnGatewayConnectionPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List local CIDRs for a VPN gateway connection. + * List instance profiles compatible with a volume. * - * This request lists local CIDRs for a VPN gateway connection. - * - * This request is only supported for policy mode VPN gateways. + * This request lists instance profiles compatible with a volume's + * `allowed_use.instance`, `operating_system.architecture` and + * `operating_system.user_data_format` properties, sorted by ascending `name` property values. The specified volume + * must be bootable (have an `operating_system` property). * - * @param listVpnGatewayConnectionsLocalCidrsOptions the {@link ListVpnGatewayConnectionsLocalCidrsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPNGatewayConnectionCIDRs} + * @param listVolumeInstanceProfilesOptions the {@link ListVolumeInstanceProfilesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VolumeInstanceProfileCollection} */ - public ServiceCall listVpnGatewayConnectionsLocalCidrs(ListVpnGatewayConnectionsLocalCidrsOptions listVpnGatewayConnectionsLocalCidrsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listVpnGatewayConnectionsLocalCidrsOptions, - "listVpnGatewayConnectionsLocalCidrsOptions cannot be null"); + public ServiceCall listVolumeInstanceProfiles(ListVolumeInstanceProfilesOptions listVolumeInstanceProfilesOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listVolumeInstanceProfilesOptions, + "listVolumeInstanceProfilesOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpn_gateway_id", listVpnGatewayConnectionsLocalCidrsOptions.vpnGatewayId()); - pathParamsMap.put("id", listVpnGatewayConnectionsLocalCidrsOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections/{id}/local/cidrs", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpnGatewayConnectionsLocalCidrs"); + pathParamsMap.put("id", listVolumeInstanceProfilesOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/volumes/{id}/instance_profiles", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVolumeInstanceProfiles"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listVolumeInstanceProfilesOptions.start() != null) { + builder.query("start", String.valueOf(listVolumeInstanceProfilesOptions.start())); + } + if (listVolumeInstanceProfilesOptions.limit() != null) { + builder.query("limit", String.valueOf(listVolumeInstanceProfilesOptions.limit())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Remove a local CIDR from a VPN gateway connection. - * - * This request removes a CIDR from a VPN gateway connection. + * List volume profiles. * - * This request is only supported for policy mode VPN gateways. + * This request lists [volume profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-block-storage-profiles) available in + * the region. A volume profile specifies the performance characteristics and pricing model for a volume. * - * @param removeVpnGatewayConnectionsLocalCidrOptions the {@link RemoveVpnGatewayConnectionsLocalCidrOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param listVolumeProfilesOptions the {@link ListVolumeProfilesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VolumeProfileCollection} */ - public ServiceCall removeVpnGatewayConnectionsLocalCidr(RemoveVpnGatewayConnectionsLocalCidrOptions removeVpnGatewayConnectionsLocalCidrOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(removeVpnGatewayConnectionsLocalCidrOptions, - "removeVpnGatewayConnectionsLocalCidrOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpn_gateway_id", removeVpnGatewayConnectionsLocalCidrOptions.vpnGatewayId()); - pathParamsMap.put("id", removeVpnGatewayConnectionsLocalCidrOptions.id()); - pathParamsMap.put("cidr", removeVpnGatewayConnectionsLocalCidrOptions.cidr()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections/{id}/local/cidrs/{cidr}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "removeVpnGatewayConnectionsLocalCidr"); + public ServiceCall listVolumeProfiles(ListVolumeProfilesOptions listVolumeProfilesOptions) { + if (listVolumeProfilesOptions == null) { + listVolumeProfilesOptions = new ListVolumeProfilesOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/volume/profiles")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVolumeProfiles"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + if (listVolumeProfilesOptions.start() != null) { + builder.query("start", String.valueOf(listVolumeProfilesOptions.start())); + } + if (listVolumeProfilesOptions.limit() != null) { + builder.query("limit", String.valueOf(listVolumeProfilesOptions.limit())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Check if the specified local CIDR exists on a VPN gateway connection. + * List volume profiles. * - * This request succeeds if a CIDR exists on the specified VPN gateway connection, and fails otherwise. + * This request lists [volume profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-block-storage-profiles) available in + * the region. A volume profile specifies the performance characteristics and pricing model for a volume. * - * This request is only supported for policy mode VPN gateways. + * @return a {@link ServiceCall} with a result of type {@link VolumeProfileCollection} + */ + public ServiceCall listVolumeProfiles() { + return listVolumeProfiles(null); + } + + /** + * List volumes. * - * @param checkVpnGatewayConnectionsLocalCidrOptions the {@link CheckVpnGatewayConnectionsLocalCidrOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * This request lists volumes in the region. Volumes are network-connected block storage devices that may be attached + * to one or more instances in the same region. + * + * @param listVolumesOptions the {@link ListVolumesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VolumeCollection} */ - public ServiceCall checkVpnGatewayConnectionsLocalCidr(CheckVpnGatewayConnectionsLocalCidrOptions checkVpnGatewayConnectionsLocalCidrOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(checkVpnGatewayConnectionsLocalCidrOptions, - "checkVpnGatewayConnectionsLocalCidrOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpn_gateway_id", checkVpnGatewayConnectionsLocalCidrOptions.vpnGatewayId()); - pathParamsMap.put("id", checkVpnGatewayConnectionsLocalCidrOptions.id()); - pathParamsMap.put("cidr", checkVpnGatewayConnectionsLocalCidrOptions.cidr()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections/{id}/local/cidrs/{cidr}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "checkVpnGatewayConnectionsLocalCidr"); + public ServiceCall listVolumes(ListVolumesOptions listVolumesOptions) { + if (listVolumesOptions == null) { + listVolumesOptions = new ListVolumesOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/volumes")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVolumes"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + if (listVolumesOptions.start() != null) { + builder.query("start", String.valueOf(listVolumesOptions.start())); + } + if (listVolumesOptions.limit() != null) { + builder.query("limit", String.valueOf(listVolumesOptions.limit())); + } + if (listVolumesOptions.attachmentState() != null) { + builder.query("attachment_state", String.valueOf(listVolumesOptions.attachmentState())); + } + if (listVolumesOptions.encryption() != null) { + builder.query("encryption", String.valueOf(listVolumesOptions.encryption())); + } + if (listVolumesOptions.name() != null) { + builder.query("name", String.valueOf(listVolumesOptions.name())); + } + if (listVolumesOptions.operatingSystemFamily() != null) { + builder.query("operating_system.family", String.valueOf(listVolumesOptions.operatingSystemFamily())); + } + if (listVolumesOptions.operatingSystemArchitecture() != null) { + builder.query("operating_system.architecture", String.valueOf(listVolumesOptions.operatingSystemArchitecture())); + } + if (listVolumesOptions.tag() != null) { + builder.query("tag", String.valueOf(listVolumesOptions.tag())); + } + if (listVolumesOptions.zoneName() != null) { + builder.query("zone.name", String.valueOf(listVolumesOptions.zoneName())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Set a local CIDR on a VPN gateway connection. + * List volumes. * - * This request adds the specified CIDR to the specified VPN gateway connection. This request succeeds if the - * specified CIDR already exists. A request body is not required, and if provided, is ignored. + * This request lists volumes in the region. Volumes are network-connected block storage devices that may be attached + * to one or more instances in the same region. * - * This request is only supported for policy mode VPN gateways. + * @return a {@link ServiceCall} with a result of type {@link VolumeCollection} + */ + public ServiceCall listVolumes() { + return listVolumes(null); + } + + /** + * Update a volume. * - * @param addVpnGatewayConnectionsLocalCidrOptions the {@link AddVpnGatewayConnectionsLocalCidrOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * This request updates a volume with the information in a provided volume patch. The volume patch object is + * structured in the same way as a retrieved volume and contains only the information to be updated. + * + * @param updateVolumeOptions the {@link UpdateVolumeOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Volume} */ - public ServiceCall addVpnGatewayConnectionsLocalCidr(AddVpnGatewayConnectionsLocalCidrOptions addVpnGatewayConnectionsLocalCidrOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(addVpnGatewayConnectionsLocalCidrOptions, - "addVpnGatewayConnectionsLocalCidrOptions cannot be null"); + public ServiceCall updateVolume(UpdateVolumeOptions updateVolumeOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateVolumeOptions, + "updateVolumeOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpn_gateway_id", addVpnGatewayConnectionsLocalCidrOptions.vpnGatewayId()); - pathParamsMap.put("id", addVpnGatewayConnectionsLocalCidrOptions.id()); - pathParamsMap.put("cidr", addVpnGatewayConnectionsLocalCidrOptions.cidr()); - RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections/{id}/local/cidrs/{cidr}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "addVpnGatewayConnectionsLocalCidr"); + pathParamsMap.put("id", updateVolumeOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/volumes/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateVolume"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); + if (updateVolumeOptions.ifMatch() != null) { + builder.header("If-Match", updateVolumeOptions.ifMatch()); + } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateVolumeOptions.volumePatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List peer CIDRs for a VPN gateway connection. + * Create a VPC. * - * This request lists peer CIDRs for a VPN gateway connection. + * This request creates a new VPC from a VPC prototype object. The prototype object is structured in the same way as a + * retrieved VPC, and contains the information necessary to create the new VPC. * - * This request is only supported for policy mode VPN gateways. + * The system will automatically create the following additional resources for the VPC: + * - Unless `address_prefix_management` is `manual`, a [default address + * prefix](https://cloud.ibm.com/apidocs/vpc/latest#get-vpc-address-prefix) for each zone + * - A [default network + * ACL](https://cloud.ibm.com/apidocs/vpc/latest#get-vpc-default-network-acl) + * - A [default routing + * table](https://cloud.ibm.com/apidocs/vpc/latest#get-vpc-default-routing-table) + * - A [default security + * group](https://cloud.ibm.com/apidocs/vpc/latest#get-vpc-default-security-group). * - * @param listVpnGatewayConnectionsPeerCidrsOptions the {@link ListVpnGatewayConnectionsPeerCidrsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPNGatewayConnectionCIDRs} + * @param createVpcOptions the {@link CreateVpcOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPC} */ - public ServiceCall listVpnGatewayConnectionsPeerCidrs(ListVpnGatewayConnectionsPeerCidrsOptions listVpnGatewayConnectionsPeerCidrsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listVpnGatewayConnectionsPeerCidrsOptions, - "listVpnGatewayConnectionsPeerCidrsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpn_gateway_id", listVpnGatewayConnectionsPeerCidrsOptions.vpnGatewayId()); - pathParamsMap.put("id", listVpnGatewayConnectionsPeerCidrsOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer/cidrs", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpnGatewayConnectionsPeerCidrs"); + public ServiceCall createVpc(CreateVpcOptions createVpcOptions) { + boolean skipBody = false; + if (createVpcOptions == null) { + createVpcOptions = new CreateVpcOptions.Builder().build(); + skipBody = true; + } + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createVpc"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (!skipBody) { + final JsonObject contentJson = new JsonObject(); + if (createVpcOptions.addressPrefixManagement() != null) { + contentJson.addProperty("address_prefix_management", createVpcOptions.addressPrefixManagement()); + } + if (createVpcOptions.classicAccess() != null) { + contentJson.addProperty("classic_access", createVpcOptions.classicAccess()); + } + if (createVpcOptions.dns() != null) { + contentJson.add("dns", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpcOptions.dns())); + } + if (createVpcOptions.name() != null) { + contentJson.addProperty("name", createVpcOptions.name()); + } + if (createVpcOptions.resourceGroup() != null) { + contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpcOptions.resourceGroup())); + } + builder.bodyJson(contentJson); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Remove a peer CIDR from a VPN gateway connection. + * Create a VPC. * - * This request removes a CIDR from a VPN gateway connection. + * This request creates a new VPC from a VPC prototype object. The prototype object is structured in the same way as a + * retrieved VPC, and contains the information necessary to create the new VPC. * - * This request is only supported for policy mode VPN gateways. + * The system will automatically create the following additional resources for the VPC: + * - Unless `address_prefix_management` is `manual`, a [default address + * prefix](https://cloud.ibm.com/apidocs/vpc/latest#get-vpc-address-prefix) for each zone + * - A [default network + * ACL](https://cloud.ibm.com/apidocs/vpc/latest#get-vpc-default-network-acl) + * - A [default routing + * table](https://cloud.ibm.com/apidocs/vpc/latest#get-vpc-default-routing-table) + * - A [default security + * group](https://cloud.ibm.com/apidocs/vpc/latest#get-vpc-default-security-group). * - * @param removeVpnGatewayConnectionsPeerCidrOptions the {@link RemoveVpnGatewayConnectionsPeerCidrOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @return a {@link ServiceCall} with a result of type {@link VPC} */ - public ServiceCall removeVpnGatewayConnectionsPeerCidr(RemoveVpnGatewayConnectionsPeerCidrOptions removeVpnGatewayConnectionsPeerCidrOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(removeVpnGatewayConnectionsPeerCidrOptions, - "removeVpnGatewayConnectionsPeerCidrOptions cannot be null"); + public ServiceCall createVpc() { + return createVpc(null); + } + + /** + * Create an address prefix for a VPC. + * + * This request creates a new prefix from a prefix prototype object. The prototype object is structured in the same + * way as a retrieved prefix, and contains the information necessary to create the new prefix. + * + * @param createVpcAddressPrefixOptions the {@link CreateVpcAddressPrefixOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link AddressPrefix} + */ + public ServiceCall createVpcAddressPrefix(CreateVpcAddressPrefixOptions createVpcAddressPrefixOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createVpcAddressPrefixOptions, + "createVpcAddressPrefixOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpn_gateway_id", removeVpnGatewayConnectionsPeerCidrOptions.vpnGatewayId()); - pathParamsMap.put("id", removeVpnGatewayConnectionsPeerCidrOptions.id()); - pathParamsMap.put("cidr", removeVpnGatewayConnectionsPeerCidrOptions.cidr()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer/cidrs/{cidr}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "removeVpnGatewayConnectionsPeerCidr"); + pathParamsMap.put("vpc_id", createVpcAddressPrefixOptions.vpcId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/address_prefixes", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createVpcAddressPrefix"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + final JsonObject contentJson = new JsonObject(); + contentJson.addProperty("cidr", createVpcAddressPrefixOptions.cidr()); + contentJson.add("zone", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpcAddressPrefixOptions.zone())); + if (createVpcAddressPrefixOptions.isDefault() != null) { + contentJson.addProperty("is_default", createVpcAddressPrefixOptions.isDefault()); + } + if (createVpcAddressPrefixOptions.name() != null) { + contentJson.addProperty("name", createVpcAddressPrefixOptions.name()); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Check if the specified peer CIDR exists on a VPN gateway connection. + * Create a DNS resolution binding. * - * This request succeeds if a CIDR exists on the specified VPN gateway connection, and fails otherwise. + * This request creates a new DNS resolution binding from a DNS resolution binding prototype object. The prototype + * object is structured in the same way as a retrieved DNS resolution binding, and contains the information necessary + * to create the new DNS resolution binding. * - * This request is only supported for policy mode VPN gateways. + * For this request to succeed: + * - The VPC specified by the identifier in the URL must not already have a DNS resolution + * binding + * - The VPC specified by the identifier in the URL must have `dns.enable_hub` set to + * `false` + * - The updated DNS sharing connected topology must not contain more than one endpoint + * gateway with `allow_dns_resolution_binding` set to `true` targeting the same service. * - * @param checkVpnGatewayConnectionsPeerCidrOptions the {@link CheckVpnGatewayConnectionsPeerCidrOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * See [About DNS sharing for VPE gateways](/docs/vpc?topic=vpc-vpe-dns-sharing) for more information. + * + * @param createVpcDnsResolutionBindingOptions the {@link CreateVpcDnsResolutionBindingOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPCDNSResolutionBinding} */ - public ServiceCall checkVpnGatewayConnectionsPeerCidr(CheckVpnGatewayConnectionsPeerCidrOptions checkVpnGatewayConnectionsPeerCidrOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(checkVpnGatewayConnectionsPeerCidrOptions, - "checkVpnGatewayConnectionsPeerCidrOptions cannot be null"); + public ServiceCall createVpcDnsResolutionBinding(CreateVpcDnsResolutionBindingOptions createVpcDnsResolutionBindingOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createVpcDnsResolutionBindingOptions, + "createVpcDnsResolutionBindingOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpn_gateway_id", checkVpnGatewayConnectionsPeerCidrOptions.vpnGatewayId()); - pathParamsMap.put("id", checkVpnGatewayConnectionsPeerCidrOptions.id()); - pathParamsMap.put("cidr", checkVpnGatewayConnectionsPeerCidrOptions.cidr()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer/cidrs/{cidr}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "checkVpnGatewayConnectionsPeerCidr"); + pathParamsMap.put("vpc_id", createVpcDnsResolutionBindingOptions.vpcId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/dns_resolution_bindings", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createVpcDnsResolutionBinding"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + final JsonObject contentJson = new JsonObject(); + contentJson.add("vpc", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpcDnsResolutionBindingOptions.vpc())); + if (createVpcDnsResolutionBindingOptions.name() != null) { + contentJson.addProperty("name", createVpcDnsResolutionBindingOptions.name()); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Set a peer CIDR on a VPN gateway connection. - * - * This request adds the specified CIDR to the specified VPN gateway connection. This request succeeds if the - * specified CIDR already exists. A request body is not required, and if provided, is ignored. + * Create a route in a VPC's default routing table. * - * This request is only supported for policy mode VPN gateways. + * This request creates a new route in the VPC's default routing table. The route prototype object is structured in + * the same way as a retrieved route, and contains the information necessary to create the new route. The request will + * fail if the new route will cause a loop. * - * @param addVpnGatewayConnectionsPeerCidrOptions the {@link AddVpnGatewayConnectionsPeerCidrOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param createVpcRouteOptions the {@link CreateVpcRouteOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link CreateVpcRouteResponse} + * @deprecated this method is deprecated and may be removed in a future release */ - public ServiceCall addVpnGatewayConnectionsPeerCidr(AddVpnGatewayConnectionsPeerCidrOptions addVpnGatewayConnectionsPeerCidrOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(addVpnGatewayConnectionsPeerCidrOptions, - "addVpnGatewayConnectionsPeerCidrOptions cannot be null"); + @Deprecated + public ServiceCall createVpcRoute(CreateVpcRouteOptions createVpcRouteOptions) { + LOGGER.warning("A deprecated operation has been invoked: createVpcRoute"); + com.ibm.cloud.sdk.core.util.Validator.notNull(createVpcRouteOptions, + "createVpcRouteOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpn_gateway_id", addVpnGatewayConnectionsPeerCidrOptions.vpnGatewayId()); - pathParamsMap.put("id", addVpnGatewayConnectionsPeerCidrOptions.id()); - pathParamsMap.put("cidr", addVpnGatewayConnectionsPeerCidrOptions.cidr()); - RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer/cidrs/{cidr}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "addVpnGatewayConnectionsPeerCidr"); + pathParamsMap.put("vpc_id", createVpcRouteOptions.vpcId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routes", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createVpcRoute"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + final JsonObject contentJson = new JsonObject(); + contentJson.addProperty("destination", createVpcRouteOptions.destination()); + contentJson.add("zone", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpcRouteOptions.zone())); + if (createVpcRouteOptions.action() != null) { + contentJson.addProperty("action", createVpcRouteOptions.action()); + } + if (createVpcRouteOptions.advertise() != null) { + contentJson.addProperty("advertise", createVpcRouteOptions.advertise()); + } + if (createVpcRouteOptions.name() != null) { + contentJson.addProperty("name", createVpcRouteOptions.name()); + } + if (createVpcRouteOptions.nextHop() != null) { + contentJson.add("next_hop", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpcRouteOptions.nextHop())); + } + if (createVpcRouteOptions.priority() != null) { + contentJson.addProperty("priority", createVpcRouteOptions.priority()); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List VPN servers. + * Create a routing table for a VPC. * - * This request lists VPN servers. + * This request creates a routing table from a routing table prototype object. The prototype object is structured in + * the same way as a retrieved routing table, and contains the information necessary to create the new routing table. * - * @param listVpnServersOptions the {@link ListVpnServersOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPNServerCollection} + * At present, the routing table's `resource_group` will be inherited from its VPC, but may be specifiable in the + * future. + * + * @param createVpcRoutingTableOptions the {@link CreateVpcRoutingTableOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link RoutingTable} */ - public ServiceCall listVpnServers(ListVpnServersOptions listVpnServersOptions) { - if (listVpnServersOptions == null) { - listVpnServersOptions = new ListVpnServersOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpnServers"); + public ServiceCall createVpcRoutingTable(CreateVpcRoutingTableOptions createVpcRoutingTableOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createVpcRoutingTableOptions, + "createVpcRoutingTableOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("vpc_id", createVpcRoutingTableOptions.vpcId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routing_tables", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createVpcRoutingTable"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listVpnServersOptions.name() != null) { - builder.query("name", String.valueOf(listVpnServersOptions.name())); + final JsonObject contentJson = new JsonObject(); + if (createVpcRoutingTableOptions.acceptRoutesFrom() != null) { + contentJson.add("accept_routes_from", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpcRoutingTableOptions.acceptRoutesFrom())); } - if (listVpnServersOptions.start() != null) { - builder.query("start", String.valueOf(listVpnServersOptions.start())); + if (createVpcRoutingTableOptions.advertiseRoutesTo() != null) { + contentJson.add("advertise_routes_to", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpcRoutingTableOptions.advertiseRoutesTo())); } - if (listVpnServersOptions.limit() != null) { - builder.query("limit", String.valueOf(listVpnServersOptions.limit())); + if (createVpcRoutingTableOptions.name() != null) { + contentJson.addProperty("name", createVpcRoutingTableOptions.name()); } - if (listVpnServersOptions.resourceGroupId() != null) { - builder.query("resource_group.id", String.valueOf(listVpnServersOptions.resourceGroupId())); + if (createVpcRoutingTableOptions.routeDirectLinkIngress() != null) { + contentJson.addProperty("route_direct_link_ingress", createVpcRoutingTableOptions.routeDirectLinkIngress()); } - if (listVpnServersOptions.sort() != null) { - builder.query("sort", String.valueOf(listVpnServersOptions.sort())); + if (createVpcRoutingTableOptions.routeInternetIngress() != null) { + contentJson.addProperty("route_internet_ingress", createVpcRoutingTableOptions.routeInternetIngress()); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (createVpcRoutingTableOptions.routeTransitGatewayIngress() != null) { + contentJson.addProperty("route_transit_gateway_ingress", createVpcRoutingTableOptions.routeTransitGatewayIngress()); + } + if (createVpcRoutingTableOptions.routeVpcZoneIngress() != null) { + contentJson.addProperty("route_vpc_zone_ingress", createVpcRoutingTableOptions.routeVpcZoneIngress()); + } + if (createVpcRoutingTableOptions.routes() != null) { + contentJson.add("routes", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpcRoutingTableOptions.routes())); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List VPN servers. - * - * This request lists VPN servers. - * - * @return a {@link ServiceCall} with a result of type {@link VPNServerCollection} - */ - public ServiceCall listVpnServers() { - return listVpnServers(null); - } - - /** - * Create a VPN server. + * Create a route in a VPC routing table. * - * This request creates a new VPN server. + * This request creates a new VPC route from a VPC route prototype object. The prototype object is structured in the + * same way as a retrieved VPC route and contains the information necessary to create the route. * - * @param createVpnServerOptions the {@link CreateVpnServerOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPNServer} + * @param createVpcRoutingTableRouteOptions the {@link CreateVpcRoutingTableRouteOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Route} */ - public ServiceCall createVpnServer(CreateVpnServerOptions createVpnServerOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createVpnServerOptions, - "createVpnServerOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createVpnServer"); + public ServiceCall createVpcRoutingTableRoute(CreateVpcRoutingTableRouteOptions createVpcRoutingTableRouteOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createVpcRoutingTableRouteOptions, + "createVpcRoutingTableRouteOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("vpc_id", createVpcRoutingTableRouteOptions.vpcId()); + pathParamsMap.put("routing_table_id", createVpcRoutingTableRouteOptions.routingTableId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createVpcRoutingTableRoute"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } @@ -12740,60 +13199,59 @@ public ServiceCall createVpnServer(CreateVpnServerOptions createVpnSe builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); final JsonObject contentJson = new JsonObject(); - contentJson.add("certificate", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpnServerOptions.certificate())); - contentJson.add("client_authentication", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpnServerOptions.clientAuthentication())); - contentJson.addProperty("client_ip_pool", createVpnServerOptions.clientIpPool()); - contentJson.add("subnets", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpnServerOptions.subnets())); - if (createVpnServerOptions.clientDnsServerIps() != null) { - contentJson.add("client_dns_server_ips", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpnServerOptions.clientDnsServerIps())); - } - if (createVpnServerOptions.clientIdleTimeout() != null) { - contentJson.addProperty("client_idle_timeout", createVpnServerOptions.clientIdleTimeout()); - } - if (createVpnServerOptions.enableSplitTunneling() != null) { - contentJson.addProperty("enable_split_tunneling", createVpnServerOptions.enableSplitTunneling()); - } - if (createVpnServerOptions.name() != null) { - contentJson.addProperty("name", createVpnServerOptions.name()); + contentJson.addProperty("destination", createVpcRoutingTableRouteOptions.destination()); + contentJson.add("zone", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpcRoutingTableRouteOptions.zone())); + if (createVpcRoutingTableRouteOptions.action() != null) { + contentJson.addProperty("action", createVpcRoutingTableRouteOptions.action()); } - if (createVpnServerOptions.port() != null) { - contentJson.addProperty("port", createVpnServerOptions.port()); + if (createVpcRoutingTableRouteOptions.advertise() != null) { + contentJson.addProperty("advertise", createVpcRoutingTableRouteOptions.advertise()); } - if (createVpnServerOptions.protocol() != null) { - contentJson.addProperty("protocol", createVpnServerOptions.protocol()); + if (createVpcRoutingTableRouteOptions.name() != null) { + contentJson.addProperty("name", createVpcRoutingTableRouteOptions.name()); } - if (createVpnServerOptions.resourceGroup() != null) { - contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpnServerOptions.resourceGroup())); + if (createVpcRoutingTableRouteOptions.nextHop() != null) { + contentJson.add("next_hop", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpcRoutingTableRouteOptions.nextHop())); } - if (createVpnServerOptions.securityGroups() != null) { - contentJson.add("security_groups", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpnServerOptions.securityGroups())); + if (createVpcRoutingTableRouteOptions.priority() != null) { + contentJson.addProperty("priority", createVpcRoutingTableRouteOptions.priority()); } builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a VPN server. + * Delete a VPC. * - * This request deletes a VPN server. This operation cannot be reversed. + * This request deletes a VPC. This operation cannot be reversed. * - * @param deleteVpnServerOptions the {@link DeleteVpnServerOptions} containing the options for the call + * For this request to succeed: + * - Instances, subnets, public gateways, endpoint gateways, and private path service + * gateways must not reside in this VPC + * - The VPC must not be providing DNS resolution for any other VPCs + * - If `dns.enable_hub` is `true`, `dns.resolution_binding_count` must be zero + * + * All security groups and network ACLs associated with the VPC are automatically deleted. All flow log collectors + * with `auto_delete` set to `true` targeting the VPC or any resource in the VPC are automatically deleted. All public + * address ranges attached to the VPC are automatically detached. + * + * @param deleteVpcOptions the {@link DeleteVpcOptions} containing the options for the call * @return a {@link ServiceCall} with a void result */ - public ServiceCall deleteVpnServer(DeleteVpnServerOptions deleteVpnServerOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVpnServerOptions, - "deleteVpnServerOptions cannot be null"); + public ServiceCall deleteVpc(DeleteVpcOptions deleteVpcOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVpcOptions, + "deleteVpcOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteVpnServerOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVpnServer"); + pathParamsMap.put("id", deleteVpcOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVpc"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - if (deleteVpnServerOptions.ifMatch() != null) { - builder.header("If-Match", deleteVpnServerOptions.ifMatch()); + if (deleteVpcOptions.ifMatch() != null) { + builder.header("If-Match", deleteVpcOptions.ifMatch()); } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); @@ -12802,142 +13260,136 @@ public ServiceCall deleteVpnServer(DeleteVpnServerOptions deleteVpnServerO } /** - * Retrieve a VPN server. + * Delete an address prefix. * - * This request retrieves a single VPN server specified by the identifier in the URL. + * This request deletes a prefix. This operation cannot be reversed. The request will fail if any subnets use + * addresses from this prefix. * - * @param getVpnServerOptions the {@link GetVpnServerOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPNServer} + * @param deleteVpcAddressPrefixOptions the {@link DeleteVpcAddressPrefixOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall getVpnServer(GetVpnServerOptions getVpnServerOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getVpnServerOptions, - "getVpnServerOptions cannot be null"); + public ServiceCall deleteVpcAddressPrefix(DeleteVpcAddressPrefixOptions deleteVpcAddressPrefixOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVpcAddressPrefixOptions, + "deleteVpcAddressPrefixOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getVpnServerOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpnServer"); + pathParamsMap.put("vpc_id", deleteVpcAddressPrefixOptions.vpcId()); + pathParamsMap.put("id", deleteVpcAddressPrefixOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/address_prefixes/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVpcAddressPrefix"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Update a VPN server. + * Delete a DNS resolution binding. * - * This request updates the properties of an existing VPN server. Any updates other than to `name` will cause all - * connected VPN clients to be disconnected. + * This request deletes a DNS resolution binding. This operation cannot be reversed. * - * @param updateVpnServerOptions the {@link UpdateVpnServerOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPNServer} + * For this request to succeed, the VPC specified by the identifier in the URL must not have + * `dns.resolver.type` set to `delegated`. + * + * @param deleteVpcDnsResolutionBindingOptions the {@link DeleteVpcDnsResolutionBindingOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPCDNSResolutionBinding} */ - public ServiceCall updateVpnServer(UpdateVpnServerOptions updateVpnServerOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateVpnServerOptions, - "updateVpnServerOptions cannot be null"); + public ServiceCall deleteVpcDnsResolutionBinding(DeleteVpcDnsResolutionBindingOptions deleteVpcDnsResolutionBindingOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVpcDnsResolutionBindingOptions, + "deleteVpcDnsResolutionBindingOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateVpnServerOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateVpnServer"); + pathParamsMap.put("vpc_id", deleteVpcDnsResolutionBindingOptions.vpcId()); + pathParamsMap.put("id", deleteVpcDnsResolutionBindingOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/dns_resolution_bindings/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVpcDnsResolutionBinding"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); - if (updateVpnServerOptions.ifMatch() != null) { - builder.header("If-Match", updateVpnServerOptions.ifMatch()); - } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateVpnServerOptions.vpnServerPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve client configuration. + * Delete a VPC route. * - * This request retrieves OpenVPN client configuration on a single VPN server specified by the identifier in the URL. - * This configuration includes directives compatible with OpenVPN releases 2.4 and 2.5. + * This request deletes a route. This operation cannot be reversed. * - * @param getVpnServerClientConfigurationOptions the {@link GetVpnServerClientConfigurationOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link String} + * @param deleteVpcRouteOptions the {@link DeleteVpcRouteOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result + * @deprecated this method is deprecated and may be removed in a future release */ - public ServiceCall getVpnServerClientConfiguration(GetVpnServerClientConfigurationOptions getVpnServerClientConfigurationOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getVpnServerClientConfigurationOptions, - "getVpnServerClientConfigurationOptions cannot be null"); + @Deprecated + public ServiceCall deleteVpcRoute(DeleteVpcRouteOptions deleteVpcRouteOptions) { + LOGGER.warning("A deprecated operation has been invoked: deleteVpcRoute"); + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVpcRouteOptions, + "deleteVpcRouteOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getVpnServerClientConfigurationOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{id}/client_configuration", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpnServerClientConfiguration"); + pathParamsMap.put("vpc_id", deleteVpcRouteOptions.vpcId()); + pathParamsMap.put("id", deleteVpcRouteOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routes/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVpcRoute"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "text/plain"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getString(); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * List VPN clients for a VPN server. + * Delete a VPC routing table. * - * This request retrieves connected VPN clients, and any disconnected VPN clients that the VPN server has not yet - * deleted based on its auto-deletion policy. + * This request deletes a routing table. A routing table cannot be deleted if it is associated with any subnets in + * the VPC. Additionally, a VPC's default routing table cannot be deleted. This operation cannot be reversed. * - * @param listVpnServerClientsOptions the {@link ListVpnServerClientsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPNServerClientCollection} + * @param deleteVpcRoutingTableOptions the {@link DeleteVpcRoutingTableOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall listVpnServerClients(ListVpnServerClientsOptions listVpnServerClientsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listVpnServerClientsOptions, - "listVpnServerClientsOptions cannot be null"); + public ServiceCall deleteVpcRoutingTable(DeleteVpcRoutingTableOptions deleteVpcRoutingTableOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVpcRoutingTableOptions, + "deleteVpcRoutingTableOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpn_server_id", listVpnServerClientsOptions.vpnServerId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{vpn_server_id}/clients", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpnServerClients"); + pathParamsMap.put("vpc_id", deleteVpcRoutingTableOptions.vpcId()); + pathParamsMap.put("id", deleteVpcRoutingTableOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routing_tables/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVpcRoutingTable"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); + if (deleteVpcRoutingTableOptions.ifMatch() != null) { + builder.header("If-Match", deleteVpcRoutingTableOptions.ifMatch()); + } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listVpnServerClientsOptions.start() != null) { - builder.query("start", String.valueOf(listVpnServerClientsOptions.start())); - } - if (listVpnServerClientsOptions.limit() != null) { - builder.query("limit", String.valueOf(listVpnServerClientsOptions.limit())); - } - if (listVpnServerClientsOptions.sort() != null) { - builder.query("sort", String.valueOf(listVpnServerClientsOptions.sort())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a VPN client. + * Delete a VPC routing table route. * - * This request disconnects and deletes the VPN client from the VPN server. The VPN client may reconnect unless its - * authentication permissions for the configured authentication methods (such as its client certificate) have been - * revoked. + * This request deletes a VPC route. This operation cannot be reversed. Only VPC routes with an `origin` of `user` are + * allowed to be deleted. * - * @param deleteVpnServerClientOptions the {@link DeleteVpnServerClientOptions} containing the options for the call + * @param deleteVpcRoutingTableRouteOptions the {@link DeleteVpcRoutingTableRouteOptions} containing the options for the call * @return a {@link ServiceCall} with a void result */ - public ServiceCall deleteVpnServerClient(DeleteVpnServerClientOptions deleteVpnServerClientOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVpnServerClientOptions, - "deleteVpnServerClientOptions cannot be null"); + public ServiceCall deleteVpcRoutingTableRoute(DeleteVpcRoutingTableRouteOptions deleteVpcRoutingTableRouteOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVpcRoutingTableRouteOptions, + "deleteVpcRoutingTableRouteOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpn_server_id", deleteVpnServerClientOptions.vpnServerId()); - pathParamsMap.put("id", deleteVpnServerClientOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{vpn_server_id}/clients/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVpnServerClient"); + pathParamsMap.put("vpc_id", deleteVpcRoutingTableRouteOptions.vpcId()); + pathParamsMap.put("routing_table_id", deleteVpcRoutingTableRouteOptions.routingTableId()); + pathParamsMap.put("id", deleteVpcRoutingTableRouteOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVpcRoutingTableRoute"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } @@ -12948,749 +13400,717 @@ public ServiceCall deleteVpnServerClient(DeleteVpnServerClientOptions dele } /** - * Retrieve a VPN client. + * Retrieve a VPC. * - * This request retrieves a single VPN client specified by the identifier in the URL. + * This request retrieves a single VPC specified by the identifier in the URL. * - * @param getVpnServerClientOptions the {@link GetVpnServerClientOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPNServerClient} + * @param getVpcOptions the {@link GetVpcOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPC} */ - public ServiceCall getVpnServerClient(GetVpnServerClientOptions getVpnServerClientOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getVpnServerClientOptions, - "getVpnServerClientOptions cannot be null"); + public ServiceCall getVpc(GetVpcOptions getVpcOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getVpcOptions, + "getVpcOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpn_server_id", getVpnServerClientOptions.vpnServerId()); - pathParamsMap.put("id", getVpnServerClientOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{vpn_server_id}/clients/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpnServerClient"); + pathParamsMap.put("id", getVpcOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpc"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Disconnect a VPN client. + * Retrieve an address prefix. * - * This request disconnects the specified VPN client, and deletes the client according to the VPN server's - * auto-deletion policy. The VPN client may reconnect unless its authentication permissions for the configured - * authentication methods (such as its client certificate) have been revoked. + * This request retrieves a single prefix specified by the identifier in the URL. * - * @param disconnectVpnClientOptions the {@link DisconnectVpnClientOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param getVpcAddressPrefixOptions the {@link GetVpcAddressPrefixOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link AddressPrefix} */ - public ServiceCall disconnectVpnClient(DisconnectVpnClientOptions disconnectVpnClientOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(disconnectVpnClientOptions, - "disconnectVpnClientOptions cannot be null"); + public ServiceCall getVpcAddressPrefix(GetVpcAddressPrefixOptions getVpcAddressPrefixOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getVpcAddressPrefixOptions, + "getVpcAddressPrefixOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpn_server_id", disconnectVpnClientOptions.vpnServerId()); - pathParamsMap.put("id", disconnectVpnClientOptions.id()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{vpn_server_id}/clients/{id}/disconnect", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "disconnectVpnClient"); + pathParamsMap.put("vpc_id", getVpcAddressPrefixOptions.vpcId()); + pathParamsMap.put("id", getVpcAddressPrefixOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/address_prefixes/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpcAddressPrefix"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List VPN routes for a VPN server. + * Retrieve a VPC's default network ACL. * - * This request lists VPN routes in a VPN server. All VPN routes are provided to the VPN client when the connection is - * established. Packets received from the VPN client will be dropped by the VPN server if there is no VPN route - * matching their specified destinations. All VPN routes must be unique within the VPN server. + * This request retrieves the default network ACL for the VPC specified by the identifier in the URL. The default + * network ACL is applied to any new subnets in the VPC which do not specify a network ACL. * - * @param listVpnServerRoutesOptions the {@link ListVpnServerRoutesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPNServerRouteCollection} + * @param getVpcDefaultNetworkAclOptions the {@link GetVpcDefaultNetworkAclOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link DefaultNetworkACL} */ - public ServiceCall listVpnServerRoutes(ListVpnServerRoutesOptions listVpnServerRoutesOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listVpnServerRoutesOptions, - "listVpnServerRoutesOptions cannot be null"); + public ServiceCall getVpcDefaultNetworkAcl(GetVpcDefaultNetworkAclOptions getVpcDefaultNetworkAclOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getVpcDefaultNetworkAclOptions, + "getVpcDefaultNetworkAclOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpn_server_id", listVpnServerRoutesOptions.vpnServerId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{vpn_server_id}/routes", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpnServerRoutes"); + pathParamsMap.put("id", getVpcDefaultNetworkAclOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{id}/default_network_acl", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpcDefaultNetworkAcl"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listVpnServerRoutesOptions.start() != null) { - builder.query("start", String.valueOf(listVpnServerRoutesOptions.start())); - } - if (listVpnServerRoutesOptions.limit() != null) { - builder.query("limit", String.valueOf(listVpnServerRoutesOptions.limit())); - } - if (listVpnServerRoutesOptions.sort() != null) { - builder.query("sort", String.valueOf(listVpnServerRoutesOptions.sort())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create a VPN route for a VPN server. + * Retrieve a VPC's default routing table. * - * This request creates a new VPN route in the VPN server. All VPN routes are provided to the VPN client when the - * connection is established. Packets received from the VPN client will be dropped by the VPN server if there is no - * VPN route matching their specified destinations. All VPN routes must be unique within the VPN server. + * This request retrieves the default routing table for the VPC specified by the identifier in the URL. The default + * routing table is associated with any subnets in the VPC which have not been explicitly associated with another + * routing table. * - * @param createVpnServerRouteOptions the {@link CreateVpnServerRouteOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPNServerRoute} + * @param getVpcDefaultRoutingTableOptions the {@link GetVpcDefaultRoutingTableOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link DefaultRoutingTable} */ - public ServiceCall createVpnServerRoute(CreateVpnServerRouteOptions createVpnServerRouteOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createVpnServerRouteOptions, - "createVpnServerRouteOptions cannot be null"); + public ServiceCall getVpcDefaultRoutingTable(GetVpcDefaultRoutingTableOptions getVpcDefaultRoutingTableOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getVpcDefaultRoutingTableOptions, + "getVpcDefaultRoutingTableOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpn_server_id", createVpnServerRouteOptions.vpnServerId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{vpn_server_id}/routes", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createVpnServerRoute"); + pathParamsMap.put("id", getVpcDefaultRoutingTableOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{id}/default_routing_table", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpcDefaultRoutingTable"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("destination", createVpnServerRouteOptions.destination()); - if (createVpnServerRouteOptions.action() != null) { - contentJson.addProperty("action", createVpnServerRouteOptions.action()); - } - if (createVpnServerRouteOptions.name() != null) { - contentJson.addProperty("name", createVpnServerRouteOptions.name()); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a VPN route. + * Retrieve a VPC's default security group. * - * This request deletes a VPN route. This operation cannot be reversed. + * This request retrieves the default security group for the VPC specified by the identifier in the URL. Resources + * created in this VPC that allow a security group to be optionally specified will use this security group by default. * - * @param deleteVpnServerRouteOptions the {@link DeleteVpnServerRouteOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param getVpcDefaultSecurityGroupOptions the {@link GetVpcDefaultSecurityGroupOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link DefaultSecurityGroup} */ - public ServiceCall deleteVpnServerRoute(DeleteVpnServerRouteOptions deleteVpnServerRouteOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVpnServerRouteOptions, - "deleteVpnServerRouteOptions cannot be null"); + public ServiceCall getVpcDefaultSecurityGroup(GetVpcDefaultSecurityGroupOptions getVpcDefaultSecurityGroupOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getVpcDefaultSecurityGroupOptions, + "getVpcDefaultSecurityGroupOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpn_server_id", deleteVpnServerRouteOptions.vpnServerId()); - pathParamsMap.put("id", deleteVpnServerRouteOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{vpn_server_id}/routes/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVpnServerRoute"); + pathParamsMap.put("id", getVpcDefaultSecurityGroupOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{id}/default_security_group", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpcDefaultSecurityGroup"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a VPN route. + * Retrieve a DNS resolution binding. * - * This request retrieves a single VPN route specified by the identifier in the URL. + * This request retrieves a single DNS resolution binding specified by the identifier in the URL. * - * @param getVpnServerRouteOptions the {@link GetVpnServerRouteOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPNServerRoute} + * @param getVpcDnsResolutionBindingOptions the {@link GetVpcDnsResolutionBindingOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPCDNSResolutionBinding} */ - public ServiceCall getVpnServerRoute(GetVpnServerRouteOptions getVpnServerRouteOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getVpnServerRouteOptions, - "getVpnServerRouteOptions cannot be null"); + public ServiceCall getVpcDnsResolutionBinding(GetVpcDnsResolutionBindingOptions getVpcDnsResolutionBindingOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getVpcDnsResolutionBindingOptions, + "getVpcDnsResolutionBindingOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpn_server_id", getVpnServerRouteOptions.vpnServerId()); - pathParamsMap.put("id", getVpnServerRouteOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{vpn_server_id}/routes/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpnServerRoute"); + pathParamsMap.put("vpc_id", getVpcDnsResolutionBindingOptions.vpcId()); + pathParamsMap.put("id", getVpcDnsResolutionBindingOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/dns_resolution_bindings/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpcDnsResolutionBinding"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a VPN route. + * Retrieve a VPC route. * - * This request updates a VPN route with the information in a provided VPN route patch. The VPN route patch object is - * structured in the same way as a retrieved VPN route and contains only the information to be updated. + * This request retrieves a single route specified by the identifier in the URL. * - * @param updateVpnServerRouteOptions the {@link UpdateVpnServerRouteOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link VPNServerRoute} + * @param getVpcRouteOptions the {@link GetVpcRouteOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link GetVpcRouteResponse} + * @deprecated this method is deprecated and may be removed in a future release */ - public ServiceCall updateVpnServerRoute(UpdateVpnServerRouteOptions updateVpnServerRouteOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateVpnServerRouteOptions, - "updateVpnServerRouteOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("vpn_server_id", updateVpnServerRouteOptions.vpnServerId()); - pathParamsMap.put("id", updateVpnServerRouteOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{vpn_server_id}/routes/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateVpnServerRoute"); + @Deprecated + public ServiceCall getVpcRoute(GetVpcRouteOptions getVpcRouteOptions) { + LOGGER.warning("A deprecated operation has been invoked: getVpcRoute"); + com.ibm.cloud.sdk.core.util.Validator.notNull(getVpcRouteOptions, + "getVpcRouteOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("vpc_id", getVpcRouteOptions.vpcId()); + pathParamsMap.put("id", getVpcRouteOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routes/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpcRoute"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateVpnServerRouteOptions.vpnServerRoutePatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List load balancer profiles. + * Retrieve a VPC routing table. * - * This request lists load balancer profiles available in the region. A load balancer profile specifies the - * performance characteristics and pricing model for a load balancer. + * This request retrieves a single routing table specified by the identifier in the URL. * - * @param listLoadBalancerProfilesOptions the {@link ListLoadBalancerProfilesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerProfileCollection} + * @param getVpcRoutingTableOptions the {@link GetVpcRoutingTableOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link RoutingTable} */ - public ServiceCall listLoadBalancerProfiles(ListLoadBalancerProfilesOptions listLoadBalancerProfilesOptions) { - if (listLoadBalancerProfilesOptions == null) { - listLoadBalancerProfilesOptions = new ListLoadBalancerProfilesOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancer/profiles")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listLoadBalancerProfiles"); + public ServiceCall getVpcRoutingTable(GetVpcRoutingTableOptions getVpcRoutingTableOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getVpcRoutingTableOptions, + "getVpcRoutingTableOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("vpc_id", getVpcRoutingTableOptions.vpcId()); + pathParamsMap.put("id", getVpcRoutingTableOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routing_tables/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpcRoutingTable"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listLoadBalancerProfilesOptions.start() != null) { - builder.query("start", String.valueOf(listLoadBalancerProfilesOptions.start())); - } - if (listLoadBalancerProfilesOptions.limit() != null) { - builder.query("limit", String.valueOf(listLoadBalancerProfilesOptions.limit())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List load balancer profiles. - * - * This request lists load balancer profiles available in the region. A load balancer profile specifies the - * performance characteristics and pricing model for a load balancer. - * - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerProfileCollection} - */ - public ServiceCall listLoadBalancerProfiles() { - return listLoadBalancerProfiles(null); - } - - /** - * Retrieve a load balancer profile. + * Retrieve a VPC routing table route. * - * This request retrieves a load balancer profile specified by the name in the URL. + * This request retrieves a single VPC route specified by the identifier in the URL path. * - * @param getLoadBalancerProfileOptions the {@link GetLoadBalancerProfileOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerProfile} + * @param getVpcRoutingTableRouteOptions the {@link GetVpcRoutingTableRouteOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Route} */ - public ServiceCall getLoadBalancerProfile(GetLoadBalancerProfileOptions getLoadBalancerProfileOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getLoadBalancerProfileOptions, - "getLoadBalancerProfileOptions cannot be null"); + public ServiceCall getVpcRoutingTableRoute(GetVpcRoutingTableRouteOptions getVpcRoutingTableRouteOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getVpcRoutingTableRouteOptions, + "getVpcRoutingTableRouteOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("name", getLoadBalancerProfileOptions.name()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancer/profiles/{name}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getLoadBalancerProfile"); + pathParamsMap.put("vpc_id", getVpcRoutingTableRouteOptions.vpcId()); + pathParamsMap.put("routing_table_id", getVpcRoutingTableRouteOptions.routingTableId()); + pathParamsMap.put("id", getVpcRoutingTableRouteOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpcRoutingTableRoute"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List load balancers. + * List address prefixes for a VPC. * - * This request lists load balancers in the region. + * This request lists address pool prefixes for a VPC. * - * @param listLoadBalancersOptions the {@link ListLoadBalancersOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerCollection} + * @param listVpcAddressPrefixesOptions the {@link ListVpcAddressPrefixesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link AddressPrefixCollection} */ - public ServiceCall listLoadBalancers(ListLoadBalancersOptions listLoadBalancersOptions) { - if (listLoadBalancersOptions == null) { - listLoadBalancersOptions = new ListLoadBalancersOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listLoadBalancers"); + public ServiceCall listVpcAddressPrefixes(ListVpcAddressPrefixesOptions listVpcAddressPrefixesOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listVpcAddressPrefixesOptions, + "listVpcAddressPrefixesOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("vpc_id", listVpcAddressPrefixesOptions.vpcId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/address_prefixes", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpcAddressPrefixes"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listLoadBalancersOptions.start() != null) { - builder.query("start", String.valueOf(listLoadBalancersOptions.start())); + if (listVpcAddressPrefixesOptions.start() != null) { + builder.query("start", String.valueOf(listVpcAddressPrefixesOptions.start())); } - if (listLoadBalancersOptions.limit() != null) { - builder.query("limit", String.valueOf(listLoadBalancersOptions.limit())); + if (listVpcAddressPrefixesOptions.limit() != null) { + builder.query("limit", String.valueOf(listVpcAddressPrefixesOptions.limit())); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List load balancers. + * List DNS resolution bindings for a VPC. * - * This request lists load balancers in the region. + * This request lists DNS resolution bindings for a VPC. A DNS resolution binding represents an association with + * another VPC for centralizing DNS name resolution. * - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerCollection} - */ - public ServiceCall listLoadBalancers() { - return listLoadBalancers(null); - } - - /** - * Create a load balancer. + * If the VPC specified by the identifier in the URL is a DNS hub VPC (has `dns.enable_hub` set to `true`) then there + * is one binding for each VPC bound to the hub VPC. The endpoint gateways in the bound VPCs can allow (using + * `allow_dns_resolution_binding`) the hub VPC to centralize resolution of their DNS names. * - * This request creates and provisions a new load balancer. + * If the VPC specified by the identifier in the URL is not a DNS hub VPC, then there is at most one binding (to a hub + * VPC). The endpoint gateways in the VPC specified by the identifier in the URL can allow (using + * `allow_dns_resolution_binding`) its hub VPC to centralize resolution of their DNS names. * - * @param createLoadBalancerOptions the {@link CreateLoadBalancerOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancer} + * To make use of centralized DNS resolution, a VPC bound to a DNS hub VPC must delegate DNS resolution to its hub VPC + * by setting `dns.resolver.type` to `delegate`. + * + * The bindings will be sorted by their `created_at` property values, with newest bindings first. Bindings with + * identical `created_at` property values will in turn be sorted by ascending `name` property values. + * + * @param listVpcDnsResolutionBindingsOptions the {@link ListVpcDnsResolutionBindingsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPCDNSResolutionBindingCollection} */ - public ServiceCall createLoadBalancer(CreateLoadBalancerOptions createLoadBalancerOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createLoadBalancerOptions, - "createLoadBalancerOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createLoadBalancer"); + public ServiceCall listVpcDnsResolutionBindings(ListVpcDnsResolutionBindingsOptions listVpcDnsResolutionBindingsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listVpcDnsResolutionBindingsOptions, + "listVpcDnsResolutionBindingsOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("vpc_id", listVpcDnsResolutionBindingsOptions.vpcId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/dns_resolution_bindings", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpcDnsResolutionBindings"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("is_public", createLoadBalancerOptions.isPublic()); - contentJson.add("subnets", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerOptions.subnets())); - if (createLoadBalancerOptions.dns() != null) { - contentJson.add("dns", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerOptions.dns())); - } - if (createLoadBalancerOptions.isPrivatePath() != null) { - contentJson.addProperty("is_private_path", createLoadBalancerOptions.isPrivatePath()); - } - if (createLoadBalancerOptions.listeners() != null) { - contentJson.add("listeners", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerOptions.listeners())); - } - if (createLoadBalancerOptions.logging() != null) { - contentJson.add("logging", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerOptions.logging())); + if (listVpcDnsResolutionBindingsOptions.sort() != null) { + builder.query("sort", String.valueOf(listVpcDnsResolutionBindingsOptions.sort())); } - if (createLoadBalancerOptions.name() != null) { - contentJson.addProperty("name", createLoadBalancerOptions.name()); + if (listVpcDnsResolutionBindingsOptions.start() != null) { + builder.query("start", String.valueOf(listVpcDnsResolutionBindingsOptions.start())); } - if (createLoadBalancerOptions.pools() != null) { - contentJson.add("pools", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerOptions.pools())); + if (listVpcDnsResolutionBindingsOptions.limit() != null) { + builder.query("limit", String.valueOf(listVpcDnsResolutionBindingsOptions.limit())); } - if (createLoadBalancerOptions.profile() != null) { - contentJson.add("profile", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerOptions.profile())); + if (listVpcDnsResolutionBindingsOptions.name() != null) { + builder.query("name", String.valueOf(listVpcDnsResolutionBindingsOptions.name())); } - if (createLoadBalancerOptions.resourceGroup() != null) { - contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerOptions.resourceGroup())); + if (listVpcDnsResolutionBindingsOptions.vpcCrn() != null) { + builder.query("vpc.crn", String.valueOf(listVpcDnsResolutionBindingsOptions.vpcCrn())); } - if (createLoadBalancerOptions.routeMode() != null) { - contentJson.addProperty("route_mode", createLoadBalancerOptions.routeMode()); + if (listVpcDnsResolutionBindingsOptions.vpcName() != null) { + builder.query("vpc.name", String.valueOf(listVpcDnsResolutionBindingsOptions.vpcName())); } - if (createLoadBalancerOptions.securityGroups() != null) { - contentJson.add("security_groups", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerOptions.securityGroups())); + if (listVpcDnsResolutionBindingsOptions.accountId() != null) { + builder.query("account.id", String.valueOf(listVpcDnsResolutionBindingsOptions.accountId())); } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a load balancer. + * List routes in a VPC's default routing table. * - * This request deletes a load balancer. This operation cannot be reversed. A load balancer cannot be deleted if its - * `provisioning_status` is `delete_pending` or it is referenced by a resource. + * This request lists routes in the VPC's default routing table. Each route is zone-specific and directs any packets + * matching its destination CIDR block to a `next_hop` IP address. The most specific route matching a packet's + * destination will be used. If multiple equally-specific routes exist, traffic will be distributed across them. * - * @param deleteLoadBalancerOptions the {@link DeleteLoadBalancerOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param listVpcRoutesOptions the {@link ListVpcRoutesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link RouteCollectionVPCContext} + * @deprecated this method is deprecated and may be removed in a future release */ - public ServiceCall deleteLoadBalancer(DeleteLoadBalancerOptions deleteLoadBalancerOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteLoadBalancerOptions, - "deleteLoadBalancerOptions cannot be null"); + @Deprecated + public ServiceCall listVpcRoutes(ListVpcRoutesOptions listVpcRoutesOptions) { + LOGGER.warning("A deprecated operation has been invoked: listVpcRoutes"); + com.ibm.cloud.sdk.core.util.Validator.notNull(listVpcRoutesOptions, + "listVpcRoutesOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteLoadBalancerOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteLoadBalancer"); + pathParamsMap.put("vpc_id", listVpcRoutesOptions.vpcId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routes", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpcRoutes"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - if (deleteLoadBalancerOptions.ifMatch() != null) { - builder.header("If-Match", deleteLoadBalancerOptions.ifMatch()); - } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + if (listVpcRoutesOptions.zoneName() != null) { + builder.query("zone.name", String.valueOf(listVpcRoutesOptions.zoneName())); + } + if (listVpcRoutesOptions.start() != null) { + builder.query("start", String.valueOf(listVpcRoutesOptions.start())); + } + if (listVpcRoutesOptions.limit() != null) { + builder.query("limit", String.valueOf(listVpcRoutesOptions.limit())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a load balancer. + * List routes in a VPC routing table. * - * This request retrieves a single load balancer specified by the identifier in the URL path. + * This request lists routes in a VPC routing table. If subnets are associated with this routing table, delivery of + * packets sent on a subnet is performed according to the action of the most specific matching route in the table + * (provided the subnet and route are in the same zone). If multiple equally-specific routes exist, the route with the + * highest priority will be used. If two matching routes have the same destination and priority, traffic will be + * distributed between them. If no routes match, delivery will be controlled by the system's built-in routes. * - * @param getLoadBalancerOptions the {@link GetLoadBalancerOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancer} + * @param listVpcRoutingTableRoutesOptions the {@link ListVpcRoutingTableRoutesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link RouteCollection} */ - public ServiceCall getLoadBalancer(GetLoadBalancerOptions getLoadBalancerOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getLoadBalancerOptions, - "getLoadBalancerOptions cannot be null"); + public ServiceCall listVpcRoutingTableRoutes(ListVpcRoutingTableRoutesOptions listVpcRoutingTableRoutesOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listVpcRoutingTableRoutesOptions, + "listVpcRoutingTableRoutesOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getLoadBalancerOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getLoadBalancer"); + pathParamsMap.put("vpc_id", listVpcRoutingTableRoutesOptions.vpcId()); + pathParamsMap.put("routing_table_id", listVpcRoutingTableRoutesOptions.routingTableId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpcRoutingTableRoutes"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listVpcRoutingTableRoutesOptions.start() != null) { + builder.query("start", String.valueOf(listVpcRoutingTableRoutesOptions.start())); + } + if (listVpcRoutingTableRoutesOptions.limit() != null) { + builder.query("limit", String.valueOf(listVpcRoutingTableRoutesOptions.limit())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a load balancer. + * List routing tables for a VPC. * - * This request updates a load balancer with the information in a provided load balancer patch. The load balancer - * patch object is structured in the same way as a retrieved load balancer and contains only the information to be - * updated. A load balancer can only be updated if its `provisioning_status` is `active`. + * This request lists routing tables for a VPC. Each subnet in a VPC is associated with a routing table, which + * controls delivery of packets sent on that subnet according to the action of the most specific matching route in the + * table. If multiple equally-specific routes exist, traffic will be distributed across them. If no routes match, + * delivery will be controlled by the system's built-in routes. * - * @param updateLoadBalancerOptions the {@link UpdateLoadBalancerOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancer} + * @param listVpcRoutingTablesOptions the {@link ListVpcRoutingTablesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link RoutingTableCollection} */ - public ServiceCall updateLoadBalancer(UpdateLoadBalancerOptions updateLoadBalancerOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateLoadBalancerOptions, - "updateLoadBalancerOptions cannot be null"); + public ServiceCall listVpcRoutingTables(ListVpcRoutingTablesOptions listVpcRoutingTablesOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listVpcRoutingTablesOptions, + "listVpcRoutingTablesOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateLoadBalancerOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateLoadBalancer"); + pathParamsMap.put("vpc_id", listVpcRoutingTablesOptions.vpcId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routing_tables", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpcRoutingTables"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); - if (updateLoadBalancerOptions.ifMatch() != null) { - builder.header("If-Match", updateLoadBalancerOptions.ifMatch()); - } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateLoadBalancerOptions.loadBalancerPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listVpcRoutingTablesOptions.start() != null) { + builder.query("start", String.valueOf(listVpcRoutingTablesOptions.start())); + } + if (listVpcRoutingTablesOptions.limit() != null) { + builder.query("limit", String.valueOf(listVpcRoutingTablesOptions.limit())); + } + if (listVpcRoutingTablesOptions.isDefault() != null) { + builder.query("is_default", String.valueOf(listVpcRoutingTablesOptions.isDefault())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List statistics of a load balancer. + * List VPCs. * - * This request lists statistics of a load balancer. + * This request lists VPCs in the region. A VPC is a virtual network that belongs to an account and provides logical + * isolation from other networks. A VPC is made up of resources in one or more zones. VPCs are regional, and each VPC + * can contain resources in multiple zones in a region. * - * @param getLoadBalancerStatisticsOptions the {@link GetLoadBalancerStatisticsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerStatistics} + * @param listVpcsOptions the {@link ListVpcsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPCCollection} */ - public ServiceCall getLoadBalancerStatistics(GetLoadBalancerStatisticsOptions getLoadBalancerStatisticsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getLoadBalancerStatisticsOptions, - "getLoadBalancerStatisticsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getLoadBalancerStatisticsOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{id}/statistics", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getLoadBalancerStatistics"); + public ServiceCall listVpcs(ListVpcsOptions listVpcsOptions) { + if (listVpcsOptions == null) { + listVpcsOptions = new ListVpcsOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpcs"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listVpcsOptions.start() != null) { + builder.query("start", String.valueOf(listVpcsOptions.start())); + } + if (listVpcsOptions.limit() != null) { + builder.query("limit", String.valueOf(listVpcsOptions.limit())); + } + if (listVpcsOptions.resourceGroupId() != null) { + builder.query("resource_group.id", String.valueOf(listVpcsOptions.resourceGroupId())); + } + if (listVpcsOptions.classicAccess() != null) { + builder.query("classic_access", String.valueOf(listVpcsOptions.classicAccess())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List listeners for a load balancer. + * List VPCs. * - * This request lists listeners for a load balancer. + * This request lists VPCs in the region. A VPC is a virtual network that belongs to an account and provides logical + * isolation from other networks. A VPC is made up of resources in one or more zones. VPCs are regional, and each VPC + * can contain resources in multiple zones in a region. * - * @param listLoadBalancerListenersOptions the {@link ListLoadBalancerListenersOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerListenerCollection} + * @return a {@link ServiceCall} with a result of type {@link VPCCollection} */ - public ServiceCall listLoadBalancerListeners(ListLoadBalancerListenersOptions listLoadBalancerListenersOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listLoadBalancerListenersOptions, - "listLoadBalancerListenersOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", listLoadBalancerListenersOptions.loadBalancerId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listLoadBalancerListeners"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.header("Accept", "application/json"); - builder.query("version", String.valueOf(this.version)); - builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); - return createServiceCall(builder.build(), responseConverter); + public ServiceCall listVpcs() { + return listVpcs(null); } /** - * Create a listener for a load balancer. + * Update a VPC. * - * This request creates a new listener for a load balancer. + * This request updates a VPC with the information provided in a VPC patch object. The patch object is structured in + * the same way as a retrieved VPC and needs to contain only the information to be updated. * - * @param createLoadBalancerListenerOptions the {@link CreateLoadBalancerListenerOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerListener} + * @param updateVpcOptions the {@link UpdateVpcOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPC} */ - public ServiceCall createLoadBalancerListener(CreateLoadBalancerListenerOptions createLoadBalancerListenerOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createLoadBalancerListenerOptions, - "createLoadBalancerListenerOptions cannot be null"); + public ServiceCall updateVpc(UpdateVpcOptions updateVpcOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateVpcOptions, + "updateVpcOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", createLoadBalancerListenerOptions.loadBalancerId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createLoadBalancerListener"); + pathParamsMap.put("id", updateVpcOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateVpc"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); + if (updateVpcOptions.ifMatch() != null) { + builder.header("If-Match", updateVpcOptions.ifMatch()); + } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("protocol", createLoadBalancerListenerOptions.protocol()); - if (createLoadBalancerListenerOptions.acceptProxyProtocol() != null) { - contentJson.addProperty("accept_proxy_protocol", createLoadBalancerListenerOptions.acceptProxyProtocol()); - } - if (createLoadBalancerListenerOptions.certificateInstance() != null) { - contentJson.add("certificate_instance", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerListenerOptions.certificateInstance())); - } - if (createLoadBalancerListenerOptions.connectionLimit() != null) { - contentJson.addProperty("connection_limit", createLoadBalancerListenerOptions.connectionLimit()); - } - if (createLoadBalancerListenerOptions.defaultPool() != null) { - contentJson.add("default_pool", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerListenerOptions.defaultPool())); - } - if (createLoadBalancerListenerOptions.httpsRedirect() != null) { - contentJson.add("https_redirect", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerListenerOptions.httpsRedirect())); - } - if (createLoadBalancerListenerOptions.idleConnectionTimeout() != null) { - contentJson.addProperty("idle_connection_timeout", createLoadBalancerListenerOptions.idleConnectionTimeout()); - } - if (createLoadBalancerListenerOptions.policies() != null) { - contentJson.add("policies", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerListenerOptions.policies())); - } - if (createLoadBalancerListenerOptions.port() != null) { - contentJson.addProperty("port", createLoadBalancerListenerOptions.port()); - } - if (createLoadBalancerListenerOptions.portMax() != null) { - contentJson.addProperty("port_max", createLoadBalancerListenerOptions.portMax()); - } - if (createLoadBalancerListenerOptions.portMin() != null) { - contentJson.addProperty("port_min", createLoadBalancerListenerOptions.portMin()); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateVpcOptions.vpcPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a load balancer listener. + * Update an address prefix. * - * This request deletes a load balancer listener. This operation cannot be reversed. For this operation to succeed, - * the listener must not be the target of another load balancer listener. + * This request updates a prefix with the information in a provided prefix patch. The prefix patch object is + * structured in the same way as a retrieved prefix and contains only the information to be updated. * - * @param deleteLoadBalancerListenerOptions the {@link DeleteLoadBalancerListenerOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param updateVpcAddressPrefixOptions the {@link UpdateVpcAddressPrefixOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link AddressPrefix} */ - public ServiceCall deleteLoadBalancerListener(DeleteLoadBalancerListenerOptions deleteLoadBalancerListenerOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteLoadBalancerListenerOptions, - "deleteLoadBalancerListenerOptions cannot be null"); + public ServiceCall updateVpcAddressPrefix(UpdateVpcAddressPrefixOptions updateVpcAddressPrefixOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateVpcAddressPrefixOptions, + "updateVpcAddressPrefixOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", deleteLoadBalancerListenerOptions.loadBalancerId()); - pathParamsMap.put("id", deleteLoadBalancerListenerOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteLoadBalancerListener"); + pathParamsMap.put("vpc_id", updateVpcAddressPrefixOptions.vpcId()); + pathParamsMap.put("id", updateVpcAddressPrefixOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/address_prefixes/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateVpcAddressPrefix"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateVpcAddressPrefixOptions.addressPrefixPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a load balancer listener. + * Update a DNS resolution binding. * - * This request retrieves a single listener specified by the identifier in the URL path. + * This request updates a DNS resolution binding with the information in a provided DNS resolution binding patch. The + * DNS resolution binding patch object is structured in the same way as a retrieved DNS resolution binding and + * contains only the information to be updated. * - * @param getLoadBalancerListenerOptions the {@link GetLoadBalancerListenerOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerListener} + * @param updateVpcDnsResolutionBindingOptions the {@link UpdateVpcDnsResolutionBindingOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPCDNSResolutionBinding} */ - public ServiceCall getLoadBalancerListener(GetLoadBalancerListenerOptions getLoadBalancerListenerOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getLoadBalancerListenerOptions, - "getLoadBalancerListenerOptions cannot be null"); + public ServiceCall updateVpcDnsResolutionBinding(UpdateVpcDnsResolutionBindingOptions updateVpcDnsResolutionBindingOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateVpcDnsResolutionBindingOptions, + "updateVpcDnsResolutionBindingOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", getLoadBalancerListenerOptions.loadBalancerId()); - pathParamsMap.put("id", getLoadBalancerListenerOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getLoadBalancerListener"); + pathParamsMap.put("vpc_id", updateVpcDnsResolutionBindingOptions.vpcId()); + pathParamsMap.put("id", updateVpcDnsResolutionBindingOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/dns_resolution_bindings/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateVpcDnsResolutionBinding"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateVpcDnsResolutionBindingOptions.vpcdnsResolutionBindingPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a load balancer listener. - * - * This request updates a load balancer listener from a listener patch. + * Update a VPC route. * - * @param updateLoadBalancerListenerOptions the {@link UpdateLoadBalancerListenerOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerListener} + * This request updates a route with the information in a provided route patch. The route patch object is structured + * in the same way as a retrieved route and contains only the information to be updated. + * + * @param updateVpcRouteOptions the {@link UpdateVpcRouteOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link UpdateVpcRouteResponse} + * @deprecated this method is deprecated and may be removed in a future release */ - public ServiceCall updateLoadBalancerListener(UpdateLoadBalancerListenerOptions updateLoadBalancerListenerOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateLoadBalancerListenerOptions, - "updateLoadBalancerListenerOptions cannot be null"); + @Deprecated + public ServiceCall updateVpcRoute(UpdateVpcRouteOptions updateVpcRouteOptions) { + LOGGER.warning("A deprecated operation has been invoked: updateVpcRoute"); + com.ibm.cloud.sdk.core.util.Validator.notNull(updateVpcRouteOptions, + "updateVpcRouteOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", updateLoadBalancerListenerOptions.loadBalancerId()); - pathParamsMap.put("id", updateLoadBalancerListenerOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateLoadBalancerListener"); + pathParamsMap.put("vpc_id", updateVpcRouteOptions.vpcId()); + pathParamsMap.put("id", updateVpcRouteOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routes/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateVpcRoute"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateLoadBalancerListenerOptions.loadBalancerListenerPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateVpcRouteOptions.routePatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List policies for a load balancer listener. + * Update a VPC routing table. * - * This request lists policies for a load balancer listener. A policy consists of rules to match against each incoming - * request, and an action to apply to the request if a rule matches. + * This request updates a routing table with the information in a provided routing table patch. The patch object is + * structured in the same way as a retrieved table and contains only the information to be updated. * - * @param listLoadBalancerListenerPoliciesOptions the {@link ListLoadBalancerListenerPoliciesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerListenerPolicyCollection} + * @param updateVpcRoutingTableOptions the {@link UpdateVpcRoutingTableOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link RoutingTable} */ - public ServiceCall listLoadBalancerListenerPolicies(ListLoadBalancerListenerPoliciesOptions listLoadBalancerListenerPoliciesOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listLoadBalancerListenerPoliciesOptions, - "listLoadBalancerListenerPoliciesOptions cannot be null"); + public ServiceCall updateVpcRoutingTable(UpdateVpcRoutingTableOptions updateVpcRoutingTableOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateVpcRoutingTableOptions, + "updateVpcRoutingTableOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", listLoadBalancerListenerPoliciesOptions.loadBalancerId()); - pathParamsMap.put("listener_id", listLoadBalancerListenerPoliciesOptions.listenerId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listLoadBalancerListenerPolicies"); + pathParamsMap.put("vpc_id", updateVpcRoutingTableOptions.vpcId()); + pathParamsMap.put("id", updateVpcRoutingTableOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routing_tables/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateVpcRoutingTable"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); + if (updateVpcRoutingTableOptions.ifMatch() != null) { + builder.header("If-Match", updateVpcRoutingTableOptions.ifMatch()); + } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateVpcRoutingTableOptions.routingTablePatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create a policy for a load balancer listener. + * Update a VPC routing table route. * - * This request creates a new policy from a load balancer listener policy object. The prototype object is structured - * in the same way as a retrieved policy, and contains the information necessary to create the new policy. For this - * request to succeed, the load balancer must be in the `application` family. + * This request updates a VPC route with the information provided in a route patch object. The patch object is + * structured in the same way as a retrieved VPC route and needs to contain only the information to be updated. Only + * VPC routes with an `origin` of `user` are allowed to be updated. * - * @param createLoadBalancerListenerPolicyOptions the {@link CreateLoadBalancerListenerPolicyOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerListenerPolicy} + * @param updateVpcRoutingTableRouteOptions the {@link UpdateVpcRoutingTableRouteOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link Route} */ - public ServiceCall createLoadBalancerListenerPolicy(CreateLoadBalancerListenerPolicyOptions createLoadBalancerListenerPolicyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createLoadBalancerListenerPolicyOptions, - "createLoadBalancerListenerPolicyOptions cannot be null"); + public ServiceCall updateVpcRoutingTableRoute(UpdateVpcRoutingTableRouteOptions updateVpcRoutingTableRouteOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateVpcRoutingTableRouteOptions, + "updateVpcRoutingTableRouteOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", createLoadBalancerListenerPolicyOptions.loadBalancerId()); - pathParamsMap.put("listener_id", createLoadBalancerListenerPolicyOptions.listenerId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createLoadBalancerListenerPolicy"); + pathParamsMap.put("vpc_id", updateVpcRoutingTableRouteOptions.vpcId()); + pathParamsMap.put("routing_table_id", updateVpcRoutingTableRouteOptions.routingTableId()); + pathParamsMap.put("id", updateVpcRoutingTableRouteOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateVpcRoutingTableRoute"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("action", createLoadBalancerListenerPolicyOptions.action()); - contentJson.addProperty("priority", createLoadBalancerListenerPolicyOptions.priority()); - if (createLoadBalancerListenerPolicyOptions.name() != null) { - contentJson.addProperty("name", createLoadBalancerListenerPolicyOptions.name()); - } - if (createLoadBalancerListenerPolicyOptions.rules() != null) { - contentJson.add("rules", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerListenerPolicyOptions.rules())); - } - if (createLoadBalancerListenerPolicyOptions.target() != null) { - contentJson.add("target", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerListenerPolicyOptions.target())); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateVpcRoutingTableRouteOptions.routePatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a load balancer listener policy. + * Set an advertised CIDR on a VPN gateway. * - * Deletes a policy of the load balancer listener. This operation cannot be reversed. + * This request adds the specified CIDR to the specified VPN gateway advertised CIDRs. This request succeeds if the + * specified CIDR already exists. A request body is not required, and if provided, is ignored. * - * @param deleteLoadBalancerListenerPolicyOptions the {@link DeleteLoadBalancerListenerPolicyOptions} containing the options for the call + * This request is only supported for route mode VPN gateways. + * + * @param addVpnGatewayAdvertisedCidrOptions the {@link AddVpnGatewayAdvertisedCidrOptions} containing the options for the call * @return a {@link ServiceCall} with a void result */ - public ServiceCall deleteLoadBalancerListenerPolicy(DeleteLoadBalancerListenerPolicyOptions deleteLoadBalancerListenerPolicyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteLoadBalancerListenerPolicyOptions, - "deleteLoadBalancerListenerPolicyOptions cannot be null"); + public ServiceCall addVpnGatewayAdvertisedCidr(AddVpnGatewayAdvertisedCidrOptions addVpnGatewayAdvertisedCidrOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(addVpnGatewayAdvertisedCidrOptions, + "addVpnGatewayAdvertisedCidrOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", deleteLoadBalancerListenerPolicyOptions.loadBalancerId()); - pathParamsMap.put("listener_id", deleteLoadBalancerListenerPolicyOptions.listenerId()); - pathParamsMap.put("id", deleteLoadBalancerListenerPolicyOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteLoadBalancerListenerPolicy"); + pathParamsMap.put("vpn_gateway_id", addVpnGatewayAdvertisedCidrOptions.vpnGatewayId()); + pathParamsMap.put("cidr", addVpnGatewayAdvertisedCidrOptions.cidr()); + RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/advertised_cidrs/{cidr}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "addVpnGatewayAdvertisedCidr"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } @@ -13701,145 +14121,137 @@ public ServiceCall deleteLoadBalancerListenerPolicy(DeleteLoadBalancerList } /** - * Retrieve a load balancer listener policy. + * Set a local CIDR on a VPN gateway connection. * - * Retrieve a single policy specified by the identifier in the URL path. + * This request adds the specified CIDR to the specified VPN gateway connection. This request succeeds if the + * specified CIDR already exists. A request body is not required, and if provided, is ignored. * - * @param getLoadBalancerListenerPolicyOptions the {@link GetLoadBalancerListenerPolicyOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerListenerPolicy} + * This request is only supported for policy mode VPN gateways. + * + * @param addVpnGatewayConnectionsLocalCidrOptions the {@link AddVpnGatewayConnectionsLocalCidrOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall getLoadBalancerListenerPolicy(GetLoadBalancerListenerPolicyOptions getLoadBalancerListenerPolicyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getLoadBalancerListenerPolicyOptions, - "getLoadBalancerListenerPolicyOptions cannot be null"); + public ServiceCall addVpnGatewayConnectionsLocalCidr(AddVpnGatewayConnectionsLocalCidrOptions addVpnGatewayConnectionsLocalCidrOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(addVpnGatewayConnectionsLocalCidrOptions, + "addVpnGatewayConnectionsLocalCidrOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", getLoadBalancerListenerPolicyOptions.loadBalancerId()); - pathParamsMap.put("listener_id", getLoadBalancerListenerPolicyOptions.listenerId()); - pathParamsMap.put("id", getLoadBalancerListenerPolicyOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getLoadBalancerListenerPolicy"); + pathParamsMap.put("vpn_gateway_id", addVpnGatewayConnectionsLocalCidrOptions.vpnGatewayId()); + pathParamsMap.put("id", addVpnGatewayConnectionsLocalCidrOptions.id()); + pathParamsMap.put("cidr", addVpnGatewayConnectionsLocalCidrOptions.cidr()); + RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections/{id}/local/cidrs/{cidr}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "addVpnGatewayConnectionsLocalCidr"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Update a load balancer listener policy. + * Set a peer CIDR on a VPN gateway connection. * - * This request updates a load balancer listener policy with the information in a provided policy patch. The policy - * patch object is structured in the same way as a retrieved policy and contains only the information to be updated. + * This request adds the specified CIDR to the specified VPN gateway connection. This request succeeds if the + * specified CIDR already exists. A request body is not required, and if provided, is ignored. * - * @param updateLoadBalancerListenerPolicyOptions the {@link UpdateLoadBalancerListenerPolicyOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerListenerPolicy} + * This request is only supported for policy mode VPN gateways. + * + * @param addVpnGatewayConnectionsPeerCidrOptions the {@link AddVpnGatewayConnectionsPeerCidrOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall updateLoadBalancerListenerPolicy(UpdateLoadBalancerListenerPolicyOptions updateLoadBalancerListenerPolicyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateLoadBalancerListenerPolicyOptions, - "updateLoadBalancerListenerPolicyOptions cannot be null"); + public ServiceCall addVpnGatewayConnectionsPeerCidr(AddVpnGatewayConnectionsPeerCidrOptions addVpnGatewayConnectionsPeerCidrOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(addVpnGatewayConnectionsPeerCidrOptions, + "addVpnGatewayConnectionsPeerCidrOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", updateLoadBalancerListenerPolicyOptions.loadBalancerId()); - pathParamsMap.put("listener_id", updateLoadBalancerListenerPolicyOptions.listenerId()); - pathParamsMap.put("id", updateLoadBalancerListenerPolicyOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateLoadBalancerListenerPolicy"); + pathParamsMap.put("vpn_gateway_id", addVpnGatewayConnectionsPeerCidrOptions.vpnGatewayId()); + pathParamsMap.put("id", addVpnGatewayConnectionsPeerCidrOptions.id()); + pathParamsMap.put("cidr", addVpnGatewayConnectionsPeerCidrOptions.cidr()); + RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer/cidrs/{cidr}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "addVpnGatewayConnectionsPeerCidr"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateLoadBalancerListenerPolicyOptions.loadBalancerListenerPolicyPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * List rules of a load balancer listener policy. + * Check if the specified advertised CIDR exists on a VPN gateway. * - * This request lists rules of a load balancer listener policy. + * This request succeeds if an advertised CIDR exists on the specified VPN gateway, and fails otherwise. * - * @param listLoadBalancerListenerPolicyRulesOptions the {@link ListLoadBalancerListenerPolicyRulesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerListenerPolicyRuleCollection} + * This request is only supported for route mode VPN gateways. + * + * @param checkVpnGatewayAdvertisedCidrOptions the {@link CheckVpnGatewayAdvertisedCidrOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall listLoadBalancerListenerPolicyRules(ListLoadBalancerListenerPolicyRulesOptions listLoadBalancerListenerPolicyRulesOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listLoadBalancerListenerPolicyRulesOptions, - "listLoadBalancerListenerPolicyRulesOptions cannot be null"); + public ServiceCall checkVpnGatewayAdvertisedCidr(CheckVpnGatewayAdvertisedCidrOptions checkVpnGatewayAdvertisedCidrOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(checkVpnGatewayAdvertisedCidrOptions, + "checkVpnGatewayAdvertisedCidrOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", listLoadBalancerListenerPolicyRulesOptions.loadBalancerId()); - pathParamsMap.put("listener_id", listLoadBalancerListenerPolicyRulesOptions.listenerId()); - pathParamsMap.put("policy_id", listLoadBalancerListenerPolicyRulesOptions.policyId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listLoadBalancerListenerPolicyRules"); + pathParamsMap.put("vpn_gateway_id", checkVpnGatewayAdvertisedCidrOptions.vpnGatewayId()); + pathParamsMap.put("cidr", checkVpnGatewayAdvertisedCidrOptions.cidr()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/advertised_cidrs/{cidr}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "checkVpnGatewayAdvertisedCidr"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Create a rule for a load balancer listener policy. + * Check if the specified local CIDR exists on a VPN gateway connection. * - * Creates a new rule for the load balancer listener policy. + * This request succeeds if a CIDR exists on the specified VPN gateway connection, and fails otherwise. * - * @param createLoadBalancerListenerPolicyRuleOptions the {@link CreateLoadBalancerListenerPolicyRuleOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerListenerPolicyRule} + * This request is only supported for policy mode VPN gateways. + * + * @param checkVpnGatewayConnectionsLocalCidrOptions the {@link CheckVpnGatewayConnectionsLocalCidrOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall createLoadBalancerListenerPolicyRule(CreateLoadBalancerListenerPolicyRuleOptions createLoadBalancerListenerPolicyRuleOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createLoadBalancerListenerPolicyRuleOptions, - "createLoadBalancerListenerPolicyRuleOptions cannot be null"); + public ServiceCall checkVpnGatewayConnectionsLocalCidr(CheckVpnGatewayConnectionsLocalCidrOptions checkVpnGatewayConnectionsLocalCidrOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(checkVpnGatewayConnectionsLocalCidrOptions, + "checkVpnGatewayConnectionsLocalCidrOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", createLoadBalancerListenerPolicyRuleOptions.loadBalancerId()); - pathParamsMap.put("listener_id", createLoadBalancerListenerPolicyRuleOptions.listenerId()); - pathParamsMap.put("policy_id", createLoadBalancerListenerPolicyRuleOptions.policyId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createLoadBalancerListenerPolicyRule"); + pathParamsMap.put("vpn_gateway_id", checkVpnGatewayConnectionsLocalCidrOptions.vpnGatewayId()); + pathParamsMap.put("id", checkVpnGatewayConnectionsLocalCidrOptions.id()); + pathParamsMap.put("cidr", checkVpnGatewayConnectionsLocalCidrOptions.cidr()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections/{id}/local/cidrs/{cidr}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "checkVpnGatewayConnectionsLocalCidr"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("condition", createLoadBalancerListenerPolicyRuleOptions.condition()); - contentJson.addProperty("type", createLoadBalancerListenerPolicyRuleOptions.type()); - contentJson.addProperty("value", createLoadBalancerListenerPolicyRuleOptions.value()); - if (createLoadBalancerListenerPolicyRuleOptions.field() != null) { - contentJson.addProperty("field", createLoadBalancerListenerPolicyRuleOptions.field()); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a load balancer listener policy rule. + * Check if the specified peer CIDR exists on a VPN gateway connection. * - * Deletes a rule from the load balancer listener policy. This operation cannot be reversed. + * This request succeeds if a CIDR exists on the specified VPN gateway connection, and fails otherwise. * - * @param deleteLoadBalancerListenerPolicyRuleOptions the {@link DeleteLoadBalancerListenerPolicyRuleOptions} containing the options for the call + * This request is only supported for policy mode VPN gateways. + * + * @param checkVpnGatewayConnectionsPeerCidrOptions the {@link CheckVpnGatewayConnectionsPeerCidrOptions} containing the options for the call * @return a {@link ServiceCall} with a void result */ - public ServiceCall deleteLoadBalancerListenerPolicyRule(DeleteLoadBalancerListenerPolicyRuleOptions deleteLoadBalancerListenerPolicyRuleOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteLoadBalancerListenerPolicyRuleOptions, - "deleteLoadBalancerListenerPolicyRuleOptions cannot be null"); + public ServiceCall checkVpnGatewayConnectionsPeerCidr(CheckVpnGatewayConnectionsPeerCidrOptions checkVpnGatewayConnectionsPeerCidrOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(checkVpnGatewayConnectionsPeerCidrOptions, + "checkVpnGatewayConnectionsPeerCidrOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", deleteLoadBalancerListenerPolicyRuleOptions.loadBalancerId()); - pathParamsMap.put("listener_id", deleteLoadBalancerListenerPolicyRuleOptions.listenerId()); - pathParamsMap.put("policy_id", deleteLoadBalancerListenerPolicyRuleOptions.policyId()); - pathParamsMap.put("id", deleteLoadBalancerListenerPolicyRuleOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteLoadBalancerListenerPolicyRule"); + pathParamsMap.put("vpn_gateway_id", checkVpnGatewayConnectionsPeerCidrOptions.vpnGatewayId()); + pathParamsMap.put("id", checkVpnGatewayConnectionsPeerCidrOptions.id()); + pathParamsMap.put("cidr", checkVpnGatewayConnectionsPeerCidrOptions.cidr()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer/cidrs/{cidr}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "checkVpnGatewayConnectionsPeerCidr"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } @@ -13850,154 +14262,150 @@ public ServiceCall deleteLoadBalancerListenerPolicyRule(DeleteLoadBalancer } /** - * Retrieve a load balancer listener policy rule. + * Create an IKE policy. * - * Retrieves a single rule specified by the identifier in the URL path. + * This request creates a new IKE policy. * - * @param getLoadBalancerListenerPolicyRuleOptions the {@link GetLoadBalancerListenerPolicyRuleOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerListenerPolicyRule} + * @param createIkePolicyOptions the {@link CreateIkePolicyOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link IKEPolicy} */ - public ServiceCall getLoadBalancerListenerPolicyRule(GetLoadBalancerListenerPolicyRuleOptions getLoadBalancerListenerPolicyRuleOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getLoadBalancerListenerPolicyRuleOptions, - "getLoadBalancerListenerPolicyRuleOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", getLoadBalancerListenerPolicyRuleOptions.loadBalancerId()); - pathParamsMap.put("listener_id", getLoadBalancerListenerPolicyRuleOptions.listenerId()); - pathParamsMap.put("policy_id", getLoadBalancerListenerPolicyRuleOptions.policyId()); - pathParamsMap.put("id", getLoadBalancerListenerPolicyRuleOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getLoadBalancerListenerPolicyRule"); + public ServiceCall createIkePolicy(CreateIkePolicyOptions createIkePolicyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createIkePolicyOptions, + "createIkePolicyOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/ike_policies")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createIkePolicy"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + final JsonObject contentJson = new JsonObject(); + contentJson.addProperty("authentication_algorithm", createIkePolicyOptions.authenticationAlgorithm()); + contentJson.addProperty("dh_group", createIkePolicyOptions.dhGroup()); + contentJson.addProperty("encryption_algorithm", createIkePolicyOptions.encryptionAlgorithm()); + contentJson.addProperty("ike_version", createIkePolicyOptions.ikeVersion()); + if (createIkePolicyOptions.keyLifetime() != null) { + contentJson.addProperty("key_lifetime", createIkePolicyOptions.keyLifetime()); + } + if (createIkePolicyOptions.name() != null) { + contentJson.addProperty("name", createIkePolicyOptions.name()); + } + if (createIkePolicyOptions.resourceGroup() != null) { + contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createIkePolicyOptions.resourceGroup())); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a load balancer listener policy rule. + * Create an IPsec policy. * - * Updates a rule of the load balancer listener policy. + * This request creates a new IPsec policy. * - * @param updateLoadBalancerListenerPolicyRuleOptions the {@link UpdateLoadBalancerListenerPolicyRuleOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerListenerPolicyRule} + * @param createIpsecPolicyOptions the {@link CreateIpsecPolicyOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link IPsecPolicy} */ - public ServiceCall updateLoadBalancerListenerPolicyRule(UpdateLoadBalancerListenerPolicyRuleOptions updateLoadBalancerListenerPolicyRuleOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateLoadBalancerListenerPolicyRuleOptions, - "updateLoadBalancerListenerPolicyRuleOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", updateLoadBalancerListenerPolicyRuleOptions.loadBalancerId()); - pathParamsMap.put("listener_id", updateLoadBalancerListenerPolicyRuleOptions.listenerId()); - pathParamsMap.put("policy_id", updateLoadBalancerListenerPolicyRuleOptions.policyId()); - pathParamsMap.put("id", updateLoadBalancerListenerPolicyRuleOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateLoadBalancerListenerPolicyRule"); + public ServiceCall createIpsecPolicy(CreateIpsecPolicyOptions createIpsecPolicyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createIpsecPolicyOptions, + "createIpsecPolicyOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/ipsec_policies")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createIpsecPolicy"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateLoadBalancerListenerPolicyRuleOptions.loadBalancerListenerPolicyRulePatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + final JsonObject contentJson = new JsonObject(); + contentJson.addProperty("authentication_algorithm", createIpsecPolicyOptions.authenticationAlgorithm()); + contentJson.addProperty("encryption_algorithm", createIpsecPolicyOptions.encryptionAlgorithm()); + contentJson.addProperty("pfs", createIpsecPolicyOptions.pfs()); + if (createIpsecPolicyOptions.keyLifetime() != null) { + contentJson.addProperty("key_lifetime", createIpsecPolicyOptions.keyLifetime()); + } + if (createIpsecPolicyOptions.name() != null) { + contentJson.addProperty("name", createIpsecPolicyOptions.name()); + } + if (createIpsecPolicyOptions.resourceGroup() != null) { + contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createIpsecPolicyOptions.resourceGroup())); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List pools of a load balancer. + * Create a VPN gateway. * - * This request lists pools of a load balancer. + * This request creates a new VPN gateway. * - * @param listLoadBalancerPoolsOptions the {@link ListLoadBalancerPoolsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerPoolCollection} + * @param createVpnGatewayOptions the {@link CreateVpnGatewayOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPNGateway} */ - public ServiceCall listLoadBalancerPools(ListLoadBalancerPoolsOptions listLoadBalancerPoolsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listLoadBalancerPoolsOptions, - "listLoadBalancerPoolsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", listLoadBalancerPoolsOptions.loadBalancerId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/pools", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listLoadBalancerPools"); + public ServiceCall createVpnGateway(CreateVpnGatewayOptions createVpnGatewayOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createVpnGatewayOptions, + "createVpnGatewayOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createVpnGateway"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createVpnGatewayOptions.vpnGatewayPrototype()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Create a load balancer pool. + * Create a connection for a VPN gateway. * - * This request creates a new pool from a pool prototype object. + * This request creates a new VPN gateway connection. * - * @param createLoadBalancerPoolOptions the {@link CreateLoadBalancerPoolOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerPool} + * @param createVpnGatewayConnectionOptions the {@link CreateVpnGatewayConnectionOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPNGatewayConnection} */ - public ServiceCall createLoadBalancerPool(CreateLoadBalancerPoolOptions createLoadBalancerPoolOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createLoadBalancerPoolOptions, - "createLoadBalancerPoolOptions cannot be null"); + public ServiceCall createVpnGatewayConnection(CreateVpnGatewayConnectionOptions createVpnGatewayConnectionOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createVpnGatewayConnectionOptions, + "createVpnGatewayConnectionOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", createLoadBalancerPoolOptions.loadBalancerId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/pools", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createLoadBalancerPool"); + pathParamsMap.put("vpn_gateway_id", createVpnGatewayConnectionOptions.vpnGatewayId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createVpnGatewayConnection"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("algorithm", createLoadBalancerPoolOptions.algorithm()); - contentJson.add("health_monitor", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerPoolOptions.healthMonitor())); - contentJson.addProperty("protocol", createLoadBalancerPoolOptions.protocol()); - if (createLoadBalancerPoolOptions.failsafePolicy() != null) { - contentJson.add("failsafe_policy", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerPoolOptions.failsafePolicy())); - } - if (createLoadBalancerPoolOptions.members() != null) { - contentJson.add("members", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerPoolOptions.members())); - } - if (createLoadBalancerPoolOptions.name() != null) { - contentJson.addProperty("name", createLoadBalancerPoolOptions.name()); - } - if (createLoadBalancerPoolOptions.proxyProtocol() != null) { - contentJson.addProperty("proxy_protocol", createLoadBalancerPoolOptions.proxyProtocol()); - } - if (createLoadBalancerPoolOptions.sessionPersistence() != null) { - contentJson.add("session_persistence", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerPoolOptions.sessionPersistence())); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(createVpnGatewayConnectionOptions.vpnGatewayConnectionPrototype()), "application/json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a load balancer pool. + * Delete an IKE policy. * - * This request deletes a load balancer pool. This operation cannot be reversed. The pool must not currently be the - * default pool for any listener in the load balancer, nor be the target pool in the failsafe policy for any other - * pool. + * This request deletes an IKE policy. This operation cannot be reversed. For this request to succeed, there must not + * be any VPN gateway connections using this policy. * - * @param deleteLoadBalancerPoolOptions the {@link DeleteLoadBalancerPoolOptions} containing the options for the call + * @param deleteIkePolicyOptions the {@link DeleteIkePolicyOptions} containing the options for the call * @return a {@link ServiceCall} with a void result */ - public ServiceCall deleteLoadBalancerPool(DeleteLoadBalancerPoolOptions deleteLoadBalancerPoolOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteLoadBalancerPoolOptions, - "deleteLoadBalancerPoolOptions cannot be null"); + public ServiceCall deleteIkePolicy(DeleteIkePolicyOptions deleteIkePolicyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteIkePolicyOptions, + "deleteIkePolicyOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", deleteLoadBalancerPoolOptions.loadBalancerId()); - pathParamsMap.put("id", deleteLoadBalancerPoolOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/pools/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteLoadBalancerPool"); + pathParamsMap.put("id", deleteIkePolicyOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/ike_policies/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteIkePolicy"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } @@ -14008,672 +14416,646 @@ public ServiceCall deleteLoadBalancerPool(DeleteLoadBalancerPoolOptions de } /** - * Retrieve a load balancer pool. + * Delete an IPsec policy. * - * This request retrieves a single pool specified by the identifier in the URL path. + * This request deletes an IPsec policy. This operation cannot be reversed. For this request to succeed, there must + * not be any VPN gateway connections using this policy. * - * @param getLoadBalancerPoolOptions the {@link GetLoadBalancerPoolOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerPool} + * @param deleteIpsecPolicyOptions the {@link DeleteIpsecPolicyOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall getLoadBalancerPool(GetLoadBalancerPoolOptions getLoadBalancerPoolOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getLoadBalancerPoolOptions, - "getLoadBalancerPoolOptions cannot be null"); + public ServiceCall deleteIpsecPolicy(DeleteIpsecPolicyOptions deleteIpsecPolicyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteIpsecPolicyOptions, + "deleteIpsecPolicyOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", getLoadBalancerPoolOptions.loadBalancerId()); - pathParamsMap.put("id", getLoadBalancerPoolOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/pools/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getLoadBalancerPool"); + pathParamsMap.put("id", deleteIpsecPolicyOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/ipsec_policies/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteIpsecPolicy"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Update a load balancer pool. + * Delete a VPN gateway. * - * This request updates a load balancer pool from a pool patch. + * This request deletes a VPN gateway. This operation cannot be reversed. For this request to succeed, the VPN gateway + * must not have a `status` of `pending`, and there must not be any VPC routes using the VPN gateway's connections as + * a next hop. * - * @param updateLoadBalancerPoolOptions the {@link UpdateLoadBalancerPoolOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerPool} + * @param deleteVpnGatewayOptions the {@link DeleteVpnGatewayOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall updateLoadBalancerPool(UpdateLoadBalancerPoolOptions updateLoadBalancerPoolOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateLoadBalancerPoolOptions, - "updateLoadBalancerPoolOptions cannot be null"); + public ServiceCall deleteVpnGateway(DeleteVpnGatewayOptions deleteVpnGatewayOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVpnGatewayOptions, + "deleteVpnGatewayOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", updateLoadBalancerPoolOptions.loadBalancerId()); - pathParamsMap.put("id", updateLoadBalancerPoolOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/pools/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateLoadBalancerPool"); + pathParamsMap.put("id", deleteVpnGatewayOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVpnGateway"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateLoadBalancerPoolOptions.loadBalancerPoolPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * List members of a load balancer pool. + * Delete a VPN gateway connection. * - * This request lists members of a load balancer pool. + * This request deletes a VPN gateway connection. This operation cannot be reversed. For this request to succeed, + * there must not be VPC routes using this VPN connection as a next hop. * - * @param listLoadBalancerPoolMembersOptions the {@link ListLoadBalancerPoolMembersOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerPoolMemberCollection} + * @param deleteVpnGatewayConnectionOptions the {@link DeleteVpnGatewayConnectionOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall listLoadBalancerPoolMembers(ListLoadBalancerPoolMembersOptions listLoadBalancerPoolMembersOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listLoadBalancerPoolMembersOptions, - "listLoadBalancerPoolMembersOptions cannot be null"); + public ServiceCall deleteVpnGatewayConnection(DeleteVpnGatewayConnectionOptions deleteVpnGatewayConnectionOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVpnGatewayConnectionOptions, + "deleteVpnGatewayConnectionOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", listLoadBalancerPoolMembersOptions.loadBalancerId()); - pathParamsMap.put("pool_id", listLoadBalancerPoolMembersOptions.poolId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/pools/{pool_id}/members", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listLoadBalancerPoolMembers"); + pathParamsMap.put("vpn_gateway_id", deleteVpnGatewayConnectionOptions.vpnGatewayId()); + pathParamsMap.put("id", deleteVpnGatewayConnectionOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVpnGatewayConnection"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); + if (deleteVpnGatewayConnectionOptions.ifMatch() != null) { + builder.header("If-Match", deleteVpnGatewayConnectionOptions.ifMatch()); + } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Create a member in a load balancer pool. - * - * This request creates a new member and adds the member to the pool. + * Retrieve an IKE policy. * - * The pool must not already have a member targeting a load balancer. + * This request retrieves a single IKE policy specified by the identifier in the URL. * - * @param createLoadBalancerPoolMemberOptions the {@link CreateLoadBalancerPoolMemberOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerPoolMember} + * @param getIkePolicyOptions the {@link GetIkePolicyOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link IKEPolicy} */ - public ServiceCall createLoadBalancerPoolMember(CreateLoadBalancerPoolMemberOptions createLoadBalancerPoolMemberOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createLoadBalancerPoolMemberOptions, - "createLoadBalancerPoolMemberOptions cannot be null"); + public ServiceCall getIkePolicy(GetIkePolicyOptions getIkePolicyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getIkePolicyOptions, + "getIkePolicyOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", createLoadBalancerPoolMemberOptions.loadBalancerId()); - pathParamsMap.put("pool_id", createLoadBalancerPoolMemberOptions.poolId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/pools/{pool_id}/members", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createLoadBalancerPoolMember"); + pathParamsMap.put("id", getIkePolicyOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/ike_policies/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getIkePolicy"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("port", createLoadBalancerPoolMemberOptions.port()); - contentJson.add("target", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createLoadBalancerPoolMemberOptions.target())); - if (createLoadBalancerPoolMemberOptions.weight() != null) { - contentJson.addProperty("weight", createLoadBalancerPoolMemberOptions.weight()); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Replace load balancer pool members. + * Retrieve an IPsec policy. * - * This request replaces the existing members of the load balancer pool with new members created from the collection - * of member prototype objects. + * This request retrieves a single IPsec policy specified by the identifier in the URL. * - * @param replaceLoadBalancerPoolMembersOptions the {@link ReplaceLoadBalancerPoolMembersOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerPoolMemberCollection} + * @param getIpsecPolicyOptions the {@link GetIpsecPolicyOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link IPsecPolicy} */ - public ServiceCall replaceLoadBalancerPoolMembers(ReplaceLoadBalancerPoolMembersOptions replaceLoadBalancerPoolMembersOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(replaceLoadBalancerPoolMembersOptions, - "replaceLoadBalancerPoolMembersOptions cannot be null"); + public ServiceCall getIpsecPolicy(GetIpsecPolicyOptions getIpsecPolicyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getIpsecPolicyOptions, + "getIpsecPolicyOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", replaceLoadBalancerPoolMembersOptions.loadBalancerId()); - pathParamsMap.put("pool_id", replaceLoadBalancerPoolMembersOptions.poolId()); - RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/pools/{pool_id}/members", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "replaceLoadBalancerPoolMembers"); + pathParamsMap.put("id", getIpsecPolicyOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/ipsec_policies/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getIpsecPolicy"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.add("members", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(replaceLoadBalancerPoolMembersOptions.members())); - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a load balancer pool member. + * Retrieve a VPN gateway. * - * This request deletes a member from the pool. This operation cannot be reversed. + * This request retrieves a single VPN gateway specified by the identifier in the URL. * - * @param deleteLoadBalancerPoolMemberOptions the {@link DeleteLoadBalancerPoolMemberOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param getVpnGatewayOptions the {@link GetVpnGatewayOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPNGateway} */ - public ServiceCall deleteLoadBalancerPoolMember(DeleteLoadBalancerPoolMemberOptions deleteLoadBalancerPoolMemberOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteLoadBalancerPoolMemberOptions, - "deleteLoadBalancerPoolMemberOptions cannot be null"); + public ServiceCall getVpnGateway(GetVpnGatewayOptions getVpnGatewayOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getVpnGatewayOptions, + "getVpnGatewayOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", deleteLoadBalancerPoolMemberOptions.loadBalancerId()); - pathParamsMap.put("pool_id", deleteLoadBalancerPoolMemberOptions.poolId()); - pathParamsMap.put("id", deleteLoadBalancerPoolMemberOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteLoadBalancerPoolMember"); + pathParamsMap.put("id", getVpnGatewayOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpnGateway"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a load balancer pool member. + * Retrieve a VPN gateway connection. * - * This request retrieves a single member specified by the identifier in the URL path. + * This request retrieves a single VPN gateway connection specified by the identifier in the URL. * - * @param getLoadBalancerPoolMemberOptions the {@link GetLoadBalancerPoolMemberOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerPoolMember} + * @param getVpnGatewayConnectionOptions the {@link GetVpnGatewayConnectionOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPNGatewayConnection} */ - public ServiceCall getLoadBalancerPoolMember(GetLoadBalancerPoolMemberOptions getLoadBalancerPoolMemberOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getLoadBalancerPoolMemberOptions, - "getLoadBalancerPoolMemberOptions cannot be null"); + public ServiceCall getVpnGatewayConnection(GetVpnGatewayConnectionOptions getVpnGatewayConnectionOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getVpnGatewayConnectionOptions, + "getVpnGatewayConnectionOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", getLoadBalancerPoolMemberOptions.loadBalancerId()); - pathParamsMap.put("pool_id", getLoadBalancerPoolMemberOptions.poolId()); - pathParamsMap.put("id", getLoadBalancerPoolMemberOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getLoadBalancerPoolMember"); + pathParamsMap.put("vpn_gateway_id", getVpnGatewayConnectionOptions.vpnGatewayId()); + pathParamsMap.put("id", getVpnGatewayConnectionOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpnGatewayConnection"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a load balancer pool member. + * Retrieve a VPN gateway service connection. * - * This request updates an existing member from a member patch. + * This request retrieves VPN gateway service connection specified by the identifier in the URL. * - * @param updateLoadBalancerPoolMemberOptions the {@link UpdateLoadBalancerPoolMemberOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link LoadBalancerPoolMember} + * @param getVpnGatewayServiceConnectionOptions the {@link GetVpnGatewayServiceConnectionOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPNGatewayServiceConnection} */ - public ServiceCall updateLoadBalancerPoolMember(UpdateLoadBalancerPoolMemberOptions updateLoadBalancerPoolMemberOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateLoadBalancerPoolMemberOptions, - "updateLoadBalancerPoolMemberOptions cannot be null"); + public ServiceCall getVpnGatewayServiceConnection(GetVpnGatewayServiceConnectionOptions getVpnGatewayServiceConnectionOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getVpnGatewayServiceConnectionOptions, + "getVpnGatewayServiceConnectionOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("load_balancer_id", updateLoadBalancerPoolMemberOptions.loadBalancerId()); - pathParamsMap.put("pool_id", updateLoadBalancerPoolMemberOptions.poolId()); - pathParamsMap.put("id", updateLoadBalancerPoolMemberOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateLoadBalancerPoolMember"); + pathParamsMap.put("vpn_gateway_id", getVpnGatewayServiceConnectionOptions.vpnGatewayId()); + pathParamsMap.put("id", getVpnGatewayServiceConnectionOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/service_connections/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpnGatewayServiceConnection"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateLoadBalancerPoolMemberOptions.loadBalancerPoolMemberPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List endpoint gateways. + * List IKE policies. * - * This request lists endpoint gateways in the region. An endpoint gateway maps one or more reserved IPs in a VPC to a - * target outside the VPC. + * This request lists IKE policies in the region. * - * @param listEndpointGatewaysOptions the {@link ListEndpointGatewaysOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link EndpointGatewayCollection} + * @param listIkePoliciesOptions the {@link ListIkePoliciesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link IKEPolicyCollection} */ - public ServiceCall listEndpointGateways(ListEndpointGatewaysOptions listEndpointGatewaysOptions) { - if (listEndpointGatewaysOptions == null) { - listEndpointGatewaysOptions = new ListEndpointGatewaysOptions.Builder().build(); + public ServiceCall listIkePolicies(ListIkePoliciesOptions listIkePoliciesOptions) { + if (listIkePoliciesOptions == null) { + listIkePoliciesOptions = new ListIkePoliciesOptions.Builder().build(); } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/endpoint_gateways")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listEndpointGateways"); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/ike_policies")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listIkePolicies"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listEndpointGatewaysOptions.name() != null) { - builder.query("name", String.valueOf(listEndpointGatewaysOptions.name())); - } - if (listEndpointGatewaysOptions.start() != null) { - builder.query("start", String.valueOf(listEndpointGatewaysOptions.start())); - } - if (listEndpointGatewaysOptions.limit() != null) { - builder.query("limit", String.valueOf(listEndpointGatewaysOptions.limit())); - } - if (listEndpointGatewaysOptions.resourceGroupId() != null) { - builder.query("resource_group.id", String.valueOf(listEndpointGatewaysOptions.resourceGroupId())); - } - if (listEndpointGatewaysOptions.lifecycleState() != null) { - builder.query("lifecycle_state", RequestUtils.join(listEndpointGatewaysOptions.lifecycleState(), ",")); - } - if (listEndpointGatewaysOptions.vpcId() != null) { - builder.query("vpc.id", String.valueOf(listEndpointGatewaysOptions.vpcId())); - } - if (listEndpointGatewaysOptions.vpcCrn() != null) { - builder.query("vpc.crn", String.valueOf(listEndpointGatewaysOptions.vpcCrn())); - } - if (listEndpointGatewaysOptions.vpcName() != null) { - builder.query("vpc.name", String.valueOf(listEndpointGatewaysOptions.vpcName())); + if (listIkePoliciesOptions.start() != null) { + builder.query("start", String.valueOf(listIkePoliciesOptions.start())); } - if (listEndpointGatewaysOptions.allowDnsResolutionBinding() != null) { - builder.query("allow_dns_resolution_binding", String.valueOf(listEndpointGatewaysOptions.allowDnsResolutionBinding())); + if (listIkePoliciesOptions.limit() != null) { + builder.query("limit", String.valueOf(listIkePoliciesOptions.limit())); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List endpoint gateways. + * List IKE policies. * - * This request lists endpoint gateways in the region. An endpoint gateway maps one or more reserved IPs in a VPC to a - * target outside the VPC. + * This request lists IKE policies in the region. * - * @return a {@link ServiceCall} with a result of type {@link EndpointGatewayCollection} + * @return a {@link ServiceCall} with a result of type {@link IKEPolicyCollection} */ - public ServiceCall listEndpointGateways() { - return listEndpointGateways(null); + public ServiceCall listIkePolicies() { + return listIkePolicies(null); } /** - * Create an endpoint gateway. + * List VPN gateway connections that use a specified IKE policy. * - * This request creates a new endpoint gateway. An endpoint gateway maps one or more reserved IPs in a VPC to a target - * outside the VPC. + * This request lists VPN gateway connections that use an IKE policy. * - * @param createEndpointGatewayOptions the {@link CreateEndpointGatewayOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link EndpointGateway} + * @param listIkePolicyConnectionsOptions the {@link ListIkePolicyConnectionsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link IKEPolicyConnectionCollection} */ - public ServiceCall createEndpointGateway(CreateEndpointGatewayOptions createEndpointGatewayOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createEndpointGatewayOptions, - "createEndpointGatewayOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/endpoint_gateways")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createEndpointGateway"); + public ServiceCall listIkePolicyConnections(ListIkePolicyConnectionsOptions listIkePolicyConnectionsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listIkePolicyConnectionsOptions, + "listIkePolicyConnectionsOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", listIkePolicyConnectionsOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/ike_policies/{id}/connections", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listIkePolicyConnections"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.add("target", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createEndpointGatewayOptions.target())); - contentJson.add("vpc", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createEndpointGatewayOptions.vpc())); - if (createEndpointGatewayOptions.allowDnsResolutionBinding() != null) { - contentJson.addProperty("allow_dns_resolution_binding", createEndpointGatewayOptions.allowDnsResolutionBinding()); - } - if (createEndpointGatewayOptions.ips() != null) { - contentJson.add("ips", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createEndpointGatewayOptions.ips())); - } - if (createEndpointGatewayOptions.name() != null) { - contentJson.addProperty("name", createEndpointGatewayOptions.name()); - } - if (createEndpointGatewayOptions.resourceGroup() != null) { - contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createEndpointGatewayOptions.resourceGroup())); + if (listIkePolicyConnectionsOptions.start() != null) { + builder.query("start", String.valueOf(listIkePolicyConnectionsOptions.start())); } - if (createEndpointGatewayOptions.securityGroups() != null) { - contentJson.add("security_groups", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createEndpointGatewayOptions.securityGroups())); + if (listIkePolicyConnectionsOptions.limit() != null) { + builder.query("limit", String.valueOf(listIkePolicyConnectionsOptions.limit())); } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List reserved IPs bound to an endpoint gateway. + * List IPsec policies. * - * This request lists reserved IPs bound to an endpoint gateway. + * This request lists IPsec policies in the region. * - * @param listEndpointGatewayIpsOptions the {@link ListEndpointGatewayIpsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ReservedIPCollectionEndpointGatewayContext} + * @param listIpsecPoliciesOptions the {@link ListIpsecPoliciesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link IPsecPolicyCollection} */ - public ServiceCall listEndpointGatewayIps(ListEndpointGatewayIpsOptions listEndpointGatewayIpsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listEndpointGatewayIpsOptions, - "listEndpointGatewayIpsOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("endpoint_gateway_id", listEndpointGatewayIpsOptions.endpointGatewayId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/endpoint_gateways/{endpoint_gateway_id}/ips", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listEndpointGatewayIps"); + public ServiceCall listIpsecPolicies(ListIpsecPoliciesOptions listIpsecPoliciesOptions) { + if (listIpsecPoliciesOptions == null) { + listIpsecPoliciesOptions = new ListIpsecPoliciesOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/ipsec_policies")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listIpsecPolicies"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listEndpointGatewayIpsOptions.start() != null) { - builder.query("start", String.valueOf(listEndpointGatewayIpsOptions.start())); - } - if (listEndpointGatewayIpsOptions.limit() != null) { - builder.query("limit", String.valueOf(listEndpointGatewayIpsOptions.limit())); + if (listIpsecPoliciesOptions.start() != null) { + builder.query("start", String.valueOf(listIpsecPoliciesOptions.start())); } - if (listEndpointGatewayIpsOptions.sort() != null) { - builder.query("sort", String.valueOf(listEndpointGatewayIpsOptions.sort())); + if (listIpsecPoliciesOptions.limit() != null) { + builder.query("limit", String.valueOf(listIpsecPoliciesOptions.limit())); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Unbind a reserved IP from an endpoint gateway. + * List IPsec policies. * - * This request unbinds the specified reserved IP from the specified endpoint gateway. If the reserved IP has - * `auto_delete` set to `true`, the reserved IP will be deleted. + * This request lists IPsec policies in the region. * - * @param removeEndpointGatewayIpOptions the {@link RemoveEndpointGatewayIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @return a {@link ServiceCall} with a result of type {@link IPsecPolicyCollection} */ - public ServiceCall removeEndpointGatewayIp(RemoveEndpointGatewayIpOptions removeEndpointGatewayIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(removeEndpointGatewayIpOptions, - "removeEndpointGatewayIpOptions cannot be null"); + public ServiceCall listIpsecPolicies() { + return listIpsecPolicies(null); + } + + /** + * List VPN gateway connections that use a specified IPsec policy. + * + * This request lists VPN gateway connections that use an IPsec policy. + * + * @param listIpsecPolicyConnectionsOptions the {@link ListIpsecPolicyConnectionsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link IPsecPolicyConnectionCollection} + */ + public ServiceCall listIpsecPolicyConnections(ListIpsecPolicyConnectionsOptions listIpsecPolicyConnectionsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listIpsecPolicyConnectionsOptions, + "listIpsecPolicyConnectionsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("endpoint_gateway_id", removeEndpointGatewayIpOptions.endpointGatewayId()); - pathParamsMap.put("id", removeEndpointGatewayIpOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/endpoint_gateways/{endpoint_gateway_id}/ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "removeEndpointGatewayIp"); + pathParamsMap.put("id", listIpsecPolicyConnectionsOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/ipsec_policies/{id}/connections", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listIpsecPolicyConnections"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + if (listIpsecPolicyConnectionsOptions.start() != null) { + builder.query("start", String.valueOf(listIpsecPolicyConnectionsOptions.start())); + } + if (listIpsecPolicyConnectionsOptions.limit() != null) { + builder.query("limit", String.valueOf(listIpsecPolicyConnectionsOptions.limit())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a reserved IP bound to an endpoint gateway. + * List advertised CIDRs for a VPN gateway. * - * This request retrieves the specified reserved IP address if it is bound to the endpoint gateway specified in the - * URL. + * This request lists advertised CIDRs for a VPN gateway. * - * @param getEndpointGatewayIpOptions the {@link GetEndpointGatewayIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ReservedIP} + * This request is only supported for route mode VPN gateways. + * + * @param listVpnGatewayAdvertisedCidrsOptions the {@link ListVpnGatewayAdvertisedCidrsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPNGatewayAdvertisedCIDRCollection} */ - public ServiceCall getEndpointGatewayIp(GetEndpointGatewayIpOptions getEndpointGatewayIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getEndpointGatewayIpOptions, - "getEndpointGatewayIpOptions cannot be null"); + public ServiceCall listVpnGatewayAdvertisedCidrs(ListVpnGatewayAdvertisedCidrsOptions listVpnGatewayAdvertisedCidrsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listVpnGatewayAdvertisedCidrsOptions, + "listVpnGatewayAdvertisedCidrsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("endpoint_gateway_id", getEndpointGatewayIpOptions.endpointGatewayId()); - pathParamsMap.put("id", getEndpointGatewayIpOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/endpoint_gateways/{endpoint_gateway_id}/ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getEndpointGatewayIp"); + pathParamsMap.put("vpn_gateway_id", listVpnGatewayAdvertisedCidrsOptions.vpnGatewayId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/advertised_cidrs", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpnGatewayAdvertisedCidrs"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Bind a reserved IP to an endpoint gateway. - * - * This request binds the specified reserved IP to the specified endpoint gateway. The reserved IP: + * List connections of a VPN gateway. * - * - must currently be unbound, or not required by its target - * - must not be in the same zone as any other reserved IP bound to the endpoint gateway. + * This request lists connections of a VPN gateway. * - * @param addEndpointGatewayIpOptions the {@link AddEndpointGatewayIpOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link ReservedIP} + * @param listVpnGatewayConnectionsOptions the {@link ListVpnGatewayConnectionsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPNGatewayConnectionCollection} */ - public ServiceCall addEndpointGatewayIp(AddEndpointGatewayIpOptions addEndpointGatewayIpOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(addEndpointGatewayIpOptions, - "addEndpointGatewayIpOptions cannot be null"); + public ServiceCall listVpnGatewayConnections(ListVpnGatewayConnectionsOptions listVpnGatewayConnectionsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listVpnGatewayConnectionsOptions, + "listVpnGatewayConnectionsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("endpoint_gateway_id", addEndpointGatewayIpOptions.endpointGatewayId()); - pathParamsMap.put("id", addEndpointGatewayIpOptions.id()); - RequestBuilder builder = RequestBuilder.put(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/endpoint_gateways/{endpoint_gateway_id}/ips/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "addEndpointGatewayIp"); + pathParamsMap.put("vpn_gateway_id", listVpnGatewayConnectionsOptions.vpnGatewayId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpnGatewayConnections"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listVpnGatewayConnectionsOptions.start() != null) { + builder.query("start", String.valueOf(listVpnGatewayConnectionsOptions.start())); + } + if (listVpnGatewayConnectionsOptions.limit() != null) { + builder.query("limit", String.valueOf(listVpnGatewayConnectionsOptions.limit())); + } + if (listVpnGatewayConnectionsOptions.status() != null) { + builder.query("status", String.valueOf(listVpnGatewayConnectionsOptions.status())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete an endpoint gateway. + * List local CIDRs for a VPN gateway connection. * - * This request deletes an endpoint gateway. This operation cannot be reversed. + * This request lists local CIDRs for a VPN gateway connection. * - * Reserved IPs that were bound to the endpoint gateway will be released if their - * `auto_delete` property is set to true. + * This request is only supported for policy mode VPN gateways. * - * @param deleteEndpointGatewayOptions the {@link DeleteEndpointGatewayOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param listVpnGatewayConnectionsLocalCidrsOptions the {@link ListVpnGatewayConnectionsLocalCidrsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPNGatewayConnectionCIDRs} */ - public ServiceCall deleteEndpointGateway(DeleteEndpointGatewayOptions deleteEndpointGatewayOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteEndpointGatewayOptions, - "deleteEndpointGatewayOptions cannot be null"); + public ServiceCall listVpnGatewayConnectionsLocalCidrs(ListVpnGatewayConnectionsLocalCidrsOptions listVpnGatewayConnectionsLocalCidrsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listVpnGatewayConnectionsLocalCidrsOptions, + "listVpnGatewayConnectionsLocalCidrsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteEndpointGatewayOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/endpoint_gateways/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteEndpointGateway"); + pathParamsMap.put("vpn_gateway_id", listVpnGatewayConnectionsLocalCidrsOptions.vpnGatewayId()); + pathParamsMap.put("id", listVpnGatewayConnectionsLocalCidrsOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections/{id}/local/cidrs", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpnGatewayConnectionsLocalCidrs"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve an endpoint gateway. + * List peer CIDRs for a VPN gateway connection. * - * This request retrieves a single endpoint gateway specified by the identifier in the URL. + * This request lists peer CIDRs for a VPN gateway connection. * - * @param getEndpointGatewayOptions the {@link GetEndpointGatewayOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link EndpointGateway} + * This request is only supported for policy mode VPN gateways. + * + * @param listVpnGatewayConnectionsPeerCidrsOptions the {@link ListVpnGatewayConnectionsPeerCidrsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPNGatewayConnectionCIDRs} */ - public ServiceCall getEndpointGateway(GetEndpointGatewayOptions getEndpointGatewayOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getEndpointGatewayOptions, - "getEndpointGatewayOptions cannot be null"); + public ServiceCall listVpnGatewayConnectionsPeerCidrs(ListVpnGatewayConnectionsPeerCidrsOptions listVpnGatewayConnectionsPeerCidrsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listVpnGatewayConnectionsPeerCidrsOptions, + "listVpnGatewayConnectionsPeerCidrsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getEndpointGatewayOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/endpoint_gateways/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getEndpointGateway"); + pathParamsMap.put("vpn_gateway_id", listVpnGatewayConnectionsPeerCidrsOptions.vpnGatewayId()); + pathParamsMap.put("id", listVpnGatewayConnectionsPeerCidrsOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer/cidrs", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpnGatewayConnectionsPeerCidrs"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update an endpoint gateway. + * List VPN gateway service connections. * - * This request updates an endpoint gateway's name. + * This request lists service connections on a VPN gateway. The VPN gateway service connections will be sorted by + * ascending `created_at` property values. A VPN gateway service connection connects services such as transit gateway + * to a VPN gateway. This facilitates the propagation of routes learned from VPN gateway peer connections to the + * connected service (for example, a transit gateway). * - * @param updateEndpointGatewayOptions the {@link UpdateEndpointGatewayOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link EndpointGateway} + * @param listVpnGatewayServiceConnectionsOptions the {@link ListVpnGatewayServiceConnectionsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPNGatewayServiceConnectionCollection} */ - public ServiceCall updateEndpointGateway(UpdateEndpointGatewayOptions updateEndpointGatewayOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateEndpointGatewayOptions, - "updateEndpointGatewayOptions cannot be null"); + public ServiceCall listVpnGatewayServiceConnections(ListVpnGatewayServiceConnectionsOptions listVpnGatewayServiceConnectionsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listVpnGatewayServiceConnectionsOptions, + "listVpnGatewayServiceConnectionsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateEndpointGatewayOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/endpoint_gateways/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateEndpointGateway"); + pathParamsMap.put("vpn_gateway_id", listVpnGatewayServiceConnectionsOptions.vpnGatewayId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/service_connections", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpnGatewayServiceConnections"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateEndpointGatewayOptions.endpointGatewayPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listVpnGatewayServiceConnectionsOptions.start() != null) { + builder.query("start", String.valueOf(listVpnGatewayServiceConnectionsOptions.start())); + } + if (listVpnGatewayServiceConnectionsOptions.limit() != null) { + builder.query("limit", String.valueOf(listVpnGatewayServiceConnectionsOptions.limit())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List flow log collectors. + * List VPN gateways. * - * This request lists flow log collectors in the region. A [flow log - * collector](https://cloud.ibm.com/docs/vpc?topic=vpc-flow-logs) summarizes TCP and UDP data sent over the instance - * network interfaces and instance network attachments contained within its target. The collected flow logs are - * written to a cloud object storage bucket, where they can be - * [viewed](https://cloud.ibm.com/docs/vpc?topic=vpc-fl-analyze). + * This request lists VPN gateways in the region. * - * @param listFlowLogCollectorsOptions the {@link ListFlowLogCollectorsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link FlowLogCollectorCollection} + * @param listVpnGatewaysOptions the {@link ListVpnGatewaysOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPNGatewayCollection} */ - public ServiceCall listFlowLogCollectors(ListFlowLogCollectorsOptions listFlowLogCollectorsOptions) { - if (listFlowLogCollectorsOptions == null) { - listFlowLogCollectorsOptions = new ListFlowLogCollectorsOptions.Builder().build(); + public ServiceCall listVpnGateways(ListVpnGatewaysOptions listVpnGatewaysOptions) { + if (listVpnGatewaysOptions == null) { + listVpnGatewaysOptions = new ListVpnGatewaysOptions.Builder().build(); } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/flow_log_collectors")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listFlowLogCollectors"); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpnGateways"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listFlowLogCollectorsOptions.start() != null) { - builder.query("start", String.valueOf(listFlowLogCollectorsOptions.start())); - } - if (listFlowLogCollectorsOptions.limit() != null) { - builder.query("limit", String.valueOf(listFlowLogCollectorsOptions.limit())); - } - if (listFlowLogCollectorsOptions.resourceGroupId() != null) { - builder.query("resource_group.id", String.valueOf(listFlowLogCollectorsOptions.resourceGroupId())); - } - if (listFlowLogCollectorsOptions.name() != null) { - builder.query("name", String.valueOf(listFlowLogCollectorsOptions.name())); - } - if (listFlowLogCollectorsOptions.vpcId() != null) { - builder.query("vpc.id", String.valueOf(listFlowLogCollectorsOptions.vpcId())); + if (listVpnGatewaysOptions.start() != null) { + builder.query("start", String.valueOf(listVpnGatewaysOptions.start())); } - if (listFlowLogCollectorsOptions.vpcCrn() != null) { - builder.query("vpc.crn", String.valueOf(listFlowLogCollectorsOptions.vpcCrn())); + if (listVpnGatewaysOptions.limit() != null) { + builder.query("limit", String.valueOf(listVpnGatewaysOptions.limit())); } - if (listFlowLogCollectorsOptions.vpcName() != null) { - builder.query("vpc.name", String.valueOf(listFlowLogCollectorsOptions.vpcName())); + if (listVpnGatewaysOptions.resourceGroupId() != null) { + builder.query("resource_group.id", String.valueOf(listVpnGatewaysOptions.resourceGroupId())); } - if (listFlowLogCollectorsOptions.targetId() != null) { - builder.query("target.id", String.valueOf(listFlowLogCollectorsOptions.targetId())); + if (listVpnGatewaysOptions.sort() != null) { + builder.query("sort", String.valueOf(listVpnGatewaysOptions.sort())); } - if (listFlowLogCollectorsOptions.targetResourceType() != null) { - builder.query("target.resource_type", String.valueOf(listFlowLogCollectorsOptions.targetResourceType())); + if (listVpnGatewaysOptions.mode() != null) { + builder.query("mode", String.valueOf(listVpnGatewaysOptions.mode())); } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List flow log collectors. + * List VPN gateways. + * + * This request lists VPN gateways in the region. + * + * @return a {@link ServiceCall} with a result of type {@link VPNGatewayCollection} + */ + public ServiceCall listVpnGateways() { + return listVpnGateways(null); + } + + /** + * Remove an advertised CIDR from a VPN gateway. + * + * This request removes a CIDR from a VPN gateway advertised CIDRs. * - * This request lists flow log collectors in the region. A [flow log - * collector](https://cloud.ibm.com/docs/vpc?topic=vpc-flow-logs) summarizes TCP and UDP data sent over the instance - * network interfaces and instance network attachments contained within its target. The collected flow logs are - * written to a cloud object storage bucket, where they can be - * [viewed](https://cloud.ibm.com/docs/vpc?topic=vpc-fl-analyze). + * This request is only supported for route mode VPN gateways. * - * @return a {@link ServiceCall} with a result of type {@link FlowLogCollectorCollection} + * @param removeVpnGatewayAdvertisedCidrOptions the {@link RemoveVpnGatewayAdvertisedCidrOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall listFlowLogCollectors() { - return listFlowLogCollectors(null); + public ServiceCall removeVpnGatewayAdvertisedCidr(RemoveVpnGatewayAdvertisedCidrOptions removeVpnGatewayAdvertisedCidrOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(removeVpnGatewayAdvertisedCidrOptions, + "removeVpnGatewayAdvertisedCidrOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("vpn_gateway_id", removeVpnGatewayAdvertisedCidrOptions.vpnGatewayId()); + pathParamsMap.put("cidr", removeVpnGatewayAdvertisedCidrOptions.cidr()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/advertised_cidrs/{cidr}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "removeVpnGatewayAdvertisedCidr"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.query("version", String.valueOf(this.version)); + builder.query("generation", String.valueOf(this.generation)); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + return createServiceCall(builder.build(), responseConverter); } /** - * Create a flow log collector. + * Remove a local CIDR from a VPN gateway connection. * - * This request creates and starts a new flow log collector from a flow log collector prototype object. The prototype - * object is structured in the same way as a retrieved flow log collector, and contains the information necessary to - * create and start the new flow log collector. + * This request removes a CIDR from a VPN gateway connection. * - * @param createFlowLogCollectorOptions the {@link CreateFlowLogCollectorOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link FlowLogCollector} + * This request is only supported for policy mode VPN gateways. + * + * @param removeVpnGatewayConnectionsLocalCidrOptions the {@link RemoveVpnGatewayConnectionsLocalCidrOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall createFlowLogCollector(CreateFlowLogCollectorOptions createFlowLogCollectorOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createFlowLogCollectorOptions, - "createFlowLogCollectorOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/flow_log_collectors")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createFlowLogCollector"); + public ServiceCall removeVpnGatewayConnectionsLocalCidr(RemoveVpnGatewayConnectionsLocalCidrOptions removeVpnGatewayConnectionsLocalCidrOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(removeVpnGatewayConnectionsLocalCidrOptions, + "removeVpnGatewayConnectionsLocalCidrOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("vpn_gateway_id", removeVpnGatewayConnectionsLocalCidrOptions.vpnGatewayId()); + pathParamsMap.put("id", removeVpnGatewayConnectionsLocalCidrOptions.id()); + pathParamsMap.put("cidr", removeVpnGatewayConnectionsLocalCidrOptions.cidr()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections/{id}/local/cidrs/{cidr}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "removeVpnGatewayConnectionsLocalCidr"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.add("storage_bucket", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createFlowLogCollectorOptions.storageBucket())); - contentJson.add("target", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createFlowLogCollectorOptions.target())); - if (createFlowLogCollectorOptions.active() != null) { - contentJson.addProperty("active", createFlowLogCollectorOptions.active()); - } - if (createFlowLogCollectorOptions.name() != null) { - contentJson.addProperty("name", createFlowLogCollectorOptions.name()); - } - if (createFlowLogCollectorOptions.resourceGroup() != null) { - contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createFlowLogCollectorOptions.resourceGroup())); - } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a flow log collector. + * Remove a peer CIDR from a VPN gateway connection. * - * This request stops and deletes a flow log collector. This operation cannot be reversed. + * This request removes a CIDR from a VPN gateway connection. * - * Collected flow logs remain available within the flow log collector's Cloud Object Storage bucket. + * This request is only supported for policy mode VPN gateways. * - * @param deleteFlowLogCollectorOptions the {@link DeleteFlowLogCollectorOptions} containing the options for the call + * @param removeVpnGatewayConnectionsPeerCidrOptions the {@link RemoveVpnGatewayConnectionsPeerCidrOptions} containing the options for the call * @return a {@link ServiceCall} with a void result */ - public ServiceCall deleteFlowLogCollector(DeleteFlowLogCollectorOptions deleteFlowLogCollectorOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deleteFlowLogCollectorOptions, - "deleteFlowLogCollectorOptions cannot be null"); + public ServiceCall removeVpnGatewayConnectionsPeerCidr(RemoveVpnGatewayConnectionsPeerCidrOptions removeVpnGatewayConnectionsPeerCidrOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(removeVpnGatewayConnectionsPeerCidrOptions, + "removeVpnGatewayConnectionsPeerCidrOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deleteFlowLogCollectorOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/flow_log_collectors/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteFlowLogCollector"); + pathParamsMap.put("vpn_gateway_id", removeVpnGatewayConnectionsPeerCidrOptions.vpnGatewayId()); + pathParamsMap.put("id", removeVpnGatewayConnectionsPeerCidrOptions.id()); + pathParamsMap.put("cidr", removeVpnGatewayConnectionsPeerCidrOptions.cidr()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer/cidrs/{cidr}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "removeVpnGatewayConnectionsPeerCidr"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } @@ -14684,134 +15066,130 @@ public ServiceCall deleteFlowLogCollector(DeleteFlowLogCollectorOptions de } /** - * Retrieve a flow log collector. + * Update an IKE policy. * - * This request retrieves a single flow log collector specified by the identifier in the URL. + * This request updates the properties of an existing IKE policy. * - * @param getFlowLogCollectorOptions the {@link GetFlowLogCollectorOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link FlowLogCollector} + * @param updateIkePolicyOptions the {@link UpdateIkePolicyOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link IKEPolicy} */ - public ServiceCall getFlowLogCollector(GetFlowLogCollectorOptions getFlowLogCollectorOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getFlowLogCollectorOptions, - "getFlowLogCollectorOptions cannot be null"); + public ServiceCall updateIkePolicy(UpdateIkePolicyOptions updateIkePolicyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateIkePolicyOptions, + "updateIkePolicyOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getFlowLogCollectorOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/flow_log_collectors/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getFlowLogCollector"); + pathParamsMap.put("id", updateIkePolicyOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/ike_policies/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateIkePolicy"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateIkePolicyOptions.ikePolicyPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update a flow log collector. + * Update an IPsec policy. * - * This request updates a flow log collector with the information in a provided flow log collector patch. The flow log - * collector patch object is structured in the same way as a retrieved flow log collector and contains only the - * information to be updated. + * This request updates the properties of an existing IPsec policy. * - * @param updateFlowLogCollectorOptions the {@link UpdateFlowLogCollectorOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link FlowLogCollector} + * @param updateIpsecPolicyOptions the {@link UpdateIpsecPolicyOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link IPsecPolicy} */ - public ServiceCall updateFlowLogCollector(UpdateFlowLogCollectorOptions updateFlowLogCollectorOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updateFlowLogCollectorOptions, - "updateFlowLogCollectorOptions cannot be null"); + public ServiceCall updateIpsecPolicy(UpdateIpsecPolicyOptions updateIpsecPolicyOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateIpsecPolicyOptions, + "updateIpsecPolicyOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updateFlowLogCollectorOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/flow_log_collectors/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateFlowLogCollector"); + pathParamsMap.put("id", updateIpsecPolicyOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/ipsec_policies/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateIpsecPolicy"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateFlowLogCollectorOptions.flowLogCollectorPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateIpsecPolicyOptions.iPsecPolicyPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List private path service gateways. + * Update a VPN gateway. * - * This request lists private path service gateways in the region. Private path service gateways allow - * [service - * providers](https://cloud.ibm.com/docs/private-path?topic=private-path-private-path-service-architecture#private-path-service-components) - * to make their services available using - * [private path - * connectivity](https://cloud.ibm.com/docs/private-path?topic=private-path-private-path-service-architecture#private-path-service-components). - * Private path service gateways are used to facilitate and manage the private path connectivity between private path - * network load balancers and their associated endpoint gateways. + * This request updates the properties of an existing VPN gateway. * - * @param listPrivatePathServiceGatewaysOptions the {@link ListPrivatePathServiceGatewaysOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link PrivatePathServiceGatewayCollection} + * @param updateVpnGatewayOptions the {@link UpdateVpnGatewayOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPNGateway} */ - public ServiceCall listPrivatePathServiceGateways(ListPrivatePathServiceGatewaysOptions listPrivatePathServiceGatewaysOptions) { - if (listPrivatePathServiceGatewaysOptions == null) { - listPrivatePathServiceGatewaysOptions = new ListPrivatePathServiceGatewaysOptions.Builder().build(); - } - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listPrivatePathServiceGateways"); + public ServiceCall updateVpnGateway(UpdateVpnGatewayOptions updateVpnGatewayOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateVpnGatewayOptions, + "updateVpnGatewayOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("id", updateVpnGatewayOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateVpnGateway"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listPrivatePathServiceGatewaysOptions.start() != null) { - builder.query("start", String.valueOf(listPrivatePathServiceGatewaysOptions.start())); - } - if (listPrivatePathServiceGatewaysOptions.limit() != null) { - builder.query("limit", String.valueOf(listPrivatePathServiceGatewaysOptions.limit())); - } - if (listPrivatePathServiceGatewaysOptions.resourceGroupId() != null) { - builder.query("resource_group.id", String.valueOf(listPrivatePathServiceGatewaysOptions.resourceGroupId())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateVpnGatewayOptions.vpnGatewayPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * List private path service gateways. + * Update a VPN gateway connection. * - * This request lists private path service gateways in the region. Private path service gateways allow - * [service - * providers](https://cloud.ibm.com/docs/private-path?topic=private-path-private-path-service-architecture#private-path-service-components) - * to make their services available using - * [private path - * connectivity](https://cloud.ibm.com/docs/private-path?topic=private-path-private-path-service-architecture#private-path-service-components). - * Private path service gateways are used to facilitate and manage the private path connectivity between private path - * network load balancers and their associated endpoint gateways. + * This request updates the properties of an existing VPN gateway connection. * - * @return a {@link ServiceCall} with a result of type {@link PrivatePathServiceGatewayCollection} + * @param updateVpnGatewayConnectionOptions the {@link UpdateVpnGatewayConnectionOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPNGatewayConnection} */ - public ServiceCall listPrivatePathServiceGateways() { - return listPrivatePathServiceGateways(null); + public ServiceCall updateVpnGatewayConnection(UpdateVpnGatewayConnectionOptions updateVpnGatewayConnectionOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateVpnGatewayConnectionOptions, + "updateVpnGatewayConnectionOptions cannot be null"); + Map pathParamsMap = new HashMap(); + pathParamsMap.put("vpn_gateway_id", updateVpnGatewayConnectionOptions.vpnGatewayId()); + pathParamsMap.put("id", updateVpnGatewayConnectionOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_gateways/{vpn_gateway_id}/connections/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateVpnGatewayConnection"); + for (Entry header : sdkHeaders.entrySet()) { + builder.header(header.getKey(), header.getValue()); + } + builder.header("Accept", "application/json"); + if (updateVpnGatewayConnectionOptions.ifMatch() != null) { + builder.header("If-Match", updateVpnGatewayConnectionOptions.ifMatch()); + } + builder.query("version", String.valueOf(this.version)); + builder.query("generation", String.valueOf(this.generation)); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateVpnGatewayConnectionOptions.vpnGatewayConnectionPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + return createServiceCall(builder.build(), responseConverter); } /** - * Create a private path service gateway. + * Create a VPN server. * - * This request creates a private path service gateway from a private path service gateway prototype object. The - * prototype object is structured in the same way as a retrieved private path service gateway, and contains the - * information necessary to create the new private path service gateway. + * This request creates a new VPN server. * - * @param createPrivatePathServiceGatewayOptions the {@link CreatePrivatePathServiceGatewayOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link PrivatePathServiceGateway} + * @param createVpnServerOptions the {@link CreateVpnServerOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPNServer} */ - public ServiceCall createPrivatePathServiceGateway(CreatePrivatePathServiceGatewayOptions createPrivatePathServiceGatewayOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createPrivatePathServiceGatewayOptions, - "createPrivatePathServiceGatewayOptions cannot be null"); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways")); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createPrivatePathServiceGateway"); + public ServiceCall createVpnServer(CreateVpnServerOptions createVpnServerOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createVpnServerOptions, + "createVpnServerOptions cannot be null"); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createVpnServer"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } @@ -14819,472 +15197,470 @@ public ServiceCall createPrivatePathServiceGateway(Cr builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); final JsonObject contentJson = new JsonObject(); - contentJson.add("load_balancer", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createPrivatePathServiceGatewayOptions.loadBalancer())); - contentJson.add("service_endpoints", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createPrivatePathServiceGatewayOptions.serviceEndpoints())); - if (createPrivatePathServiceGatewayOptions.defaultAccessPolicy() != null) { - contentJson.addProperty("default_access_policy", createPrivatePathServiceGatewayOptions.defaultAccessPolicy()); + contentJson.add("certificate", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpnServerOptions.certificate())); + contentJson.add("client_authentication", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpnServerOptions.clientAuthentication())); + contentJson.addProperty("client_ip_pool", createVpnServerOptions.clientIpPool()); + contentJson.add("subnets", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpnServerOptions.subnets())); + if (createVpnServerOptions.clientDnsServerIps() != null) { + contentJson.add("client_dns_server_ips", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpnServerOptions.clientDnsServerIps())); } - if (createPrivatePathServiceGatewayOptions.name() != null) { - contentJson.addProperty("name", createPrivatePathServiceGatewayOptions.name()); + if (createVpnServerOptions.clientIdleTimeout() != null) { + contentJson.addProperty("client_idle_timeout", createVpnServerOptions.clientIdleTimeout()); + } + if (createVpnServerOptions.enableSplitTunneling() != null) { + contentJson.addProperty("enable_split_tunneling", createVpnServerOptions.enableSplitTunneling()); + } + if (createVpnServerOptions.name() != null) { + contentJson.addProperty("name", createVpnServerOptions.name()); + } + if (createVpnServerOptions.port() != null) { + contentJson.addProperty("port", createVpnServerOptions.port()); + } + if (createVpnServerOptions.protocol() != null) { + contentJson.addProperty("protocol", createVpnServerOptions.protocol()); } - if (createPrivatePathServiceGatewayOptions.resourceGroup() != null) { - contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createPrivatePathServiceGatewayOptions.resourceGroup())); + if (createVpnServerOptions.resourceGroup() != null) { + contentJson.add("resource_group", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpnServerOptions.resourceGroup())); } - if (createPrivatePathServiceGatewayOptions.zonalAffinity() != null) { - contentJson.addProperty("zonal_affinity", createPrivatePathServiceGatewayOptions.zonalAffinity()); + if (createVpnServerOptions.securityGroups() != null) { + contentJson.add("security_groups", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createVpnServerOptions.securityGroups())); } builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Delete a private path service gateway. + * Create a VPN route for a VPN server. * - * This request deletes a private path service gateway. For this request to succeed, the value of - * `endpoint_gateway_count` must be `0`. This operation cannot be reversed. + * This request creates a new VPN route in the VPN server. All VPN routes are provided to the VPN client when the + * connection is established. Packets received from the VPN client will be dropped by the VPN server if there is no + * VPN route matching their specified destinations. All VPN routes must be unique within the VPN server. * - * @param deletePrivatePathServiceGatewayOptions the {@link DeletePrivatePathServiceGatewayOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param createVpnServerRouteOptions the {@link CreateVpnServerRouteOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPNServerRoute} */ - public ServiceCall deletePrivatePathServiceGateway(DeletePrivatePathServiceGatewayOptions deletePrivatePathServiceGatewayOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deletePrivatePathServiceGatewayOptions, - "deletePrivatePathServiceGatewayOptions cannot be null"); + public ServiceCall createVpnServerRoute(CreateVpnServerRouteOptions createVpnServerRouteOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(createVpnServerRouteOptions, + "createVpnServerRouteOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", deletePrivatePathServiceGatewayOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deletePrivatePathServiceGateway"); + pathParamsMap.put("vpn_server_id", createVpnServerRouteOptions.vpnServerId()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{vpn_server_id}/routes", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createVpnServerRoute"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + final JsonObject contentJson = new JsonObject(); + contentJson.addProperty("destination", createVpnServerRouteOptions.destination()); + if (createVpnServerRouteOptions.action() != null) { + contentJson.addProperty("action", createVpnServerRouteOptions.action()); + } + if (createVpnServerRouteOptions.name() != null) { + contentJson.addProperty("name", createVpnServerRouteOptions.name()); + } + builder.bodyJson(contentJson); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve a private path service gateway. + * Delete a VPN server. * - * This request retrieves the private path service gateway specified by the identifier in the URL. + * This request deletes a VPN server. This operation cannot be reversed. * - * @param getPrivatePathServiceGatewayOptions the {@link GetPrivatePathServiceGatewayOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link PrivatePathServiceGateway} + * @param deleteVpnServerOptions the {@link DeleteVpnServerOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall getPrivatePathServiceGateway(GetPrivatePathServiceGatewayOptions getPrivatePathServiceGatewayOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getPrivatePathServiceGatewayOptions, - "getPrivatePathServiceGatewayOptions cannot be null"); + public ServiceCall deleteVpnServer(DeleteVpnServerOptions deleteVpnServerOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVpnServerOptions, + "deleteVpnServerOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", getPrivatePathServiceGatewayOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getPrivatePathServiceGateway"); + pathParamsMap.put("id", deleteVpnServerOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVpnServer"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); + if (deleteVpnServerOptions.ifMatch() != null) { + builder.header("If-Match", deleteVpnServerOptions.ifMatch()); + } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Update a private path service gateway. + * Delete a VPN client. * - * This request updates a private path service gateway with the information provided in a private path service gateway - * patch object. The private path service gateway patch object is structured in the same way as a retrieved private - * path service gateway and contains only the information to be updated. + * This request disconnects and deletes the VPN client from the VPN server. The VPN client may reconnect unless its + * authentication permissions for the configured authentication methods (such as its client certificate) have been + * revoked. * - * @param updatePrivatePathServiceGatewayOptions the {@link UpdatePrivatePathServiceGatewayOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link PrivatePathServiceGateway} + * @param deleteVpnServerClientOptions the {@link DeleteVpnServerClientOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall updatePrivatePathServiceGateway(UpdatePrivatePathServiceGatewayOptions updatePrivatePathServiceGatewayOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updatePrivatePathServiceGatewayOptions, - "updatePrivatePathServiceGatewayOptions cannot be null"); + public ServiceCall deleteVpnServerClient(DeleteVpnServerClientOptions deleteVpnServerClientOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVpnServerClientOptions, + "deleteVpnServerClientOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("id", updatePrivatePathServiceGatewayOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updatePrivatePathServiceGateway"); + pathParamsMap.put("vpn_server_id", deleteVpnServerClientOptions.vpnServerId()); + pathParamsMap.put("id", deleteVpnServerClientOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{vpn_server_id}/clients/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVpnServerClient"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updatePrivatePathServiceGatewayOptions.privatePathServiceGatewayPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * List account policies for a private path service gateway. - * - * This request lists account policies for a private path service gateway. Each policy defines how requests to use the - * private path service gateway from that account will be handled. + * Delete a VPN route. * - * The account policies will be sorted by their `created_at` property values, with newest account policies first. - * Account policies with identical `created_at` property values will in turn be sorted by ascending `id` property - * values. + * This request deletes a VPN route. This operation cannot be reversed. * - * @param listPrivatePathServiceGatewayAccountPoliciesOptions the {@link ListPrivatePathServiceGatewayAccountPoliciesOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link PrivatePathServiceGatewayAccountPolicyCollection} + * @param deleteVpnServerRouteOptions the {@link DeleteVpnServerRouteOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall listPrivatePathServiceGatewayAccountPolicies(ListPrivatePathServiceGatewayAccountPoliciesOptions listPrivatePathServiceGatewayAccountPoliciesOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listPrivatePathServiceGatewayAccountPoliciesOptions, - "listPrivatePathServiceGatewayAccountPoliciesOptions cannot be null"); + public ServiceCall deleteVpnServerRoute(DeleteVpnServerRouteOptions deleteVpnServerRouteOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVpnServerRouteOptions, + "deleteVpnServerRouteOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("private_path_service_gateway_id", listPrivatePathServiceGatewayAccountPoliciesOptions.privatePathServiceGatewayId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{private_path_service_gateway_id}/account_policies", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listPrivatePathServiceGatewayAccountPolicies"); + pathParamsMap.put("vpn_server_id", deleteVpnServerRouteOptions.vpnServerId()); + pathParamsMap.put("id", deleteVpnServerRouteOptions.id()); + RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{vpn_server_id}/routes/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deleteVpnServerRoute"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listPrivatePathServiceGatewayAccountPoliciesOptions.start() != null) { - builder.query("start", String.valueOf(listPrivatePathServiceGatewayAccountPoliciesOptions.start())); - } - if (listPrivatePathServiceGatewayAccountPoliciesOptions.limit() != null) { - builder.query("limit", String.valueOf(listPrivatePathServiceGatewayAccountPoliciesOptions.limit())); - } - if (listPrivatePathServiceGatewayAccountPoliciesOptions.accountId() != null) { - builder.query("account.id", String.valueOf(listPrivatePathServiceGatewayAccountPoliciesOptions.accountId())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Create an account policy for a private path service gateway. + * Disconnect a VPN client. * - * This request creates an account policy from an account policy prototype object. The prototype object is structured - * in the same way as a retrieved account policy, and contains the information necessary to create the new account - * policy. + * This request disconnects the specified VPN client, and deletes the client according to the VPN server's + * auto-deletion policy. The VPN client may reconnect unless its authentication permissions for the configured + * authentication methods (such as its client certificate) have been revoked. * - * @param createPrivatePathServiceGatewayAccountPolicyOptions the {@link CreatePrivatePathServiceGatewayAccountPolicyOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link PrivatePathServiceGatewayAccountPolicy} + * @param disconnectVpnClientOptions the {@link DisconnectVpnClientOptions} containing the options for the call + * @return a {@link ServiceCall} with a void result */ - public ServiceCall createPrivatePathServiceGatewayAccountPolicy(CreatePrivatePathServiceGatewayAccountPolicyOptions createPrivatePathServiceGatewayAccountPolicyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(createPrivatePathServiceGatewayAccountPolicyOptions, - "createPrivatePathServiceGatewayAccountPolicyOptions cannot be null"); + public ServiceCall disconnectVpnClient(DisconnectVpnClientOptions disconnectVpnClientOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(disconnectVpnClientOptions, + "disconnectVpnClientOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("private_path_service_gateway_id", createPrivatePathServiceGatewayAccountPolicyOptions.privatePathServiceGatewayId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{private_path_service_gateway_id}/account_policies", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "createPrivatePathServiceGatewayAccountPolicy"); + pathParamsMap.put("vpn_server_id", disconnectVpnClientOptions.vpnServerId()); + pathParamsMap.put("id", disconnectVpnClientOptions.id()); + RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{vpn_server_id}/clients/{id}/disconnect", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "disconnectVpnClient"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.addProperty("access_policy", createPrivatePathServiceGatewayAccountPolicyOptions.accessPolicy()); - contentJson.add("account", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(createPrivatePathServiceGatewayAccountPolicyOptions.account())); - builder.bodyJson(contentJson); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); return createServiceCall(builder.build(), responseConverter); } /** - * Delete an account policy for a private path service gateway. + * Retrieve a VPN server. * - * This request deletes an account policy. This operation cannot be reversed and it does not affect the `status` of - * any existing endpoint gateway bindings. + * This request retrieves a single VPN server specified by the identifier in the URL. * - * @param deletePrivatePathServiceGatewayAccountPolicyOptions the {@link DeletePrivatePathServiceGatewayAccountPolicyOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param getVpnServerOptions the {@link GetVpnServerOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPNServer} */ - public ServiceCall deletePrivatePathServiceGatewayAccountPolicy(DeletePrivatePathServiceGatewayAccountPolicyOptions deletePrivatePathServiceGatewayAccountPolicyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(deletePrivatePathServiceGatewayAccountPolicyOptions, - "deletePrivatePathServiceGatewayAccountPolicyOptions cannot be null"); + public ServiceCall getVpnServer(GetVpnServerOptions getVpnServerOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getVpnServerOptions, + "getVpnServerOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("private_path_service_gateway_id", deletePrivatePathServiceGatewayAccountPolicyOptions.privatePathServiceGatewayId()); - pathParamsMap.put("id", deletePrivatePathServiceGatewayAccountPolicyOptions.id()); - RequestBuilder builder = RequestBuilder.delete(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{private_path_service_gateway_id}/account_policies/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "deletePrivatePathServiceGatewayAccountPolicy"); + pathParamsMap.put("id", getVpnServerOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpnServer"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve an account policy for a private path service gateway. + * Retrieve a VPN client. * - * This request retrieves a single account policy specified by the identifier in the URL. + * This request retrieves a single VPN client specified by the identifier in the URL. * - * @param getPrivatePathServiceGatewayAccountPolicyOptions the {@link GetPrivatePathServiceGatewayAccountPolicyOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link PrivatePathServiceGatewayAccountPolicy} + * @param getVpnServerClientOptions the {@link GetVpnServerClientOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPNServerClient} */ - public ServiceCall getPrivatePathServiceGatewayAccountPolicy(GetPrivatePathServiceGatewayAccountPolicyOptions getPrivatePathServiceGatewayAccountPolicyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getPrivatePathServiceGatewayAccountPolicyOptions, - "getPrivatePathServiceGatewayAccountPolicyOptions cannot be null"); + public ServiceCall getVpnServerClient(GetVpnServerClientOptions getVpnServerClientOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getVpnServerClientOptions, + "getVpnServerClientOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("private_path_service_gateway_id", getPrivatePathServiceGatewayAccountPolicyOptions.privatePathServiceGatewayId()); - pathParamsMap.put("id", getPrivatePathServiceGatewayAccountPolicyOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{private_path_service_gateway_id}/account_policies/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getPrivatePathServiceGatewayAccountPolicy"); + pathParamsMap.put("vpn_server_id", getVpnServerClientOptions.vpnServerId()); + pathParamsMap.put("id", getVpnServerClientOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{vpn_server_id}/clients/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpnServerClient"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Update an account policy for a private path service gateway. + * Retrieve client configuration. * - * This request updates an account policy with the information in a provided account policy patch. The account policy - * patch object is structured in the same way as a retrieved account policy and contains only the information to be - * updated. + * This request retrieves OpenVPN client configuration on a single VPN server specified by the identifier in the URL. + * This configuration includes directives compatible with OpenVPN releases 2.4 and 2.5. * - * @param updatePrivatePathServiceGatewayAccountPolicyOptions the {@link UpdatePrivatePathServiceGatewayAccountPolicyOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link PrivatePathServiceGatewayAccountPolicy} + * @param getVpnServerClientConfigurationOptions the {@link GetVpnServerClientConfigurationOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link String} */ - public ServiceCall updatePrivatePathServiceGatewayAccountPolicy(UpdatePrivatePathServiceGatewayAccountPolicyOptions updatePrivatePathServiceGatewayAccountPolicyOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(updatePrivatePathServiceGatewayAccountPolicyOptions, - "updatePrivatePathServiceGatewayAccountPolicyOptions cannot be null"); + public ServiceCall getVpnServerClientConfiguration(GetVpnServerClientConfigurationOptions getVpnServerClientConfigurationOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getVpnServerClientConfigurationOptions, + "getVpnServerClientConfigurationOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("private_path_service_gateway_id", updatePrivatePathServiceGatewayAccountPolicyOptions.privatePathServiceGatewayId()); - pathParamsMap.put("id", updatePrivatePathServiceGatewayAccountPolicyOptions.id()); - RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{private_path_service_gateway_id}/account_policies/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updatePrivatePathServiceGatewayAccountPolicy"); + pathParamsMap.put("id", getVpnServerClientConfigurationOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{id}/client_configuration", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpnServerClientConfiguration"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } - builder.header("Accept", "application/json"); + builder.header("Accept", "text/plain"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updatePrivatePathServiceGatewayAccountPolicyOptions.privatePathServiceGatewayAccountPolicyPatch()), "application/merge-patch+json"); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = ResponseConverterUtils.getString(); return createServiceCall(builder.build(), responseConverter); } /** - * List endpoint gateway bindings for a private path service gateway. - * - * This request lists endpoint gateway bindings for a private path service gateway. Each endpoint gateway binding is - * implicitly created when an endpoint gateway is created targeting the private path service gateway. The associated - * account policy is applied to all new endpoint gateway bindings. If an associated account policy doesn't exist, the - * private path service gateway's `default_access_policy` is used. + * Retrieve a VPN route. * - * The endpoint gateway bindings will be sorted by their `created_at` property values, with newest endpoint gateway - * bindings first. Endpoint gateway bindings with identical - * `created_at` property values will in turn be sorted by ascending `name` property values. + * This request retrieves a single VPN route specified by the identifier in the URL. * - * @param listPrivatePathServiceGatewayEndpointGatewayBindingsOptions the {@link ListPrivatePathServiceGatewayEndpointGatewayBindingsOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link PrivatePathServiceGatewayEndpointGatewayBindingCollection} + * @param getVpnServerRouteOptions the {@link GetVpnServerRouteOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPNServerRoute} */ - public ServiceCall listPrivatePathServiceGatewayEndpointGatewayBindings(ListPrivatePathServiceGatewayEndpointGatewayBindingsOptions listPrivatePathServiceGatewayEndpointGatewayBindingsOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(listPrivatePathServiceGatewayEndpointGatewayBindingsOptions, - "listPrivatePathServiceGatewayEndpointGatewayBindingsOptions cannot be null"); + public ServiceCall getVpnServerRoute(GetVpnServerRouteOptions getVpnServerRouteOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(getVpnServerRouteOptions, + "getVpnServerRouteOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("private_path_service_gateway_id", listPrivatePathServiceGatewayEndpointGatewayBindingsOptions.privatePathServiceGatewayId()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{private_path_service_gateway_id}/endpoint_gateway_bindings", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listPrivatePathServiceGatewayEndpointGatewayBindings"); + pathParamsMap.put("vpn_server_id", getVpnServerRouteOptions.vpnServerId()); + pathParamsMap.put("id", getVpnServerRouteOptions.id()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{vpn_server_id}/routes/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getVpnServerRoute"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - if (listPrivatePathServiceGatewayEndpointGatewayBindingsOptions.start() != null) { - builder.query("start", String.valueOf(listPrivatePathServiceGatewayEndpointGatewayBindingsOptions.start())); - } - if (listPrivatePathServiceGatewayEndpointGatewayBindingsOptions.limit() != null) { - builder.query("limit", String.valueOf(listPrivatePathServiceGatewayEndpointGatewayBindingsOptions.limit())); - } - if (listPrivatePathServiceGatewayEndpointGatewayBindingsOptions.status() != null) { - builder.query("status", String.valueOf(listPrivatePathServiceGatewayEndpointGatewayBindingsOptions.status())); - } - if (listPrivatePathServiceGatewayEndpointGatewayBindingsOptions.accountId() != null) { - builder.query("account.id", String.valueOf(listPrivatePathServiceGatewayEndpointGatewayBindingsOptions.accountId())); - } - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Retrieve an endpoint gateway binding for a private path service gateway. + * List VPN clients for a VPN server. * - * This request retrieves a single endpoint gateway binding specified by the identifier in the URL. + * This request retrieves connected VPN clients, and any disconnected VPN clients that the VPN server has not yet + * deleted based on its auto-deletion policy. * - * @param getPrivatePathServiceGatewayEndpointGatewayBindingOptions the {@link GetPrivatePathServiceGatewayEndpointGatewayBindingOptions} containing the options for the call - * @return a {@link ServiceCall} with a result of type {@link PrivatePathServiceGatewayEndpointGatewayBinding} + * @param listVpnServerClientsOptions the {@link ListVpnServerClientsOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPNServerClientCollection} */ - public ServiceCall getPrivatePathServiceGatewayEndpointGatewayBinding(GetPrivatePathServiceGatewayEndpointGatewayBindingOptions getPrivatePathServiceGatewayEndpointGatewayBindingOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(getPrivatePathServiceGatewayEndpointGatewayBindingOptions, - "getPrivatePathServiceGatewayEndpointGatewayBindingOptions cannot be null"); + public ServiceCall listVpnServerClients(ListVpnServerClientsOptions listVpnServerClientsOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listVpnServerClientsOptions, + "listVpnServerClientsOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("private_path_service_gateway_id", getPrivatePathServiceGatewayEndpointGatewayBindingOptions.privatePathServiceGatewayId()); - pathParamsMap.put("id", getPrivatePathServiceGatewayEndpointGatewayBindingOptions.id()); - RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{private_path_service_gateway_id}/endpoint_gateway_bindings/{id}", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "getPrivatePathServiceGatewayEndpointGatewayBinding"); + pathParamsMap.put("vpn_server_id", listVpnServerClientsOptions.vpnServerId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{vpn_server_id}/clients", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpnServerClients"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = - ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); + if (listVpnServerClientsOptions.start() != null) { + builder.query("start", String.valueOf(listVpnServerClientsOptions.start())); + } + if (listVpnServerClientsOptions.limit() != null) { + builder.query("limit", String.valueOf(listVpnServerClientsOptions.limit())); + } + if (listVpnServerClientsOptions.sort() != null) { + builder.query("sort", String.valueOf(listVpnServerClientsOptions.sort())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Deny an endpoint gateway binding for a private path service gateway. + * List VPN routes for a VPN server. * - * This request denies a `pending` endpoint gateway request, and optionally sets the policy to deny future requests - * from the same account. + * This request lists VPN routes in a VPN server. All VPN routes are provided to the VPN client when the connection is + * established. Packets received from the VPN client will be dropped by the VPN server if there is no VPN route + * matching their specified destinations. All VPN routes must be unique within the VPN server. * - * @param denyPrivatePathServiceGatewayEndpointGatewayBindingOptions the {@link DenyPrivatePathServiceGatewayEndpointGatewayBindingOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param listVpnServerRoutesOptions the {@link ListVpnServerRoutesOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPNServerRouteCollection} */ - public ServiceCall denyPrivatePathServiceGatewayEndpointGatewayBinding(DenyPrivatePathServiceGatewayEndpointGatewayBindingOptions denyPrivatePathServiceGatewayEndpointGatewayBindingOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(denyPrivatePathServiceGatewayEndpointGatewayBindingOptions, - "denyPrivatePathServiceGatewayEndpointGatewayBindingOptions cannot be null"); + public ServiceCall listVpnServerRoutes(ListVpnServerRoutesOptions listVpnServerRoutesOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(listVpnServerRoutesOptions, + "listVpnServerRoutesOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("private_path_service_gateway_id", denyPrivatePathServiceGatewayEndpointGatewayBindingOptions.privatePathServiceGatewayId()); - pathParamsMap.put("id", denyPrivatePathServiceGatewayEndpointGatewayBindingOptions.id()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{private_path_service_gateway_id}/endpoint_gateway_bindings/{id}/deny", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "denyPrivatePathServiceGatewayEndpointGatewayBinding"); + pathParamsMap.put("vpn_server_id", listVpnServerRoutesOptions.vpnServerId()); + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{vpn_server_id}/routes", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpnServerRoutes"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - if (denyPrivatePathServiceGatewayEndpointGatewayBindingOptions.setAccountPolicy() != null) { - contentJson.addProperty("set_account_policy", denyPrivatePathServiceGatewayEndpointGatewayBindingOptions.setAccountPolicy()); + if (listVpnServerRoutesOptions.start() != null) { + builder.query("start", String.valueOf(listVpnServerRoutesOptions.start())); } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + if (listVpnServerRoutesOptions.limit() != null) { + builder.query("limit", String.valueOf(listVpnServerRoutesOptions.limit())); + } + if (listVpnServerRoutesOptions.sort() != null) { + builder.query("sort", String.valueOf(listVpnServerRoutesOptions.sort())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Permit an endpoint gateway binding for a private path service gateway. + * List VPN servers. * - * This request permits a `pending` endpoint gateway request, and optionally sets the policy to permit future requests - * from the same account. + * This request lists VPN servers. * - * @param permitPrivatePathServiceGatewayEndpointGatewayBindingOptions the {@link PermitPrivatePathServiceGatewayEndpointGatewayBindingOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param listVpnServersOptions the {@link ListVpnServersOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPNServerCollection} */ - public ServiceCall permitPrivatePathServiceGatewayEndpointGatewayBinding(PermitPrivatePathServiceGatewayEndpointGatewayBindingOptions permitPrivatePathServiceGatewayEndpointGatewayBindingOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(permitPrivatePathServiceGatewayEndpointGatewayBindingOptions, - "permitPrivatePathServiceGatewayEndpointGatewayBindingOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("private_path_service_gateway_id", permitPrivatePathServiceGatewayEndpointGatewayBindingOptions.privatePathServiceGatewayId()); - pathParamsMap.put("id", permitPrivatePathServiceGatewayEndpointGatewayBindingOptions.id()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{private_path_service_gateway_id}/endpoint_gateway_bindings/{id}/permit", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "permitPrivatePathServiceGatewayEndpointGatewayBinding"); + public ServiceCall listVpnServers(ListVpnServersOptions listVpnServersOptions) { + if (listVpnServersOptions == null) { + listVpnServersOptions = new ListVpnServersOptions.Builder().build(); + } + RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers")); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "listVpnServers"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - if (permitPrivatePathServiceGatewayEndpointGatewayBindingOptions.setAccountPolicy() != null) { - contentJson.addProperty("set_account_policy", permitPrivatePathServiceGatewayEndpointGatewayBindingOptions.setAccountPolicy()); + if (listVpnServersOptions.name() != null) { + builder.query("name", String.valueOf(listVpnServersOptions.name())); } - builder.bodyJson(contentJson); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + if (listVpnServersOptions.start() != null) { + builder.query("start", String.valueOf(listVpnServersOptions.start())); + } + if (listVpnServersOptions.limit() != null) { + builder.query("limit", String.valueOf(listVpnServersOptions.limit())); + } + if (listVpnServersOptions.resourceGroupId() != null) { + builder.query("resource_group.id", String.valueOf(listVpnServersOptions.resourceGroupId())); + } + if (listVpnServersOptions.sort() != null) { + builder.query("sort", String.valueOf(listVpnServersOptions.sort())); + } + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Publish a private path service gateway. + * List VPN servers. * - * This request publishes a private path service gateway, allowing any account to request access to it. + * This request lists VPN servers. * - * @param publishPrivatePathServiceGatewayOptions the {@link PublishPrivatePathServiceGatewayOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @return a {@link ServiceCall} with a result of type {@link VPNServerCollection} */ - public ServiceCall publishPrivatePathServiceGateway(PublishPrivatePathServiceGatewayOptions publishPrivatePathServiceGatewayOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(publishPrivatePathServiceGatewayOptions, - "publishPrivatePathServiceGatewayOptions cannot be null"); - Map pathParamsMap = new HashMap(); - pathParamsMap.put("private_path_service_gateway_id", publishPrivatePathServiceGatewayOptions.privatePathServiceGatewayId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{private_path_service_gateway_id}/publish", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "publishPrivatePathServiceGateway"); - for (Entry header : sdkHeaders.entrySet()) { - builder.header(header.getKey(), header.getValue()); - } - builder.query("version", String.valueOf(this.version)); - builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); - return createServiceCall(builder.build(), responseConverter); + public ServiceCall listVpnServers() { + return listVpnServers(null); } /** - * Revoke access to a private path service gateway for an account. + * Update a VPN server. * - * This request revokes a consumer account. This operation cannot be reversed. The `status` of all endpoint gateway - * bindings associated with the specified private path service gateway become `denied`. If the specified account has - * an existing access policy, that policy will be updated to `denied`. Otherwise, a new `deny` access policy will be - * created for the account. + * This request updates the properties of an existing VPN server. Any updates other than to `name` will cause all + * connected VPN clients to be disconnected. * - * @param revokeAccountForPrivatePathServiceGatewayOptions the {@link RevokeAccountForPrivatePathServiceGatewayOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param updateVpnServerOptions the {@link UpdateVpnServerOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPNServer} */ - public ServiceCall revokeAccountForPrivatePathServiceGateway(RevokeAccountForPrivatePathServiceGatewayOptions revokeAccountForPrivatePathServiceGatewayOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(revokeAccountForPrivatePathServiceGatewayOptions, - "revokeAccountForPrivatePathServiceGatewayOptions cannot be null"); + public ServiceCall updateVpnServer(UpdateVpnServerOptions updateVpnServerOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateVpnServerOptions, + "updateVpnServerOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("private_path_service_gateway_id", revokeAccountForPrivatePathServiceGatewayOptions.privatePathServiceGatewayId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{private_path_service_gateway_id}/revoke_account", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "revokeAccountForPrivatePathServiceGateway"); + pathParamsMap.put("id", updateVpnServerOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateVpnServer"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); + if (updateVpnServerOptions.ifMatch() != null) { + builder.header("If-Match", updateVpnServerOptions.ifMatch()); + } builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - final JsonObject contentJson = new JsonObject(); - contentJson.add("account", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(revokeAccountForPrivatePathServiceGatewayOptions.account())); - builder.bodyJson(contentJson); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateVpnServerOptions.vpnServerPatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } /** - * Unpublish a private path service gateway. + * Update a VPN route. * - * This request unpublishes a private path service gateway. For this request to succeed, any existing access from - * other accounts must first be revoked. Once unpublished, access will again be restricted to the account that created - * this private path service gateway. + * This request updates a VPN route with the information in a provided VPN route patch. The VPN route patch object is + * structured in the same way as a retrieved VPN route and contains only the information to be updated. * - * @param unpublishPrivatePathServiceGatewayOptions the {@link UnpublishPrivatePathServiceGatewayOptions} containing the options for the call - * @return a {@link ServiceCall} with a void result + * @param updateVpnServerRouteOptions the {@link UpdateVpnServerRouteOptions} containing the options for the call + * @return a {@link ServiceCall} with a result of type {@link VPNServerRoute} */ - public ServiceCall unpublishPrivatePathServiceGateway(UnpublishPrivatePathServiceGatewayOptions unpublishPrivatePathServiceGatewayOptions) { - com.ibm.cloud.sdk.core.util.Validator.notNull(unpublishPrivatePathServiceGatewayOptions, - "unpublishPrivatePathServiceGatewayOptions cannot be null"); + public ServiceCall updateVpnServerRoute(UpdateVpnServerRouteOptions updateVpnServerRouteOptions) { + com.ibm.cloud.sdk.core.util.Validator.notNull(updateVpnServerRouteOptions, + "updateVpnServerRouteOptions cannot be null"); Map pathParamsMap = new HashMap(); - pathParamsMap.put("private_path_service_gateway_id", unpublishPrivatePathServiceGatewayOptions.privatePathServiceGatewayId()); - RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/private_path_service_gateways/{private_path_service_gateway_id}/unpublish", pathParamsMap)); - Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "unpublishPrivatePathServiceGateway"); + pathParamsMap.put("vpn_server_id", updateVpnServerRouteOptions.vpnServerId()); + pathParamsMap.put("id", updateVpnServerRouteOptions.id()); + RequestBuilder builder = RequestBuilder.patch(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/vpn_servers/{vpn_server_id}/routes/{id}", pathParamsMap)); + Map sdkHeaders = SdkCommon.getSdkHeaders("vpc", "v1", "updateVpnServerRoute"); for (Entry header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } + builder.header("Accept", "application/json"); builder.query("version", String.valueOf(this.version)); builder.query("generation", String.valueOf(this.generation)); - ResponseConverter responseConverter = ResponseConverterUtils.getVoid(); + builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateVpnServerRouteOptions.vpnServerRoutePatch()), "application/merge-patch+json"); + ResponseConverter responseConverter = + ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken() { }.getType()); return createServiceCall(builder.build(), responseConverter); } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AccountIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AccountIdentity.java index 105433c3d4..60308ea35f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AccountIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AccountIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AccountIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AccountIdentityById.java index 876c20c469..b85a4dd2b6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AccountIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AccountIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AccountReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AccountReference.java index 4c46c067fd..af91f85cd8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AccountReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AccountReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ActivateReservationOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ActivateReservationOptions.java index 57f1aae67f..b153b70e19 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ActivateReservationOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ActivateReservationOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddBareMetalServerNetworkInterfaceFloatingIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddBareMetalServerNetworkInterfaceFloatingIpOptions.java index 329364380b..8ca8e69607 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddBareMetalServerNetworkInterfaceFloatingIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddBareMetalServerNetworkInterfaceFloatingIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddEndpointGatewayIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddEndpointGatewayIpOptions.java index 34a6fd2a58..9e8d5d4e4e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddEndpointGatewayIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddEndpointGatewayIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddInstanceNetworkInterfaceFloatingIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddInstanceNetworkInterfaceFloatingIpOptions.java index fb32f41be5..53b1c13ea2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddInstanceNetworkInterfaceFloatingIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddInstanceNetworkInterfaceFloatingIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddNetworkInterfaceFloatingIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddNetworkInterfaceFloatingIpOptions.java index 2cb1badfaf..da458471dd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddNetworkInterfaceFloatingIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddNetworkInterfaceFloatingIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddVirtualNetworkInterfaceIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddVirtualNetworkInterfaceIpOptions.java index bc93d462b1..d5dd19f24a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddVirtualNetworkInterfaceIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddVirtualNetworkInterfaceIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddVpnGatewayAdvertisedCidrOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddVpnGatewayAdvertisedCidrOptions.java new file mode 100644 index 0000000000..a1cd1e1c41 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddVpnGatewayAdvertisedCidrOptions.java @@ -0,0 +1,134 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * The addVpnGatewayAdvertisedCidr options. + */ +public class AddVpnGatewayAdvertisedCidrOptions extends GenericModel { + + protected String vpnGatewayId; + protected String cidr; + + /** + * Builder. + */ + public static class Builder { + private String vpnGatewayId; + private String cidr; + + /** + * Instantiates a new Builder from an existing AddVpnGatewayAdvertisedCidrOptions instance. + * + * @param addVpnGatewayAdvertisedCidrOptions the instance to initialize the Builder with + */ + private Builder(AddVpnGatewayAdvertisedCidrOptions addVpnGatewayAdvertisedCidrOptions) { + this.vpnGatewayId = addVpnGatewayAdvertisedCidrOptions.vpnGatewayId; + this.cidr = addVpnGatewayAdvertisedCidrOptions.cidr; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Instantiates a new builder with required properties. + * + * @param vpnGatewayId the vpnGatewayId + * @param cidr the cidr + */ + public Builder(String vpnGatewayId, String cidr) { + this.vpnGatewayId = vpnGatewayId; + this.cidr = cidr; + } + + /** + * Builds a AddVpnGatewayAdvertisedCidrOptions. + * + * @return the new AddVpnGatewayAdvertisedCidrOptions instance + */ + public AddVpnGatewayAdvertisedCidrOptions build() { + return new AddVpnGatewayAdvertisedCidrOptions(this); + } + + /** + * Set the vpnGatewayId. + * + * @param vpnGatewayId the vpnGatewayId + * @return the AddVpnGatewayAdvertisedCidrOptions builder + */ + public Builder vpnGatewayId(String vpnGatewayId) { + this.vpnGatewayId = vpnGatewayId; + return this; + } + + /** + * Set the cidr. + * + * @param cidr the cidr + * @return the AddVpnGatewayAdvertisedCidrOptions builder + */ + public Builder cidr(String cidr) { + this.cidr = cidr; + return this; + } + } + + protected AddVpnGatewayAdvertisedCidrOptions() { } + + protected AddVpnGatewayAdvertisedCidrOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.vpnGatewayId, + "vpnGatewayId cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.cidr, + "cidr cannot be empty"); + vpnGatewayId = builder.vpnGatewayId; + cidr = builder.cidr; + } + + /** + * New builder. + * + * @return a AddVpnGatewayAdvertisedCidrOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the vpnGatewayId. + * + * The VPN gateway identifier. + * + * @return the vpnGatewayId + */ + public String vpnGatewayId() { + return vpnGatewayId; + } + + /** + * Gets the cidr. + * + * The IP address range in CIDR block notation. + * + * @return the cidr + */ + public String cidr() { + return cidr; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddVpnGatewayConnectionsLocalCidrOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddVpnGatewayConnectionsLocalCidrOptions.java index cab964db1f..8d0ef5f36a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddVpnGatewayConnectionsLocalCidrOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddVpnGatewayConnectionsLocalCidrOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddVpnGatewayConnectionsPeerCidrOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddVpnGatewayConnectionsPeerCidrOptions.java index 15c4b7ef84..ff677f1216 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddVpnGatewayConnectionsPeerCidrOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddVpnGatewayConnectionsPeerCidrOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddressPrefix.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddressPrefix.java index 666d6e7753..216c88afbb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddressPrefix.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddressPrefix.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddressPrefixCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddressPrefixCollection.java index 4f8fa5da9e..8f52264571 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddressPrefixCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddressPrefixCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddressPrefixPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddressPrefixPatch.java index 6e2a8ac1dd..f74b3a727a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddressPrefixPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/AddressPrefixPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPoliciesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPoliciesPager.java index a65445619d..bc1ddd1bd0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPoliciesPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPoliciesPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicy.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicy.java index f63d82b380..f2ec1b3175 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicy.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicy.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyCollection.java index a99e980e3f..78a2aceefa 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyHealthReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyHealthReason.java index c6027150f8..bff229bb26 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyHealthReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyHealthReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJob.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJob.java index 45afa9138c..b76b50605e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJob.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJob.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobCollection.java index 47efed0d63..3f5454aa93 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSource.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSource.java index e56d6ca3ff..b633c265cf 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSource.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSource.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceInstanceReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceInstanceReference.java index 50c2b8ff1c..c24ccac3af 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceInstanceReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceInstanceReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceShareReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceShareReference.java index fe3ed37841..2201059e60 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceShareReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceShareReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceVolumeReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceVolumeReference.java index 05dd0a1958..4d1e12edcb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceVolumeReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceVolumeReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobStatusReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobStatusReason.java index 81607c2870..6bdce5196c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobStatusReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobStatusReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobsPager.java index 4b500f947f..dda23810de 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyMatchResourceTypeInstance.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyMatchResourceTypeInstance.java index 646de4518a..29d5c9f379 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyMatchResourceTypeInstance.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyMatchResourceTypeInstance.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyMatchResourceTypeShare.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyMatchResourceTypeShare.java index 38f88b0b8a..95192a11bb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyMatchResourceTypeShare.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyMatchResourceTypeShare.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyMatchResourceTypeVolume.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyMatchResourceTypeVolume.java index faa5d29580..43a189ba16 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyMatchResourceTypeVolume.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyMatchResourceTypeVolume.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPatch.java index 26144369b2..2a73fcbabd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlan.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlan.java index 070453bb52..a1dad8aa53 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlan.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlan.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanClonePolicy.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanClonePolicy.java index 3fc1ea1529..3f6329e381 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanClonePolicy.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanClonePolicy.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanClonePolicyPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanClonePolicyPatch.java index 2bfadfc636..ae2d3c5163 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanClonePolicyPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanClonePolicyPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanClonePolicyPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanClonePolicyPrototype.java index a67ddd1c41..4064543001 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanClonePolicyPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanClonePolicyPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanCollection.java index 57de7d9f23..0b07597250 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanDeletionTrigger.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanDeletionTrigger.java index 4b026650f5..64b9d4e0e6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanDeletionTrigger.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanDeletionTrigger.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanDeletionTriggerPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanDeletionTriggerPatch.java index 72f828854b..751ab4c04a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanDeletionTriggerPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanDeletionTriggerPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanDeletionTriggerPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanDeletionTriggerPrototype.java index 7d045079e9..709903c99e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanDeletionTriggerPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanDeletionTriggerPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanPatch.java index acdcbea7fb..ad14a48d46 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanPrototype.java index 34108e1408..626128d2c1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanReference.java index e3cbcf4fe5..c18c79c4e3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanRemote.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanRemote.java index 72bd95293a..629077125b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanRemote.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanRemote.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanRemoteRegionPolicy.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanRemoteRegionPolicy.java index ab81f9082b..325e67ebcc 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanRemoteRegionPolicy.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanRemoteRegionPolicy.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanRemoteRegionPolicyPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanRemoteRegionPolicyPrototype.java index e02b60a4b8..ff5414e157 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanRemoteRegionPolicyPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanRemoteRegionPolicyPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototype.java index 4b9446f882..27ffc0b740 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype.java index bc5abae897..af0e477e43 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -34,6 +34,9 @@ public interface IncludedContent { /** * The resource type this backup policy will apply to. Resources that have both a matching type and a matching user * tag will be subject to the backup policy. + * + * A backup policy of type `instance` will create a backup of all volumes with a + * `storage_generation` value of `1` attached to the instance. */ public interface MatchResourceType { /** instance. */ diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype.java index e9e220a135..e51ef2fb92 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype.java index 20019db77a..93b450e8b1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScope.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScope.java index 2f16c6db2b..327e7d1f1d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScope.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScope.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopeAccountReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopeAccountReference.java index 2ec94757d6..a06c2fa59e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopeAccountReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopeAccountReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopeEnterpriseReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopeEnterpriseReference.java index 15cb803d70..0c59e9e9cb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopeEnterpriseReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopeEnterpriseReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopePrototype.java index 836900baf4..5513c6277c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopePrototypeEnterpriseIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopePrototypeEnterpriseIdentity.java index 11f30264e2..a99150f4ee 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopePrototypeEnterpriseIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopePrototypeEnterpriseIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN.java index 9d9a7a3128..19252fda3c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTargetSnapshot.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTargetSnapshot.java index d1b3295d7a..d301ad9520 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTargetSnapshot.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTargetSnapshot.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTargetSnapshotShareSnapshotReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTargetSnapshotShareSnapshotReference.java index abd2bb803a..5a3633a6a3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTargetSnapshotShareSnapshotReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTargetSnapshotShareSnapshotReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTargetSnapshotSnapshotReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTargetSnapshotSnapshotReference.java index 7493745dfd..2f59487bc3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTargetSnapshotSnapshotReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTargetSnapshotSnapshotReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServer.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServer.java index eab6ac5916..9299311786 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServer.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServer.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -130,6 +130,8 @@ public interface Status { @SerializedName("lifecycle_state") protected String lifecycleState; protected Long memory; + @SerializedName("metadata_service") + protected BareMetalServerMetadataService metadataService; protected String name; @SerializedName("network_attachments") protected List networkAttachments; @@ -343,6 +345,17 @@ public Long getMemory() { return memory; } + /** + * Gets the metadataService. + * + * The metadata service configuration for the bare metal server. + * + * @return the metadataService + */ + public BareMetalServerMetadataService getMetadataService() { + return metadataService; + } + /** * Gets the name. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerBootTarget.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerBootTarget.java index 7b4efbd6a6..9c3c5b34f9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerBootTarget.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerBootTarget.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerBootTargetBareMetalServerDiskReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerBootTargetBareMetalServerDiskReference.java index 915ba196bb..a0a3c91094 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerBootTargetBareMetalServerDiskReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerBootTargetBareMetalServerDiskReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerCPU.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerCPU.java index 6bcc6477e3..e1852cd97e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerCPU.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerCPU.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerCollection.java index a3a32d6e10..24833ecf84 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerConsoleAccessToken.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerConsoleAccessToken.java index 53a8fdc9a7..c310dd78f9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerConsoleAccessToken.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerConsoleAccessToken.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDisk.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDisk.java index da42a483d8..bc823fa2fd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDisk.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDisk.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -49,6 +49,8 @@ public interface ResourceType { String BARE_METAL_SERVER_DISK = "bare_metal_server_disk"; } + @SerializedName("allowed_use") + protected BareMetalServerDiskAllowedUse allowedUse; @SerializedName("created_at") protected Date createdAt; protected String href; @@ -62,6 +64,21 @@ public interface ResourceType { protected BareMetalServerDisk() { } + /** + * Gets the allowedUse. + * + * The usage constraints to be matched against the requested bare metal server + * properties to determine compatibility. + * + * Only present for disks which are referenced in a bare metal server's `boot_target` + * property. The value of this property will be inherited from the source image at creation. + * + * @return the allowedUse + */ + public BareMetalServerDiskAllowedUse getAllowedUse() { + return allowedUse; + } + /** * Gets the createdAt. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskAllowedUse.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskAllowedUse.java new file mode 100644 index 0000000000..85b19db86f --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskAllowedUse.java @@ -0,0 +1,62 @@ +/* + * (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.is.vpc.v1.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * BareMetalServerDiskAllowedUse. + */ +public class BareMetalServerDiskAllowedUse extends GenericModel { + + @SerializedName("api_version") + protected String apiVersion; + @SerializedName("bare_metal_server") + protected String bareMetalServer; + + protected BareMetalServerDiskAllowedUse() { } + + /** + * Gets the apiVersion. + * + * The API version with which to evaluate the expressions. + * + * If specified, the value must be between `2019-01-01` and today's date (in UTC). If unspecified, the `version` query + * parameter value will be used. + * + * @return the apiVersion + */ + public String getApiVersion() { + return apiVersion; + } + + /** + * Gets the bareMetalServer. + * + * The expression that must be satisfied by the properties of a bare metal server provisioned using the image data in + * this disk. + * + * The expression follows [Common Expression Language](https://github.com/google/cel-spec/blob/master/doc/langdef.md), + * but does not support built-in functions and macros. In addition, the following variable is supported, corresponding + * to the `BareMetalServer` property: + * - `enable_secure_boot` (boolean): Indicates whether secure boot is enabled. + * + * @return the bareMetalServer + */ + public String getBareMetalServer() { + return bareMetalServer; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskCollection.java index 97614861d0..c6beaba3cd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskPatch.java index 1c8e06b855..bcec23582b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerFirmware.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerFirmware.java index afe45a33bd..b748b7ccbb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerFirmware.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerFirmware.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerHealthReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerHealthReason.java index fa900b6a32..7071e7ed36 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerHealthReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerHealthReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitialization.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitialization.java index f4a65f32bc..c49b4e29fd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitialization.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitialization.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -23,6 +23,8 @@ */ public class BareMetalServerInitialization extends GenericModel { + @SerializedName("default_trusted_profile") + protected BareMetalServerInitializationDefaultTrustedProfile defaultTrustedProfile; protected ImageReference image; protected List keys; @SerializedName("user_accounts") @@ -30,6 +32,18 @@ public class BareMetalServerInitialization extends GenericModel { protected BareMetalServerInitialization() { } + /** + * Gets the defaultTrustedProfile. + * + * The default trusted profile configuration specified at bare metal server + * initialization. If absent, no default trusted profile was specified. + * + * @return the defaultTrustedProfile + */ + public BareMetalServerInitializationDefaultTrustedProfile getDefaultTrustedProfile() { + return defaultTrustedProfile; + } + /** * Gets the image. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationDefaultTrustedProfile.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationDefaultTrustedProfile.java new file mode 100644 index 0000000000..6370867cca --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationDefaultTrustedProfile.java @@ -0,0 +1,54 @@ +/* + * (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.is.vpc.v1.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * BareMetalServerInitializationDefaultTrustedProfile. + */ +public class BareMetalServerInitializationDefaultTrustedProfile extends GenericModel { + + @SerializedName("auto_link") + protected Boolean autoLink; + protected TrustedProfileReference target; + + protected BareMetalServerInitializationDefaultTrustedProfile() { } + + /** + * Gets the autoLink. + * + * If set to `true`, the system created a link to the specified `target` trusted profile during server initialization. + * Regardless of whether a link was created by the system or manually using the IAM Identity service, the link will be + * automatically deleted when the server is deleted. + * + * @return the autoLink + */ + public Boolean isAutoLink() { + return autoLink; + } + + /** + * Gets the target. + * + * The default IAM trusted profile to use for this bare metal server. + * + * @return the target + */ + public TrustedProfileReference getTarget() { + return target; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationDefaultTrustedProfilePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationDefaultTrustedProfilePrototype.java new file mode 100644 index 0000000000..cf2b5a9abc --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationDefaultTrustedProfilePrototype.java @@ -0,0 +1,134 @@ +/* + * (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.is.vpc.v1.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * BareMetalServerInitializationDefaultTrustedProfilePrototype. + */ +public class BareMetalServerInitializationDefaultTrustedProfilePrototype extends GenericModel { + + @SerializedName("auto_link") + protected Boolean autoLink; + protected TrustedProfileIdentity target; + + /** + * Builder. + */ + public static class Builder { + private Boolean autoLink; + private TrustedProfileIdentity target; + + /** + * Instantiates a new Builder from an existing BareMetalServerInitializationDefaultTrustedProfilePrototype instance. + * + * @param bareMetalServerInitializationDefaultTrustedProfilePrototype the instance to initialize the Builder with + */ + private Builder(BareMetalServerInitializationDefaultTrustedProfilePrototype bareMetalServerInitializationDefaultTrustedProfilePrototype) { + this.autoLink = bareMetalServerInitializationDefaultTrustedProfilePrototype.autoLink; + this.target = bareMetalServerInitializationDefaultTrustedProfilePrototype.target; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Instantiates a new builder with required properties. + * + * @param target the target + */ + public Builder(TrustedProfileIdentity target) { + this.target = target; + } + + /** + * Builds a BareMetalServerInitializationDefaultTrustedProfilePrototype. + * + * @return the new BareMetalServerInitializationDefaultTrustedProfilePrototype instance + */ + public BareMetalServerInitializationDefaultTrustedProfilePrototype build() { + return new BareMetalServerInitializationDefaultTrustedProfilePrototype(this); + } + + /** + * Set the autoLink. + * + * @param autoLink the autoLink + * @return the BareMetalServerInitializationDefaultTrustedProfilePrototype builder + */ + public Builder autoLink(Boolean autoLink) { + this.autoLink = autoLink; + return this; + } + + /** + * Set the target. + * + * @param target the target + * @return the BareMetalServerInitializationDefaultTrustedProfilePrototype builder + */ + public Builder target(TrustedProfileIdentity target) { + this.target = target; + return this; + } + } + + protected BareMetalServerInitializationDefaultTrustedProfilePrototype() { } + + protected BareMetalServerInitializationDefaultTrustedProfilePrototype(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.target, + "target cannot be null"); + autoLink = builder.autoLink; + target = builder.target; + } + + /** + * New builder. + * + * @return a BareMetalServerInitializationDefaultTrustedProfilePrototype builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the autoLink. + * + * If set to `true`, the system will create a link to the specified `target` trusted profile during server creation. + * Regardless of whether a link is created by the system or manually using the IAM Identity service, it will be + * automatically deleted when the server is deleted. + * + * @return the autoLink + */ + public Boolean autoLink() { + return autoLink; + } + + /** + * Gets the target. + * + * The default IAM trusted profile to use for this bare metal server. + * + * @return the target + */ + public TrustedProfileIdentity target() { + return target; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationPrototype.java index e86e3c860b..33a91bcdab 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -24,6 +24,8 @@ */ public class BareMetalServerInitializationPrototype extends GenericModel { + @SerializedName("default_trusted_profile") + protected BareMetalServerInitializationDefaultTrustedProfilePrototype defaultTrustedProfile; protected ImageIdentity image; protected List keys; @SerializedName("user_data") @@ -33,6 +35,7 @@ public class BareMetalServerInitializationPrototype extends GenericModel { * Builder. */ public static class Builder { + private BareMetalServerInitializationDefaultTrustedProfilePrototype defaultTrustedProfile; private ImageIdentity image; private List keys; private String userData; @@ -43,6 +46,7 @@ public static class Builder { * @param bareMetalServerInitializationPrototype the instance to initialize the Builder with */ private Builder(BareMetalServerInitializationPrototype bareMetalServerInitializationPrototype) { + this.defaultTrustedProfile = bareMetalServerInitializationPrototype.defaultTrustedProfile; this.image = bareMetalServerInitializationPrototype.image; this.keys = bareMetalServerInitializationPrototype.keys; this.userData = bareMetalServerInitializationPrototype.userData; @@ -90,6 +94,17 @@ public Builder addKeys(KeyIdentity keys) { return this; } + /** + * Set the defaultTrustedProfile. + * + * @param defaultTrustedProfile the defaultTrustedProfile + * @return the BareMetalServerInitializationPrototype builder + */ + public Builder defaultTrustedProfile(BareMetalServerInitializationDefaultTrustedProfilePrototype defaultTrustedProfile) { + this.defaultTrustedProfile = defaultTrustedProfile; + return this; + } + /** * Set the image. * @@ -132,6 +147,7 @@ protected BareMetalServerInitializationPrototype(Builder builder) { "image cannot be null"); com.ibm.cloud.sdk.core.util.Validator.notNull(builder.keys, "keys cannot be null"); + defaultTrustedProfile = builder.defaultTrustedProfile; image = builder.image; keys = builder.keys; userData = builder.userData; @@ -146,6 +162,19 @@ public Builder newBuilder() { return new Builder(this); } + /** + * Gets the defaultTrustedProfile. + * + * The default trusted profile to be used when initializing the bare metal server. + * + * If unspecified, no default trusted profile will be made available. + * + * @return the defaultTrustedProfile + */ + public BareMetalServerInitializationDefaultTrustedProfilePrototype defaultTrustedProfile() { + return defaultTrustedProfile; + } + /** * Gets the image. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationUserAccount.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationUserAccount.java index 4d92fb9c13..d51efcd1aa 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationUserAccount.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationUserAccount.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount.java index 28723c21d3..810c1a54af 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerLifecycleReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerLifecycleReason.java index 0723580180..d09d65517f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerLifecycleReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerLifecycleReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerMetadataService.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerMetadataService.java new file mode 100644 index 0000000000..66310829cf --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerMetadataService.java @@ -0,0 +1,66 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * The metadata service configuration for the bare metal server. + */ +public class BareMetalServerMetadataService extends GenericModel { + + /** + * The communication protocol to use for the metadata service endpoint. Applies only when the metadata service is + * enabled. + * - `http`: HTTP protocol (unencrypted) + * - `https`: HTTP Secure protocol. + */ + public interface Protocol { + /** http. */ + String HTTP = "http"; + /** https. */ + String HTTPS = "https"; + } + + protected Boolean enabled; + protected String protocol; + + protected BareMetalServerMetadataService() { } + + /** + * Gets the enabled. + * + * Indicates whether the metadata service endpoint is available to the bare metal server. + * + * @return the enabled + */ + public Boolean isEnabled() { + return enabled; + } + + /** + * Gets the protocol. + * + * The communication protocol to use for the metadata service endpoint. Applies only when the metadata service is + * enabled. + * - `http`: HTTP protocol (unencrypted) + * - `https`: HTTP Secure protocol. + * + * @return the protocol + */ + public String getProtocol() { + return protocol; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerMetadataServicePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerMetadataServicePatch.java new file mode 100644 index 0000000000..5e154fff5f --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerMetadataServicePatch.java @@ -0,0 +1,135 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * The metadata service configuration for the bare metal server. + */ +public class BareMetalServerMetadataServicePatch extends GenericModel { + + /** + * The communication protocol to use for the metadata service endpoint. Applies only when the metadata service is + * enabled. + * - `http`: HTTP protocol (unencrypted) + * - `https`: HTTP Secure protocol. + */ + public interface Protocol { + /** http. */ + String HTTP = "http"; + /** https. */ + String HTTPS = "https"; + } + + protected Boolean enabled; + protected String protocol; + + /** + * Builder. + */ + public static class Builder { + private Boolean enabled; + private String protocol; + + /** + * Instantiates a new Builder from an existing BareMetalServerMetadataServicePatch instance. + * + * @param bareMetalServerMetadataServicePatch the instance to initialize the Builder with + */ + private Builder(BareMetalServerMetadataServicePatch bareMetalServerMetadataServicePatch) { + this.enabled = bareMetalServerMetadataServicePatch.enabled; + this.protocol = bareMetalServerMetadataServicePatch.protocol; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Builds a BareMetalServerMetadataServicePatch. + * + * @return the new BareMetalServerMetadataServicePatch instance + */ + public BareMetalServerMetadataServicePatch build() { + return new BareMetalServerMetadataServicePatch(this); + } + + /** + * Set the enabled. + * + * @param enabled the enabled + * @return the BareMetalServerMetadataServicePatch builder + */ + public Builder enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Set the protocol. + * + * @param protocol the protocol + * @return the BareMetalServerMetadataServicePatch builder + */ + public Builder protocol(String protocol) { + this.protocol = protocol; + return this; + } + } + + protected BareMetalServerMetadataServicePatch() { } + + protected BareMetalServerMetadataServicePatch(Builder builder) { + enabled = builder.enabled; + protocol = builder.protocol; + } + + /** + * New builder. + * + * @return a BareMetalServerMetadataServicePatch builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the enabled. + * + * Indicates whether the metadata service endpoint will be available to the bare metal server. + * + * @return the enabled + */ + public Boolean enabled() { + return enabled; + } + + /** + * Gets the protocol. + * + * The communication protocol to use for the metadata service endpoint. Applies only when the metadata service is + * enabled. + * - `http`: HTTP protocol (unencrypted) + * - `https`: HTTP Secure protocol. + * + * @return the protocol + */ + public String protocol() { + return protocol; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerMetadataServicePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerMetadataServicePrototype.java new file mode 100644 index 0000000000..c401009aa1 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerMetadataServicePrototype.java @@ -0,0 +1,135 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * The metadata service configuration for the bare metal server. + */ +public class BareMetalServerMetadataServicePrototype extends GenericModel { + + /** + * The communication protocol to use for the metadata service endpoint. Applies only when the metadata service is + * enabled. + * - `http`: HTTP protocol (unencrypted) + * - `https`: HTTP Secure protocol. + */ + public interface Protocol { + /** http. */ + String HTTP = "http"; + /** https. */ + String HTTPS = "https"; + } + + protected Boolean enabled; + protected String protocol; + + /** + * Builder. + */ + public static class Builder { + private Boolean enabled; + private String protocol; + + /** + * Instantiates a new Builder from an existing BareMetalServerMetadataServicePrototype instance. + * + * @param bareMetalServerMetadataServicePrototype the instance to initialize the Builder with + */ + private Builder(BareMetalServerMetadataServicePrototype bareMetalServerMetadataServicePrototype) { + this.enabled = bareMetalServerMetadataServicePrototype.enabled; + this.protocol = bareMetalServerMetadataServicePrototype.protocol; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Builds a BareMetalServerMetadataServicePrototype. + * + * @return the new BareMetalServerMetadataServicePrototype instance + */ + public BareMetalServerMetadataServicePrototype build() { + return new BareMetalServerMetadataServicePrototype(this); + } + + /** + * Set the enabled. + * + * @param enabled the enabled + * @return the BareMetalServerMetadataServicePrototype builder + */ + public Builder enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Set the protocol. + * + * @param protocol the protocol + * @return the BareMetalServerMetadataServicePrototype builder + */ + public Builder protocol(String protocol) { + this.protocol = protocol; + return this; + } + } + + protected BareMetalServerMetadataServicePrototype() { } + + protected BareMetalServerMetadataServicePrototype(Builder builder) { + enabled = builder.enabled; + protocol = builder.protocol; + } + + /** + * New builder. + * + * @return a BareMetalServerMetadataServicePrototype builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the enabled. + * + * Indicates whether the metadata service endpoint will be available to the bare metal server. + * + * @return the enabled + */ + public Boolean enabled() { + return enabled; + } + + /** + * Gets the protocol. + * + * The communication protocol to use for the metadata service endpoint. Applies only when the metadata service is + * enabled. + * - `http`: HTTP protocol (unencrypted) + * - `https`: HTTP Secure protocol. + * + * @return the protocol + */ + public String protocol() { + return protocol; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachment.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachment.java index 0a2d69d8da..32eb4a5a1b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachment.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentByPCI.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentByPCI.java index cea2a8e100..6c59435fb5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentByPCI.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentByPCI.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentByVLAN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentByVLAN.java index 2d6d74f584..887c6d6699 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentByVLAN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentByVLAN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentCollection.java index 189ff47c1f..8e21e7b7f6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPatch.java index 7c5a7399fc..7946e00b94 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototype.java index 366aae6321..84c956c9dd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype.java index 248ccd496d..c665fd5b61 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype.java index c933579569..549bb3ac8f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface.java index b3a0699ec6..86764d0713 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity.java index 0c239c6ca5..fd51adc7e9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java index e603f90ac4..53e1ab30cc 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java index 6a3c8ca4bc..d45c801853 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java index 244765737d..cc45da0a9e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext.java index 9be3262b1f..6a83d2aff0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentReference.java index a1174347a0..4897357b14 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentsPager.java index c26ad4ee68..e3a2ac32d6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterface.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterface.java index 6d791dbddc..11228af6c9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterface.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterface.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceByHiperSocket.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceByHiperSocket.java index b7a7a679b2..2855a83e22 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceByHiperSocket.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceByHiperSocket.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceByPCI.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceByPCI.java index 96c4320de9..f513c6d709 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceByPCI.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceByPCI.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceByVLAN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceByVLAN.java index ed1dadada9..1352716a38 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceByVLAN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceByVLAN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceCollection.java index 1b947530d6..adb335538b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePatch.java index 139cd5031e..b7f43db4a2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototype.java index 3bf50ec3c2..f1fef09916 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype.java index 43f0ac883d..064c586ce8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype.java index 66c0214a16..459649fcd9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype.java index 563b3f4ee6..e4f9c4cee7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacesPager.java index ebe661ae29..d3790c9f60 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacesPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacesPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPatch.java index 47d70351f2..30cb65edad 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -27,6 +27,8 @@ public class BareMetalServerPatch extends GenericModel { protected Long bandwidth; @SerializedName("enable_secure_boot") protected Boolean enableSecureBoot; + @SerializedName("metadata_service") + protected BareMetalServerMetadataServicePatch metadataService; protected String name; @SerializedName("reservation_affinity") protected BareMetalServerReservationAffinityPatch reservationAffinity; @@ -39,6 +41,7 @@ public class BareMetalServerPatch extends GenericModel { public static class Builder { private Long bandwidth; private Boolean enableSecureBoot; + private BareMetalServerMetadataServicePatch metadataService; private String name; private BareMetalServerReservationAffinityPatch reservationAffinity; private BareMetalServerTrustedPlatformModulePatch trustedPlatformModule; @@ -51,6 +54,7 @@ public static class Builder { private Builder(BareMetalServerPatch bareMetalServerPatch) { this.bandwidth = bareMetalServerPatch.bandwidth; this.enableSecureBoot = bareMetalServerPatch.enableSecureBoot; + this.metadataService = bareMetalServerPatch.metadataService; this.name = bareMetalServerPatch.name; this.reservationAffinity = bareMetalServerPatch.reservationAffinity; this.trustedPlatformModule = bareMetalServerPatch.trustedPlatformModule; @@ -93,6 +97,17 @@ public Builder enableSecureBoot(Boolean enableSecureBoot) { return this; } + /** + * Set the metadataService. + * + * @param metadataService the metadataService + * @return the BareMetalServerPatch builder + */ + public Builder metadataService(BareMetalServerMetadataServicePatch metadataService) { + this.metadataService = metadataService; + return this; + } + /** * Set the name. * @@ -132,6 +147,7 @@ protected BareMetalServerPatch() { } protected BareMetalServerPatch(Builder builder) { bandwidth = builder.bandwidth; enableSecureBoot = builder.enableSecureBoot; + metadataService = builder.metadataService; name = builder.name; reservationAffinity = builder.reservationAffinity; trustedPlatformModule = builder.trustedPlatformModule; @@ -173,6 +189,17 @@ public Boolean enableSecureBoot() { return enableSecureBoot; } + /** + * Gets the metadataService. + * + * The metadata service configuration for the bare metal server. + * + * @return the metadataService + */ + public BareMetalServerMetadataServicePatch metadataService() { + return metadataService; + } + /** * Gets the name. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrimaryNetworkAttachmentPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrimaryNetworkAttachmentPrototype.java index 2e0c8985e7..3372ebe621 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrimaryNetworkAttachmentPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrimaryNetworkAttachmentPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype.java index ace937ac22..640f7304a4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrimaryNetworkInterfacePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrimaryNetworkInterfacePrototype.java index 40db7e64b9..0d85086cd8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrimaryNetworkInterfacePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrimaryNetworkInterfacePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfile.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfile.java index cd93626ecf..4eea2c5791 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfile.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfile.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidth.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidth.java index c416525bde..eed13d9511 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidth.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidth.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthDependent.java index 986deddbe5..458fa3107d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthEnum.java index 78a4d7c7da..49970d7f30 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthEnum.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthEnum.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthFixed.java index a7a5729f29..8873da5d9c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthRange.java index ae46c8cb72..28570296e8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUArchitecture.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUArchitecture.java index e8929679de..e1a10ace3a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUArchitecture.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUArchitecture.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCount.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCount.java index 4e49e260d2..790557229e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCount.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCount.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountDependent.java index 16bdfc09ae..75fc5416b5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountEnum.java index 8fcef716a1..857b296d94 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountEnum.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountEnum.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountFixed.java index ec3fdd546f..8020b83985 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountRange.java index ad5278e6f5..5ab211a3f6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCount.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCount.java index 97adc194d8..6f0f99a721 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCount.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCount.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountDependent.java index 5c705eec12..5dd4bfdb6e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountEnum.java index c807fb48be..891e1a658f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountEnum.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountEnum.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountFixed.java index 066013d7e0..d595f14ab8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountRange.java index 962a791e13..2eca51835f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCollection.java index fdf81360a1..a17d3bbc69 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileConsoleTypes.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileConsoleTypes.java index 3fadb7510f..79387954d7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileConsoleTypes.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileConsoleTypes.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDisk.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDisk.java index 2e1d88cb0e..ee8ccc45b4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDisk.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDisk.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantity.java index 7125cc221c..5453fe84ee 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityDependent.java index d3acdb78a6..d3246cee07 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityEnum.java index a4b555aa4b..24c524b06a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityEnum.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityEnum.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityFixed.java index 77ce4f97e6..5dd5185ade 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityRange.java index e073407130..34b92de962 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSize.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSize.java index 2a3353d7f0..01f4ce033c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSize.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSize.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeDependent.java index 286f3ffa7f..e32f3bb781 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeEnum.java index 93fbbf0918..264ac50968 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeEnum.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeEnum.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeFixed.java index 96115df07a..2225f83515 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeRange.java index b8e76ab791..c3b1f380ba 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSupportedInterfaces.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSupportedInterfaces.java index addbda6695..298d3a2f76 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSupportedInterfaces.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSupportedInterfaces.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileIdentity.java index a7592a51c6..6b8598f5ce 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileIdentityByHref.java index b31c794617..d6bcd1783f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileIdentityByName.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileIdentityByName.java index 71a0abd924..6af0bbc2c4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileIdentityByName.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileIdentityByName.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemory.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemory.java index 9d611ed165..1292c10baf 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemory.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemory.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryDependent.java index 94f8805067..e0c007e928 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryEnum.java index 3fb94e5481..b0054598be 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryEnum.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryEnum.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryFixed.java index 6c8c2bc9fd..94eb0fe4d3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryRange.java index a62a2b8618..f028f68474 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkAttachmentCount.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkAttachmentCount.java index 1827737883..41046ff7c5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkAttachmentCount.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkAttachmentCount.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkAttachmentCountDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkAttachmentCountDependent.java index a962592e71..8b7e4f79ac 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkAttachmentCountDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkAttachmentCountDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkAttachmentCountRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkAttachmentCountRange.java index 596403190f..ddc9f447a0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkAttachmentCountRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkAttachmentCountRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkInterfaceCount.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkInterfaceCount.java index fd3a5de0bc..68ec33f4c3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkInterfaceCount.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkInterfaceCount.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkInterfaceCountDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkInterfaceCountDependent.java index dc9074c345..b0e826048b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkInterfaceCountDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkInterfaceCountDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkInterfaceCountRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkInterfaceCountRange.java index 516d2cff9c..2185475b48 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkInterfaceCountRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkInterfaceCountRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileOSArchitecture.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileOSArchitecture.java index 4f49f53c37..5756f806c8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileOSArchitecture.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileOSArchitecture.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileReference.java index 135fa34f43..9453614178 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileReservationTerms.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileReservationTerms.java index 8ff20db6d7..93ce2de8f6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileReservationTerms.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileReservationTerms.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileSupportedTrustedPlatformModuleModes.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileSupportedTrustedPlatformModuleModes.java index a720bf2b5a..eac863940b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileSupportedTrustedPlatformModuleModes.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileSupportedTrustedPlatformModuleModes.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileVirtualNetworkInterfacesSupported.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileVirtualNetworkInterfacesSupported.java index 65fae9939e..650fbaef8d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileVirtualNetworkInterfacesSupported.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileVirtualNetworkInterfacesSupported.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfilesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfilesPager.java index 6fed1fbb48..4acbaa6b7b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfilesPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfilesPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrototype.java index 7f7c37ef52..1f6ae8cdb5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -31,6 +31,8 @@ public class BareMetalServerPrototype extends GenericModel { @SerializedName("enable_secure_boot") protected Boolean enableSecureBoot; protected BareMetalServerInitializationPrototype initialization; + @SerializedName("metadata_service") + protected BareMetalServerMetadataServicePrototype metadataService; protected String name; protected BareMetalServerProfileIdentity profile; @SerializedName("reservation_affinity") @@ -86,6 +88,17 @@ public BareMetalServerInitializationPrototype initialization() { return initialization; } + /** + * Gets the metadataService. + * + * The metadata service configuration for the bare metal server. + * + * @return the metadataService + */ + public BareMetalServerMetadataServicePrototype metadataService() { + return metadataService; + } + /** * Gets the name. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrototypeBareMetalServerByNetworkAttachment.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrototypeBareMetalServerByNetworkAttachment.java index 7abe41d6e6..9e0ee74daf 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrototypeBareMetalServerByNetworkAttachment.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrototypeBareMetalServerByNetworkAttachment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -29,6 +29,7 @@ public static class Builder { private Long bandwidth; private Boolean enableSecureBoot; private BareMetalServerInitializationPrototype initialization; + private BareMetalServerMetadataServicePrototype metadataService; private String name; private BareMetalServerProfileIdentity profile; private BareMetalServerReservationAffinityPrototype reservationAffinity; @@ -48,6 +49,7 @@ public Builder(BareMetalServerPrototype bareMetalServerPrototypeBareMetalServerB this.bandwidth = bareMetalServerPrototypeBareMetalServerByNetworkAttachment.bandwidth; this.enableSecureBoot = bareMetalServerPrototypeBareMetalServerByNetworkAttachment.enableSecureBoot; this.initialization = bareMetalServerPrototypeBareMetalServerByNetworkAttachment.initialization; + this.metadataService = bareMetalServerPrototypeBareMetalServerByNetworkAttachment.metadataService; this.name = bareMetalServerPrototypeBareMetalServerByNetworkAttachment.name; this.profile = bareMetalServerPrototypeBareMetalServerByNetworkAttachment.profile; this.reservationAffinity = bareMetalServerPrototypeBareMetalServerByNetworkAttachment.reservationAffinity; @@ -138,6 +140,17 @@ public Builder initialization(BareMetalServerInitializationPrototype initializat return this; } + /** + * Set the metadataService. + * + * @param metadataService the metadataService + * @return the BareMetalServerPrototypeBareMetalServerByNetworkAttachment builder + */ + public Builder metadataService(BareMetalServerMetadataServicePrototype metadataService) { + this.metadataService = metadataService; + return this; + } + /** * Set the name. * @@ -253,6 +266,7 @@ protected BareMetalServerPrototypeBareMetalServerByNetworkAttachment(Builder bui bandwidth = builder.bandwidth; enableSecureBoot = builder.enableSecureBoot; initialization = builder.initialization; + metadataService = builder.metadataService; name = builder.name; profile = builder.profile; reservationAffinity = builder.reservationAffinity; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrototypeBareMetalServerByNetworkInterface.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrototypeBareMetalServerByNetworkInterface.java index 0b5ae9d549..16694bbdf7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrototypeBareMetalServerByNetworkInterface.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrototypeBareMetalServerByNetworkInterface.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -29,6 +29,7 @@ public static class Builder { private Long bandwidth; private Boolean enableSecureBoot; private BareMetalServerInitializationPrototype initialization; + private BareMetalServerMetadataServicePrototype metadataService; private String name; private BareMetalServerProfileIdentity profile; private BareMetalServerReservationAffinityPrototype reservationAffinity; @@ -48,6 +49,7 @@ public Builder(BareMetalServerPrototype bareMetalServerPrototypeBareMetalServerB this.bandwidth = bareMetalServerPrototypeBareMetalServerByNetworkInterface.bandwidth; this.enableSecureBoot = bareMetalServerPrototypeBareMetalServerByNetworkInterface.enableSecureBoot; this.initialization = bareMetalServerPrototypeBareMetalServerByNetworkInterface.initialization; + this.metadataService = bareMetalServerPrototypeBareMetalServerByNetworkInterface.metadataService; this.name = bareMetalServerPrototypeBareMetalServerByNetworkInterface.name; this.profile = bareMetalServerPrototypeBareMetalServerByNetworkInterface.profile; this.reservationAffinity = bareMetalServerPrototypeBareMetalServerByNetworkInterface.reservationAffinity; @@ -138,6 +140,17 @@ public Builder initialization(BareMetalServerInitializationPrototype initializat return this; } + /** + * Set the metadataService. + * + * @param metadataService the metadataService + * @return the BareMetalServerPrototypeBareMetalServerByNetworkInterface builder + */ + public Builder metadataService(BareMetalServerMetadataServicePrototype metadataService) { + this.metadataService = metadataService; + return this; + } + /** * Set the name. * @@ -253,6 +266,7 @@ protected BareMetalServerPrototypeBareMetalServerByNetworkInterface(Builder buil bandwidth = builder.bandwidth; enableSecureBoot = builder.enableSecureBoot; initialization = builder.initialization; + metadataService = builder.metadataService; name = builder.name; profile = builder.profile; reservationAffinity = builder.reservationAffinity; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerReservationAffinity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerReservationAffinity.java index f3841aba95..68044a3d5c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerReservationAffinity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerReservationAffinity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerReservationAffinityPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerReservationAffinityPatch.java index 750826426c..dc30115a66 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerReservationAffinityPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerReservationAffinityPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerReservationAffinityPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerReservationAffinityPrototype.java index ed9613c728..a06f3b5b3d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerReservationAffinityPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerReservationAffinityPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerStatusReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerStatusReason.java index 090270979b..ccb738bff2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerStatusReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerStatusReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTrustedPlatformModule.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTrustedPlatformModule.java index 7741bb5810..41aab2f0a1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTrustedPlatformModule.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTrustedPlatformModule.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTrustedPlatformModulePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTrustedPlatformModulePatch.java index 10a3c3fb6f..c46b7812bc 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTrustedPlatformModulePatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTrustedPlatformModulePatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTrustedPlatformModulePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTrustedPlatformModulePrototype.java index e83caf9928..aa3adac368 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTrustedPlatformModulePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTrustedPlatformModulePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServersPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServersPager.java index 522a701688..e5827490d6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServersPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServersPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingIdentity.java index 2df7712c34..d45cdf8309 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingIdentityCatalogOfferingByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingIdentityCatalogOfferingByCRN.java index 95e5b8d46b..d8bd68bf5e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingIdentityCatalogOfferingByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingIdentityCatalogOfferingByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionIdentity.java index 72f7e38850..e3656293cb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN.java index f8d3617820..d986d9be8c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionPlanIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionPlanIdentity.java index 349221a91b..5bb4d9d3a4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionPlanIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionPlanIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN.java index 22a8b84064..804d8232ff 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionPlanReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionPlanReference.java index 751d5ba10e..a0a229d01e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionPlanReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionPlanReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionReference.java index 640d53ec7c..70fc57afdd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CertificateInstanceIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CertificateInstanceIdentity.java index c2f9ae8369..71909f0987 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CertificateInstanceIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CertificateInstanceIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CertificateInstanceIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CertificateInstanceIdentityByCRN.java index c3f922267d..12ba576cf0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CertificateInstanceIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CertificateInstanceIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CertificateInstanceReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CertificateInstanceReference.java index 67c3b6e9cf..41300e96e1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CertificateInstanceReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CertificateInstanceReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CheckVpnGatewayAdvertisedCidrOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CheckVpnGatewayAdvertisedCidrOptions.java new file mode 100644 index 0000000000..e5f55903b7 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CheckVpnGatewayAdvertisedCidrOptions.java @@ -0,0 +1,134 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * The checkVpnGatewayAdvertisedCidr options. + */ +public class CheckVpnGatewayAdvertisedCidrOptions extends GenericModel { + + protected String vpnGatewayId; + protected String cidr; + + /** + * Builder. + */ + public static class Builder { + private String vpnGatewayId; + private String cidr; + + /** + * Instantiates a new Builder from an existing CheckVpnGatewayAdvertisedCidrOptions instance. + * + * @param checkVpnGatewayAdvertisedCidrOptions the instance to initialize the Builder with + */ + private Builder(CheckVpnGatewayAdvertisedCidrOptions checkVpnGatewayAdvertisedCidrOptions) { + this.vpnGatewayId = checkVpnGatewayAdvertisedCidrOptions.vpnGatewayId; + this.cidr = checkVpnGatewayAdvertisedCidrOptions.cidr; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Instantiates a new builder with required properties. + * + * @param vpnGatewayId the vpnGatewayId + * @param cidr the cidr + */ + public Builder(String vpnGatewayId, String cidr) { + this.vpnGatewayId = vpnGatewayId; + this.cidr = cidr; + } + + /** + * Builds a CheckVpnGatewayAdvertisedCidrOptions. + * + * @return the new CheckVpnGatewayAdvertisedCidrOptions instance + */ + public CheckVpnGatewayAdvertisedCidrOptions build() { + return new CheckVpnGatewayAdvertisedCidrOptions(this); + } + + /** + * Set the vpnGatewayId. + * + * @param vpnGatewayId the vpnGatewayId + * @return the CheckVpnGatewayAdvertisedCidrOptions builder + */ + public Builder vpnGatewayId(String vpnGatewayId) { + this.vpnGatewayId = vpnGatewayId; + return this; + } + + /** + * Set the cidr. + * + * @param cidr the cidr + * @return the CheckVpnGatewayAdvertisedCidrOptions builder + */ + public Builder cidr(String cidr) { + this.cidr = cidr; + return this; + } + } + + protected CheckVpnGatewayAdvertisedCidrOptions() { } + + protected CheckVpnGatewayAdvertisedCidrOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.vpnGatewayId, + "vpnGatewayId cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.cidr, + "cidr cannot be empty"); + vpnGatewayId = builder.vpnGatewayId; + cidr = builder.cidr; + } + + /** + * New builder. + * + * @return a CheckVpnGatewayAdvertisedCidrOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the vpnGatewayId. + * + * The VPN gateway identifier. + * + * @return the vpnGatewayId + */ + public String vpnGatewayId() { + return vpnGatewayId; + } + + /** + * Gets the cidr. + * + * The IP address range in CIDR block notation. + * + * @return the cidr + */ + public String cidr() { + return cidr; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CheckVpnGatewayConnectionsLocalCidrOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CheckVpnGatewayConnectionsLocalCidrOptions.java index 73dcba7865..373757d3e4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CheckVpnGatewayConnectionsLocalCidrOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CheckVpnGatewayConnectionsLocalCidrOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CheckVpnGatewayConnectionsPeerCidrOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CheckVpnGatewayConnectionsPeerCidrOptions.java index c239e23a27..2ac3ff36e7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CheckVpnGatewayConnectionsPeerCidrOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CheckVpnGatewayConnectionsPeerCidrOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketIdentity.java index 7230af441c..ca03768d22 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketIdentityByCRN.java index 5561c995c5..ad63d95963 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName.java index b450634ddb..6fac355a51 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketReference.java index 2c002b2294..56dffb914d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageObjectReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageObjectReference.java index 00156b449a..ba25f46329 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageObjectReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageObjectReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetwork.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetwork.java index c0d08278e7..7601d80f66 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetwork.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetwork.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkCollection.java index 3970812f32..ab7e52b549 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterface.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterface.java index 1656e3de5e..ea3e5d4f6d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterface.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterface.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceCollection.java index 922ac61941..4c44684112 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceLifecycleReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceLifecycleReason.java index 3b972a85ed..173c3825ae 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceLifecycleReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceLifecycleReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePatch.java index 26971f4c35..6a7fc1389e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototype.java index c922971ce1..38a0d78a19 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContext.java index 47593c6166..beea502db5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref.java index ba3b11fc01..cdccb20200 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById.java index 7c04a16497..6304505802 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext.java index 064c5f1654..c467a8e0e4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceReference.java index 2e4ef82a15..8180fa2f30 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceTarget.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceTarget.java index 90f5f57abd..b51e1abea0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceTarget.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceTarget.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext.java index 08d0ec758e..86900d9c3d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacesPager.java index 0b694eda3a..c16c8e65c7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacesPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacesPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkLifecycleReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkLifecycleReason.java index 5ec6627825..6408ae0f97 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkLifecycleReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkLifecycleReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkPatch.java index 1c71dcd3df..e88b68aa14 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfile.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfile.java index 27da9511fb..c3c236110f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfile.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfile.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileCollection.java index a0a6bfae30..6dd9bc9334 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileIdentity.java index 872976318e..92c4f84a3d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileIdentityByHref.java index 079e74eada..73d05783e6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileIdentityByName.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileIdentityByName.java index 5a0aa986a2..d330c6f712 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileIdentityByName.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileIdentityByName.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileReference.java index 4faa7d7163..4ef5d8408e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfilesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfilesPager.java index b3b60be7c1..0558eccdb0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfilesPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfilesPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkReference.java index 450e561ede..86e38cc9ff 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnet.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnet.java index b69648e7df..34df75eb43 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnet.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnet.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetCollection.java index cf6f8bd4d6..3453a97981 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetIdentity.java index 8998ec725b..2b17f1781d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetIdentityByHref.java index 69a0248e3a..66db194011 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetIdentityById.java index dea94a91c4..bae538ca19 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetLifecycleReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetLifecycleReason.java index 03bbb3d570..75d4dd5e59 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetLifecycleReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetLifecycleReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPatch.java index 9fa852d732..a47af2323d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrefix.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrefix.java index 96a3be6264..666fc5506a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrefix.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrefix.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrefixPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrefixPrototype.java index 9fdbcc62c1..fe6903b43a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrefixPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrefixPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrototype.java index e6c3c3aed1..2f9edc9be2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrototypeClusterNetworkSubnetByIPv4CIDRBlockPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrototypeClusterNetworkSubnetByIPv4CIDRBlockPrototype.java index ce3c2c7176..a70f9c1532 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrototypeClusterNetworkSubnetByIPv4CIDRBlockPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrototypeClusterNetworkSubnetByIPv4CIDRBlockPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype.java index cd5412f169..c95b58866d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReference.java index db007f98f4..464b13cab0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIP.java index 716a83f723..7d39fc887e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPCollection.java index 273a34b3db..f87223b381 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPLifecycleReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPLifecycleReason.java index e41370b6c1..f5ddd7f280 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPLifecycleReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPLifecycleReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPPatch.java index b4916232c4..55b8eb684c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPReference.java index 6b1c0b706f..3e87e0190f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPTarget.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPTarget.java index 00cd3bb8b8..8f028a7f12 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPTarget.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPTarget.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext.java index 5e50073a2e..a00dbd59ac 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIpsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIpsPager.java index 41214c56c4..ff6d8a4337 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIpsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIpsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetsPager.java index 0482b8e70a..f0d09e212b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworksPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworksPager.java index 11dcdde9e4..7118afdfa6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworksPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworksPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateBackupPolicyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateBackupPolicyOptions.java index 41000b49df..9b3819e3dd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateBackupPolicyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateBackupPolicyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateBackupPolicyPlanOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateBackupPolicyPlanOptions.java index 945466105d..bd7c92c437 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateBackupPolicyPlanOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateBackupPolicyPlanOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerConsoleAccessTokenOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerConsoleAccessTokenOptions.java index 7ba0130f5c..68ecb6f2e5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerConsoleAccessTokenOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerConsoleAccessTokenOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerNetworkAttachmentOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerNetworkAttachmentOptions.java index 7974eec560..359f3c5c1f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerNetworkAttachmentOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerNetworkAttachmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerNetworkInterfaceOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerNetworkInterfaceOptions.java index f6f8290f2d..2418618f22 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerNetworkInterfaceOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerNetworkInterfaceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerOptions.java index e2c1d31aba..3f8534348e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkAttachmentOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkAttachmentOptions.java index 0fa33220f1..201e427be4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkAttachmentOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkAttachmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkInterfaceOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkInterfaceOptions.java index 72f05b13e3..1d30998cf6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkInterfaceOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkInterfaceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkOptions.java index c9ee54905b..451fac9de3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkSubnetOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkSubnetOptions.java index ecbe55ad72..93d7157156 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkSubnetOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkSubnetOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkSubnetReservedIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkSubnetReservedIpOptions.java index 73639dd19e..64253ec6ee 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkSubnetReservedIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkSubnetReservedIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateDedicatedHostGroupOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateDedicatedHostGroupOptions.java index a62521f16f..4068095fe4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateDedicatedHostGroupOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateDedicatedHostGroupOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateDedicatedHostOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateDedicatedHostOptions.java index f27e22a997..8edefb6f8b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateDedicatedHostOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateDedicatedHostOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateEndpointGatewayOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateEndpointGatewayOptions.java index 834246f2ad..1a0ea7e2bd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateEndpointGatewayOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateEndpointGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -226,11 +226,11 @@ public Builder newBuilder() { * * The target to use for this endpoint gateway. The target: * - Must not already be the target of another endpoint gateway in the VPC - * - Must not have a service endpoint that overlaps with any `service_endpoints` of another - * endpoint gateway in the VPC. + * - Must not have a service endpoint that overlaps with any `service_endpoints` of + * another endpoint gateway in the VPC. * - * If `allow_dns_resolution_binding` is `true`, then there must not be another endpoint gateway - * with `allow_dns_resolution_binding` set to `true` in the [DNS + * If `allow_dns_resolution_binding` is `true`, then there must not be another endpoint + * gateway with `allow_dns_resolution_binding` set to `true` in the [DNS * sharing](/docs/vpc?topic=vpc-vpe-dns-sharing) connected topology that: * - Has the same `target` as this endpoint gateway * - Has `service_endpoints` that overlap with the `service_endpoints` for this endpoint diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateFloatingIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateFloatingIpOptions.java index d73a08561c..2dc577d668 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateFloatingIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateFloatingIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateFlowLogCollectorOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateFlowLogCollectorOptions.java index c9fd2ed484..03800da708 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateFlowLogCollectorOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateFlowLogCollectorOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateIkePolicyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateIkePolicyOptions.java index 1ab4a3a10a..94758c11f3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateIkePolicyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateIkePolicyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateImageExportJobOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateImageExportJobOptions.java index c58eefd218..2117e9e2c0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateImageExportJobOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateImageExportJobOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateImageOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateImageOptions.java index f410dab29c..62e553b3f3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateImageOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateImageOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceActionOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceActionOptions.java index 9bcba81faf..9eaae238ba 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceActionOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceActionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceConsoleAccessTokenOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceConsoleAccessTokenOptions.java index 5d52982bee..87ba6c82ad 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceConsoleAccessTokenOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceConsoleAccessTokenOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupManagerActionOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupManagerActionOptions.java index 1e639bd5e7..a638db2ad0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupManagerActionOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupManagerActionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupManagerOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupManagerOptions.java index d0a9cfbf40..756dc31314 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupManagerOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupManagerOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupManagerPolicyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupManagerPolicyOptions.java index 80a6eedf57..163e40bd84 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupManagerPolicyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupManagerPolicyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupOptions.java index 8b044b856b..5e14a275a1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceNetworkAttachmentOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceNetworkAttachmentOptions.java index 1c64e8f54a..faaf4f9cfa 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceNetworkAttachmentOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceNetworkAttachmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceNetworkInterfaceOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceNetworkInterfaceOptions.java index 774f04ee27..1c00d68d9c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceNetworkInterfaceOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceNetworkInterfaceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -258,10 +258,11 @@ public String name() { * Gets the primaryIp. * * The primary IP address to bind to the instance network interface. This can be - * specified using an existing reserved IP, or a prototype object for a new reserved IP. + * specified using an existing reserved IP, or a prototype object for a new reserved + * IP. * - * If an existing reserved IP or a prototype object with an address is specified, it must - * be available on the instance network interface's subnet. Otherwise, an + * If an existing reserved IP or a prototype object with an address is specified, it + * must be available on the instance network interface's subnet. Otherwise, an * available address on the subnet will be automatically selected and reserved. * * @return the primaryIp diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceOptions.java index 49cb7aeb22..a13a31a6af 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceTemplateOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceTemplateOptions.java index 5997998a5d..c73bc10e46 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceTemplateOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceTemplateOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceVolumeAttachmentOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceVolumeAttachmentOptions.java index 218527a87e..6f0abf043e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceVolumeAttachmentOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceVolumeAttachmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateIpsecPolicyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateIpsecPolicyOptions.java index 7059c58f8d..1e6baf9622 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateIpsecPolicyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateIpsecPolicyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateKeyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateKeyOptions.java index c98dfee4b4..47f56c9934 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateKeyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateKeyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerListenerOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerListenerOptions.java index 006e9c24ad..bcfda6354b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerListenerOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerListenerOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerListenerPolicyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerListenerPolicyOptions.java index 2438e61fd1..8d8f687c00 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerListenerPolicyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerListenerPolicyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerListenerPolicyRuleOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerListenerPolicyRuleOptions.java index 3950279335..38cfb38571 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerListenerPolicyRuleOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerListenerPolicyRuleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerOptions.java index 8818c4eb5f..ee72569c86 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerPoolMemberOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerPoolMemberOptions.java index 17d1aab5ae..5641a2ae08 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerPoolMemberOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerPoolMemberOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerPoolOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerPoolOptions.java index b1deaff5d9..9ef48bb99e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerPoolOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerPoolOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateNetworkAclOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateNetworkAclOptions.java index d5282a825b..4ff33e6979 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateNetworkAclOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateNetworkAclOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateNetworkAclRuleOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateNetworkAclRuleOptions.java index c9f7f76057..c753bb4613 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateNetworkAclRuleOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateNetworkAclRuleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreatePlacementGroupOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreatePlacementGroupOptions.java index 82211d2604..0884b789d9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreatePlacementGroupOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreatePlacementGroupOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreatePrivatePathServiceGatewayAccountPolicyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreatePrivatePathServiceGatewayAccountPolicyOptions.java index 811d144344..c46d447ffc 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreatePrivatePathServiceGatewayAccountPolicyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreatePrivatePathServiceGatewayAccountPolicyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreatePrivatePathServiceGatewayOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreatePrivatePathServiceGatewayOptions.java index dce8e8a3b4..3e2658a17a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreatePrivatePathServiceGatewayOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreatePrivatePathServiceGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreatePublicAddressRangeOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreatePublicAddressRangeOptions.java index 82f8979e13..ea225f088c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreatePublicAddressRangeOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreatePublicAddressRangeOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreatePublicGatewayOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreatePublicGatewayOptions.java index 4589064f48..33e3bba0bb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreatePublicGatewayOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreatePublicGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateReservationOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateReservationOptions.java index 0cfc7d757c..6725eff2b7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateReservationOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateReservationOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSecurityGroupOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSecurityGroupOptions.java index de1c7b575d..8e6f2a2c75 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSecurityGroupOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSecurityGroupOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSecurityGroupRuleOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSecurityGroupRuleOptions.java index b08933c293..71cccee25b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSecurityGroupRuleOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSecurityGroupRuleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSecurityGroupTargetBindingOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSecurityGroupTargetBindingOptions.java index c35fef8ea5..b088d81f42 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSecurityGroupTargetBindingOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSecurityGroupTargetBindingOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateShareMountTargetOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateShareMountTargetOptions.java index 7b18de4217..0096050a63 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateShareMountTargetOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateShareMountTargetOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateShareOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateShareOptions.java index 89afaab380..1d8adabd8f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateShareOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateShareOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateShareSnapshotOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateShareSnapshotOptions.java index 28c172da3c..a2dc7c2d7d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateShareSnapshotOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateShareSnapshotOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSnapshotCloneOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSnapshotCloneOptions.java index 6fe66ad490..073e0eeddf 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSnapshotCloneOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSnapshotCloneOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSnapshotConsistencyGroupOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSnapshotConsistencyGroupOptions.java index 9abb601d55..1c9dd26fe8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSnapshotConsistencyGroupOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSnapshotConsistencyGroupOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSnapshotOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSnapshotOptions.java index c17a2ba06a..a680175a13 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSnapshotOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSnapshotOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSubnetOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSubnetOptions.java index c465e54608..4cc725ce89 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSubnetOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSubnetOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSubnetReservedIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSubnetReservedIpOptions.java index 21fe9bd9e4..039dbeea3f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSubnetReservedIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateSubnetReservedIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVirtualNetworkInterfaceOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVirtualNetworkInterfaceOptions.java index 6cc363a488..c532125479 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVirtualNetworkInterfaceOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVirtualNetworkInterfaceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVolumeOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVolumeOptions.java index 0956af48a2..5f3f408b74 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVolumeOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVolumeOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcAddressPrefixOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcAddressPrefixOptions.java index 9f87f434dd..1dbf9fdfbd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcAddressPrefixOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcAddressPrefixOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcDnsResolutionBindingOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcDnsResolutionBindingOptions.java index d99ad6e51c..3aae109a19 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcDnsResolutionBindingOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcDnsResolutionBindingOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcOptions.java index 41bd6995a1..8fcab019f9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -179,9 +179,9 @@ public String addressPrefixManagement() { * private network connectivity to the account's Classic Infrastructure resources. Only one VPC, per region, may be * connected in this way. This value is set at creation and subsequently immutable. * - * This property has been deprecated. Instead, use a [Transit Gateway](https://cloud.ibm.com/docs/transit-gateway) to - * connect this VPC to Classic Infrastructure. For more information, see [upcoming - * changes](https://cloud.ibm.com/docs/vpc?topic=vpc-api-change-log#upcoming-changes). + * Setting this property to `true` is supported only for accounts that have been + * [granted approval](https://cloud.ibm.com/docs/vpc?topic=vpc-setting-up-access-to-classic-infrastructure). Instead, + * use a [Transit Gateway](https://cloud.ibm.com/docs/transit-gateway) to connect this VPC to Classic Infrastructure. * * @return the classicAccess * @deprecated this method is deprecated and may be removed in a future release diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRouteOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRouteOptions.java index bb0677a675..a8d897e470 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRouteOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRouteOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRouteResponse.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRouteResponse.java new file mode 100644 index 0000000000..faf085837e --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRouteResponse.java @@ -0,0 +1,270 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import java.util.Date; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * CreateVpcRouteResponse. + */ +public class CreateVpcRouteResponse extends GenericModel { + + /** + * The action to perform with a packet matching the route: + * - `delegate`: delegate to system-provided routes + * - `delegate_vpc`: delegate to system-provided routes, ignoring Internet-bound routes + * - `deliver`: deliver the packet to the specified `next_hop` + * - `drop`: drop the packet + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + */ + public interface Action { + /** delegate. */ + String DELEGATE = "delegate"; + /** delegate_vpc. */ + String DELEGATE_VPC = "delegate_vpc"; + /** deliver. */ + String DELIVER = "deliver"; + /** drop. */ + String DROP = "drop"; + } + + /** + * The lifecycle state of the route. + */ + public interface LifecycleState { + /** deleting. */ + String DELETING = "deleting"; + /** failed. */ + String FAILED = "failed"; + /** pending. */ + String PENDING = "pending"; + /** stable. */ + String STABLE = "stable"; + /** suspended. */ + String SUSPENDED = "suspended"; + /** updating. */ + String UPDATING = "updating"; + /** waiting. */ + String WAITING = "waiting"; + } + + /** + * The origin of this route: + * - `service`: route was directly created by a service + * - `user`: route was directly created by a user + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + */ + public interface Origin { + /** service. */ + String SERVICE = "service"; + /** user. */ + String USER = "user"; + } + + protected String action; + protected Boolean advertise; + @SerializedName("created_at") + protected Date createdAt; + protected RouteCreator creator; + protected String destination; + protected String href; + protected String id; + @SerializedName("lifecycle_state") + protected String lifecycleState; + protected String name; + @SerializedName("next_hop") + protected RouteNextHop nextHop; + protected String origin; + protected Long priority; + protected ZoneReference zone; + + protected CreateVpcRouteResponse() { } + + /** + * Gets the action. + * + * The action to perform with a packet matching the route: + * - `delegate`: delegate to system-provided routes + * - `delegate_vpc`: delegate to system-provided routes, ignoring Internet-bound routes + * - `deliver`: deliver the packet to the specified `next_hop` + * - `drop`: drop the packet + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + * + * @return the action + */ + public String getAction() { + return action; + } + + /** + * Gets the advertise. + * + * Indicates whether this route will be advertised to the ingress sources specified by the `advertise_routes_to` + * routing table property. + * + * @return the advertise + */ + public Boolean isAdvertise() { + return advertise; + } + + /** + * Gets the createdAt. + * + * The date and time that the route was created. + * + * @return the createdAt + */ + public Date getCreatedAt() { + return createdAt; + } + + /** + * Gets the creator. + * + * If present, the resource that created the route. Routes with this property present cannot + * be directly deleted. All routes with an `origin` of `service` will have this property set, + * and future `origin` values may also have this property set. + * + * @return the creator + */ + public RouteCreator getCreator() { + return creator; + } + + /** + * Gets the destination. + * + * The destination CIDR of the route. + * + * @return the destination + */ + public String getDestination() { + return destination; + } + + /** + * Gets the href. + * + * The URL for this route. + * + * @return the href + */ + public String getHref() { + return href; + } + + /** + * Gets the id. + * + * The unique identifier for this route. + * + * @return the id + */ + public String getId() { + return id; + } + + /** + * Gets the lifecycleState. + * + * The lifecycle state of the route. + * + * @return the lifecycleState + */ + public String getLifecycleState() { + return lifecycleState; + } + + /** + * Gets the name. + * + * The name for this route. The name is unique across all routes in the routing table. + * + * @return the name + */ + public String getName() { + return name; + } + + /** + * Gets the nextHop. + * + * If `action` is `deliver`, the next hop that packets will be delivered to. For + * other `action` values, its `address` will be `0.0.0.0`. + * + * @return the nextHop + */ + public RouteNextHop getNextHop() { + return nextHop; + } + + /** + * Gets the origin. + * + * The origin of this route: + * - `service`: route was directly created by a service + * - `user`: route was directly created by a user + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + * + * @return the origin + */ + public String getOrigin() { + return origin; + } + + /** + * Gets the priority. + * + * The priority of this route. Smaller values have higher priority. + * + * If a routing table contains multiple routes with the same `zone` and `destination`, the route with the highest + * priority (smallest value) is selected. If two routes have the same `destination` and `priority`, traffic is + * distributed between them. + * + * @return the priority + */ + public Long getPriority() { + return priority; + } + + /** + * Gets the zone. + * + * The zone the route applies to. + * + * If subnets are attached to the route's routing table, egress traffic from those + * subnets in this zone will be subject to this route. If this route's routing table + * has any of `route_direct_link_ingress`, `route_internet_ingress`, + * `route_transit_gateway_ingress` or `route_vpc_zone_ingress` set to`true`, traffic + * from those ingress sources arriving in this zone will be subject to this route. + * + * @return the zone + */ + public ZoneReference getZone() { + return zone; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRoutingTableOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRoutingTableOptions.java index 4c89c4f4a7..e8b1f43cb7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRoutingTableOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRoutingTableOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRoutingTableRouteOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRoutingTableRouteOptions.java index 61c88342b2..059e94a540 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRoutingTableRouteOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRoutingTableRouteOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnGatewayConnectionOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnGatewayConnectionOptions.java index 9f5d977cff..9278f1b05b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnGatewayConnectionOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnGatewayConnectionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnGatewayOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnGatewayOptions.java index 8438be6deb..1fe5723a44 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnGatewayOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnServerOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnServerOptions.java index c6cfb5c180..1322a0c0b8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnServerOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnServerOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnServerRouteOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnServerRouteOptions.java index 0adaafe6c6..3dc6be96d9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnServerRouteOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnServerRouteOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSInstanceIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSInstanceIdentity.java index d565f13e9f..14f5e86db5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSInstanceIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSInstanceIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSInstanceIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSInstanceIdentityByCRN.java index a75bfb78ae..6e9c8310db 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSInstanceIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSInstanceIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSInstanceReferenceLoadBalancerDNSContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSInstanceReferenceLoadBalancerDNSContext.java index f4eb1d8871..d320e1c148 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSInstanceReferenceLoadBalancerDNSContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSInstanceReferenceLoadBalancerDNSContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSServer.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSServer.java index 649fff61c6..d6df87a0b2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSServer.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSServer.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSServerPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSServerPrototype.java index 9b06e2bd69..b94bd96821 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSServerPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSServerPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSZoneIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSZoneIdentity.java index 0a6299ed39..9b82c69557 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSZoneIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSZoneIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSZoneIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSZoneIdentityById.java index 0241ee6a8f..d0cc587995 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSZoneIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSZoneIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSZoneReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSZoneReference.java index b3906e2b96..743fd1eab0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSZoneReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DNSZoneReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHost.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHost.java index f1fc9795ca..952d3a2029 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHost.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHost.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostCollection.java index 3d701ac0ba..b7d26ba831 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostDisk.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostDisk.java index d7f12f5736..6dc499db0b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostDisk.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostDisk.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostDiskCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostDiskCollection.java index afe106245a..21d255aacb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostDiskCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostDiskCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostDiskPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostDiskPatch.java index 288682f1b1..e55ed4c7db 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostDiskPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostDiskPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroup.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroup.java index f9836526ed..e00eb6c51d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroup.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroup.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupCollection.java index ee3289758c..a9b1280eb4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentity.java index d2e2d763a6..9038ce8ebb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -10,8 +10,11 @@ * 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.is.vpc.v1.model; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + /** * Identifies a dedicated host group by a unique property. * @@ -20,7 +23,11 @@ * - DedicatedHostGroupIdentityByCRN * - DedicatedHostGroupIdentityByHref */ -public class DedicatedHostGroupIdentity extends DedicatedHostPrototypeGroup { +public class DedicatedHostGroupIdentity extends GenericModel { + + protected String id; + protected String crn; + protected String href; protected DedicatedHostGroupIdentity() { } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityByCRN.java index b8a014d0a4..5c1a0ccd8c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityByHref.java index e1bfe3627a..bb9214c133 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityById.java index b88c7b8638..2b38d38bdf 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupPatch.java index 6ad6656332..903533f684 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupPrototypeDedicatedHostByZoneContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupPrototypeDedicatedHostByZoneContext.java index 423f297803..e61bffbf63 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupPrototypeDedicatedHostByZoneContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupPrototypeDedicatedHostByZoneContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -10,12 +10,20 @@ * 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.is.vpc.v1.model; +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + /** * DedicatedHostGroupPrototypeDedicatedHostByZoneContext. */ -public class DedicatedHostGroupPrototypeDedicatedHostByZoneContext extends DedicatedHostPrototypeGroup { +public class DedicatedHostGroupPrototypeDedicatedHostByZoneContext extends GenericModel { + + protected String name; + @SerializedName("resource_group") + protected ResourceGroupIdentity resourceGroup; /** * Builder. diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupReference.java index f56af4c06d..90593f940b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupsPager.java index dabf10137c..6f8a3c9619 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostNUMA.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostNUMA.java index 4c807d1cab..9e5f1e8540 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostNUMA.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostNUMA.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostNUMANode.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostNUMANode.java index 3a848089f3..d90f5c9cc3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostNUMANode.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostNUMANode.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPatch.java index e388614934..06c799df5c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfile.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfile.java index 9624c07d84..f8d810738b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfile.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfile.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileCollection.java index 3702d6237b..572685295b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDisk.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDisk.java index 863e1f8a96..1566cccb55 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDisk.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDisk.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskInterface.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskInterface.java index 100e9f708b..ad6436a287 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskInterface.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskInterface.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskQuantity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskQuantity.java index 2a3f4650a6..ef475c799c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskQuantity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskQuantity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskSize.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskSize.java index 9f16b06afe..33ab4cd34f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskSize.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskSize.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskSupportedInterfaces.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskSupportedInterfaces.java index 26a00b7038..d3beb94c4c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskSupportedInterfaces.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskSupportedInterfaces.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileIdentity.java index 3ad5e145b8..9eef58ce50 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileIdentityByHref.java index f150c21e9d..09b3475a46 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileIdentityByName.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileIdentityByName.java index 4c848d7652..6478a09f51 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileIdentityByName.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileIdentityByName.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemory.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemory.java index 836b8f97bc..1b02d38575 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemory.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemory.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryDependent.java index cae99c5010..e050a5bf67 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryEnum.java index 86786015f5..6bae569c19 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryEnum.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryEnum.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryFixed.java index dfead3b55e..c2c5b8ec81 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryRange.java index f262b084ad..8f0580979c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileReference.java index 02f80048c4..4c5a99b9b5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocket.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocket.java index 4c178dd9a3..05b9f9c056 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocket.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocket.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketDependent.java index 56c9908550..f264320cfb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketEnum.java index 327fa1e81d..a6fd04d376 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketEnum.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketEnum.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketFixed.java index 36ac0f35a9..dab79887f5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketRange.java index b559c15bee..ed91ebe2c9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPU.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPU.java index 328caa57ad..7f9e5f6718 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPU.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPU.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUArchitecture.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUArchitecture.java index ca030549a2..d6e7a4bf44 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUArchitecture.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUArchitecture.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUDependent.java index c6096d9090..58bee7c052 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUEnum.java index 9fb91e7687..d5277c1622 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUEnum.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUEnum.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUFixed.java index d69f468677..6c7806f306 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUManufacturer.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUManufacturer.java index ce9cd2607f..4e330ad9d5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUManufacturer.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUManufacturer.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPURange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPURange.java index 2927b91314..b7d09994e2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPURange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPURange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfilesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfilesPager.java index a82992655c..f7465d14cb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfilesPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfilesPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPrototype.java index 7fa41f9412..f76f267cef 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -10,6 +10,7 @@ * 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.is.vpc.v1.model; import com.google.gson.annotations.SerializedName; @@ -30,7 +31,7 @@ public class DedicatedHostPrototype extends GenericModel { protected DedicatedHostProfileIdentity profile; @SerializedName("resource_group") protected ResourceGroupIdentity resourceGroup; - protected DedicatedHostPrototypeGroup group; + protected DedicatedHostGroupIdentity group; protected ZoneIdentity zone; protected DedicatedHostPrototype() { } @@ -89,7 +90,7 @@ public ResourceGroupIdentity resourceGroup() { * * @return the group */ - public DedicatedHostPrototypeGroup group() { + public DedicatedHostGroupIdentity group() { return group; } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPrototypeDedicatedHostByGroup.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPrototypeDedicatedHostByGroup.java index 08cbd7173f..95309ee2b9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPrototypeDedicatedHostByGroup.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPrototypeDedicatedHostByGroup.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -10,6 +10,7 @@ * 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.is.vpc.v1.model; /** @@ -38,7 +39,7 @@ public Builder(DedicatedHostPrototype dedicatedHostPrototypeDedicatedHostByGroup this.name = dedicatedHostPrototypeDedicatedHostByGroup.name; this.profile = dedicatedHostPrototypeDedicatedHostByGroup.profile; this.resourceGroup = dedicatedHostPrototypeDedicatedHostByGroup.resourceGroup; - this.group = (DedicatedHostGroupIdentity) dedicatedHostPrototypeDedicatedHostByGroup.group; + this.group = dedicatedHostPrototypeDedicatedHostByGroup.group; } /** diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPrototypeDedicatedHostByZone.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPrototypeDedicatedHostByZone.java index 714d5cb461..a0be89b256 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPrototypeDedicatedHostByZone.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPrototypeDedicatedHostByZone.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -10,6 +10,7 @@ * 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.is.vpc.v1.model; /** @@ -39,7 +40,7 @@ public Builder(DedicatedHostPrototype dedicatedHostPrototypeDedicatedHostByZone) this.name = dedicatedHostPrototypeDedicatedHostByZone.name; this.profile = dedicatedHostPrototypeDedicatedHostByZone.profile; this.resourceGroup = dedicatedHostPrototypeDedicatedHostByZone.resourceGroup; - this.group = (DedicatedHostGroupPrototypeDedicatedHostByZoneContext) dedicatedHostPrototypeDedicatedHostByZone.group; + this.group = dedicatedHostPrototypeDedicatedHostByZone.group; this.zone = dedicatedHostPrototypeDedicatedHostByZone.zone; } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostReference.java index 616eb4c3c1..fceb342bf8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostsPager.java index 237e34f54f..d9b2fcb7b7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DefaultNetworkACL.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DefaultNetworkACL.java index 8e80a5e5a4..85efe3d2fc 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DefaultNetworkACL.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DefaultNetworkACL.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DefaultRoutingTable.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DefaultRoutingTable.java index 4efc1b162d..a6442d3281 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DefaultRoutingTable.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DefaultRoutingTable.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DefaultSecurityGroup.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DefaultSecurityGroup.java index 9a5398a574..a8d575b7c6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DefaultSecurityGroup.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DefaultSecurityGroup.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteBackupPolicyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteBackupPolicyOptions.java index 1949710609..f7873342f2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteBackupPolicyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteBackupPolicyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteBackupPolicyPlanOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteBackupPolicyPlanOptions.java index 507d52427c..fe42e0a595 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteBackupPolicyPlanOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteBackupPolicyPlanOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteBareMetalServerNetworkAttachmentOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteBareMetalServerNetworkAttachmentOptions.java index 2fee76947b..a852cef3a6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteBareMetalServerNetworkAttachmentOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteBareMetalServerNetworkAttachmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteBareMetalServerNetworkInterfaceOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteBareMetalServerNetworkInterfaceOptions.java index e4b8addea2..c119e034c2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteBareMetalServerNetworkInterfaceOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteBareMetalServerNetworkInterfaceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteBareMetalServerOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteBareMetalServerOptions.java index 2f24d5067a..b57f843062 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteBareMetalServerOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteBareMetalServerOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkInterfaceOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkInterfaceOptions.java index e6f532876e..120254a9f7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkInterfaceOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkInterfaceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkOptions.java index e1a81ea024..284542a624 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkSubnetOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkSubnetOptions.java index be5669ad6b..67e2ec5e9b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkSubnetOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkSubnetOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkSubnetReservedIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkSubnetReservedIpOptions.java index 7ff512e1ca..ba47c55290 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkSubnetReservedIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkSubnetReservedIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteDedicatedHostGroupOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteDedicatedHostGroupOptions.java index d520aa6492..ed4ccbe3a9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteDedicatedHostGroupOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteDedicatedHostGroupOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteDedicatedHostOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteDedicatedHostOptions.java index 06831f81b9..722427718c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteDedicatedHostOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteDedicatedHostOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteEndpointGatewayOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteEndpointGatewayOptions.java index b744ac4283..c71db9c266 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteEndpointGatewayOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteEndpointGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteFloatingIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteFloatingIpOptions.java index 5fb8d440b4..e4f090d187 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteFloatingIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteFloatingIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteFlowLogCollectorOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteFlowLogCollectorOptions.java index 76d9c85ca3..61e7d86e12 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteFlowLogCollectorOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteFlowLogCollectorOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteIkePolicyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteIkePolicyOptions.java index aeb2ec4c6d..4e2dd727a5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteIkePolicyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteIkePolicyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteImageExportJobOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteImageExportJobOptions.java index 4c7346af22..5b210e6a36 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteImageExportJobOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteImageExportJobOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteImageOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteImageOptions.java index b32640e57b..7fe8a89cde 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteImageOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteImageOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceClusterNetworkAttachmentOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceClusterNetworkAttachmentOptions.java index 443d47bd08..d210f8a439 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceClusterNetworkAttachmentOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceClusterNetworkAttachmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupLoadBalancerOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupLoadBalancerOptions.java index 7a6af463e8..951a6fd22a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupLoadBalancerOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupLoadBalancerOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupManagerActionOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupManagerActionOptions.java index 3cbcd9fbdd..d99746696e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupManagerActionOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupManagerActionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupManagerOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupManagerOptions.java index a063346e51..0c633dd958 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupManagerOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupManagerOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupManagerPolicyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupManagerPolicyOptions.java index daab4cb180..84806ad1d9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupManagerPolicyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupManagerPolicyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupMembershipOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupMembershipOptions.java index d02f5c31d2..f95f16adec 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupMembershipOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupMembershipOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupMembershipsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupMembershipsOptions.java index 8e7fd96553..55c845aa0d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupMembershipsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupMembershipsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupOptions.java index 381e0013c1..cb5392cd90 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceNetworkAttachmentOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceNetworkAttachmentOptions.java index 82f1f998f4..75b908ecee 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceNetworkAttachmentOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceNetworkAttachmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceNetworkInterfaceOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceNetworkInterfaceOptions.java index 8f6a7311b2..3cef3df115 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceNetworkInterfaceOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceNetworkInterfaceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceOptions.java index cc37430a32..ef5b7ee4c8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceTemplateOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceTemplateOptions.java index b3fd6da781..321ff08ced 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceTemplateOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceTemplateOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceVolumeAttachmentOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceVolumeAttachmentOptions.java index 9fcbf525cb..4433606cea 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceVolumeAttachmentOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceVolumeAttachmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteIpsecPolicyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteIpsecPolicyOptions.java index 5911318501..1070e25a6a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteIpsecPolicyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteIpsecPolicyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteKeyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteKeyOptions.java index a2e392543a..5bec9aecb2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteKeyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteKeyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerListenerOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerListenerOptions.java index dae2fe2b39..47315a7f38 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerListenerOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerListenerOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerListenerPolicyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerListenerPolicyOptions.java index 12c1ec3211..96112bdb7b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerListenerPolicyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerListenerPolicyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerListenerPolicyRuleOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerListenerPolicyRuleOptions.java index 8bc4645c03..4f035d8cfa 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerListenerPolicyRuleOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerListenerPolicyRuleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerOptions.java index 11333c49c4..e132aa4d87 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerPoolMemberOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerPoolMemberOptions.java index 01c6f8d230..e31b997c1e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerPoolMemberOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerPoolMemberOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerPoolOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerPoolOptions.java index 7ab1dc0981..193be5254f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerPoolOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerPoolOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteNetworkAclOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteNetworkAclOptions.java index 618ff14bd0..789346e7e9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteNetworkAclOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteNetworkAclOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteNetworkAclRuleOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteNetworkAclRuleOptions.java index eabffea9be..90167b279a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteNetworkAclRuleOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteNetworkAclRuleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeletePlacementGroupOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeletePlacementGroupOptions.java index 12e1442f43..ea54b401ec 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeletePlacementGroupOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeletePlacementGroupOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeletePrivatePathServiceGatewayAccountPolicyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeletePrivatePathServiceGatewayAccountPolicyOptions.java index 883adb1f94..7acff987e8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeletePrivatePathServiceGatewayAccountPolicyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeletePrivatePathServiceGatewayAccountPolicyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeletePrivatePathServiceGatewayOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeletePrivatePathServiceGatewayOptions.java index d4cb0bd70f..6e1f7e00ce 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeletePrivatePathServiceGatewayOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeletePrivatePathServiceGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeletePublicAddressRangeOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeletePublicAddressRangeOptions.java index 93c58753b5..3dc3ccf9db 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeletePublicAddressRangeOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeletePublicAddressRangeOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeletePublicGatewayOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeletePublicGatewayOptions.java index 559deeabaa..e699b7f04a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeletePublicGatewayOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeletePublicGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteReservationOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteReservationOptions.java index 883ad9f836..5ee2486ecb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteReservationOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteReservationOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSecurityGroupOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSecurityGroupOptions.java index d6c44dcb51..0f41ea4872 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSecurityGroupOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSecurityGroupOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSecurityGroupRuleOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSecurityGroupRuleOptions.java index 36ac379ea1..0adf1e5354 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSecurityGroupRuleOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSecurityGroupRuleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSecurityGroupTargetBindingOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSecurityGroupTargetBindingOptions.java index 3464ac5e3b..11d0384848 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSecurityGroupTargetBindingOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSecurityGroupTargetBindingOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareAccessorBindingOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareAccessorBindingOptions.java index e14836b6d4..aa753c3f8c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareAccessorBindingOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareAccessorBindingOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareMountTargetOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareMountTargetOptions.java index e2e438050b..aa3da9b6c6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareMountTargetOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareMountTargetOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareOptions.java index f8501e7c25..da15dac328 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareSnapshotOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareSnapshotOptions.java index 8768df0aeb..3683eab9de 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareSnapshotOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareSnapshotOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareSourceOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareSourceOptions.java index c7cb63c42c..6b0fe4dcb3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareSourceOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareSourceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotCloneOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotCloneOptions.java index d518457caa..a5f00f7ae0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotCloneOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotCloneOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotConsistencyGroupOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotConsistencyGroupOptions.java index af70700ee5..8b15640d16 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotConsistencyGroupOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotConsistencyGroupOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotOptions.java index b5b3054ea2..90733d4561 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotsOptions.java index 326577db11..f76c55b5a2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSubnetOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSubnetOptions.java index caf1bf46e4..f9e149534c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSubnetOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSubnetOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSubnetReservedIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSubnetReservedIpOptions.java index 233b552aec..a14e26ec5d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSubnetReservedIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteSubnetReservedIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVirtualNetworkInterfacesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVirtualNetworkInterfacesOptions.java index 2abb55da39..6c04cb2482 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVirtualNetworkInterfacesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVirtualNetworkInterfacesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVolumeOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVolumeOptions.java index fc24043118..00ff5a3fb0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVolumeOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVolumeOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcAddressPrefixOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcAddressPrefixOptions.java index ffdd48716a..9ab05f392f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcAddressPrefixOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcAddressPrefixOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcDnsResolutionBindingOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcDnsResolutionBindingOptions.java index c154c2bf0f..f07c88c3ad 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcDnsResolutionBindingOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcDnsResolutionBindingOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcOptions.java index f21c84806b..86d64c4c46 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcRouteOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcRouteOptions.java index 8c9df67e4e..25daabcdda 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcRouteOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcRouteOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcRoutingTableOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcRoutingTableOptions.java index b4e0090264..529dd0cfaf 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcRoutingTableOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcRoutingTableOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcRoutingTableRouteOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcRoutingTableRouteOptions.java index 4d0da4249b..9771f17aaa 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcRoutingTableRouteOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcRoutingTableRouteOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnGatewayConnectionOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnGatewayConnectionOptions.java index eb0ebbf111..2fa8039b0a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnGatewayConnectionOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnGatewayConnectionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -22,6 +22,7 @@ public class DeleteVpnGatewayConnectionOptions extends GenericModel { protected String vpnGatewayId; protected String id; + protected String ifMatch; /** * Builder. @@ -29,6 +30,7 @@ public class DeleteVpnGatewayConnectionOptions extends GenericModel { public static class Builder { private String vpnGatewayId; private String id; + private String ifMatch; /** * Instantiates a new Builder from an existing DeleteVpnGatewayConnectionOptions instance. @@ -38,6 +40,7 @@ public static class Builder { private Builder(DeleteVpnGatewayConnectionOptions deleteVpnGatewayConnectionOptions) { this.vpnGatewayId = deleteVpnGatewayConnectionOptions.vpnGatewayId; this.id = deleteVpnGatewayConnectionOptions.id; + this.ifMatch = deleteVpnGatewayConnectionOptions.ifMatch; } /** @@ -87,6 +90,17 @@ public Builder id(String id) { this.id = id; return this; } + + /** + * Set the ifMatch. + * + * @param ifMatch the ifMatch + * @return the DeleteVpnGatewayConnectionOptions builder + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } } protected DeleteVpnGatewayConnectionOptions() { } @@ -98,6 +112,7 @@ protected DeleteVpnGatewayConnectionOptions(Builder builder) { "id cannot be empty"); vpnGatewayId = builder.vpnGatewayId; id = builder.id; + ifMatch = builder.ifMatch; } /** @@ -130,5 +145,16 @@ public String vpnGatewayId() { public String id() { return id; } + + /** + * Gets the ifMatch. + * + * If present, the request will fail if the specified ETag value does not match the resource's current ETag value. + * + * @return the ifMatch + */ + public String ifMatch() { + return ifMatch; + } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnGatewayOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnGatewayOptions.java index 6391597662..70eb8da59a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnGatewayOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnServerClientOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnServerClientOptions.java index e4e0372492..b4e3e0adfb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnServerClientOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnServerClientOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnServerOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnServerOptions.java index db46002d61..9e8e168a6f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnServerOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnServerOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnServerRouteOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnServerRouteOptions.java index d0630863ea..658181736e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnServerRouteOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnServerRouteOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Deleted.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Deleted.java index b108580382..48ed736846 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Deleted.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Deleted.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DenyPrivatePathServiceGatewayEndpointGatewayBindingOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DenyPrivatePathServiceGatewayEndpointGatewayBindingOptions.java index f8d9a6a8ff..2a6555414a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DenyPrivatePathServiceGatewayEndpointGatewayBindingOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DenyPrivatePathServiceGatewayEndpointGatewayBindingOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeprecateImageOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeprecateImageOptions.java index f9300c4ae3..750473e603 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeprecateImageOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DeprecateImageOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DisconnectVpnClientOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DisconnectVpnClientOptions.java index 551c99490d..a596f74455 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DisconnectVpnClientOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/DisconnectVpnClientOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EncryptionKeyIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EncryptionKeyIdentity.java index b328b62cd3..27dd12c4bf 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EncryptionKeyIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EncryptionKeyIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EncryptionKeyIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EncryptionKeyIdentityByCRN.java index 51b50dbc63..8159f43f30 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EncryptionKeyIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EncryptionKeyIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EncryptionKeyReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EncryptionKeyReference.java index ffd1b0a2a7..43be48e452 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EncryptionKeyReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EncryptionKeyReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGateway.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGateway.java index 806fa46be8..77788c6615 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGateway.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGateway.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayCollection.java index a10e505cc4..ec2bb9e231 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayIpsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayIpsPager.java index 26a5979e6d..e314bd8e7d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayIpsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayIpsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayLifecycleReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayLifecycleReason.java index 32f71ecb15..6210b853b7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayLifecycleReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayLifecycleReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayPatch.java index 5b0c26a71b..62f68b6430 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReferenceRemote.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReferenceRemote.java index 1c50cc9687..dcc374b649 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReferenceRemote.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReferenceRemote.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayRemote.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayRemote.java index 64f50cf47d..83afbcfc78 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayRemote.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayRemote.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIP.java index 61584ce973..7a2b348736 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPIdentity.java index 75a05ba936..4d941a590f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPIdentityByHref.java index 16ede7f8d6..5b26dd3ced 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPIdentityById.java index 588e94fb48..5a113b63bb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPPrototypeTargetContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPPrototypeTargetContext.java index 1646498168..09a071aae8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPPrototypeTargetContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPPrototypeTargetContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTarget.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTarget.java index 18fc4e45fb..f1aeafc259 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTarget.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTarget.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrivatePathServiceGatewayReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrivatePathServiceGatewayReference.java index 1bda2d9e89..bd0b6848c1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrivatePathServiceGatewayReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrivatePathServiceGatewayReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototype.java index 85174ce9eb..207f550ad1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -19,8 +19,8 @@ /** * The target to use for this endpoint gateway. The target: * - Must not already be the target of another endpoint gateway in the VPC - * - Must not have a service endpoint that overlaps with any `service_endpoints` of another - * endpoint gateway in the VPC. + * - Must not have a service endpoint that overlaps with any `service_endpoints` of + * another endpoint gateway in the VPC. * * If `allow_dns_resolution_binding` is `true`, then there must not be another endpoint gateway with * `allow_dns_resolution_binding` set to `true` in the [DNS sharing](/docs/vpc?topic=vpc-vpe-dns-sharing) connected diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype.java index 3a6c2d108f..28b841231d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype.java index 52a34f01bd..d2efae4094 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype.java index 34abdcb3fd..18c232f8ac 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetProviderCloudServiceReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetProviderCloudServiceReference.java index e723c075dc..e465ef1815 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetProviderCloudServiceReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetProviderCloudServiceReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetProviderInfrastructureServiceReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetProviderInfrastructureServiceReference.java index 3299664c0f..05a428922c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetProviderInfrastructureServiceReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetProviderInfrastructureServiceReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewaysPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewaysPager.java index 50df43bfbe..0a3616c9f6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewaysPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewaysPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FailoverShareOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FailoverShareOptions.java index 38b56efe06..a18f06305a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FailoverShareOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FailoverShareOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIP.java index 38a47e705d..cd4964884f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPCollection.java index a3fe3be886..2b63281b4c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPCollectionVirtualNetworkInterfaceContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPCollectionVirtualNetworkInterfaceContext.java index b11479c658..2ebb126aae 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPCollectionVirtualNetworkInterfaceContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPCollectionVirtualNetworkInterfaceContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPatch.java index f4d584f96f..b169dca820 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPrototype.java index 737d667a7b..d032f2abe8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPrototypeFloatingIPByTarget.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPrototypeFloatingIPByTarget.java index f9df37ddde..52900b07cb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPrototypeFloatingIPByTarget.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPrototypeFloatingIPByTarget.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPrototypeFloatingIPByZone.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPrototypeFloatingIPByZone.java index f4e808acab..de677ece43 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPrototypeFloatingIPByZone.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPrototypeFloatingIPByZone.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPReference.java index a0ace1bf7b..8c538c8c96 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTarget.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTarget.java index 4f86157f81..7ba7807d7f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTarget.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTarget.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetBareMetalServerNetworkInterfaceReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetBareMetalServerNetworkInterfaceReference.java index de267810e3..af2106f118 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetBareMetalServerNetworkInterfaceReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetBareMetalServerNetworkInterfaceReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetNetworkInterfaceReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetNetworkInterfaceReference.java index 4d8f33fc63..a300806955 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetNetworkInterfaceReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetNetworkInterfaceReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatch.java index 1aab2baeb1..76fb1d7e4d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentity.java index a2b49f6b12..7e773c8ff7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref.java index 3e5e27070c..3907a17a3b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById.java index 2ad32d58e0..965a3ea668 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchNetworkInterfaceIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchNetworkInterfaceIdentity.java index 2923da7f5c..a6ae4a912c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchNetworkInterfaceIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchNetworkInterfaceIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.java index 78dea240e8..557af9758e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById.java index 4ca7cebf65..144fb3a0ea 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentity.java index 826f671c93..492b664dd8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java index e46466521e..b496c6f37d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java index 3607dc3748..8ec683af30 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java index 3e89a71911..3f06393cf5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototype.java index 6f90c7e740..34e52c42ea 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentity.java index 7401c523da..1c192dca87 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref.java index c686aa68d3..8a0da82ea0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById.java index 69016ed42a..aae7a779b7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeNetworkInterfaceIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeNetworkInterfaceIdentity.java index 573771ffbb..be33cc8e76 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeNetworkInterfaceIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeNetworkInterfaceIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.java index d330fdaa93..c996bacb62 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById.java index 386020b463..37c7bcf8ac 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentity.java index 46d2994bf8..2ec7e4d6a3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java index c1eff4ac86..33766f037f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java index 93a47b8b6a..82b08bfc66 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java index 6ce93a4c50..8d90004cac 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPublicGatewayReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPublicGatewayReference.java index 5ca1baa536..a7c8fff7f3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPublicGatewayReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPublicGatewayReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetVirtualNetworkInterfaceReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetVirtualNetworkInterfaceReference.java index fbfda3dbb9..e472275e2d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetVirtualNetworkInterfaceReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetVirtualNetworkInterfaceReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPUnpaginatedCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPUnpaginatedCollection.java index 0dc695d0b5..bcdc513c9b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPUnpaginatedCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPUnpaginatedCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIpsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIpsPager.java index 367e122f8f..db34e41dc1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIpsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FloatingIpsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollector.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollector.java index 0d48ba878e..10da7bafca 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollector.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollector.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorCollection.java index f6c3015bd2..12c0cb69ea 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorPatch.java index 4be740f19a..3b67c94351 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTarget.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTarget.java index 959812513f..56ed9466c9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTarget.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTarget.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetInstanceNetworkAttachmentReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetInstanceNetworkAttachmentReference.java index 9f2e032048..f7933f2cb9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetInstanceNetworkAttachmentReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetInstanceNetworkAttachmentReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetInstanceReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetInstanceReference.java index 7b048ddf6b..ae8ec65358 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetInstanceReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetInstanceReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext.java index d53e036bd4..8b24c57542 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototype.java index e0e37d88be..59cbd9fb55 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentity.java index fd80632a5d..b093e4873e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN.java index 0e813ca1b9..eebb6c69c9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref.java index ead94def09..5f66c03a68 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById.java index c34ec10a34..7a8e7cc89a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentity.java index 904e189820..168836bf85 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref.java index 3316a9859b..53a9fad674 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById.java index a9840eec8d..b841328a29 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity.java index 5cc189ef33..34fecd2656 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.java index dece50feeb..623ab9fb4e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById.java index 1053ec0f90..240820a113 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentity.java index 5bb47efa1f..58c0f923a9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN.java index 8466c01617..e9838c01fc 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref.java index 947e101a6e..0e9da3d23a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById.java index 17114d9816..f9874ef0fc 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentity.java index 60c25857e9..522948f1d5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN.java index 10efc69ee8..39844d4ea2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref.java index 22016534ed..0b02f67a4a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById.java index c55cc3a417..76eeee89aa 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentity.java index 8604ed0d07..576d47382b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java index 3b04dcdcc8..556f33e6d0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java index 7b9dc21e4f..70daa00733 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java index 46aa6afcc6..5dc82defc7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetSubnetReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetSubnetReference.java index e0d4f4f00b..36ef2dd1d8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetSubnetReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetSubnetReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetVPCReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetVPCReference.java index 91280a35b5..b0f5c06d7f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetVPCReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetVPCReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext.java index 8c6a28daf0..9662bd87c3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorsPager.java index 9fee052aa8..e9e676ef13 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBackupPolicyJobOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBackupPolicyJobOptions.java index 839d3bd6af..fea5d53620 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBackupPolicyJobOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBackupPolicyJobOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBackupPolicyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBackupPolicyOptions.java index 17de5e9aac..b6fd88a37f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBackupPolicyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBackupPolicyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBackupPolicyPlanOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBackupPolicyPlanOptions.java index 47eff6f95f..e8d5285dfd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBackupPolicyPlanOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBackupPolicyPlanOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerDiskOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerDiskOptions.java index 55da60a789..dfb9c5a9fc 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerDiskOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerDiskOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerInitializationOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerInitializationOptions.java index e300e92aba..60bfc175ba 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerInitializationOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerInitializationOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkAttachmentOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkAttachmentOptions.java index 3c41072333..a646f14567 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkAttachmentOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkAttachmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkInterfaceFloatingIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkInterfaceFloatingIpOptions.java index 80d5213124..16b7061bb5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkInterfaceFloatingIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkInterfaceFloatingIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkInterfaceIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkInterfaceIpOptions.java index 398e44fcd8..d0ed5d85bd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkInterfaceIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkInterfaceIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkInterfaceOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkInterfaceOptions.java index 3ece9aa750..977b58d52e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkInterfaceOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkInterfaceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerOptions.java index 4f73e92267..1102807a7b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerProfileOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerProfileOptions.java index 4f4f9524cc..3ad6dbfa42 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerProfileOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerProfileOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkInterfaceOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkInterfaceOptions.java index 063bd325d6..61aa932811 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkInterfaceOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkInterfaceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkOptions.java index fa90590338..d287b98687 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkProfileOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkProfileOptions.java index 007ce980d6..dd218d29f9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkProfileOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkProfileOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkSubnetOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkSubnetOptions.java index 638505a31a..75e1cf03ed 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkSubnetOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkSubnetOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkSubnetReservedIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkSubnetReservedIpOptions.java index d5b354d162..26c2ce9cfd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkSubnetReservedIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkSubnetReservedIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostDiskOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostDiskOptions.java index ba87aa7dbc..a813e1d2c4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostDiskOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostDiskOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostGroupOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostGroupOptions.java index 31b87c0cba..f0eda3b20d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostGroupOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostGroupOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostOptions.java index 039a0c0fd4..c50412842f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostProfileOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostProfileOptions.java index 27a11e94fb..4786bb70c4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostProfileOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostProfileOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetEndpointGatewayIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetEndpointGatewayIpOptions.java index 93468f7224..cacfde8945 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetEndpointGatewayIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetEndpointGatewayIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetEndpointGatewayOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetEndpointGatewayOptions.java index 271c6278a2..842c7377b6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetEndpointGatewayOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetEndpointGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetFloatingIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetFloatingIpOptions.java index 72e6facb04..9920091f90 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetFloatingIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetFloatingIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetFlowLogCollectorOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetFlowLogCollectorOptions.java index 2368b3d1b2..465e78fd94 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetFlowLogCollectorOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetFlowLogCollectorOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetIkePolicyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetIkePolicyOptions.java index c62ad9dea7..d72bb72704 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetIkePolicyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetIkePolicyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetImageExportJobOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetImageExportJobOptions.java index 383c80c1b1..171c82a85f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetImageExportJobOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetImageExportJobOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetImageOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetImageOptions.java index 34e3e19556..fbb50fbd29 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetImageOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetImageOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceClusterNetworkAttachmentOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceClusterNetworkAttachmentOptions.java index ea5d1d0668..3eeb0c5ab4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceClusterNetworkAttachmentOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceClusterNetworkAttachmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceDiskOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceDiskOptions.java index 7060438db3..3a15d39536 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceDiskOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceDiskOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupManagerActionOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupManagerActionOptions.java index 9cfbd2c067..49726246ad 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupManagerActionOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupManagerActionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupManagerOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupManagerOptions.java index 895e03175c..2f1b46f2c1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupManagerOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupManagerOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupManagerPolicyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupManagerPolicyOptions.java index c891e859bc..8fe47f3604 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupManagerPolicyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupManagerPolicyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupMembershipOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupMembershipOptions.java index 463cfa9b03..e6dea701bd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupMembershipOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupMembershipOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupOptions.java index c1b116f3bb..4728232602 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceInitializationOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceInitializationOptions.java index afe1b64a1c..57b16f934b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceInitializationOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceInitializationOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkAttachmentOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkAttachmentOptions.java index 09aa88c4ae..7386f845da 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkAttachmentOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkAttachmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkInterfaceFloatingIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkInterfaceFloatingIpOptions.java index 316f91cf64..3d080f2ac2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkInterfaceFloatingIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkInterfaceFloatingIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkInterfaceIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkInterfaceIpOptions.java index aba2393a32..41488afe7a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkInterfaceIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkInterfaceIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkInterfaceOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkInterfaceOptions.java index 738424c8cb..ab3c679eb9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkInterfaceOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkInterfaceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceOptions.java index 347eeb3974..bf2b9ebd37 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceProfileOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceProfileOptions.java index 8c39dc13a8..7b1ba7b2e1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceProfileOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceProfileOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceTemplateOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceTemplateOptions.java index 76423f6913..29563dd93b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceTemplateOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceTemplateOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceVolumeAttachmentOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceVolumeAttachmentOptions.java index 92adf7543b..a575dddef7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceVolumeAttachmentOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceVolumeAttachmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetIpsecPolicyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetIpsecPolicyOptions.java index 11d560a93b..98ecb13b1b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetIpsecPolicyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetIpsecPolicyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetKeyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetKeyOptions.java index cc33c9f5aa..1ac8701dbe 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetKeyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetKeyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerListenerOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerListenerOptions.java index 263640ddee..9907d8020a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerListenerOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerListenerOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerListenerPolicyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerListenerPolicyOptions.java index f3baed66db..83bda25b67 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerListenerPolicyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerListenerPolicyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerListenerPolicyRuleOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerListenerPolicyRuleOptions.java index 1133772d02..b302c5c638 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerListenerPolicyRuleOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerListenerPolicyRuleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerOptions.java index 176cf51fed..8c52b0ddc7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerPoolMemberOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerPoolMemberOptions.java index 64f4a1e0b0..20d2a8c2b1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerPoolMemberOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerPoolMemberOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerPoolOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerPoolOptions.java index ba79fe6887..5e00d4e32b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerPoolOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerPoolOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerProfileOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerProfileOptions.java index 8d912ef4e8..2fae3652cd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerProfileOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerProfileOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerStatisticsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerStatisticsOptions.java index 750963d8ec..359a343860 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerStatisticsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerStatisticsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetNetworkAclOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetNetworkAclOptions.java index 09cdf8ba6d..948c9e8e97 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetNetworkAclOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetNetworkAclOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetNetworkAclRuleOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetNetworkAclRuleOptions.java index d240af76d5..6baa7a12ce 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetNetworkAclRuleOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetNetworkAclRuleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetNetworkInterfaceFloatingIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetNetworkInterfaceFloatingIpOptions.java index 21ca2d1abf..2e6cdfe9a6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetNetworkInterfaceFloatingIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetNetworkInterfaceFloatingIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetOperatingSystemOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetOperatingSystemOptions.java index f84e11c7a7..e79e36d156 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetOperatingSystemOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetOperatingSystemOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetPlacementGroupOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetPlacementGroupOptions.java index 9cdf236692..5fb3696274 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetPlacementGroupOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetPlacementGroupOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetPrivatePathServiceGatewayAccountPolicyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetPrivatePathServiceGatewayAccountPolicyOptions.java index f0d11c70ab..5b8340ecca 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetPrivatePathServiceGatewayAccountPolicyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetPrivatePathServiceGatewayAccountPolicyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetPrivatePathServiceGatewayEndpointGatewayBindingOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetPrivatePathServiceGatewayEndpointGatewayBindingOptions.java index 7fe8c0e5fe..f1f86229cb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetPrivatePathServiceGatewayEndpointGatewayBindingOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetPrivatePathServiceGatewayEndpointGatewayBindingOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetPrivatePathServiceGatewayOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetPrivatePathServiceGatewayOptions.java index 340b677b64..e04ef5341c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetPrivatePathServiceGatewayOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetPrivatePathServiceGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetPublicAddressRangeOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetPublicAddressRangeOptions.java index 4108badc78..0c916ff7d0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetPublicAddressRangeOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetPublicAddressRangeOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetPublicGatewayOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetPublicGatewayOptions.java index 25ed6b9b64..9174159b5c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetPublicGatewayOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetPublicGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetRegionOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetRegionOptions.java index ff535855b2..a96be6c6a8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetRegionOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetRegionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetRegionZoneOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetRegionZoneOptions.java index d2e9e6dfc4..4ef81564a6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetRegionZoneOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetRegionZoneOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetReservationOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetReservationOptions.java index 943eb0a662..3569f28791 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetReservationOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetReservationOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSecurityGroupOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSecurityGroupOptions.java index 7c449587e5..92b00ca0e7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSecurityGroupOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSecurityGroupOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSecurityGroupRuleOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSecurityGroupRuleOptions.java index 01909d9aa5..a5887f907b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSecurityGroupRuleOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSecurityGroupRuleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSecurityGroupTargetOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSecurityGroupTargetOptions.java index 82733dc9cb..41ddc5a3bd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSecurityGroupTargetOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSecurityGroupTargetOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetShareAccessorBindingOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetShareAccessorBindingOptions.java index cf3f78de83..e4e4829556 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetShareAccessorBindingOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetShareAccessorBindingOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetShareMountTargetOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetShareMountTargetOptions.java index 5a44f26d94..7d4282e599 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetShareMountTargetOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetShareMountTargetOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetShareOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetShareOptions.java index 318136a88a..52ac4d705b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetShareOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetShareOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetShareProfileOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetShareProfileOptions.java index 6386481b14..c9131fa76a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetShareProfileOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetShareProfileOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetShareSnapshotOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetShareSnapshotOptions.java index af19f6a159..7f7eb6f43c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetShareSnapshotOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetShareSnapshotOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetShareSourceOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetShareSourceOptions.java index 9bf8591ff7..b2bbc46f08 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetShareSourceOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetShareSourceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSnapshotCloneOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSnapshotCloneOptions.java index bc18022657..87af0269e0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSnapshotCloneOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSnapshotCloneOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSnapshotConsistencyGroupOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSnapshotConsistencyGroupOptions.java index 916efb47f7..a50f4ed1a7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSnapshotConsistencyGroupOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSnapshotConsistencyGroupOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSnapshotOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSnapshotOptions.java index 7f4d45f4ec..10ff773da0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSnapshotOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSnapshotOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetNetworkAclOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetNetworkAclOptions.java index bd84d36215..daae5cd007 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetNetworkAclOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetNetworkAclOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetOptions.java index d8a3898d2c..f65d8d7fbd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetPublicGatewayOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetPublicGatewayOptions.java index 316a55796a..0dbc759d22 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetPublicGatewayOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetPublicGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetReservedIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetReservedIpOptions.java index 9b1bb72280..e6305464d0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetReservedIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetReservedIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetRoutingTableOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetRoutingTableOptions.java index 583cde8f7d..0e9030d216 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetRoutingTableOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetRoutingTableOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVirtualNetworkInterfaceIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVirtualNetworkInterfaceIpOptions.java index 4da89a6e38..3b7d4e0746 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVirtualNetworkInterfaceIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVirtualNetworkInterfaceIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVirtualNetworkInterfaceOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVirtualNetworkInterfaceOptions.java index df49060cb3..0d91f17079 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVirtualNetworkInterfaceOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVirtualNetworkInterfaceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVolumeOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVolumeOptions.java index 1ad044a282..b95c0b1872 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVolumeOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVolumeOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVolumeProfileOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVolumeProfileOptions.java index 041f7ff8cb..e308c71c04 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVolumeProfileOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVolumeProfileOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcAddressPrefixOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcAddressPrefixOptions.java index 5ddc2c7663..917691294d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcAddressPrefixOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcAddressPrefixOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDefaultNetworkAclOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDefaultNetworkAclOptions.java index 78d3622281..fe696acae5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDefaultNetworkAclOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDefaultNetworkAclOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDefaultRoutingTableOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDefaultRoutingTableOptions.java index 57b9e101a6..7d3d6761bb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDefaultRoutingTableOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDefaultRoutingTableOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDefaultSecurityGroupOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDefaultSecurityGroupOptions.java index 2319e535ee..1f75d07604 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDefaultSecurityGroupOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDefaultSecurityGroupOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDnsResolutionBindingOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDnsResolutionBindingOptions.java index f59f453012..ed1238b043 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDnsResolutionBindingOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDnsResolutionBindingOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcOptions.java index 07609f8620..7947eba8e6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRouteOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRouteOptions.java index 7a9c63869f..4708bf37b6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRouteOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRouteOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRouteResponse.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRouteResponse.java new file mode 100644 index 0000000000..c2a011700f --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRouteResponse.java @@ -0,0 +1,270 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import java.util.Date; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * GetVpcRouteResponse. + */ +public class GetVpcRouteResponse extends GenericModel { + + /** + * The action to perform with a packet matching the route: + * - `delegate`: delegate to system-provided routes + * - `delegate_vpc`: delegate to system-provided routes, ignoring Internet-bound routes + * - `deliver`: deliver the packet to the specified `next_hop` + * - `drop`: drop the packet + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + */ + public interface Action { + /** delegate. */ + String DELEGATE = "delegate"; + /** delegate_vpc. */ + String DELEGATE_VPC = "delegate_vpc"; + /** deliver. */ + String DELIVER = "deliver"; + /** drop. */ + String DROP = "drop"; + } + + /** + * The lifecycle state of the route. + */ + public interface LifecycleState { + /** deleting. */ + String DELETING = "deleting"; + /** failed. */ + String FAILED = "failed"; + /** pending. */ + String PENDING = "pending"; + /** stable. */ + String STABLE = "stable"; + /** suspended. */ + String SUSPENDED = "suspended"; + /** updating. */ + String UPDATING = "updating"; + /** waiting. */ + String WAITING = "waiting"; + } + + /** + * The origin of this route: + * - `service`: route was directly created by a service + * - `user`: route was directly created by a user + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + */ + public interface Origin { + /** service. */ + String SERVICE = "service"; + /** user. */ + String USER = "user"; + } + + protected String action; + protected Boolean advertise; + @SerializedName("created_at") + protected Date createdAt; + protected RouteCreator creator; + protected String destination; + protected String href; + protected String id; + @SerializedName("lifecycle_state") + protected String lifecycleState; + protected String name; + @SerializedName("next_hop") + protected RouteNextHop nextHop; + protected String origin; + protected Long priority; + protected ZoneReference zone; + + protected GetVpcRouteResponse() { } + + /** + * Gets the action. + * + * The action to perform with a packet matching the route: + * - `delegate`: delegate to system-provided routes + * - `delegate_vpc`: delegate to system-provided routes, ignoring Internet-bound routes + * - `deliver`: deliver the packet to the specified `next_hop` + * - `drop`: drop the packet + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + * + * @return the action + */ + public String getAction() { + return action; + } + + /** + * Gets the advertise. + * + * Indicates whether this route will be advertised to the ingress sources specified by the `advertise_routes_to` + * routing table property. + * + * @return the advertise + */ + public Boolean isAdvertise() { + return advertise; + } + + /** + * Gets the createdAt. + * + * The date and time that the route was created. + * + * @return the createdAt + */ + public Date getCreatedAt() { + return createdAt; + } + + /** + * Gets the creator. + * + * If present, the resource that created the route. Routes with this property present cannot + * be directly deleted. All routes with an `origin` of `service` will have this property set, + * and future `origin` values may also have this property set. + * + * @return the creator + */ + public RouteCreator getCreator() { + return creator; + } + + /** + * Gets the destination. + * + * The destination CIDR of the route. + * + * @return the destination + */ + public String getDestination() { + return destination; + } + + /** + * Gets the href. + * + * The URL for this route. + * + * @return the href + */ + public String getHref() { + return href; + } + + /** + * Gets the id. + * + * The unique identifier for this route. + * + * @return the id + */ + public String getId() { + return id; + } + + /** + * Gets the lifecycleState. + * + * The lifecycle state of the route. + * + * @return the lifecycleState + */ + public String getLifecycleState() { + return lifecycleState; + } + + /** + * Gets the name. + * + * The name for this route. The name is unique across all routes in the routing table. + * + * @return the name + */ + public String getName() { + return name; + } + + /** + * Gets the nextHop. + * + * If `action` is `deliver`, the next hop that packets will be delivered to. For + * other `action` values, its `address` will be `0.0.0.0`. + * + * @return the nextHop + */ + public RouteNextHop getNextHop() { + return nextHop; + } + + /** + * Gets the origin. + * + * The origin of this route: + * - `service`: route was directly created by a service + * - `user`: route was directly created by a user + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + * + * @return the origin + */ + public String getOrigin() { + return origin; + } + + /** + * Gets the priority. + * + * The priority of this route. Smaller values have higher priority. + * + * If a routing table contains multiple routes with the same `zone` and `destination`, the route with the highest + * priority (smallest value) is selected. If two routes have the same `destination` and `priority`, traffic is + * distributed between them. + * + * @return the priority + */ + public Long getPriority() { + return priority; + } + + /** + * Gets the zone. + * + * The zone the route applies to. + * + * If subnets are attached to the route's routing table, egress traffic from those + * subnets in this zone will be subject to this route. If this route's routing table + * has any of `route_direct_link_ingress`, `route_internet_ingress`, + * `route_transit_gateway_ingress` or `route_vpc_zone_ingress` set to`true`, traffic + * from those ingress sources arriving in this zone will be subject to this route. + * + * @return the zone + */ + public ZoneReference getZone() { + return zone; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRoutingTableOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRoutingTableOptions.java index 26e2b8f1e1..4907e2d0aa 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRoutingTableOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRoutingTableOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRoutingTableRouteOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRoutingTableRouteOptions.java index 8574f830ba..cfbb78b5c7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRoutingTableRouteOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRoutingTableRouteOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnGatewayConnectionOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnGatewayConnectionOptions.java index 9014936be9..f73b685d6b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnGatewayConnectionOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnGatewayConnectionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnGatewayOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnGatewayOptions.java index e6d807121f..1447f52a27 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnGatewayOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnGatewayServiceConnectionOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnGatewayServiceConnectionOptions.java new file mode 100644 index 0000000000..7483bd833b --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnGatewayServiceConnectionOptions.java @@ -0,0 +1,134 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * The getVpnGatewayServiceConnection options. + */ +public class GetVpnGatewayServiceConnectionOptions extends GenericModel { + + protected String vpnGatewayId; + protected String id; + + /** + * Builder. + */ + public static class Builder { + private String vpnGatewayId; + private String id; + + /** + * Instantiates a new Builder from an existing GetVpnGatewayServiceConnectionOptions instance. + * + * @param getVpnGatewayServiceConnectionOptions the instance to initialize the Builder with + */ + private Builder(GetVpnGatewayServiceConnectionOptions getVpnGatewayServiceConnectionOptions) { + this.vpnGatewayId = getVpnGatewayServiceConnectionOptions.vpnGatewayId; + this.id = getVpnGatewayServiceConnectionOptions.id; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Instantiates a new builder with required properties. + * + * @param vpnGatewayId the vpnGatewayId + * @param id the id + */ + public Builder(String vpnGatewayId, String id) { + this.vpnGatewayId = vpnGatewayId; + this.id = id; + } + + /** + * Builds a GetVpnGatewayServiceConnectionOptions. + * + * @return the new GetVpnGatewayServiceConnectionOptions instance + */ + public GetVpnGatewayServiceConnectionOptions build() { + return new GetVpnGatewayServiceConnectionOptions(this); + } + + /** + * Set the vpnGatewayId. + * + * @param vpnGatewayId the vpnGatewayId + * @return the GetVpnGatewayServiceConnectionOptions builder + */ + public Builder vpnGatewayId(String vpnGatewayId) { + this.vpnGatewayId = vpnGatewayId; + return this; + } + + /** + * Set the id. + * + * @param id the id + * @return the GetVpnGatewayServiceConnectionOptions builder + */ + public Builder id(String id) { + this.id = id; + return this; + } + } + + protected GetVpnGatewayServiceConnectionOptions() { } + + protected GetVpnGatewayServiceConnectionOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.vpnGatewayId, + "vpnGatewayId cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.id, + "id cannot be empty"); + vpnGatewayId = builder.vpnGatewayId; + id = builder.id; + } + + /** + * New builder. + * + * @return a GetVpnGatewayServiceConnectionOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the vpnGatewayId. + * + * The VPN gateway identifier. + * + * @return the vpnGatewayId + */ + public String vpnGatewayId() { + return vpnGatewayId; + } + + /** + * Gets the id. + * + * The VPN gateway service connection identifier. + * + * @return the id + */ + public String id() { + return id; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerClientConfigurationOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerClientConfigurationOptions.java index 21ff02fea9..9b22395617 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerClientConfigurationOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerClientConfigurationOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerClientOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerClientOptions.java index eca0b4fc65..59c190bc5d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerClientOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerClientOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerOptions.java index 8e83d38b7c..ac3e50cd01 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerRouteOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerRouteOptions.java index f32a074d79..5df9f6d085 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerRouteOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerRouteOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicy.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicy.java index 588544925d..279b52412b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicy.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicy.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyCollection.java index 542b62c4c5..78a4f8fb54 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyConnectionCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyConnectionCollection.java index f4ce4cbd69..c61143985c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyConnectionCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyConnectionCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyPatch.java index 33802d28bd..06136cd124 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyReference.java index ea7eeebdd0..28fb092439 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IP.java index 6e238817b5..433020b814 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicy.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicy.java index 6b20e21a5c..522ef1e22f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicy.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicy.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyCollection.java index 483c3fe10c..8ba3f2c990 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyConnectionCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyConnectionCollection.java index 783ea8751d..ad45306879 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyConnectionCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyConnectionCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyPatch.java index 78bab01611..b23b672f2a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyReference.java index b9239983f4..3b78e83443 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IkePoliciesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IkePoliciesPager.java index 6d0309d8ea..fd40432e25 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IkePoliciesPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IkePoliciesPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IkePolicyConnectionsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IkePolicyConnectionsPager.java index c03e3069f4..d50a57ee3c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IkePolicyConnectionsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IkePolicyConnectionsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Image.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Image.java index 7643a82832..2b142f9bda 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Image.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Image.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -106,6 +106,8 @@ public interface Visibility { String X_PUBLIC = "public"; } + @SerializedName("allowed_use") + protected ImageAllowedUse allowedUse; @SerializedName("catalog_offering") protected ImageCatalogOffering catalogOffering; @SerializedName("created_at") @@ -142,6 +144,18 @@ public interface Visibility { protected Image() { } + /** + * Gets the allowedUse. + * + * The usage constraints to match against the requested instance or bare metal server + * properties to determine compatibility. + * + * @return the allowedUse + */ + public ImageAllowedUse getAllowedUse() { + return allowedUse; + } + /** * Gets the catalogOffering. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageAllowedUse.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageAllowedUse.java new file mode 100644 index 0000000000..d58bd25ebb --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageAllowedUse.java @@ -0,0 +1,79 @@ +/* + * (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.is.vpc.v1.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * ImageAllowedUse. + */ +public class ImageAllowedUse extends GenericModel { + + @SerializedName("api_version") + protected String apiVersion; + @SerializedName("bare_metal_server") + protected String bareMetalServer; + protected String instance; + + protected ImageAllowedUse() { } + + /** + * Gets the apiVersion. + * + * The API version with which to evaluate the expressions. + * + * @return the apiVersion + */ + public String getApiVersion() { + return apiVersion; + } + + /** + * Gets the bareMetalServer. + * + * The expression that must be satisfied by the properties of a bare metal server provisioned using this image. + * + * The expression follows [Common Expression Language](https://github.com/google/cel-spec/blob/master/doc/langdef.md), + * but does not support built-in functions and macros. In addition, the following variables are supported, + * corresponding to `BareMetalServer` properties: + * - `enable_secure_boot` (boolean): Indicates whether secure boot is enabled. + * + * @return the bareMetalServer + */ + public String getBareMetalServer() { + return bareMetalServer; + } + + /** + * Gets the instance. + * + * The expression that must be satisfied by the properties of a virtual server instance provisioned using this image. + * + * The expression follows [Common Expression Language](https://github.com/google/cel-spec/blob/master/doc/langdef.md), + * but does not support built-in functions and macros. In addition, the following variables are supported, + * corresponding to `Instance` properties: + * - `enable_secure_boot` (boolean): Indicates whether secure boot is enabled + * - `gpu.count` (integer): The number of GPUs + * - `gpu.manufacturer` (string): The GPU manufacturer + * - `gpu.memory` (integer): The overall amount of GPU memory in GiB (gibibytes) + * - `gpu.model` (string): The GPU model. + * + * @return the instance + */ + public String getInstance() { + return instance; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageAllowedUsePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageAllowedUsePatch.java new file mode 100644 index 0000000000..be02b3d84c --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageAllowedUsePatch.java @@ -0,0 +1,164 @@ +/* + * (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.is.vpc.v1.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * ImageAllowedUsePatch. + */ +public class ImageAllowedUsePatch extends GenericModel { + + @SerializedName("api_version") + protected String apiVersion; + @SerializedName("bare_metal_server") + protected String bareMetalServer; + protected String instance; + + /** + * Builder. + */ + public static class Builder { + private String apiVersion; + private String bareMetalServer; + private String instance; + + /** + * Instantiates a new Builder from an existing ImageAllowedUsePatch instance. + * + * @param imageAllowedUsePatch the instance to initialize the Builder with + */ + private Builder(ImageAllowedUsePatch imageAllowedUsePatch) { + this.apiVersion = imageAllowedUsePatch.apiVersion; + this.bareMetalServer = imageAllowedUsePatch.bareMetalServer; + this.instance = imageAllowedUsePatch.instance; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Builds a ImageAllowedUsePatch. + * + * @return the new ImageAllowedUsePatch instance + */ + public ImageAllowedUsePatch build() { + return new ImageAllowedUsePatch(this); + } + + /** + * Set the apiVersion. + * + * @param apiVersion the apiVersion + * @return the ImageAllowedUsePatch builder + */ + public Builder apiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return this; + } + + /** + * Set the bareMetalServer. + * + * @param bareMetalServer the bareMetalServer + * @return the ImageAllowedUsePatch builder + */ + public Builder bareMetalServer(String bareMetalServer) { + this.bareMetalServer = bareMetalServer; + return this; + } + + /** + * Set the instance. + * + * @param instance the instance + * @return the ImageAllowedUsePatch builder + */ + public Builder instance(String instance) { + this.instance = instance; + return this; + } + } + + protected ImageAllowedUsePatch() { } + + protected ImageAllowedUsePatch(Builder builder) { + apiVersion = builder.apiVersion; + bareMetalServer = builder.bareMetalServer; + instance = builder.instance; + } + + /** + * New builder. + * + * @return a ImageAllowedUsePatch builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the apiVersion. + * + * The API version with which to evaluate the expressions. + * + * If specified, the value must be between `2019-01-01` and today's date (in UTC). + * + * @return the apiVersion + */ + public String apiVersion() { + return apiVersion; + } + + /** + * Gets the bareMetalServer. + * + * The expression that must be satisfied by the properties of a bare metal server provisioned using this image. + * + * The expression follows [Common Expression Language](https://github.com/google/cel-spec/blob/master/doc/langdef.md), + * but does not support built-in functions and macros. In addition, the following variable is supported, corresponding + * to the `BareMetalServer` property: + * - `enable_secure_boot` (boolean): Indicates whether secure boot is enabled. + * + * @return the bareMetalServer + */ + public String bareMetalServer() { + return bareMetalServer; + } + + /** + * Gets the instance. + * + * The expression that must be satisfied by the properties of a virtual server instance provisioned using this image. + * + * The expression follows [Common Expression Language](https://github.com/google/cel-spec/blob/master/doc/langdef.md), + * but does not support built-in functions and macros. In addition, the following variables are supported, + * corresponding to `Instance` properties: + * - `enable_secure_boot` (boolean): Indicates whether secure boot is enabled + * - `gpu.count` (integer): The number of GPUs + * - `gpu.manufacturer` (string): The GPU manufacturer + * - `gpu.memory` (integer): The overall amount of GPU memory in GiB (gibibytes) + * - `gpu.model` (string): The GPU model. + * + * @return the instance + */ + public String instance() { + return instance; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageAllowedUsePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageAllowedUsePrototype.java new file mode 100644 index 0000000000..0a3585eda4 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageAllowedUsePrototype.java @@ -0,0 +1,169 @@ +/* + * (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.is.vpc.v1.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * ImageAllowedUsePrototype. + */ +public class ImageAllowedUsePrototype extends GenericModel { + + @SerializedName("api_version") + protected String apiVersion; + @SerializedName("bare_metal_server") + protected String bareMetalServer; + protected String instance; + + /** + * Builder. + */ + public static class Builder { + private String apiVersion; + private String bareMetalServer; + private String instance; + + /** + * Instantiates a new Builder from an existing ImageAllowedUsePrototype instance. + * + * @param imageAllowedUsePrototype the instance to initialize the Builder with + */ + private Builder(ImageAllowedUsePrototype imageAllowedUsePrototype) { + this.apiVersion = imageAllowedUsePrototype.apiVersion; + this.bareMetalServer = imageAllowedUsePrototype.bareMetalServer; + this.instance = imageAllowedUsePrototype.instance; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Builds a ImageAllowedUsePrototype. + * + * @return the new ImageAllowedUsePrototype instance + */ + public ImageAllowedUsePrototype build() { + return new ImageAllowedUsePrototype(this); + } + + /** + * Set the apiVersion. + * + * @param apiVersion the apiVersion + * @return the ImageAllowedUsePrototype builder + */ + public Builder apiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return this; + } + + /** + * Set the bareMetalServer. + * + * @param bareMetalServer the bareMetalServer + * @return the ImageAllowedUsePrototype builder + */ + public Builder bareMetalServer(String bareMetalServer) { + this.bareMetalServer = bareMetalServer; + return this; + } + + /** + * Set the instance. + * + * @param instance the instance + * @return the ImageAllowedUsePrototype builder + */ + public Builder instance(String instance) { + this.instance = instance; + return this; + } + } + + protected ImageAllowedUsePrototype() { } + + protected ImageAllowedUsePrototype(Builder builder) { + apiVersion = builder.apiVersion; + bareMetalServer = builder.bareMetalServer; + instance = builder.instance; + } + + /** + * New builder. + * + * @return a ImageAllowedUsePrototype builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the apiVersion. + * + * The API version with which to evaluate the expressions. + * + * If specified, the value must be between `2019-01-01` and today's date (in UTC). If unspecified, the `version` query + * parameter value will be used. + * + * @return the apiVersion + */ + public String apiVersion() { + return apiVersion; + } + + /** + * Gets the bareMetalServer. + * + * The expression that must be satisfied by the properties of a bare metal server provisioned using this image. + * + * If unspecified, the expression will be set to `true`. + * + * The expression follows [Common Expression Language](https://github.com/google/cel-spec/blob/master/doc/langdef.md), + * but does not support built-in functions and macros. In addition, the following variable is supported, corresponding + * to the `BareMetalServer` property: + * - `enable_secure_boot` (boolean): Indicates whether secure boot is enabled. + * + * @return the bareMetalServer + */ + public String bareMetalServer() { + return bareMetalServer; + } + + /** + * Gets the instance. + * + * The expression that must be satisfied by the properties of a virtual server instance provisioned using this image. + * + * If unspecified, the expression will be set to `true`. + * + * The expression follows [Common Expression Language](https://github.com/google/cel-spec/blob/master/doc/langdef.md), + * but does not support built-in functions and macros. In addition, the following variables are supported, + * corresponding to `Instance` properties: + * - `enable_secure_boot` (boolean): Indicates whether secure boot is enabled + * - `gpu.count` (integer): The number of GPUs + * - `gpu.manufacturer` (string): The GPU manufacturer + * - `gpu.memory` (integer): The overall amount of GPU memory in GiB (gibibytes) + * - `gpu.model` (string): The GPU model. + * + * @return the instance + */ + public String instance() { + return instance; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageBareMetalServerProfileCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageBareMetalServerProfileCollection.java new file mode 100644 index 0000000000..36afc8f823 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageBareMetalServerProfileCollection.java @@ -0,0 +1,92 @@ +/* + * (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.is.vpc.v1.model; + +import java.util.List; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * ImageBareMetalServerProfileCollection. + */ +public class ImageBareMetalServerProfileCollection extends GenericModel { + + @SerializedName("bare_metal_server_profiles") + protected List bareMetalServerProfiles; + protected PageLink first; + protected Long limit; + protected PageLink next; + @SerializedName("total_count") + protected Long totalCount; + + protected ImageBareMetalServerProfileCollection() { } + + /** + * Gets the bareMetalServerProfiles. + * + * A page of bare metal server profiles compatible with the image. + * + * @return the bareMetalServerProfiles + */ + public List getBareMetalServerProfiles() { + return bareMetalServerProfiles; + } + + /** + * Gets the first. + * + * A link to the first page of resources. + * + * @return the first + */ + public PageLink getFirst() { + return first; + } + + /** + * Gets the limit. + * + * The maximum number of resources that can be returned by the request. + * + * @return the limit + */ + public Long getLimit() { + return limit; + } + + /** + * Gets the next. + * + * A link to the next page of resources. This property is present for all pages + * except the last page. + * + * @return the next + */ + public PageLink getNext() { + return next; + } + + /** + * Gets the totalCount. + * + * The total number of resources across all pages. + * + * @return the totalCount + */ + public Long getTotalCount() { + return totalCount; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageBareMetalServerProfilesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageBareMetalServerProfilesPager.java new file mode 100644 index 0000000000..fee8b21fda --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageBareMetalServerProfilesPager.java @@ -0,0 +1,112 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.Vpc; +import com.ibm.cloud.sdk.core.util.UrlHelper; +import java.util.ArrayList; +import java.util.List; +import java.util.NoSuchElementException; + +/** + * ImageBareMetalServerProfilesPager can be used to simplify the use of the "listImageBareMetalServerProfiles" method. + */ +public class ImageBareMetalServerProfilesPager { + private static class PageContext { + private String next; + public String getNext() { + return next; + } + public void setNext(String next) { + this.next = next; + } + } + + protected boolean hasNext; + protected ListImageBareMetalServerProfilesOptions options; + protected Vpc client; + protected PageContext pageContext; + + // Hide the default ctor. + protected ImageBareMetalServerProfilesPager() { } + + /** + * Constructs a new ImageBareMetalServerProfilesPager instance with the specified client and options model instance. + * @param client the Vpc instance to be used to invoke the "listImageBareMetalServerProfiles" method + * @param options the ListImageBareMetalServerProfilesOptions instance to be used to invoke the "listImageBareMetalServerProfiles" method + */ + public ImageBareMetalServerProfilesPager(Vpc client, ListImageBareMetalServerProfilesOptions options) { + if (options.start() != null) { + throw new IllegalArgumentException("The options 'start' field should not be set"); + } + + this.hasNext = true; + this.client = client; + this.options = options.newBuilder().build(); + this.pageContext = new PageContext(); + } + + /** + * Returns true if there are more results to be retrieved. + * @return boolean + */ + public boolean hasNext() { + return hasNext; + } + + /** + * Returns the next page of results. + * @return a List<BareMetalServerProfileReference> that contains the next page of results + */ + public List getNext() { + if (!hasNext()) { + throw new NoSuchElementException("No more results available"); + } + + ListImageBareMetalServerProfilesOptions.Builder builder = this.options.newBuilder(); + if (this.pageContext.getNext() != null) { + builder.start(this.pageContext.getNext()); + } + this.options = builder.build(); + + ImageBareMetalServerProfileCollection result = client.listImageBareMetalServerProfiles(options).execute().getResult(); + + String next = null; + if (result.getNext() != null) { + String queryParam = UrlHelper.getQueryParam(result.getNext().getHref(), "start"); + if (queryParam != null) { + next = queryParam; + } + } + this.pageContext.setNext(next); + if (next == null) { + this.hasNext = false; + } + + return result.getBareMetalServerProfiles(); + } + + /** + * Returns all results by invoking getNext() repeatedly until all pages of results have been retrieved. + * @return a List<BareMetalServerProfileReference> containing all results returned by the "listImageBareMetalServerProfiles" method + */ + public List getAll() { + List results = new ArrayList<>(); + while (hasNext()) { + List nextPage = getNext(); + results.addAll(nextPage); + } + return results; + } +} diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageCatalogOffering.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageCatalogOffering.java index 0af162655b..a5e1455924 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageCatalogOffering.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageCatalogOffering.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageCollection.java index d07ed92ad7..1dad49707f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJob.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJob.java index c1323fe9e9..d2d6a3440e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJob.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJob.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobPatch.java index c2a26546ff..5ec5f88a8d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobStatusReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobStatusReason.java index 427b53623f..b906c7cd8d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobStatusReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobStatusReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobUnpaginatedCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobUnpaginatedCollection.java index 180dedc79a..0d3d9889af 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobUnpaginatedCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobUnpaginatedCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageFile.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageFile.java index 509fa684e9..0b0f8e02a9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageFile.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageFile.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageFileChecksums.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageFileChecksums.java index b9a472a3c7..d8bd47b32f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageFileChecksums.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageFileChecksums.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageFilePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageFilePrototype.java index c6538dcb7b..161b3957df 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageFilePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageFilePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentity.java index 9e35484bce..195c56eeb9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityByCRN.java index dec920a3f3..2c35a273b3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityByHref.java index 023d589470..0364942c18 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityById.java index bafdbc17c3..fe6f7f4603 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageInstanceProfileCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageInstanceProfileCollection.java new file mode 100644 index 0000000000..1783af3c6d --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageInstanceProfileCollection.java @@ -0,0 +1,92 @@ +/* + * (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.is.vpc.v1.model; + +import java.util.List; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * ImageInstanceProfileCollection. + */ +public class ImageInstanceProfileCollection extends GenericModel { + + protected PageLink first; + @SerializedName("instance_profiles") + protected List instanceProfiles; + protected Long limit; + protected PageLink next; + @SerializedName("total_count") + protected Long totalCount; + + protected ImageInstanceProfileCollection() { } + + /** + * Gets the first. + * + * A link to the first page of resources. + * + * @return the first + */ + public PageLink getFirst() { + return first; + } + + /** + * Gets the instanceProfiles. + * + * A page of instance profiles compatible with the image. + * + * @return the instanceProfiles + */ + public List getInstanceProfiles() { + return instanceProfiles; + } + + /** + * Gets the limit. + * + * The maximum number of resources that can be returned by the request. + * + * @return the limit + */ + public Long getLimit() { + return limit; + } + + /** + * Gets the next. + * + * A link to the next page of resources. This property is present for all pages + * except the last page. + * + * @return the next + */ + public PageLink getNext() { + return next; + } + + /** + * Gets the totalCount. + * + * The total number of resources across all pages. + * + * @return the totalCount + */ + public Long getTotalCount() { + return totalCount; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageInstanceProfilesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageInstanceProfilesPager.java new file mode 100644 index 0000000000..1cb089ead9 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageInstanceProfilesPager.java @@ -0,0 +1,112 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.Vpc; +import com.ibm.cloud.sdk.core.util.UrlHelper; +import java.util.ArrayList; +import java.util.List; +import java.util.NoSuchElementException; + +/** + * ImageInstanceProfilesPager can be used to simplify the use of the "listImageInstanceProfiles" method. + */ +public class ImageInstanceProfilesPager { + private static class PageContext { + private String next; + public String getNext() { + return next; + } + public void setNext(String next) { + this.next = next; + } + } + + protected boolean hasNext; + protected ListImageInstanceProfilesOptions options; + protected Vpc client; + protected PageContext pageContext; + + // Hide the default ctor. + protected ImageInstanceProfilesPager() { } + + /** + * Constructs a new ImageInstanceProfilesPager instance with the specified client and options model instance. + * @param client the Vpc instance to be used to invoke the "listImageInstanceProfiles" method + * @param options the ListImageInstanceProfilesOptions instance to be used to invoke the "listImageInstanceProfiles" method + */ + public ImageInstanceProfilesPager(Vpc client, ListImageInstanceProfilesOptions options) { + if (options.start() != null) { + throw new IllegalArgumentException("The options 'start' field should not be set"); + } + + this.hasNext = true; + this.client = client; + this.options = options.newBuilder().build(); + this.pageContext = new PageContext(); + } + + /** + * Returns true if there are more results to be retrieved. + * @return boolean + */ + public boolean hasNext() { + return hasNext; + } + + /** + * Returns the next page of results. + * @return a List<InstanceProfileReference> that contains the next page of results + */ + public List getNext() { + if (!hasNext()) { + throw new NoSuchElementException("No more results available"); + } + + ListImageInstanceProfilesOptions.Builder builder = this.options.newBuilder(); + if (this.pageContext.getNext() != null) { + builder.start(this.pageContext.getNext()); + } + this.options = builder.build(); + + ImageInstanceProfileCollection result = client.listImageInstanceProfiles(options).execute().getResult(); + + String next = null; + if (result.getNext() != null) { + String queryParam = UrlHelper.getQueryParam(result.getNext().getHref(), "start"); + if (queryParam != null) { + next = queryParam; + } + } + this.pageContext.setNext(next); + if (next == null) { + this.hasNext = false; + } + + return result.getInstanceProfiles(); + } + + /** + * Returns all results by invoking getNext() repeatedly until all pages of results have been retrieved. + * @return a List<InstanceProfileReference> containing all results returned by the "listImageInstanceProfiles" method + */ + public List getAll() { + List results = new ArrayList<>(); + while (hasNext()) { + List nextPage = getNext(); + results.addAll(nextPage); + } + return results; + } +} diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImagePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImagePatch.java index af2246ffb2..7cffc3a032 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImagePatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImagePatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -25,6 +25,8 @@ */ public class ImagePatch extends GenericModel { + @SerializedName("allowed_use") + protected ImageAllowedUsePatch allowedUse; @SerializedName("deprecation_at") protected Date deprecationAt; protected String name; @@ -35,6 +37,7 @@ public class ImagePatch extends GenericModel { * Builder. */ public static class Builder { + private ImageAllowedUsePatch allowedUse; private Date deprecationAt; private String name; private Date obsolescenceAt; @@ -45,6 +48,7 @@ public static class Builder { * @param imagePatch the instance to initialize the Builder with */ private Builder(ImagePatch imagePatch) { + this.allowedUse = imagePatch.allowedUse; this.deprecationAt = imagePatch.deprecationAt; this.name = imagePatch.name; this.obsolescenceAt = imagePatch.obsolescenceAt; @@ -65,6 +69,17 @@ public ImagePatch build() { return new ImagePatch(this); } + /** + * Set the allowedUse. + * + * @param allowedUse the allowedUse + * @return the ImagePatch builder + */ + public Builder allowedUse(ImageAllowedUsePatch allowedUse) { + this.allowedUse = allowedUse; + return this; + } + /** * Set the deprecationAt. * @@ -102,6 +117,7 @@ public Builder obsolescenceAt(Date obsolescenceAt) { protected ImagePatch() { } protected ImagePatch(Builder builder) { + allowedUse = builder.allowedUse; deprecationAt = builder.deprecationAt; name = builder.name; obsolescenceAt = builder.obsolescenceAt; @@ -116,6 +132,18 @@ public Builder newBuilder() { return new Builder(this); } + /** + * Gets the allowedUse. + * + * The usage constraints to be matched against the requested instance or bare metal server + * properties to determine compatibility. + * + * @return the allowedUse + */ + public ImageAllowedUsePatch allowedUse() { + return allowedUse; + } + /** * Gets the deprecationAt. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImagePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImagePrototype.java index c99822ed47..e9cda72756 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImagePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImagePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -27,6 +27,8 @@ */ public class ImagePrototype extends GenericModel { + @SerializedName("allowed_use") + protected ImageAllowedUsePrototype allowedUse; @SerializedName("deprecation_at") protected Date deprecationAt; protected String name; @@ -46,6 +48,18 @@ public class ImagePrototype extends GenericModel { protected ImagePrototype() { } + /** + * Gets the allowedUse. + * + * The usage constraints to match against the requested instance or bare metal server + * properties to determine compatibility. + * + * @return the allowedUse + */ + public ImageAllowedUsePrototype allowedUse() { + return allowedUse; + } + /** * Gets the deprecationAt. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImagePrototypeImageByFile.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImagePrototypeImageByFile.java index 14f096510a..a3b77389c1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImagePrototypeImageByFile.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImagePrototypeImageByFile.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -25,6 +25,7 @@ public class ImagePrototypeImageByFile extends ImagePrototype { * Builder. */ public static class Builder { + private ImageAllowedUsePrototype allowedUse; private Date deprecationAt; private String name; private Date obsolescenceAt; @@ -40,6 +41,7 @@ public static class Builder { * @param imagePrototypeImageByFile the instance to initialize the Builder with */ public Builder(ImagePrototype imagePrototypeImageByFile) { + this.allowedUse = imagePrototypeImageByFile.allowedUse; this.deprecationAt = imagePrototypeImageByFile.deprecationAt; this.name = imagePrototypeImageByFile.name; this.obsolescenceAt = imagePrototypeImageByFile.obsolescenceAt; @@ -76,6 +78,17 @@ public ImagePrototypeImageByFile build() { return new ImagePrototypeImageByFile(this); } + /** + * Set the allowedUse. + * + * @param allowedUse the allowedUse + * @return the ImagePrototypeImageByFile builder + */ + public Builder allowedUse(ImageAllowedUsePrototype allowedUse) { + this.allowedUse = allowedUse; + return this; + } + /** * Set the deprecationAt. * @@ -172,6 +185,7 @@ protected ImagePrototypeImageByFile(Builder builder) { "file cannot be null"); com.ibm.cloud.sdk.core.util.Validator.notNull(builder.operatingSystem, "operatingSystem cannot be null"); + allowedUse = builder.allowedUse; deprecationAt = builder.deprecationAt; name = builder.name; obsolescenceAt = builder.obsolescenceAt; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImagePrototypeImageBySourceVolume.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImagePrototypeImageBySourceVolume.java index ff0d44bc3c..ca1549dc28 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImagePrototypeImageBySourceVolume.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImagePrototypeImageBySourceVolume.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -25,6 +25,7 @@ public class ImagePrototypeImageBySourceVolume extends ImagePrototype { * Builder. */ public static class Builder { + private ImageAllowedUsePrototype allowedUse; private Date deprecationAt; private String name; private Date obsolescenceAt; @@ -38,6 +39,7 @@ public static class Builder { * @param imagePrototypeImageBySourceVolume the instance to initialize the Builder with */ public Builder(ImagePrototype imagePrototypeImageBySourceVolume) { + this.allowedUse = imagePrototypeImageBySourceVolume.allowedUse; this.deprecationAt = imagePrototypeImageBySourceVolume.deprecationAt; this.name = imagePrototypeImageBySourceVolume.name; this.obsolescenceAt = imagePrototypeImageBySourceVolume.obsolescenceAt; @@ -70,6 +72,17 @@ public ImagePrototypeImageBySourceVolume build() { return new ImagePrototypeImageBySourceVolume(this); } + /** + * Set the allowedUse. + * + * @param allowedUse the allowedUse + * @return the ImagePrototypeImageBySourceVolume builder + */ + public Builder allowedUse(ImageAllowedUsePrototype allowedUse) { + this.allowedUse = allowedUse; + return this; + } + /** * Set the deprecationAt. * @@ -142,6 +155,7 @@ protected ImagePrototypeImageBySourceVolume() { } protected ImagePrototypeImageBySourceVolume(Builder builder) { com.ibm.cloud.sdk.core.util.Validator.notNull(builder.sourceVolume, "sourceVolume cannot be null"); + allowedUse = builder.allowedUse; deprecationAt = builder.deprecationAt; name = builder.name; obsolescenceAt = builder.obsolescenceAt; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageReference.java index 2ac33ac9ff..ea255814c9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageRemote.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageRemote.java index adf108ceee..d5ad43b2ee 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageRemote.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageRemote.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageRemoteContextImageReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageRemoteContextImageReference.java index e908017722..92627b8d64 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageRemoteContextImageReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageRemoteContextImageReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageStatusReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageStatusReason.java index df16fb6b3f..63e6668711 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageStatusReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImageStatusReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImagesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImagesPager.java index 08c46ffbf1..43faa70bfb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImagesPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ImagesPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Instance.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Instance.java index d544fd5800..28adb5bca1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Instance.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Instance.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -109,6 +109,16 @@ public interface Status { String STOPPING = "stopping"; } + /** + * The volume bandwidth QoS mode for this virtual server instance. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + @SerializedName("availability_policy") protected InstanceAvailabilityPolicy availabilityPolicy; protected Long bandwidth; @@ -177,6 +187,8 @@ public interface Status { protected InstanceVCPU vcpu; @SerializedName("volume_attachments") protected List volumeAttachments; + @SerializedName("volume_bandwidth_qos_mode") + protected String volumeBandwidthQosMode; protected VPCReference vpc; protected ZoneReference zone; @@ -664,6 +676,17 @@ public List getVolumeAttachments() { return volumeAttachments; } + /** + * Gets the volumeBandwidthQosMode. + * + * The volume bandwidth QoS mode for this virtual server instance. + * + * @return the volumeBandwidthQosMode + */ + public String getVolumeBandwidthQosMode() { + return volumeBandwidthQosMode; + } + /** * Gets the vpc. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceAction.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceAction.java index 3be63a8389..c41c746d44 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceAction.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceAction.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceAvailabilityPolicy.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceAvailabilityPolicy.java index 0322079041..79498cdf9c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceAvailabilityPolicy.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceAvailabilityPolicy.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -17,14 +17,16 @@ import com.ibm.cloud.sdk.core.service.model.GenericModel; /** - * InstanceAvailabilityPolicy. + * The availability policy for this virtual server instance. */ public class InstanceAvailabilityPolicy extends GenericModel { /** * The action to perform if the compute host experiences a failure: - * - `restart`: Automatically restart the virtual server instance after host failure - * - `stop`: Leave the virtual server instance stopped after host failure + * - `restart`: Restart the virtual server instance + * - `stop`: Leave the virtual server instance stopped + * + * See [handling host failures](https://cloud.ibm.com/docs/vpc?topic=vpc-host-failure-recovery-policies) for details. * * The enumerated values for this property may * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. @@ -45,8 +47,10 @@ protected InstanceAvailabilityPolicy() { } * Gets the hostFailure. * * The action to perform if the compute host experiences a failure: - * - `restart`: Automatically restart the virtual server instance after host failure - * - `stop`: Leave the virtual server instance stopped after host failure + * - `restart`: Restart the virtual server instance + * - `stop`: Leave the virtual server instance stopped + * + * See [handling host failures](https://cloud.ibm.com/docs/vpc?topic=vpc-host-failure-recovery-policies) for details. * * The enumerated values for this property may * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceAvailabilityPolicyPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceAvailabilityPolicyPatch.java index 0ce716d526..2e2585e338 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceAvailabilityPolicyPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceAvailabilityPolicyPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -22,9 +22,9 @@ public class InstanceAvailabilityPolicyPatch extends GenericModel { /** - * The action to perform if the compute host experiences a failure. - * - `restart`: Automatically restart the virtual server instance after host failure - * - `stop`: Leave the virtual server instance stopped after host failure. + * The action to perform if the compute host experiences a failure: + * - `restart`: Restart the virtual server instance + * - `stop`: Leave the virtual server instance stopped. */ public interface HostFailure { /** restart. */ @@ -96,9 +96,9 @@ public Builder newBuilder() { /** * Gets the hostFailure. * - * The action to perform if the compute host experiences a failure. - * - `restart`: Automatically restart the virtual server instance after host failure - * - `stop`: Leave the virtual server instance stopped after host failure. + * The action to perform if the compute host experiences a failure: + * - `restart`: Restart the virtual server instance + * - `stop`: Leave the virtual server instance stopped. * * @return the hostFailure */ diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceAvailabilityPolicyPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceAvailabilityPolicyPrototype.java index 8587a7e55a..c6afdc3d01 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceAvailabilityPolicyPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceAvailabilityPolicyPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -17,14 +17,16 @@ import com.ibm.cloud.sdk.core.service.model.GenericModel; /** - * InstanceAvailabilityPolicyPrototype. + * The availability policy to use for this virtual server instance. */ public class InstanceAvailabilityPolicyPrototype extends GenericModel { /** - * The action to perform if the compute host experiences a failure. - * - `restart`: Automatically restart the virtual server instance after host failure - * - `stop`: Leave the virtual server instance stopped after host failure. + * The action to perform if the compute host experiences a failure: + * - `restart`: Restart the virtual server instance + * - `stop`: Leave the virtual server instance stopped + * + * See [handling host failures](https://cloud.ibm.com/docs/vpc?topic=vpc-host-failure-recovery-policies) for details. */ public interface HostFailure { /** restart. */ @@ -96,9 +98,11 @@ public Builder newBuilder() { /** * Gets the hostFailure. * - * The action to perform if the compute host experiences a failure. - * - `restart`: Automatically restart the virtual server instance after host failure - * - `stop`: Leave the virtual server instance stopped after host failure. + * The action to perform if the compute host experiences a failure: + * - `restart`: Restart the virtual server instance + * - `stop`: Leave the virtual server instance stopped + * + * See [handling host failures](https://cloud.ibm.com/docs/vpc?topic=vpc-host-failure-recovery-policies) for details. * * @return the hostFailure */ diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOffering.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOffering.java index d1afce7b3b..5556af03b7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOffering.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOffering.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingPrototype.java index 74fd868552..50ddcf30fa 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingPrototypeCatalogOfferingByOffering.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingPrototypeCatalogOfferingByOffering.java index e8c0d692ca..179d929127 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingPrototypeCatalogOfferingByOffering.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingPrototypeCatalogOfferingByOffering.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingPrototypeCatalogOfferingByVersion.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingPrototypeCatalogOfferingByVersion.java index 24f5ed941e..dc7d5c53de 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingPrototypeCatalogOfferingByVersion.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingPrototypeCatalogOfferingByVersion.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachment.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachment.java index f5a8a20753..3ca2295020 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachment.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBefore.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBefore.java index 9346237677..7547668fac 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBefore.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBefore.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforePrototype.java index 6718c4cd36..d048cb1ffb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref.java index eb79ec2d4d..5eb2215035 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById.java index 368e3e35df..4ef76adfba 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentCollection.java index 3343e4b4ae..05b0bde52a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentLifecycleReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentLifecycleReason.java index eebba01e4d..432fb975e3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentLifecycleReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentLifecycleReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPatch.java index 6cdb8056d4..2a662520ef 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterface.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterface.java index 0d7032f18a..18b19a4c15 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterface.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterface.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentity.java index a2f1a67187..bb39ca3daf 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref.java index fe7c01e4fb..d006e0f026 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById.java index 78ca9f2e46..8a663f8e69 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment.java index b95499690d..00666db0c0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeInstanceContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeInstanceContext.java index c0b21b19de..ab43e4c6d4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeInstanceContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeInstanceContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentReference.java index bd34cea38b..ab14a6e055 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentsPager.java index f707409abf..a34daa61c7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceCollection.java index e22cad1e87..84d3b12794 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceConsoleAccessToken.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceConsoleAccessToken.java index 604c0a395b..490c591cb4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceConsoleAccessToken.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceConsoleAccessToken.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceDefaultTrustedProfilePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceDefaultTrustedProfilePrototype.java index 5cd318532c..6805a650f0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceDefaultTrustedProfilePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceDefaultTrustedProfilePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceDisk.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceDisk.java index f7631d0189..70ad9ebf0d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceDisk.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceDisk.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskCollection.java index e6fc125095..00651171e1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskPatch.java index 8e5c496f87..dddc624b0a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskReference.java index 14ff5af3b8..246476f226 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGPU.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGPU.java index 368ca162ab..122515c43f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGPU.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGPU.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroup.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroup.java index 1b1014229a..d482dfbbc0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroup.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroup.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupCollection.java index b14744bdeb..a9d46ca053 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupLifecycleReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupLifecycleReason.java index 846610c2a8..5ad8802d35 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupLifecycleReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupLifecycleReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManager.java index c688adbfd1..d3dcb913f2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerAction.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerAction.java index 8d3908e648..1a042ff35b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerAction.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerAction.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionGroupPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionGroupPatch.java index 7222e8ee82..5854d3321d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionGroupPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionGroupPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionManagerPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionManagerPatch.java index 542bae5893..60a01d88bd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionManagerPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionManagerPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPatch.java index c6b878b138..866148c084 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototype.java index 9d191aeda4..2e16013106 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototype.java index 204cc6b2b9..191b2f7b28 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec.java index 734944ab0f..1cae659698 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup.java index 36cd502cee..e9e1600d42 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager.java index 528a46b408..fafaf8740c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt.java index 08c462671e..2fa011e228 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup.java index 71f939cde3..f656db733d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager.java index 9893c349ad..47494879c8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionReference.java index a8e42f6eb2..53320f592c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionScheduledAction.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionScheduledAction.java index 325574f4a6..82ea0b454d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionScheduledAction.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionScheduledAction.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionScheduledActionGroupTarget.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionScheduledActionGroupTarget.java index 0565556c41..079f16ab46 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionScheduledActionGroupTarget.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionScheduledActionGroupTarget.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionScheduledActionManagerTarget.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionScheduledActionManagerTarget.java index 76a2f36bec..4336fc4e9a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionScheduledActionManagerTarget.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionScheduledActionManagerTarget.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionsCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionsCollection.java index 1a456099df..85066d4ede 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionsCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionsCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionsPager.java index a02a606a1b..2ac819ab05 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerAutoScale.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerAutoScale.java index 69d4e56a77..ed376a2941 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerAutoScale.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerAutoScale.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerCollection.java index ec33d7fc40..3e3d7611b3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPatch.java index e0798b22a5..ba25ce1549 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPoliciesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPoliciesPager.java index 91a1b29b77..2522d8fd36 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPoliciesPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPoliciesPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicy.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicy.java index 4fdb8a6d39..937c42ce30 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicy.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicy.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyCollection.java index dc6c4312c4..b22b61e28b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy.java index b80087e7c4..980d12f746 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyPatch.java index 1c49b45c10..da137d1dc8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyPrototype.java index 3e217dd35a..dad0fb309f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype.java index 24f9209349..e20279b046 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyReference.java index d717c19771..9a4e3c9835 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPrototype.java index 511e304250..3dbefc7030 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype.java index 09d00a0c0f..21b9a3839e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype.java index 5db290ee04..abe424fe82 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerReference.java index d5f45ea1c7..6a5a4dec9e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduled.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduled.java index 6654f1004f..ac8d4a733a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduled.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduled.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionGroup.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionGroup.java index 8389a1a36b..f9de6c5aae 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionGroup.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionGroup.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionGroupPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionGroupPrototype.java index e110d7cce9..69a147b0c5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionGroupPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionGroupPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManager.java index ac6a0ebb15..fe579bb33e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerAutoScale.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerAutoScale.java index 66bcd5827b..ce6724ac79 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerAutoScale.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerAutoScale.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototype.java index 3cf1a666a3..a2b9bca91d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype.java index d3b96a1755..c8a1fd03b5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref.java index 2fa44ab1bc..aa6db1112f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById.java index 200b960033..51b17f4a41 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagersPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagersPager.java index 11ab27631b..68f8037ee6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagersPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagersPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembership.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembership.java index a3a0ae6b87..e904073841 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembership.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembership.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembershipCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembershipCollection.java index 6e2ed26d66..d80de50e04 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembershipCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembershipCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembershipPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembershipPatch.java index eb773f4ed1..1ff8c43d47 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembershipPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembershipPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembershipsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembershipsPager.java index 101bf64ecf..86abb67b1d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembershipsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembershipsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupPatch.java index bc4085e9e7..7596b65f85 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupReference.java index 8faf10c315..e460967384 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupsPager.java index 7f2ff254b7..041a1b5539 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceHealthReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceHealthReason.java index 67f966bbf8..e555e757ac 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceHealthReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceHealthReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceInitialization.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceInitialization.java index 8fc9cbd1db..bf64126b82 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceInitialization.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceInitialization.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceInitializationDefaultTrustedProfile.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceInitializationDefaultTrustedProfile.java index 492252d726..a6ebf76c1f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceInitializationDefaultTrustedProfile.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceInitializationDefaultTrustedProfile.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceInitializationPassword.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceInitializationPassword.java index 162032760c..bd4bd9b805 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceInitializationPassword.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceInitializationPassword.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceLifecycleReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceLifecycleReason.java index ba645d3aba..81a05cc3ad 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceLifecycleReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceLifecycleReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceMetadataService.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceMetadataService.java index 46bf3e7ece..79e65a5c28 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceMetadataService.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceMetadataService.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceMetadataServicePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceMetadataServicePatch.java index 7d8697e3c0..63018490f2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceMetadataServicePatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceMetadataServicePatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceMetadataServicePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceMetadataServicePrototype.java index 9aa79db093..7b8a2ab1a9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceMetadataServicePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceMetadataServicePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachment.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachment.java index 97da015acb..3b536c9fd7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachment.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentCollection.java index e3d7ae6e69..1e0a1f0fbf 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPatch.java index 31b64280fc..f07d67ca46 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototype.java index f699db4143..179f872711 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterface.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterface.java index a291cfb263..0104d0dbaf 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterface.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterface.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity.java index 82886fe149..f53138b86e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java index 7a829fd9eb..6a5dfee33f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java index 8e7307a22f..90b0415aa5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java index a533f9753e..8ee80c9c78 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext.java index e0e9d44ebf..9681cdd7a0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentReference.java index 76d04fb547..a892e07631 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkInterfaceIpsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkInterfaceIpsPager.java index 4368ee0d31..de4426b888 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkInterfaceIpsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkInterfaceIpsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePatch.java index 1745507dab..a51f39720b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -39,6 +39,20 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * For this property to be changed, the virtual server instance `status` must be + * `stopping` or `stopped`. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + @SerializedName("availability_policy") protected InstanceAvailabilityPolicyPatch availabilityPolicy; @SerializedName("confidential_compute_mode") @@ -55,6 +69,8 @@ public interface ConfidentialComputeMode { protected InstanceReservationAffinityPatch reservationAffinity; @SerializedName("total_volume_bandwidth") protected Long totalVolumeBandwidth; + @SerializedName("volume_bandwidth_qos_mode") + protected String volumeBandwidthQosMode; /** * Builder. @@ -69,6 +85,7 @@ public static class Builder { private InstancePatchProfile profile; private InstanceReservationAffinityPatch reservationAffinity; private Long totalVolumeBandwidth; + private String volumeBandwidthQosMode; /** * Instantiates a new Builder from an existing InstancePatch instance. @@ -85,6 +102,7 @@ private Builder(InstancePatch instancePatch) { this.profile = instancePatch.profile; this.reservationAffinity = instancePatch.reservationAffinity; this.totalVolumeBandwidth = instancePatch.totalVolumeBandwidth; + this.volumeBandwidthQosMode = instancePatch.volumeBandwidthQosMode; } /** @@ -200,6 +218,17 @@ public Builder totalVolumeBandwidth(long totalVolumeBandwidth) { this.totalVolumeBandwidth = totalVolumeBandwidth; return this; } + + /** + * Set the volumeBandwidthQosMode. + * + * @param volumeBandwidthQosMode the volumeBandwidthQosMode + * @return the InstancePatch builder + */ + public Builder volumeBandwidthQosMode(String volumeBandwidthQosMode) { + this.volumeBandwidthQosMode = volumeBandwidthQosMode; + return this; + } } protected InstancePatch() { } @@ -214,6 +243,7 @@ protected InstancePatch(Builder builder) { profile = builder.profile; reservationAffinity = builder.reservationAffinity; totalVolumeBandwidth = builder.totalVolumeBandwidth; + volumeBandwidthQosMode = builder.volumeBandwidthQosMode; } /** @@ -228,8 +258,6 @@ public Builder newBuilder() { /** * Gets the availabilityPolicy. * - * The availability policy for this virtual server instance. - * * @return the availabilityPolicy */ public InstanceAvailabilityPolicyPatch availabilityPolicy() { @@ -317,6 +345,7 @@ public InstancePlacementTargetPatch placementTarget() { * - Have the same `vcpu.architecture`. * - Support the number of network attachments or network interfaces the instance * currently has. + * - Have the `volume_bandwidth_qos_mode` listed in its `volume_bandwidth_qos_modes`. * * @return the profile */ @@ -346,6 +375,21 @@ public Long totalVolumeBandwidth() { return totalVolumeBandwidth; } + /** + * Gets the volumeBandwidthQosMode. + * + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * For this property to be changed, the virtual server instance `status` must be + * `stopping` or `stopped`. + * + * @return the volumeBandwidthQosMode + */ + public String volumeBandwidthQosMode() { + return volumeBandwidthQosMode; + } + /** * Construct a JSON merge-patch from the InstancePatch. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchProfile.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchProfile.java index 81c4f3364c..b5dcc01370 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchProfile.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchProfile.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -27,6 +27,7 @@ * - Have the same `vcpu.architecture`. * - Support the number of network attachments or network interfaces the instance * currently has. + * - Have the `volume_bandwidth_qos_mode` listed in its `volume_bandwidth_qos_modes`. * * Classes which extend this class: * - InstancePatchProfileInstanceProfileIdentityByName diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchProfileInstanceProfileIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchProfileInstanceProfileIdentityByHref.java index b047f96794..ea4c1081ae 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchProfileInstanceProfileIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchProfileInstanceProfileIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchProfileInstanceProfileIdentityByName.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchProfileInstanceProfileIdentityByName.java index 0657e88c5a..7c951110a8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchProfileInstanceProfileIdentityByName.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchProfileInstanceProfileIdentityByName.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTarget.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTarget.java index 62edde9352..bcca2788c7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTarget.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTarget.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetDedicatedHostGroupReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetDedicatedHostGroupReference.java index 51d4c5ba8f..53b78a603a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetDedicatedHostGroupReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetDedicatedHostGroupReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetDedicatedHostReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetDedicatedHostReference.java index 5a5b46e21b..6ed907d6ac 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetDedicatedHostReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetDedicatedHostReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatch.java index 0064b635eb..3f8a467cce 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentity.java index 41df4d0ff9..307f90e41f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN.java index 0dee66c396..2b110d0136 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref.java index bc8a2f2696..ff15c57a19 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById.java index 6233a15700..e5881189ec 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentity.java index 45d6eb32d1..64759219d7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN.java index 4bfa24709a..368d5679d3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref.java index 2eb804aae6..e7d4f14984 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById.java index b820c9aaa8..10c698abf1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPlacementGroupReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPlacementGroupReference.java index 92cb5de44d..813a74ef5a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPlacementGroupReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPlacementGroupReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototype.java index 129e82affc..6d06e9916f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentity.java index 4e0585274e..2f41c26922 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN.java index b64f026de7..660679b644 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref.java index eda30bad9a..51c954f6c7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById.java index 17964d08af..787a8427ca 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentity.java index bd47722d7d..a657bf7e7a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN.java index 2a35db4050..6fdd5ae624 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref.java index e38e13966e..f87bc05e49 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById.java index 1d82b4c44c..7636b90222 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentity.java index 64bd95379b..d78fcf4f85 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN.java index d62e57a90c..00fa210ebc 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref.java index 465138fa28..48426d522f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById.java index 9125b0ee43..27863e0c84 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfile.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfile.java index ad270ca3da..29a6a47e89 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfile.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfile.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -96,6 +96,8 @@ public interface Status { protected InstanceProfileVCPU vcpuCount; @SerializedName("vcpu_manufacturer") protected InstanceProfileVCPUManufacturer vcpuManufacturer; + @SerializedName("volume_bandwidth_qos_modes") + protected InstanceProfileVolumeBandwidthQoSModes volumeBandwidthQosModes; protected InstanceProfile() { } @@ -356,5 +358,14 @@ public InstanceProfileVCPU getVcpuCount() { public InstanceProfileVCPUManufacturer getVcpuManufacturer() { return vcpuManufacturer; } + + /** + * Gets the volumeBandwidthQosModes. + * + * @return the volumeBandwidthQosModes + */ + public InstanceProfileVolumeBandwidthQoSModes getVolumeBandwidthQosModes() { + return volumeBandwidthQosModes; + } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidth.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidth.java index 33ead54367..6dc7b119df 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidth.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidth.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthDependent.java index 9e44948d2c..ad7e79fb0a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthEnum.java index e2bf555a35..99216df90d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthEnum.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthEnum.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthFixed.java index a75378027f..88054cd9da 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthRange.java index 5c83d80c45..2a22f5177c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCount.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCount.java index 538dc08f2a..7c5f52e6f7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCount.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCount.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountDependent.java index fd91bd0f51..02cf3f24f7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountEnum.java index a43aaf8b0f..ba233c6fe4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountEnum.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountEnum.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountRange.java index 6dcfe89f35..22cc4cff46 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileCollection.java index 0e0f189b92..bd71ceb006 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -29,7 +29,7 @@ protected InstanceProfileCollection() { } /** * Gets the profiles. * - * A page of virtual server instance profiles. + * The virtual server instance profiles. * * @return the profiles */ diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDisk.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDisk.java index 2ed3d1af69..ef2a5529e0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDisk.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDisk.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantity.java index 123fa0e9bf..d8e29365c5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityDependent.java index 724c55dec2..0f50832ab9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityEnum.java index 503175a0ef..91b07969b0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityEnum.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityEnum.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityFixed.java index 607b3f798c..a67442e09d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityRange.java index e43223e5b2..3af4929d30 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSize.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSize.java index 1d9338b728..5a22ac4419 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSize.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSize.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeDependent.java index 5e2293ac5a..905eb92376 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeEnum.java index d176fd30d5..e0979380e6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeEnum.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeEnum.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeFixed.java index 848c8130d8..b891053f5a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeRange.java index 697ef217aa..1488d1ce50 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSupportedInterfaces.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSupportedInterfaces.java index 4944c274f6..6f81289207 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSupportedInterfaces.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSupportedInterfaces.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPU.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPU.java index 16faedf196..b87aae3980 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPU.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPU.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUDependent.java index 32175da79d..71334cb763 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUEnum.java index 3974678b38..3f6d1b6732 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUEnum.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUEnum.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUFixed.java index c21cda9372..ad1151a66b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUManufacturer.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUManufacturer.java index 38080e8447..a7cb6191a1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUManufacturer.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUManufacturer.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemory.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemory.java index 4ff37b9959..000cfe4677 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemory.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemory.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryDependent.java index 33ee36ac17..dc60aa936f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryEnum.java index 241351cb27..b824e50e4e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryEnum.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryEnum.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryFixed.java index d28961628c..fc81ea54b6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryRange.java index ec8021e669..e09e4cc9e2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUModel.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUModel.java index 266280fcda..0905a716b8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUModel.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUModel.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPURange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPURange.java index 27537ea426..de9d0b3e18 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPURange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPURange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileIdentity.java index 98c3775acc..32fb9b4676 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileIdentityByHref.java index fcbcb140b6..0a69e948c1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileIdentityByName.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileIdentityByName.java index 6c74739928..e429dcbdeb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileIdentityByName.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileIdentityByName.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemory.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemory.java index 8c3735afc7..35ebfc3c24 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemory.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemory.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryDependent.java index 73cd560db4..7d5ef932df 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryEnum.java index b81bcbe9b8..4e24baf650 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryEnum.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryEnum.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryFixed.java index 7dbb928d2e..ee0ad20b61 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryRange.java index 76d0d3d513..8b836c41a7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNUMACount.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNUMACount.java index c296c93af9..d34278615b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNUMACount.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNUMACount.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNUMACountDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNUMACountDependent.java index 277f362c8d..659c537c81 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNUMACountDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNUMACountDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNUMACountFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNUMACountFixed.java index 990a589716..9babde0d75 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNUMACountFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNUMACountFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkAttachmentCount.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkAttachmentCount.java index 230bce22cc..bce080ab01 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkAttachmentCount.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkAttachmentCount.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkAttachmentCountDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkAttachmentCountDependent.java index 081a9d3380..25d97a7d19 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkAttachmentCountDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkAttachmentCountDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkAttachmentCountRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkAttachmentCountRange.java index 35c0e0e660..ce77cc96e3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkAttachmentCountRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkAttachmentCountRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkInterfaceCount.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkInterfaceCount.java index 87e8aba774..e4335ad3a2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkInterfaceCount.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkInterfaceCount.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkInterfaceCountDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkInterfaceCountDependent.java index db41b44abb..5467830cc3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkInterfaceCountDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkInterfaceCountDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkInterfaceCountRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkInterfaceCountRange.java index dc95361b23..3cb850c562 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkInterfaceCountRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkInterfaceCountRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileOSArchitecture.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileOSArchitecture.java index 5d159e6584..2a08347c1b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileOSArchitecture.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileOSArchitecture.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfilePortSpeed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfilePortSpeed.java index 403dc1526f..94b4392d91 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfilePortSpeed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfilePortSpeed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfilePortSpeedDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfilePortSpeedDependent.java index f66a136b41..4ffa6bffb0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfilePortSpeedDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfilePortSpeedDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfilePortSpeedFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfilePortSpeedFixed.java index 0b3f4c27aa..65adcd9b4f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfilePortSpeedFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfilePortSpeedFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileReference.java index f16ddc23ae..0707936d3b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileReservationTerms.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileReservationTerms.java index 3bf2999793..93c5a78ee6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileReservationTerms.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileReservationTerms.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileSupportedConfidentialComputeModes.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileSupportedConfidentialComputeModes.java index ae74b244b9..362a87ca2e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileSupportedConfidentialComputeModes.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileSupportedConfidentialComputeModes.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileSupportedSecureBootModes.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileSupportedSecureBootModes.java index 2ba6e0a1bc..fb1b1951fa 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileSupportedSecureBootModes.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileSupportedSecureBootModes.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPU.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPU.java index 4062749704..3153cc409a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPU.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPU.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUArchitecture.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUArchitecture.java index 4fab2459d2..429c040d3d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUArchitecture.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUArchitecture.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUDependent.java index 47cc792d4d..a45d50ff53 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUEnum.java index b815ed94d4..71a3c6b08d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUEnum.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUEnum.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUFixed.java index e957e60ff0..3d44133c94 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUManufacturer.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUManufacturer.java index 410c9549f7..f83c793f9b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUManufacturer.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUManufacturer.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUManufacturerDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUManufacturerDependent.java index 88131402d5..b29e9acae8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUManufacturerDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUManufacturerDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUManufacturerFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUManufacturerFixed.java index 9f6e4ff204..d2f23cffe4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUManufacturerFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUManufacturerFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPURange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPURange.java index 7aa6d5b108..5e9152032b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPURange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPURange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidth.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidth.java index d94200263b..4135155ed3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidth.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidth.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthDependent.java index 0cd188455d..48c51daa79 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthEnum.java index 92dab5f053..4708d320cb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthEnum.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthEnum.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthFixed.java index 953abeccfc..6cc2940974 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthQoSModes.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthQoSModes.java new file mode 100644 index 0000000000..134c6e66df --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthQoSModes.java @@ -0,0 +1,103 @@ +/* + * (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.is.vpc.v1.model; + +import java.util.List; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * InstanceProfileVolumeBandwidthQoSModes. + * + * Classes which extend this class: + * - InstanceProfileVolumeBandwidthQoSModesEnum + * - InstanceProfileVolumeBandwidthQoSModesDependent + */ +public class InstanceProfileVolumeBandwidthQoSModes extends GenericModel { + + /** + * The default volume bandwidth QoS mode for this profile. + */ + public interface XDefault { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + + /** + * The type for this profile field. + */ + public interface Type { + /** enum. */ + String X_ENUM = "enum"; + } + + /** + * A volume bandwidth QoS mode: + * - `pooled`: All volumes attached to an instance will pool and share bandwidth. + * - `weighted`: Each volume attached to an instance will have its own bandwidth, weighted according to its IOPS. + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + */ + public interface Values { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + + @SerializedName("default") + protected String xDefault; + protected String type; + protected List values; + + protected InstanceProfileVolumeBandwidthQoSModes() { } + + /** + * Gets the xDefault. + * + * The default volume bandwidth QoS mode for this profile. + * + * @return the xDefault + */ + public String getXDefault() { + return xDefault; + } + + /** + * Gets the type. + * + * The type for this profile field. + * + * @return the type + */ + public String getType() { + return type; + } + + /** + * Gets the values. + * + * The permitted volume bandwidth QoS modes for an instance using this profile. + * + * @return the values + */ + public List getValues() { + return values; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthQoSModesDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthQoSModesDependent.java new file mode 100644 index 0000000000..ea1f88dc7e --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthQoSModesDependent.java @@ -0,0 +1,32 @@ +/* + * (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.is.vpc.v1.model; + +/** + * The volume bandwidth QoS modes for an instance with this profile depends on its configuration. + */ +public class InstanceProfileVolumeBandwidthQoSModesDependent extends InstanceProfileVolumeBandwidthQoSModes { + + /** + * The type for this profile field. + */ + public interface Type { + /** dependent. */ + String DEPENDENT = "dependent"; + } + + + protected InstanceProfileVolumeBandwidthQoSModesDependent() { } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthQoSModesEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthQoSModesEnum.java new file mode 100644 index 0000000000..872451e4f0 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthQoSModesEnum.java @@ -0,0 +1,57 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +/** + * InstanceProfileVolumeBandwidthQoSModesEnum. + */ +public class InstanceProfileVolumeBandwidthQoSModesEnum extends InstanceProfileVolumeBandwidthQoSModes { + + /** + * The default volume bandwidth QoS mode for this profile. + */ + public interface XDefault { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + + /** + * The type for this profile field. + */ + public interface Type { + /** enum. */ + String X_ENUM = "enum"; + } + + /** + * A volume bandwidth QoS mode: + * - `pooled`: All volumes attached to an instance will pool and share bandwidth. + * - `weighted`: Each volume attached to an instance will have its own bandwidth, weighted according to its IOPS. + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + */ + public interface Values { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + + + protected InstanceProfileVolumeBandwidthQoSModesEnum() { } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthRange.java index 748d8c3415..3f2929c95d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototype.java index 33b6adb84c..e40215c4b6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -44,6 +44,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + @SerializedName("availability_policy") protected InstanceAvailabilityPolicyPrototype availabilityPolicy; @SerializedName("cluster_network_attachments") @@ -71,9 +84,11 @@ public interface ConfidentialComputeMode { protected String userData; @SerializedName("volume_attachments") protected List volumeAttachments; + @SerializedName("volume_bandwidth_qos_mode") + protected String volumeBandwidthQosMode; protected VPCIdentity vpc; @SerializedName("boot_volume_attachment") - protected VolumeAttachmentPrototypeInstance bootVolumeAttachment; + protected VolumeAttachmentPrototypeInstanceByImageContext bootVolumeAttachment; protected ImageIdentity image; protected ZoneIdentity zone; @SerializedName("network_attachments") @@ -223,8 +238,8 @@ public InstancePlacementTargetPrototype placementTarget() { * The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this * virtual server instance. * - * If unspecified, `bx2-2x8` will be used, but this default value is expected to change - * in the future. + * If unspecified, `bxf-2x8` will be used, but this default value may change + * in the future without changing the API version. * * @return the profile */ @@ -235,8 +250,7 @@ public InstanceProfileIdentity profile() { /** * Gets the reservationAffinity. * - * The reservation affinity settings for this virtual server instance. If specified, - * `vcpu.tenancy` must be `dedicated`, and `vcpu.percentage` must be `100`. + * The reservation affinity settings for this virtual server instance. * * @return the reservationAffinity */ @@ -292,6 +306,20 @@ public List volumeAttachments() { return volumeAttachments; } + /** + * Gets the volumeBandwidthQosMode. + * + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + * + * @return the volumeBandwidthQosMode + */ + public String volumeBandwidthQosMode() { + return volumeBandwidthQosMode; + } + /** * Gets the vpc. * @@ -313,7 +341,7 @@ public VPCIdentity vpc() { * * @return the bootVolumeAttachment */ - public VolumeAttachmentPrototypeInstance bootVolumeAttachment() { + public VolumeAttachmentPrototypeInstanceByImageContext bootVolumeAttachment() { return bootVolumeAttachment; } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByCatalogOffering.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByCatalogOffering.java index e55391bf46..78dff9abab 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByCatalogOffering.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByCatalogOffering.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -36,6 +36,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + protected InstancePrototypeInstanceByCatalogOffering() { } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment.java index 2fb65c34f4..c0bc20ebc5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,6 +35,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + /** * Builder. @@ -55,6 +68,7 @@ public static class Builder { private Long totalVolumeBandwidth; private String userData; private List volumeAttachments; + private String volumeBandwidthQosMode; private VPCIdentity vpc; private VolumeAttachmentPrototypeInstanceByImageContext bootVolumeAttachment; private InstanceCatalogOfferingPrototype catalogOffering; @@ -83,8 +97,9 @@ public Builder(InstancePrototypeInstanceByCatalogOffering instancePrototypeInsta this.totalVolumeBandwidth = instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment.totalVolumeBandwidth; this.userData = instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment.userData; this.volumeAttachments = instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment.volumeAttachments; + this.volumeBandwidthQosMode = instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment.volumeBandwidthQosMode; this.vpc = instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment.vpc; - this.bootVolumeAttachment = (VolumeAttachmentPrototypeInstanceByImageContext) instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment.bootVolumeAttachment; + this.bootVolumeAttachment = instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment.bootVolumeAttachment; this.catalogOffering = instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment.catalogOffering; this.zone = instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment.zone; this.networkAttachments = instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment.networkAttachments; @@ -351,6 +366,17 @@ public Builder volumeAttachments(List volumeAttachmen return this; } + /** + * Set the volumeBandwidthQosMode. + * + * @param volumeBandwidthQosMode the volumeBandwidthQosMode + * @return the InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment builder + */ + public Builder volumeBandwidthQosMode(String volumeBandwidthQosMode) { + this.volumeBandwidthQosMode = volumeBandwidthQosMode; + return this; + } + /** * Set the vpc. * @@ -443,6 +469,7 @@ protected InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingIns totalVolumeBandwidth = builder.totalVolumeBandwidth; userData = builder.userData; volumeAttachments = builder.volumeAttachments; + volumeBandwidthQosMode = builder.volumeBandwidthQosMode; vpc = builder.vpc; bootVolumeAttachment = builder.bootVolumeAttachment; catalogOffering = builder.catalogOffering; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface.java index 468e4fac4d..cd0b737840 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,6 +35,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + /** * Builder. @@ -55,6 +68,7 @@ public static class Builder { private Long totalVolumeBandwidth; private String userData; private List volumeAttachments; + private String volumeBandwidthQosMode; private VPCIdentity vpc; private VolumeAttachmentPrototypeInstanceByImageContext bootVolumeAttachment; private InstanceCatalogOfferingPrototype catalogOffering; @@ -83,8 +97,9 @@ public Builder(InstancePrototypeInstanceByCatalogOffering instancePrototypeInsta this.totalVolumeBandwidth = instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface.totalVolumeBandwidth; this.userData = instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface.userData; this.volumeAttachments = instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface.volumeAttachments; + this.volumeBandwidthQosMode = instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface.volumeBandwidthQosMode; this.vpc = instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface.vpc; - this.bootVolumeAttachment = (VolumeAttachmentPrototypeInstanceByImageContext) instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface.bootVolumeAttachment; + this.bootVolumeAttachment = instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface.bootVolumeAttachment; this.catalogOffering = instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface.catalogOffering; this.zone = instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface.zone; this.networkInterfaces = instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface.networkInterfaces; @@ -351,6 +366,17 @@ public Builder volumeAttachments(List volumeAttachmen return this; } + /** + * Set the volumeBandwidthQosMode. + * + * @param volumeBandwidthQosMode the volumeBandwidthQosMode + * @return the InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface builder + */ + public Builder volumeBandwidthQosMode(String volumeBandwidthQosMode) { + this.volumeBandwidthQosMode = volumeBandwidthQosMode; + return this; + } + /** * Set the vpc. * @@ -443,6 +469,7 @@ protected InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingIns totalVolumeBandwidth = builder.totalVolumeBandwidth; userData = builder.userData; volumeAttachments = builder.volumeAttachments; + volumeBandwidthQosMode = builder.volumeBandwidthQosMode; vpc = builder.vpc; bootVolumeAttachment = builder.bootVolumeAttachment; catalogOffering = builder.catalogOffering; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByImage.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByImage.java index 08a0deaa6d..e669902832 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByImage.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByImage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -38,6 +38,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + protected InstancePrototypeInstanceByImage() { } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment.java index 7f8d3ea032..906e094cb4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,6 +35,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + /** * Builder. @@ -55,6 +68,7 @@ public static class Builder { private Long totalVolumeBandwidth; private String userData; private List volumeAttachments; + private String volumeBandwidthQosMode; private VPCIdentity vpc; private VolumeAttachmentPrototypeInstanceByImageContext bootVolumeAttachment; private ImageIdentity image; @@ -83,8 +97,9 @@ public Builder(InstancePrototypeInstanceByImage instancePrototypeInstanceByImage this.totalVolumeBandwidth = instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment.totalVolumeBandwidth; this.userData = instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment.userData; this.volumeAttachments = instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment.volumeAttachments; + this.volumeBandwidthQosMode = instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment.volumeBandwidthQosMode; this.vpc = instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment.vpc; - this.bootVolumeAttachment = (VolumeAttachmentPrototypeInstanceByImageContext) instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment.bootVolumeAttachment; + this.bootVolumeAttachment = instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment.bootVolumeAttachment; this.image = instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment.image; this.zone = instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment.zone; this.networkAttachments = instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment.networkAttachments; @@ -351,6 +366,17 @@ public Builder volumeAttachments(List volumeAttachmen return this; } + /** + * Set the volumeBandwidthQosMode. + * + * @param volumeBandwidthQosMode the volumeBandwidthQosMode + * @return the InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment builder + */ + public Builder volumeBandwidthQosMode(String volumeBandwidthQosMode) { + this.volumeBandwidthQosMode = volumeBandwidthQosMode; + return this; + } + /** * Set the vpc. * @@ -443,6 +469,7 @@ protected InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttach totalVolumeBandwidth = builder.totalVolumeBandwidth; userData = builder.userData; volumeAttachments = builder.volumeAttachments; + volumeBandwidthQosMode = builder.volumeBandwidthQosMode; vpc = builder.vpc; bootVolumeAttachment = builder.bootVolumeAttachment; image = builder.image; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface.java index e9e0dc210e..a0d4cf356c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,6 +35,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + /** * Builder. @@ -55,6 +68,7 @@ public static class Builder { private Long totalVolumeBandwidth; private String userData; private List volumeAttachments; + private String volumeBandwidthQosMode; private VPCIdentity vpc; private VolumeAttachmentPrototypeInstanceByImageContext bootVolumeAttachment; private ImageIdentity image; @@ -83,8 +97,9 @@ public Builder(InstancePrototypeInstanceByImage instancePrototypeInstanceByImage this.totalVolumeBandwidth = instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface.totalVolumeBandwidth; this.userData = instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface.userData; this.volumeAttachments = instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface.volumeAttachments; + this.volumeBandwidthQosMode = instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface.volumeBandwidthQosMode; this.vpc = instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface.vpc; - this.bootVolumeAttachment = (VolumeAttachmentPrototypeInstanceByImageContext) instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface.bootVolumeAttachment; + this.bootVolumeAttachment = instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface.bootVolumeAttachment; this.image = instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface.image; this.zone = instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface.zone; this.networkInterfaces = instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface.networkInterfaces; @@ -351,6 +366,17 @@ public Builder volumeAttachments(List volumeAttachmen return this; } + /** + * Set the volumeBandwidthQosMode. + * + * @param volumeBandwidthQosMode the volumeBandwidthQosMode + * @return the InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface builder + */ + public Builder volumeBandwidthQosMode(String volumeBandwidthQosMode) { + this.volumeBandwidthQosMode = volumeBandwidthQosMode; + return this; + } + /** * Set the vpc. * @@ -443,6 +469,7 @@ protected InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterf totalVolumeBandwidth = builder.totalVolumeBandwidth; userData = builder.userData; volumeAttachments = builder.volumeAttachments; + volumeBandwidthQosMode = builder.volumeBandwidthQosMode; vpc = builder.vpc; bootVolumeAttachment = builder.bootVolumeAttachment; image = builder.image; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceSnapshot.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceSnapshot.java index 546cdea9da..a91bac917d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceSnapshot.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceSnapshot.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -36,6 +36,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + protected InstancePrototypeInstanceBySourceSnapshot() { } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment.java index cf612f6291..873d2b8aac 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,6 +35,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + /** * Builder. @@ -55,6 +68,7 @@ public static class Builder { private Long totalVolumeBandwidth; private String userData; private List volumeAttachments; + private String volumeBandwidthQosMode; private VPCIdentity vpc; private VolumeAttachmentPrototypeInstanceBySourceSnapshotContext bootVolumeAttachment; private ZoneIdentity zone; @@ -82,8 +96,9 @@ public Builder(InstancePrototypeInstanceBySourceSnapshot instancePrototypeInstan this.totalVolumeBandwidth = instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment.totalVolumeBandwidth; this.userData = instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment.userData; this.volumeAttachments = instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment.volumeAttachments; + this.volumeBandwidthQosMode = instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment.volumeBandwidthQosMode; this.vpc = instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment.vpc; - this.bootVolumeAttachment = (VolumeAttachmentPrototypeInstanceBySourceSnapshotContext) instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment.bootVolumeAttachment; + this.bootVolumeAttachment = instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment.bootVolumeAttachment; this.zone = instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment.zone; this.networkAttachments = instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment.networkAttachments; this.primaryNetworkAttachment = instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment.primaryNetworkAttachment; @@ -349,6 +364,17 @@ public Builder volumeAttachments(List volumeAttachmen return this; } + /** + * Set the volumeBandwidthQosMode. + * + * @param volumeBandwidthQosMode the volumeBandwidthQosMode + * @return the InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment builder + */ + public Builder volumeBandwidthQosMode(String volumeBandwidthQosMode) { + this.volumeBandwidthQosMode = volumeBandwidthQosMode; + return this; + } + /** * Set the vpc. * @@ -430,6 +456,7 @@ protected InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInsta totalVolumeBandwidth = builder.totalVolumeBandwidth; userData = builder.userData; volumeAttachments = builder.volumeAttachments; + volumeBandwidthQosMode = builder.volumeBandwidthQosMode; vpc = builder.vpc; bootVolumeAttachment = builder.bootVolumeAttachment; zone = builder.zone; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface.java index d357da23d5..a5570f95a2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,6 +35,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + /** * Builder. @@ -55,6 +68,7 @@ public static class Builder { private Long totalVolumeBandwidth; private String userData; private List volumeAttachments; + private String volumeBandwidthQosMode; private VPCIdentity vpc; private VolumeAttachmentPrototypeInstanceBySourceSnapshotContext bootVolumeAttachment; private ZoneIdentity zone; @@ -82,8 +96,9 @@ public Builder(InstancePrototypeInstanceBySourceSnapshot instancePrototypeInstan this.totalVolumeBandwidth = instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface.totalVolumeBandwidth; this.userData = instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface.userData; this.volumeAttachments = instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface.volumeAttachments; + this.volumeBandwidthQosMode = instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface.volumeBandwidthQosMode; this.vpc = instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface.vpc; - this.bootVolumeAttachment = (VolumeAttachmentPrototypeInstanceBySourceSnapshotContext) instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface.bootVolumeAttachment; + this.bootVolumeAttachment = instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface.bootVolumeAttachment; this.zone = instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface.zone; this.networkInterfaces = instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface.networkInterfaces; this.primaryNetworkInterface = instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface.primaryNetworkInterface; @@ -349,6 +364,17 @@ public Builder volumeAttachments(List volumeAttachmen return this; } + /** + * Set the volumeBandwidthQosMode. + * + * @param volumeBandwidthQosMode the volumeBandwidthQosMode + * @return the InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface builder + */ + public Builder volumeBandwidthQosMode(String volumeBandwidthQosMode) { + this.volumeBandwidthQosMode = volumeBandwidthQosMode; + return this; + } + /** * Set the vpc. * @@ -430,6 +456,7 @@ protected InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInsta totalVolumeBandwidth = builder.totalVolumeBandwidth; userData = builder.userData; volumeAttachments = builder.volumeAttachments; + volumeBandwidthQosMode = builder.volumeBandwidthQosMode; vpc = builder.vpc; bootVolumeAttachment = builder.bootVolumeAttachment; zone = builder.zone; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceTemplate.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceTemplate.java index 0a16607a2a..f320a3375c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceTemplate.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceTemplate.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -41,6 +41,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + /** * Builder. @@ -61,6 +74,7 @@ public static class Builder { private Long totalVolumeBandwidth; private String userData; private List volumeAttachments; + private String volumeBandwidthQosMode; private VPCIdentity vpc; private VolumeAttachmentPrototypeInstanceByImageContext bootVolumeAttachment; private InstanceCatalogOfferingPrototype catalogOffering; @@ -93,8 +107,9 @@ public Builder(InstancePrototype instancePrototypeInstanceBySourceTemplate) { this.totalVolumeBandwidth = instancePrototypeInstanceBySourceTemplate.totalVolumeBandwidth; this.userData = instancePrototypeInstanceBySourceTemplate.userData; this.volumeAttachments = instancePrototypeInstanceBySourceTemplate.volumeAttachments; + this.volumeBandwidthQosMode = instancePrototypeInstanceBySourceTemplate.volumeBandwidthQosMode; this.vpc = instancePrototypeInstanceBySourceTemplate.vpc; - this.bootVolumeAttachment = (VolumeAttachmentPrototypeInstanceByImageContext) instancePrototypeInstanceBySourceTemplate.bootVolumeAttachment; + this.bootVolumeAttachment = instancePrototypeInstanceBySourceTemplate.bootVolumeAttachment; this.catalogOffering = instancePrototypeInstanceBySourceTemplate.catalogOffering; this.image = instancePrototypeInstanceBySourceTemplate.image; this.networkAttachments = instancePrototypeInstanceBySourceTemplate.networkAttachments; @@ -377,6 +392,17 @@ public Builder volumeAttachments(List volumeAttachmen return this; } + /** + * Set the volumeBandwidthQosMode. + * + * @param volumeBandwidthQosMode the volumeBandwidthQosMode + * @return the InstancePrototypeInstanceBySourceTemplate builder + */ + public Builder volumeBandwidthQosMode(String volumeBandwidthQosMode) { + this.volumeBandwidthQosMode = volumeBandwidthQosMode; + return this; + } + /** * Set the vpc. * @@ -510,6 +536,7 @@ protected InstancePrototypeInstanceBySourceTemplate(Builder builder) { totalVolumeBandwidth = builder.totalVolumeBandwidth; userData = builder.userData; volumeAttachments = builder.volumeAttachments; + volumeBandwidthQosMode = builder.volumeBandwidthQosMode; vpc = builder.vpc; bootVolumeAttachment = builder.bootVolumeAttachment; catalogOffering = builder.catalogOffering; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByVolume.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByVolume.java index 296050170b..6609f0dba7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByVolume.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByVolume.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -36,6 +36,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + protected InstancePrototypeInstanceByVolume() { } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment.java index 0d7d4299a9..80ab26eeb5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,6 +35,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + /** * Builder. @@ -55,6 +68,7 @@ public static class Builder { private Long totalVolumeBandwidth; private String userData; private List volumeAttachments; + private String volumeBandwidthQosMode; private VPCIdentity vpc; private VolumeAttachmentPrototypeInstanceByVolumeContext bootVolumeAttachment; private ZoneIdentity zone; @@ -82,8 +96,9 @@ public Builder(InstancePrototypeInstanceByVolume instancePrototypeInstanceByVolu this.totalVolumeBandwidth = instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment.totalVolumeBandwidth; this.userData = instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment.userData; this.volumeAttachments = instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment.volumeAttachments; + this.volumeBandwidthQosMode = instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment.volumeBandwidthQosMode; this.vpc = instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment.vpc; - this.bootVolumeAttachment = (VolumeAttachmentPrototypeInstanceByVolumeContext) instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment.bootVolumeAttachment; + this.bootVolumeAttachment = instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment.bootVolumeAttachment; this.zone = instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment.zone; this.networkAttachments = instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment.networkAttachments; this.primaryNetworkAttachment = instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment.primaryNetworkAttachment; @@ -349,6 +364,17 @@ public Builder volumeAttachments(List volumeAttachmen return this; } + /** + * Set the volumeBandwidthQosMode. + * + * @param volumeBandwidthQosMode the volumeBandwidthQosMode + * @return the InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment builder + */ + public Builder volumeBandwidthQosMode(String volumeBandwidthQosMode) { + this.volumeBandwidthQosMode = volumeBandwidthQosMode; + return this; + } + /** * Set the vpc. * @@ -430,6 +456,7 @@ protected InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAtta totalVolumeBandwidth = builder.totalVolumeBandwidth; userData = builder.userData; volumeAttachments = builder.volumeAttachments; + volumeBandwidthQosMode = builder.volumeBandwidthQosMode; vpc = builder.vpc; bootVolumeAttachment = builder.bootVolumeAttachment; zone = builder.zone; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface.java index 20ed840624..80fa26f040 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,6 +35,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + /** * Builder. @@ -55,6 +68,7 @@ public static class Builder { private Long totalVolumeBandwidth; private String userData; private List volumeAttachments; + private String volumeBandwidthQosMode; private VPCIdentity vpc; private VolumeAttachmentPrototypeInstanceByVolumeContext bootVolumeAttachment; private ZoneIdentity zone; @@ -82,8 +96,9 @@ public Builder(InstancePrototypeInstanceByVolume instancePrototypeInstanceByVolu this.totalVolumeBandwidth = instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface.totalVolumeBandwidth; this.userData = instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface.userData; this.volumeAttachments = instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface.volumeAttachments; + this.volumeBandwidthQosMode = instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface.volumeBandwidthQosMode; this.vpc = instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface.vpc; - this.bootVolumeAttachment = (VolumeAttachmentPrototypeInstanceByVolumeContext) instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface.bootVolumeAttachment; + this.bootVolumeAttachment = instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface.bootVolumeAttachment; this.zone = instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface.zone; this.networkInterfaces = instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface.networkInterfaces; this.primaryNetworkInterface = instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface.primaryNetworkInterface; @@ -349,6 +364,17 @@ public Builder volumeAttachments(List volumeAttachmen return this; } + /** + * Set the volumeBandwidthQosMode. + * + * @param volumeBandwidthQosMode the volumeBandwidthQosMode + * @return the InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface builder + */ + public Builder volumeBandwidthQosMode(String volumeBandwidthQosMode) { + this.volumeBandwidthQosMode = volumeBandwidthQosMode; + return this; + } + /** * Set the vpc. * @@ -430,6 +456,7 @@ protected InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInte totalVolumeBandwidth = builder.totalVolumeBandwidth; userData = builder.userData; volumeAttachments = builder.volumeAttachments; + volumeBandwidthQosMode = builder.volumeBandwidthQosMode; vpc = builder.vpc; bootVolumeAttachment = builder.bootVolumeAttachment; zone = builder.zone; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceReference.java index 809ab9abdb..0312081141 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceReservationAffinity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceReservationAffinity.java index f9e73cbd2d..4789b251d2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceReservationAffinity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceReservationAffinity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceReservationAffinityPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceReservationAffinityPatch.java index 1c8e23dd35..c8e02a016c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceReservationAffinityPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceReservationAffinityPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceReservationAffinityPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceReservationAffinityPrototype.java index 0bfed71b24..88dc2c04dc 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceReservationAffinityPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceReservationAffinityPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -19,8 +19,7 @@ import com.ibm.cloud.sdk.core.service.model.GenericModel; /** - * The reservation affinity settings for this virtual server instance. If specified, - * `vcpu.tenancy` must be `dedicated`, and `vcpu.percentage` must be `100`. + * The reservation affinity settings for this virtual server instance. */ public class InstanceReservationAffinityPrototype extends GenericModel { diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceStatusReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceStatusReason.java index a434f7f65d..3dfc4b1459 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceStatusReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceStatusReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplate.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplate.java index 7e751ca26b..f7147ed58b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplate.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplate.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -43,6 +43,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + @SerializedName("availability_policy") protected InstanceAvailabilityPolicyPrototype availabilityPolicy; @SerializedName("cluster_network_attachments") @@ -75,6 +88,8 @@ public interface ConfidentialComputeMode { protected String userData; @SerializedName("volume_attachments") protected List volumeAttachments; + @SerializedName("volume_bandwidth_qos_mode") + protected String volumeBandwidthQosMode; protected VPCIdentity vpc; @SerializedName("boot_volume_attachment") protected VolumeAttachmentPrototypeInstanceByImageContext bootVolumeAttachment; @@ -266,8 +281,8 @@ public InstancePlacementTargetPrototype getPlacementTarget() { * The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this * virtual server instance. * - * If unspecified, `bx2-2x8` will be used, but this default value is expected to change - * in the future. + * If unspecified, `bxf-2x8` will be used, but this default value may change + * in the future without changing the API version. * * @return the profile */ @@ -278,8 +293,7 @@ public InstanceProfileIdentity getProfile() { /** * Gets the reservationAffinity. * - * The reservation affinity settings for this virtual server instance. If specified, - * `vcpu.tenancy` must be `dedicated`, and `vcpu.percentage` must be `100`. + * The reservation affinity settings for this virtual server instance. * * @return the reservationAffinity */ @@ -334,6 +348,20 @@ public List getVolumeAttachments() { return volumeAttachments; } + /** + * Gets the volumeBandwidthQosMode. + * + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + * + * @return the volumeBandwidthQosMode + */ + public String getVolumeBandwidthQosMode() { + return volumeBandwidthQosMode; + } + /** * Gets the vpc. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateCollection.java index 958a966ef0..60dde04737 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentity.java index 0ce8c2cd7a..cc85520485 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityByCRN.java index 36a2b5a1ea..9212b9ff73 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityByHref.java index 42916468b2..57f9ba8360 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityById.java index 944cfe80a4..9323de4882 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext.java index fc58aa3bcc..0372c3aa31 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -36,6 +36,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + protected InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext() { } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment.java index f907dcd47b..475bbfa688 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -32,6 +32,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + protected InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment() { } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface.java index 3e26d73f08..daa42d55ed 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -32,6 +32,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + protected InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface() { } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByImageInstanceTemplateContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByImageInstanceTemplateContext.java index 25e6372403..e36e54b799 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByImageInstanceTemplateContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByImageInstanceTemplateContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -36,6 +36,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + protected InstanceTemplateInstanceByImageInstanceTemplateContext() { } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment.java index 8690b9c0f9..f87a904a67 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -32,6 +32,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + protected InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment() { } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface.java index 4fdf926560..893a9fd9e9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -32,6 +32,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + protected InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface() { } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext.java index 52d98791cd..5a0a1b3af0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -36,6 +36,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + protected InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext() { } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment.java index 299984ae83..255b77b359 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -32,6 +32,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + protected InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment() { } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface.java index 578e21929f..b303181043 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -32,6 +32,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + protected InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface() { } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePatch.java index e60b5c29a8..2eb978880a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototype.java index 0829e141f2..8e80bbe4b6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -43,6 +43,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + @SerializedName("availability_policy") protected InstanceAvailabilityPolicyPrototype availabilityPolicy; @SerializedName("cluster_network_attachments") @@ -70,9 +83,11 @@ public interface ConfidentialComputeMode { protected String userData; @SerializedName("volume_attachments") protected List volumeAttachments; + @SerializedName("volume_bandwidth_qos_mode") + protected String volumeBandwidthQosMode; protected VPCIdentity vpc; @SerializedName("boot_volume_attachment") - protected VolumeAttachmentPrototypeInstance bootVolumeAttachment; + protected VolumeAttachmentPrototypeInstanceByImageContext bootVolumeAttachment; protected ImageIdentity image; protected ZoneIdentity zone; @SerializedName("network_attachments") @@ -220,8 +235,8 @@ public InstancePlacementTargetPrototype placementTarget() { * The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this * virtual server instance. * - * If unspecified, `bx2-2x8` will be used, but this default value is expected to change - * in the future. + * If unspecified, `bxf-2x8` will be used, but this default value may change + * in the future without changing the API version. * * @return the profile */ @@ -232,8 +247,7 @@ public InstanceProfileIdentity profile() { /** * Gets the reservationAffinity. * - * The reservation affinity settings for this virtual server instance. If specified, - * `vcpu.tenancy` must be `dedicated`, and `vcpu.percentage` must be `100`. + * The reservation affinity settings for this virtual server instance. * * @return the reservationAffinity */ @@ -289,6 +303,20 @@ public List volumeAttachments() { return volumeAttachments; } + /** + * Gets the volumeBandwidthQosMode. + * + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + * + * @return the volumeBandwidthQosMode + */ + public String volumeBandwidthQosMode() { + return volumeBandwidthQosMode; + } + /** * Gets the vpc. * @@ -310,7 +338,7 @@ public VPCIdentity vpc() { * * @return the bootVolumeAttachment */ - public VolumeAttachmentPrototypeInstance bootVolumeAttachment() { + public VolumeAttachmentPrototypeInstanceByImageContext bootVolumeAttachment() { return bootVolumeAttachment; } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByCatalogOffering.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByCatalogOffering.java index 19f036100d..6a513da3e3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByCatalogOffering.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByCatalogOffering.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -36,6 +36,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + protected InstanceTemplatePrototypeInstanceTemplateByCatalogOffering() { } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment.java index 281d5a1f7f..10e66eaaa4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,6 +35,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + /** * Builder. @@ -55,6 +68,7 @@ public static class Builder { private Long totalVolumeBandwidth; private String userData; private List volumeAttachments; + private String volumeBandwidthQosMode; private VPCIdentity vpc; private VolumeAttachmentPrototypeInstanceByImageContext bootVolumeAttachment; private InstanceCatalogOfferingPrototype catalogOffering; @@ -83,8 +97,9 @@ public Builder(InstanceTemplatePrototypeInstanceTemplateByCatalogOffering instan this.totalVolumeBandwidth = instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment.totalVolumeBandwidth; this.userData = instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment.userData; this.volumeAttachments = instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment.volumeAttachments; + this.volumeBandwidthQosMode = instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment.volumeBandwidthQosMode; this.vpc = instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment.vpc; - this.bootVolumeAttachment = (VolumeAttachmentPrototypeInstanceByImageContext) instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment.bootVolumeAttachment; + this.bootVolumeAttachment = instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment.bootVolumeAttachment; this.catalogOffering = instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment.catalogOffering; this.zone = instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment.zone; this.networkAttachments = instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment.networkAttachments; @@ -351,6 +366,17 @@ public Builder volumeAttachments(List volumeAttachmen return this; } + /** + * Set the volumeBandwidthQosMode. + * + * @param volumeBandwidthQosMode the volumeBandwidthQosMode + * @return the InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment builder + */ + public Builder volumeBandwidthQosMode(String volumeBandwidthQosMode) { + this.volumeBandwidthQosMode = volumeBandwidthQosMode; + return this; + } + /** * Set the vpc. * @@ -443,6 +469,7 @@ protected InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemp totalVolumeBandwidth = builder.totalVolumeBandwidth; userData = builder.userData; volumeAttachments = builder.volumeAttachments; + volumeBandwidthQosMode = builder.volumeBandwidthQosMode; vpc = builder.vpc; bootVolumeAttachment = builder.bootVolumeAttachment; catalogOffering = builder.catalogOffering; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface.java index 6d52189a19..2e732c8636 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,6 +35,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + /** * Builder. @@ -55,6 +68,7 @@ public static class Builder { private Long totalVolumeBandwidth; private String userData; private List volumeAttachments; + private String volumeBandwidthQosMode; private VPCIdentity vpc; private VolumeAttachmentPrototypeInstanceByImageContext bootVolumeAttachment; private InstanceCatalogOfferingPrototype catalogOffering; @@ -83,8 +97,9 @@ public Builder(InstanceTemplatePrototypeInstanceTemplateByCatalogOffering instan this.totalVolumeBandwidth = instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface.totalVolumeBandwidth; this.userData = instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface.userData; this.volumeAttachments = instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface.volumeAttachments; + this.volumeBandwidthQosMode = instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface.volumeBandwidthQosMode; this.vpc = instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface.vpc; - this.bootVolumeAttachment = (VolumeAttachmentPrototypeInstanceByImageContext) instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface.bootVolumeAttachment; + this.bootVolumeAttachment = instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface.bootVolumeAttachment; this.catalogOffering = instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface.catalogOffering; this.zone = instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface.zone; this.networkInterfaces = instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface.networkInterfaces; @@ -351,6 +366,17 @@ public Builder volumeAttachments(List volumeAttachmen return this; } + /** + * Set the volumeBandwidthQosMode. + * + * @param volumeBandwidthQosMode the volumeBandwidthQosMode + * @return the InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface builder + */ + public Builder volumeBandwidthQosMode(String volumeBandwidthQosMode) { + this.volumeBandwidthQosMode = volumeBandwidthQosMode; + return this; + } + /** * Set the vpc. * @@ -443,6 +469,7 @@ protected InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemp totalVolumeBandwidth = builder.totalVolumeBandwidth; userData = builder.userData; volumeAttachments = builder.volumeAttachments; + volumeBandwidthQosMode = builder.volumeBandwidthQosMode; vpc = builder.vpc; bootVolumeAttachment = builder.bootVolumeAttachment; catalogOffering = builder.catalogOffering; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByImage.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByImage.java index e87be18975..97312231f6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByImage.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByImage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -38,6 +38,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + protected InstanceTemplatePrototypeInstanceTemplateByImage() { } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment.java index 567b0aec4f..e82a3b768d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,6 +35,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + /** * Builder. @@ -55,6 +68,7 @@ public static class Builder { private Long totalVolumeBandwidth; private String userData; private List volumeAttachments; + private String volumeBandwidthQosMode; private VPCIdentity vpc; private VolumeAttachmentPrototypeInstanceByImageContext bootVolumeAttachment; private ImageIdentity image; @@ -83,8 +97,9 @@ public Builder(InstanceTemplatePrototypeInstanceTemplateByImage instanceTemplate this.totalVolumeBandwidth = instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment.totalVolumeBandwidth; this.userData = instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment.userData; this.volumeAttachments = instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment.volumeAttachments; + this.volumeBandwidthQosMode = instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment.volumeBandwidthQosMode; this.vpc = instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment.vpc; - this.bootVolumeAttachment = (VolumeAttachmentPrototypeInstanceByImageContext) instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment.bootVolumeAttachment; + this.bootVolumeAttachment = instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment.bootVolumeAttachment; this.image = instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment.image; this.zone = instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment.zone; this.networkAttachments = instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment.networkAttachments; @@ -351,6 +366,17 @@ public Builder volumeAttachments(List volumeAttachmen return this; } + /** + * Set the volumeBandwidthQosMode. + * + * @param volumeBandwidthQosMode the volumeBandwidthQosMode + * @return the InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment builder + */ + public Builder volumeBandwidthQosMode(String volumeBandwidthQosMode) { + this.volumeBandwidthQosMode = volumeBandwidthQosMode; + return this; + } + /** * Set the vpc. * @@ -443,6 +469,7 @@ protected InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImag totalVolumeBandwidth = builder.totalVolumeBandwidth; userData = builder.userData; volumeAttachments = builder.volumeAttachments; + volumeBandwidthQosMode = builder.volumeBandwidthQosMode; vpc = builder.vpc; bootVolumeAttachment = builder.bootVolumeAttachment; image = builder.image; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface.java index 377446c77d..7c1d2ff3ff 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,6 +35,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + /** * Builder. @@ -55,6 +68,7 @@ public static class Builder { private Long totalVolumeBandwidth; private String userData; private List volumeAttachments; + private String volumeBandwidthQosMode; private VPCIdentity vpc; private VolumeAttachmentPrototypeInstanceByImageContext bootVolumeAttachment; private ImageIdentity image; @@ -83,8 +97,9 @@ public Builder(InstanceTemplatePrototypeInstanceTemplateByImage instanceTemplate this.totalVolumeBandwidth = instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface.totalVolumeBandwidth; this.userData = instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface.userData; this.volumeAttachments = instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface.volumeAttachments; + this.volumeBandwidthQosMode = instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface.volumeBandwidthQosMode; this.vpc = instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface.vpc; - this.bootVolumeAttachment = (VolumeAttachmentPrototypeInstanceByImageContext) instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface.bootVolumeAttachment; + this.bootVolumeAttachment = instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface.bootVolumeAttachment; this.image = instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface.image; this.zone = instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface.zone; this.networkInterfaces = instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface.networkInterfaces; @@ -351,6 +366,17 @@ public Builder volumeAttachments(List volumeAttachmen return this; } + /** + * Set the volumeBandwidthQosMode. + * + * @param volumeBandwidthQosMode the volumeBandwidthQosMode + * @return the InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface builder + */ + public Builder volumeBandwidthQosMode(String volumeBandwidthQosMode) { + this.volumeBandwidthQosMode = volumeBandwidthQosMode; + return this; + } + /** * Set the vpc. * @@ -443,6 +469,7 @@ protected InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImag totalVolumeBandwidth = builder.totalVolumeBandwidth; userData = builder.userData; volumeAttachments = builder.volumeAttachments; + volumeBandwidthQosMode = builder.volumeBandwidthQosMode; vpc = builder.vpc; bootVolumeAttachment = builder.bootVolumeAttachment; image = builder.image; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot.java index abfb12ef2c..0f2ad425f4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -36,6 +36,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + protected InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot() { } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment.java index ac05963cc9..fe7520e5ec 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,6 +35,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + /** * Builder. @@ -55,6 +68,7 @@ public static class Builder { private Long totalVolumeBandwidth; private String userData; private List volumeAttachments; + private String volumeBandwidthQosMode; private VPCIdentity vpc; private VolumeAttachmentPrototypeInstanceBySourceSnapshotContext bootVolumeAttachment; private ZoneIdentity zone; @@ -82,8 +96,9 @@ public Builder(InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot instanc this.totalVolumeBandwidth = instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment.totalVolumeBandwidth; this.userData = instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment.userData; this.volumeAttachments = instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment.volumeAttachments; + this.volumeBandwidthQosMode = instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment.volumeBandwidthQosMode; this.vpc = instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment.vpc; - this.bootVolumeAttachment = (VolumeAttachmentPrototypeInstanceBySourceSnapshotContext) instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment.bootVolumeAttachment; + this.bootVolumeAttachment = instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment.bootVolumeAttachment; this.zone = instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment.zone; this.networkAttachments = instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment.networkAttachments; this.primaryNetworkAttachment = instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment.primaryNetworkAttachment; @@ -349,6 +364,17 @@ public Builder volumeAttachments(List volumeAttachmen return this; } + /** + * Set the volumeBandwidthQosMode. + * + * @param volumeBandwidthQosMode the volumeBandwidthQosMode + * @return the InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment builder + */ + public Builder volumeBandwidthQosMode(String volumeBandwidthQosMode) { + this.volumeBandwidthQosMode = volumeBandwidthQosMode; + return this; + } + /** * Set the vpc. * @@ -430,6 +456,7 @@ protected InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTempl totalVolumeBandwidth = builder.totalVolumeBandwidth; userData = builder.userData; volumeAttachments = builder.volumeAttachments; + volumeBandwidthQosMode = builder.volumeBandwidthQosMode; vpc = builder.vpc; bootVolumeAttachment = builder.bootVolumeAttachment; zone = builder.zone; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface.java index 6410031c7d..d3e44267e9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,6 +35,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + /** * Builder. @@ -55,6 +68,7 @@ public static class Builder { private Long totalVolumeBandwidth; private String userData; private List volumeAttachments; + private String volumeBandwidthQosMode; private VPCIdentity vpc; private VolumeAttachmentPrototypeInstanceBySourceSnapshotContext bootVolumeAttachment; private ZoneIdentity zone; @@ -82,8 +96,9 @@ public Builder(InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot instanc this.totalVolumeBandwidth = instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface.totalVolumeBandwidth; this.userData = instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface.userData; this.volumeAttachments = instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface.volumeAttachments; + this.volumeBandwidthQosMode = instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface.volumeBandwidthQosMode; this.vpc = instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface.vpc; - this.bootVolumeAttachment = (VolumeAttachmentPrototypeInstanceBySourceSnapshotContext) instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface.bootVolumeAttachment; + this.bootVolumeAttachment = instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface.bootVolumeAttachment; this.zone = instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface.zone; this.networkInterfaces = instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface.networkInterfaces; this.primaryNetworkInterface = instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface.primaryNetworkInterface; @@ -349,6 +364,17 @@ public Builder volumeAttachments(List volumeAttachmen return this; } + /** + * Set the volumeBandwidthQosMode. + * + * @param volumeBandwidthQosMode the volumeBandwidthQosMode + * @return the InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface builder + */ + public Builder volumeBandwidthQosMode(String volumeBandwidthQosMode) { + this.volumeBandwidthQosMode = volumeBandwidthQosMode; + return this; + } + /** * Set the vpc. * @@ -430,6 +456,7 @@ protected InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTempl totalVolumeBandwidth = builder.totalVolumeBandwidth; userData = builder.userData; volumeAttachments = builder.volumeAttachments; + volumeBandwidthQosMode = builder.volumeBandwidthQosMode; vpc = builder.vpc; bootVolumeAttachment = builder.bootVolumeAttachment; zone = builder.zone; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceTemplate.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceTemplate.java index a3d55619e3..2741cfb88a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceTemplate.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceTemplate.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -41,6 +41,19 @@ public interface ConfidentialComputeMode { String TDX = "tdx"; } + /** + * The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + * instance profile's `volume_bandwidth_qos_modes`. + * + * If unspecified, the default volume bandwidth QoS mode from the profile will be used. + */ + public interface VolumeBandwidthQosMode { + /** pooled. */ + String POOLED = "pooled"; + /** weighted. */ + String WEIGHTED = "weighted"; + } + /** * Builder. @@ -61,6 +74,7 @@ public static class Builder { private Long totalVolumeBandwidth; private String userData; private List volumeAttachments; + private String volumeBandwidthQosMode; private VPCIdentity vpc; private VolumeAttachmentPrototypeInstanceByImageContext bootVolumeAttachment; private InstanceCatalogOfferingPrototype catalogOffering; @@ -93,8 +107,9 @@ public Builder(InstanceTemplatePrototype instanceTemplatePrototypeInstanceTempla this.totalVolumeBandwidth = instanceTemplatePrototypeInstanceTemplateBySourceTemplate.totalVolumeBandwidth; this.userData = instanceTemplatePrototypeInstanceTemplateBySourceTemplate.userData; this.volumeAttachments = instanceTemplatePrototypeInstanceTemplateBySourceTemplate.volumeAttachments; + this.volumeBandwidthQosMode = instanceTemplatePrototypeInstanceTemplateBySourceTemplate.volumeBandwidthQosMode; this.vpc = instanceTemplatePrototypeInstanceTemplateBySourceTemplate.vpc; - this.bootVolumeAttachment = (VolumeAttachmentPrototypeInstanceByImageContext) instanceTemplatePrototypeInstanceTemplateBySourceTemplate.bootVolumeAttachment; + this.bootVolumeAttachment = instanceTemplatePrototypeInstanceTemplateBySourceTemplate.bootVolumeAttachment; this.catalogOffering = instanceTemplatePrototypeInstanceTemplateBySourceTemplate.catalogOffering; this.image = instanceTemplatePrototypeInstanceTemplateBySourceTemplate.image; this.networkAttachments = instanceTemplatePrototypeInstanceTemplateBySourceTemplate.networkAttachments; @@ -377,6 +392,17 @@ public Builder volumeAttachments(List volumeAttachmen return this; } + /** + * Set the volumeBandwidthQosMode. + * + * @param volumeBandwidthQosMode the volumeBandwidthQosMode + * @return the InstanceTemplatePrototypeInstanceTemplateBySourceTemplate builder + */ + public Builder volumeBandwidthQosMode(String volumeBandwidthQosMode) { + this.volumeBandwidthQosMode = volumeBandwidthQosMode; + return this; + } + /** * Set the vpc. * @@ -510,6 +536,7 @@ protected InstanceTemplatePrototypeInstanceTemplateBySourceTemplate(Builder buil totalVolumeBandwidth = builder.totalVolumeBandwidth; userData = builder.userData; volumeAttachments = builder.volumeAttachments; + volumeBandwidthQosMode = builder.volumeBandwidthQosMode; vpc = builder.vpc; bootVolumeAttachment = builder.bootVolumeAttachment; catalogOffering = builder.catalogOffering; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateReference.java index 7e44e83318..fb9c12b3ac 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceVCPU.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceVCPU.java index e95bf4fcda..1efb53b4e4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceVCPU.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstanceVCPU.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -34,7 +34,8 @@ public interface Architecture { } /** - * The VCPU manufacturer. + * The VCPU manufacturer for this instance. It may be `unassigned` when instance `status` is `failed`, `pending`, or + * `stopped`. * * The enumerated values for this property may * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. @@ -46,6 +47,8 @@ public interface Manufacturer { String IBM = "ibm"; /** intel. */ String INTEL = "intel"; + /** unassigned. */ + String UNASSIGNED = "unassigned"; } protected String architecture; @@ -82,7 +85,8 @@ public Long getCount() { /** * Gets the manufacturer. * - * The VCPU manufacturer. + * The VCPU manufacturer for this instance. It may be `unassigned` when instance `status` is `failed`, `pending`, or + * `stopped`. * * The enumerated values for this property may * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancesPager.java index dc67a34fff..e75a6328ab 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancesPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/InstancesPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IpsecPoliciesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IpsecPoliciesPager.java index af5f815cc2..f1da49d9aa 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IpsecPoliciesPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IpsecPoliciesPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IpsecPolicyConnectionsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IpsecPolicyConnectionsPager.java index 2aad531541..8eae5fbc8c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IpsecPolicyConnectionsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/IpsecPolicyConnectionsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Key.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Key.java index bd4b14b7ff..a3686c40a9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Key.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Key.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyCollection.java index 73cb4f43a2..ab10e122c2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentity.java index 328937280a..db2b2d0323 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByCRN.java index 652e8d7bba..33ec486f06 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByFingerprint.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByFingerprint.java index da3d25a90a..ad8511ef0b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByFingerprint.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByFingerprint.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByHref.java index bee124cd88..7f66b8af52 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityById.java index 3ab928fe59..536e7f9309 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyPatch.java index 2bb8e93714..b2eb5f1143 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyReference.java index b5f88b3377..ef8903cdea 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeyReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeysPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeysPager.java index 21f017ef73..07e7ea0c70 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeysPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/KeysPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LegacyCloudObjectStorageBucketIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LegacyCloudObjectStorageBucketIdentity.java index 9454b1b055..0c4ae0b707 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LegacyCloudObjectStorageBucketIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LegacyCloudObjectStorageBucketIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName.java index 6e7250665e..78f5e35b1d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LegacyCloudObjectStorageBucketReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LegacyCloudObjectStorageBucketReference.java index 4e2799cc5b..e7634a527f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LegacyCloudObjectStorageBucketReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LegacyCloudObjectStorageBucketReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBackupPoliciesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBackupPoliciesOptions.java index 6d77f0b8cb..afd2247502 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBackupPoliciesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBackupPoliciesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBackupPolicyJobsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBackupPolicyJobsOptions.java index d87e58aeea..d864509bbc 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBackupPolicyJobsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBackupPolicyJobsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBackupPolicyPlansOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBackupPolicyPlansOptions.java index 8ec3f983c0..99a1257117 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBackupPolicyPlansOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBackupPolicyPlansOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerDisksOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerDisksOptions.java index 659aec33f3..1a6b99e204 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerDisksOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerDisksOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkAttachmentsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkAttachmentsOptions.java index b11953fab2..4f24639796 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkAttachmentsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkAttachmentsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkInterfaceFloatingIpsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkInterfaceFloatingIpsOptions.java index f8eb8c4f7b..b3b9469af2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkInterfaceFloatingIpsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkInterfaceFloatingIpsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkInterfaceIpsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkInterfaceIpsOptions.java index 20997d5950..31e54b614e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkInterfaceIpsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkInterfaceIpsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkInterfacesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkInterfacesOptions.java index 892f6d1491..38bd332141 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkInterfacesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkInterfacesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerProfilesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerProfilesOptions.java index 5d10a537d5..ea40321207 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerProfilesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerProfilesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServersOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServersOptions.java index 19da9e9cc4..791e1702ae 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServersOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServersOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkInterfacesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkInterfacesOptions.java index bd149958fd..0f47d3b900 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkInterfacesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkInterfacesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkProfilesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkProfilesOptions.java index 40f147c152..4f9908d28f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkProfilesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkProfilesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkSubnetReservedIpsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkSubnetReservedIpsOptions.java index 846576d5db..b26ab9aa54 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkSubnetReservedIpsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkSubnetReservedIpsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkSubnetsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkSubnetsOptions.java index 507512aa34..c78264c052 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkSubnetsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkSubnetsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworksOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworksOptions.java index 4e67e25150..03bc64762a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworksOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworksOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostDisksOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostDisksOptions.java index cbf9d6c027..6b84c9d7b8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostDisksOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostDisksOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostGroupsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostGroupsOptions.java index 3b697e82cc..3421bc4fd6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostGroupsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostGroupsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostProfilesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostProfilesOptions.java index cf151bee0b..0cd0bc316e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostProfilesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostProfilesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostsOptions.java index 8278810b25..c82e1b90eb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListEndpointGatewayIpsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListEndpointGatewayIpsOptions.java index 2c24d44430..ee0f1ec5c6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListEndpointGatewayIpsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListEndpointGatewayIpsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListEndpointGatewaysOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListEndpointGatewaysOptions.java index 877d7dd90c..e1aa0bd85f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListEndpointGatewaysOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListEndpointGatewaysOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListFloatingIpsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListFloatingIpsOptions.java index d3c619ed6e..dc678df69a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListFloatingIpsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListFloatingIpsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListFlowLogCollectorsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListFlowLogCollectorsOptions.java index a6b53b3ad8..22d65551ed 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListFlowLogCollectorsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListFlowLogCollectorsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListIkePoliciesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListIkePoliciesOptions.java index 2990444fab..25a4237ce7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListIkePoliciesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListIkePoliciesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListIkePolicyConnectionsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListIkePolicyConnectionsOptions.java index 7acf6348bb..f0fbcb2664 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListIkePolicyConnectionsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListIkePolicyConnectionsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListImageBareMetalServerProfilesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListImageBareMetalServerProfilesOptions.java new file mode 100644 index 0000000000..a05fd8eafe --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListImageBareMetalServerProfilesOptions.java @@ -0,0 +1,156 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * The listImageBareMetalServerProfiles options. + */ +public class ListImageBareMetalServerProfilesOptions extends GenericModel { + + protected String id; + protected String start; + protected Long limit; + + /** + * Builder. + */ + public static class Builder { + private String id; + private String start; + private Long limit; + + /** + * Instantiates a new Builder from an existing ListImageBareMetalServerProfilesOptions instance. + * + * @param listImageBareMetalServerProfilesOptions the instance to initialize the Builder with + */ + private Builder(ListImageBareMetalServerProfilesOptions listImageBareMetalServerProfilesOptions) { + this.id = listImageBareMetalServerProfilesOptions.id; + this.start = listImageBareMetalServerProfilesOptions.start; + this.limit = listImageBareMetalServerProfilesOptions.limit; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Instantiates a new builder with required properties. + * + * @param id the id + */ + public Builder(String id) { + this.id = id; + } + + /** + * Builds a ListImageBareMetalServerProfilesOptions. + * + * @return the new ListImageBareMetalServerProfilesOptions instance + */ + public ListImageBareMetalServerProfilesOptions build() { + return new ListImageBareMetalServerProfilesOptions(this); + } + + /** + * Set the id. + * + * @param id the id + * @return the ListImageBareMetalServerProfilesOptions builder + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * Set the start. + * + * @param start the start + * @return the ListImageBareMetalServerProfilesOptions builder + */ + public Builder start(String start) { + this.start = start; + return this; + } + + /** + * Set the limit. + * + * @param limit the limit + * @return the ListImageBareMetalServerProfilesOptions builder + */ + public Builder limit(long limit) { + this.limit = limit; + return this; + } + } + + protected ListImageBareMetalServerProfilesOptions() { } + + protected ListImageBareMetalServerProfilesOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.id, + "id cannot be empty"); + id = builder.id; + start = builder.start; + limit = builder.limit; + } + + /** + * New builder. + * + * @return a ListImageBareMetalServerProfilesOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the id. + * + * The image identifier. + * + * @return the id + */ + public String id() { + return id; + } + + /** + * Gets the start. + * + * A server-provided token determining what resource to start the page on. + * + * @return the start + */ + public String start() { + return start; + } + + /** + * Gets the limit. + * + * The number of resources to return on a page. + * + * @return the limit + */ + public Long limit() { + return limit; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListImageExportJobsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListImageExportJobsOptions.java index 5753e10954..83cf088094 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListImageExportJobsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListImageExportJobsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListImageInstanceProfilesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListImageInstanceProfilesOptions.java new file mode 100644 index 0000000000..940e9b810f --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListImageInstanceProfilesOptions.java @@ -0,0 +1,156 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * The listImageInstanceProfiles options. + */ +public class ListImageInstanceProfilesOptions extends GenericModel { + + protected String id; + protected String start; + protected Long limit; + + /** + * Builder. + */ + public static class Builder { + private String id; + private String start; + private Long limit; + + /** + * Instantiates a new Builder from an existing ListImageInstanceProfilesOptions instance. + * + * @param listImageInstanceProfilesOptions the instance to initialize the Builder with + */ + private Builder(ListImageInstanceProfilesOptions listImageInstanceProfilesOptions) { + this.id = listImageInstanceProfilesOptions.id; + this.start = listImageInstanceProfilesOptions.start; + this.limit = listImageInstanceProfilesOptions.limit; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Instantiates a new builder with required properties. + * + * @param id the id + */ + public Builder(String id) { + this.id = id; + } + + /** + * Builds a ListImageInstanceProfilesOptions. + * + * @return the new ListImageInstanceProfilesOptions instance + */ + public ListImageInstanceProfilesOptions build() { + return new ListImageInstanceProfilesOptions(this); + } + + /** + * Set the id. + * + * @param id the id + * @return the ListImageInstanceProfilesOptions builder + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * Set the start. + * + * @param start the start + * @return the ListImageInstanceProfilesOptions builder + */ + public Builder start(String start) { + this.start = start; + return this; + } + + /** + * Set the limit. + * + * @param limit the limit + * @return the ListImageInstanceProfilesOptions builder + */ + public Builder limit(long limit) { + this.limit = limit; + return this; + } + } + + protected ListImageInstanceProfilesOptions() { } + + protected ListImageInstanceProfilesOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.id, + "id cannot be empty"); + id = builder.id; + start = builder.start; + limit = builder.limit; + } + + /** + * New builder. + * + * @return a ListImageInstanceProfilesOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the id. + * + * The image identifier. + * + * @return the id + */ + public String id() { + return id; + } + + /** + * Gets the start. + * + * A server-provided token determining what resource to start the page on. + * + * @return the start + */ + public String start() { + return start; + } + + /** + * Gets the limit. + * + * The number of resources to return on a page. + * + * @return the limit + */ + public Long limit() { + return limit; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListImagesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListImagesOptions.java index 3c3a0f60ae..758258621d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListImagesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListImagesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceClusterNetworkAttachmentsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceClusterNetworkAttachmentsOptions.java index c76882f832..7f55915fbc 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceClusterNetworkAttachmentsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceClusterNetworkAttachmentsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceDisksOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceDisksOptions.java index 68d1eb1808..4bb925693f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceDisksOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceDisksOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupManagerActionsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupManagerActionsOptions.java index cc72efde21..b548527d66 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupManagerActionsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupManagerActionsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupManagerPoliciesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupManagerPoliciesOptions.java index ae9c1dcd61..e85ad430c6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupManagerPoliciesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupManagerPoliciesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupManagersOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupManagersOptions.java index b0eed88955..d45ce55a95 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupManagersOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupManagersOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupMembershipsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupMembershipsOptions.java index 02822a0f11..d9d7fde9eb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupMembershipsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupMembershipsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupsOptions.java index 54a7787f1b..84c8edb8a0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkAttachmentsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkAttachmentsOptions.java index 9397f178b3..3280c24250 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkAttachmentsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkAttachmentsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkInterfaceFloatingIpsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkInterfaceFloatingIpsOptions.java index 1431c2cd37..2575f06469 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkInterfaceFloatingIpsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkInterfaceFloatingIpsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkInterfaceIpsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkInterfaceIpsOptions.java index c76a48aa5e..17f97e2ec8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkInterfaceIpsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkInterfaceIpsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkInterfacesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkInterfacesOptions.java index adf73b4c7b..51b7de0952 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkInterfacesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkInterfacesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceProfilesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceProfilesOptions.java index b866aaa83b..b8ff58bba1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceProfilesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceProfilesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceTemplatesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceTemplatesOptions.java index 03b224f15f..20d686d5aa 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceTemplatesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceTemplatesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceVolumeAttachmentsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceVolumeAttachmentsOptions.java index 5f48fbd9b0..c79ef0389f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceVolumeAttachmentsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceVolumeAttachmentsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstancesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstancesOptions.java index e326a5d714..78fc29cb55 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstancesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListInstancesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListIpsecPoliciesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListIpsecPoliciesOptions.java index cb91c4b2af..c401c7bbd0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListIpsecPoliciesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListIpsecPoliciesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListIpsecPolicyConnectionsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListIpsecPolicyConnectionsOptions.java index a46e17d5af..6b72115a2f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListIpsecPolicyConnectionsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListIpsecPolicyConnectionsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListKeysOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListKeysOptions.java index 1e1abf7fe8..bf9a16d71a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListKeysOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListKeysOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerListenerPoliciesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerListenerPoliciesOptions.java index 2da7c369e6..6a6a5cd938 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerListenerPoliciesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerListenerPoliciesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerListenerPolicyRulesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerListenerPolicyRulesOptions.java index 8e801e8016..23adc7b01c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerListenerPolicyRulesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerListenerPolicyRulesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerListenersOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerListenersOptions.java index 4ff1fefdb6..1cb1fd652e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerListenersOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerListenersOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerPoolMembersOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerPoolMembersOptions.java index 10d5b41c17..1724ff76c8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerPoolMembersOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerPoolMembersOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerPoolsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerPoolsOptions.java index 280c273729..f8f0f77d49 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerPoolsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerPoolsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerProfilesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerProfilesOptions.java index 15f13d4130..c0bafe02fb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerProfilesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerProfilesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancersOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancersOptions.java index a1c07b941a..4461c8b3f4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancersOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancersOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListNetworkAclRulesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListNetworkAclRulesOptions.java index 4f602d8a0e..32e901d944 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListNetworkAclRulesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListNetworkAclRulesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListNetworkAclsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListNetworkAclsOptions.java index b355166b5b..c29ee9f669 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListNetworkAclsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListNetworkAclsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListNetworkInterfaceFloatingIpsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListNetworkInterfaceFloatingIpsOptions.java index 6385374e75..8b99206bab 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListNetworkInterfaceFloatingIpsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListNetworkInterfaceFloatingIpsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListOperatingSystemsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListOperatingSystemsOptions.java index 8bc024aa30..94a8261da5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListOperatingSystemsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListOperatingSystemsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListPlacementGroupsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListPlacementGroupsOptions.java index 99cd740f3f..d497345c76 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListPlacementGroupsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListPlacementGroupsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListPrivatePathServiceGatewayAccountPoliciesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListPrivatePathServiceGatewayAccountPoliciesOptions.java index 1809112608..46ff5c7688 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListPrivatePathServiceGatewayAccountPoliciesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListPrivatePathServiceGatewayAccountPoliciesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListPrivatePathServiceGatewayEndpointGatewayBindingsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListPrivatePathServiceGatewayEndpointGatewayBindingsOptions.java index e69ed1be1e..e238a1747a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListPrivatePathServiceGatewayEndpointGatewayBindingsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListPrivatePathServiceGatewayEndpointGatewayBindingsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListPrivatePathServiceGatewaysOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListPrivatePathServiceGatewaysOptions.java index 7df871972a..09595a53b0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListPrivatePathServiceGatewaysOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListPrivatePathServiceGatewaysOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListPublicAddressRangesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListPublicAddressRangesOptions.java index c7f04cb075..c1c6abee10 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListPublicAddressRangesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListPublicAddressRangesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListPublicGatewaysOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListPublicGatewaysOptions.java index 4acac6b9b2..3942a028bf 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListPublicGatewaysOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListPublicGatewaysOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListRegionZonesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListRegionZonesOptions.java index f6049933cd..695809eb3c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListRegionZonesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListRegionZonesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListRegionsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListRegionsOptions.java index 313e830224..8822742d0a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListRegionsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListRegionsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListReservationsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListReservationsOptions.java index 87bf7c30fa..34254b627e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListReservationsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListReservationsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSecurityGroupRulesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSecurityGroupRulesOptions.java index 58ac8f86ed..02fa4f3bc8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSecurityGroupRulesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSecurityGroupRulesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSecurityGroupTargetsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSecurityGroupTargetsOptions.java index 4502bb5eff..a2fe7079cd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSecurityGroupTargetsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSecurityGroupTargetsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSecurityGroupsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSecurityGroupsOptions.java index ef3cfc9df2..66a04df98b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSecurityGroupsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSecurityGroupsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListShareAccessorBindingsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListShareAccessorBindingsOptions.java index 84454e3949..5775d9f915 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListShareAccessorBindingsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListShareAccessorBindingsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListShareMountTargetsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListShareMountTargetsOptions.java index 865ab1925a..18e3ea279b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListShareMountTargetsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListShareMountTargetsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListShareProfilesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListShareProfilesOptions.java index 3b62a42641..ebba8e0da8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListShareProfilesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListShareProfilesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListShareSnapshotsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListShareSnapshotsOptions.java index d8400fbd18..106822c6f4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListShareSnapshotsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListShareSnapshotsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSharesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSharesOptions.java index 805b82cc1c..b5071747d8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSharesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSharesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotClonesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotClonesOptions.java index c22e0ec26f..382a6ae1d8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotClonesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotClonesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotConsistencyGroupsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotConsistencyGroupsOptions.java index f866b91830..152c74184d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotConsistencyGroupsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotConsistencyGroupsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotInstanceProfilesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotInstanceProfilesOptions.java new file mode 100644 index 0000000000..39589d2ed3 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotInstanceProfilesOptions.java @@ -0,0 +1,156 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * The listSnapshotInstanceProfiles options. + */ +public class ListSnapshotInstanceProfilesOptions extends GenericModel { + + protected String id; + protected String start; + protected Long limit; + + /** + * Builder. + */ + public static class Builder { + private String id; + private String start; + private Long limit; + + /** + * Instantiates a new Builder from an existing ListSnapshotInstanceProfilesOptions instance. + * + * @param listSnapshotInstanceProfilesOptions the instance to initialize the Builder with + */ + private Builder(ListSnapshotInstanceProfilesOptions listSnapshotInstanceProfilesOptions) { + this.id = listSnapshotInstanceProfilesOptions.id; + this.start = listSnapshotInstanceProfilesOptions.start; + this.limit = listSnapshotInstanceProfilesOptions.limit; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Instantiates a new builder with required properties. + * + * @param id the id + */ + public Builder(String id) { + this.id = id; + } + + /** + * Builds a ListSnapshotInstanceProfilesOptions. + * + * @return the new ListSnapshotInstanceProfilesOptions instance + */ + public ListSnapshotInstanceProfilesOptions build() { + return new ListSnapshotInstanceProfilesOptions(this); + } + + /** + * Set the id. + * + * @param id the id + * @return the ListSnapshotInstanceProfilesOptions builder + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * Set the start. + * + * @param start the start + * @return the ListSnapshotInstanceProfilesOptions builder + */ + public Builder start(String start) { + this.start = start; + return this; + } + + /** + * Set the limit. + * + * @param limit the limit + * @return the ListSnapshotInstanceProfilesOptions builder + */ + public Builder limit(long limit) { + this.limit = limit; + return this; + } + } + + protected ListSnapshotInstanceProfilesOptions() { } + + protected ListSnapshotInstanceProfilesOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.id, + "id cannot be empty"); + id = builder.id; + start = builder.start; + limit = builder.limit; + } + + /** + * New builder. + * + * @return a ListSnapshotInstanceProfilesOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the id. + * + * The snapshot identifier. + * + * @return the id + */ + public String id() { + return id; + } + + /** + * Gets the start. + * + * A server-provided token determining what resource to start the page on. + * + * @return the start + */ + public String start() { + return start; + } + + /** + * Gets the limit. + * + * The number of resources to return on a page. + * + * @return the limit + */ + public Long limit() { + return limit; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotsOptions.java index 1c2da46219..9edbc60305 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSubnetReservedIpsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSubnetReservedIpsOptions.java index 5ed6daf3bd..849cc2240e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSubnetReservedIpsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSubnetReservedIpsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSubnetsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSubnetsOptions.java index 28ee04856b..dcc0179d3d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSubnetsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListSubnetsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVirtualNetworkInterfaceIpsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVirtualNetworkInterfaceIpsOptions.java index 4b37de9244..e8e380ccba 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVirtualNetworkInterfaceIpsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVirtualNetworkInterfaceIpsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVirtualNetworkInterfacesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVirtualNetworkInterfacesOptions.java index 2ad0cc2199..651768f2e4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVirtualNetworkInterfacesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVirtualNetworkInterfacesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVolumeInstanceProfilesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVolumeInstanceProfilesOptions.java new file mode 100644 index 0000000000..2d174ce294 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVolumeInstanceProfilesOptions.java @@ -0,0 +1,156 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * The listVolumeInstanceProfiles options. + */ +public class ListVolumeInstanceProfilesOptions extends GenericModel { + + protected String id; + protected String start; + protected Long limit; + + /** + * Builder. + */ + public static class Builder { + private String id; + private String start; + private Long limit; + + /** + * Instantiates a new Builder from an existing ListVolumeInstanceProfilesOptions instance. + * + * @param listVolumeInstanceProfilesOptions the instance to initialize the Builder with + */ + private Builder(ListVolumeInstanceProfilesOptions listVolumeInstanceProfilesOptions) { + this.id = listVolumeInstanceProfilesOptions.id; + this.start = listVolumeInstanceProfilesOptions.start; + this.limit = listVolumeInstanceProfilesOptions.limit; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Instantiates a new builder with required properties. + * + * @param id the id + */ + public Builder(String id) { + this.id = id; + } + + /** + * Builds a ListVolumeInstanceProfilesOptions. + * + * @return the new ListVolumeInstanceProfilesOptions instance + */ + public ListVolumeInstanceProfilesOptions build() { + return new ListVolumeInstanceProfilesOptions(this); + } + + /** + * Set the id. + * + * @param id the id + * @return the ListVolumeInstanceProfilesOptions builder + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * Set the start. + * + * @param start the start + * @return the ListVolumeInstanceProfilesOptions builder + */ + public Builder start(String start) { + this.start = start; + return this; + } + + /** + * Set the limit. + * + * @param limit the limit + * @return the ListVolumeInstanceProfilesOptions builder + */ + public Builder limit(long limit) { + this.limit = limit; + return this; + } + } + + protected ListVolumeInstanceProfilesOptions() { } + + protected ListVolumeInstanceProfilesOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.id, + "id cannot be empty"); + id = builder.id; + start = builder.start; + limit = builder.limit; + } + + /** + * New builder. + * + * @return a ListVolumeInstanceProfilesOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the id. + * + * The volume identifier. + * + * @return the id + */ + public String id() { + return id; + } + + /** + * Gets the start. + * + * A server-provided token determining what resource to start the page on. + * + * @return the start + */ + public String start() { + return start; + } + + /** + * Gets the limit. + * + * The number of resources to return on a page. + * + * @return the limit + */ + public Long limit() { + return limit; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVolumeProfilesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVolumeProfilesOptions.java index e59b184209..e76c58b0d4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVolumeProfilesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVolumeProfilesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVolumesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVolumesOptions.java index 6b8d5ecb02..e26c9360cd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVolumesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVolumesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpcAddressPrefixesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpcAddressPrefixesOptions.java index afc3196be7..94942dfa61 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpcAddressPrefixesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpcAddressPrefixesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpcDnsResolutionBindingsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpcDnsResolutionBindingsOptions.java index 82a3aac3ce..a747b02701 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpcDnsResolutionBindingsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpcDnsResolutionBindingsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpcRoutesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpcRoutesOptions.java index 19044c78ae..a55554d537 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpcRoutesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpcRoutesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpcRoutingTableRoutesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpcRoutingTableRoutesOptions.java index be4408ba62..e520c41da3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpcRoutingTableRoutesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpcRoutingTableRoutesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpcRoutingTablesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpcRoutingTablesOptions.java index 60f17bfe1e..85c6c7298a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpcRoutingTablesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpcRoutingTablesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpcsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpcsOptions.java index fde578165e..922b040a1b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpcsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpcsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayAdvertisedCidrsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayAdvertisedCidrsOptions.java new file mode 100644 index 0000000000..f2b8cf189e --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayAdvertisedCidrsOptions.java @@ -0,0 +1,104 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * The listVpnGatewayAdvertisedCidrs options. + */ +public class ListVpnGatewayAdvertisedCidrsOptions extends GenericModel { + + protected String vpnGatewayId; + + /** + * Builder. + */ + public static class Builder { + private String vpnGatewayId; + + /** + * Instantiates a new Builder from an existing ListVpnGatewayAdvertisedCidrsOptions instance. + * + * @param listVpnGatewayAdvertisedCidrsOptions the instance to initialize the Builder with + */ + private Builder(ListVpnGatewayAdvertisedCidrsOptions listVpnGatewayAdvertisedCidrsOptions) { + this.vpnGatewayId = listVpnGatewayAdvertisedCidrsOptions.vpnGatewayId; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Instantiates a new builder with required properties. + * + * @param vpnGatewayId the vpnGatewayId + */ + public Builder(String vpnGatewayId) { + this.vpnGatewayId = vpnGatewayId; + } + + /** + * Builds a ListVpnGatewayAdvertisedCidrsOptions. + * + * @return the new ListVpnGatewayAdvertisedCidrsOptions instance + */ + public ListVpnGatewayAdvertisedCidrsOptions build() { + return new ListVpnGatewayAdvertisedCidrsOptions(this); + } + + /** + * Set the vpnGatewayId. + * + * @param vpnGatewayId the vpnGatewayId + * @return the ListVpnGatewayAdvertisedCidrsOptions builder + */ + public Builder vpnGatewayId(String vpnGatewayId) { + this.vpnGatewayId = vpnGatewayId; + return this; + } + } + + protected ListVpnGatewayAdvertisedCidrsOptions() { } + + protected ListVpnGatewayAdvertisedCidrsOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.vpnGatewayId, + "vpnGatewayId cannot be empty"); + vpnGatewayId = builder.vpnGatewayId; + } + + /** + * New builder. + * + * @return a ListVpnGatewayAdvertisedCidrsOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the vpnGatewayId. + * + * The VPN gateway identifier. + * + * @return the vpnGatewayId + */ + public String vpnGatewayId() { + return vpnGatewayId; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayConnectionsLocalCidrsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayConnectionsLocalCidrsOptions.java index dbf542bf93..776b64b008 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayConnectionsLocalCidrsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayConnectionsLocalCidrsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayConnectionsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayConnectionsOptions.java index 5d8aeb6988..e508ee2584 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayConnectionsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayConnectionsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayConnectionsPeerCidrsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayConnectionsPeerCidrsOptions.java index 5880738f1b..fd886e042e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayConnectionsPeerCidrsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayConnectionsPeerCidrsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayServiceConnectionsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayServiceConnectionsOptions.java new file mode 100644 index 0000000000..d2407a3d97 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayServiceConnectionsOptions.java @@ -0,0 +1,156 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * The listVpnGatewayServiceConnections options. + */ +public class ListVpnGatewayServiceConnectionsOptions extends GenericModel { + + protected String vpnGatewayId; + protected String start; + protected Long limit; + + /** + * Builder. + */ + public static class Builder { + private String vpnGatewayId; + private String start; + private Long limit; + + /** + * Instantiates a new Builder from an existing ListVpnGatewayServiceConnectionsOptions instance. + * + * @param listVpnGatewayServiceConnectionsOptions the instance to initialize the Builder with + */ + private Builder(ListVpnGatewayServiceConnectionsOptions listVpnGatewayServiceConnectionsOptions) { + this.vpnGatewayId = listVpnGatewayServiceConnectionsOptions.vpnGatewayId; + this.start = listVpnGatewayServiceConnectionsOptions.start; + this.limit = listVpnGatewayServiceConnectionsOptions.limit; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Instantiates a new builder with required properties. + * + * @param vpnGatewayId the vpnGatewayId + */ + public Builder(String vpnGatewayId) { + this.vpnGatewayId = vpnGatewayId; + } + + /** + * Builds a ListVpnGatewayServiceConnectionsOptions. + * + * @return the new ListVpnGatewayServiceConnectionsOptions instance + */ + public ListVpnGatewayServiceConnectionsOptions build() { + return new ListVpnGatewayServiceConnectionsOptions(this); + } + + /** + * Set the vpnGatewayId. + * + * @param vpnGatewayId the vpnGatewayId + * @return the ListVpnGatewayServiceConnectionsOptions builder + */ + public Builder vpnGatewayId(String vpnGatewayId) { + this.vpnGatewayId = vpnGatewayId; + return this; + } + + /** + * Set the start. + * + * @param start the start + * @return the ListVpnGatewayServiceConnectionsOptions builder + */ + public Builder start(String start) { + this.start = start; + return this; + } + + /** + * Set the limit. + * + * @param limit the limit + * @return the ListVpnGatewayServiceConnectionsOptions builder + */ + public Builder limit(long limit) { + this.limit = limit; + return this; + } + } + + protected ListVpnGatewayServiceConnectionsOptions() { } + + protected ListVpnGatewayServiceConnectionsOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.vpnGatewayId, + "vpnGatewayId cannot be empty"); + vpnGatewayId = builder.vpnGatewayId; + start = builder.start; + limit = builder.limit; + } + + /** + * New builder. + * + * @return a ListVpnGatewayServiceConnectionsOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the vpnGatewayId. + * + * The VPN gateway identifier. + * + * @return the vpnGatewayId + */ + public String vpnGatewayId() { + return vpnGatewayId; + } + + /** + * Gets the start. + * + * A server-provided token determining what resource to start the page on. + * + * @return the start + */ + public String start() { + return start; + } + + /** + * Gets the limit. + * + * The number of resources to return on a page. + * + * @return the limit + */ + public Long limit() { + return limit; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewaysOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewaysOptions.java index 8a7220976e..af922a50c8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewaysOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewaysOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnServerClientsOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnServerClientsOptions.java index 2097ec276b..73cb29383d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnServerClientsOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnServerClientsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnServerRoutesOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnServerRoutesOptions.java index 1feafe8c57..c65413b6e2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnServerRoutesOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnServerRoutesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnServersOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnServersOptions.java index 4e70a43a6a..e8010ac93d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnServersOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ListVpnServersOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancer.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancer.java index 26f71f183a..ee4b1ff2d9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancer.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancer.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerCollection.java index 86ed38da28..29ced519d3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerDNS.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerDNS.java index b0241c8aeb..2d043fdb9d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerDNS.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerDNS.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerDNSPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerDNSPatch.java index 6965ed9b79..81c27d1f73 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerDNSPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerDNSPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerDNSPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerDNSPrototype.java index edcd75545a..370e4d310c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerDNSPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerDNSPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentity.java index 702aadfb69..1f9c1b63d1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityByCRN.java index 43bc2a5caa..afbb1f6172 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityByHref.java index abea28e061..8a878f737d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityById.java index 445c92d09c..5d2ae236b9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListener.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListener.java index 7d9fbf3ff8..842e9e4de9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListener.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListener.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerCollection.java index 38c2e0dc9a..0a83d663ff 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerDefaultPoolPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerDefaultPoolPatch.java index 90ac4d5c1c..c374755c7b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerDefaultPoolPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerDefaultPoolPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref.java index d69b473934..a191dd8c98 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById.java index 47c047204e..c401ddd291 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerHTTPSRedirect.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerHTTPSRedirect.java index 9551a0109f..85689696d6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerHTTPSRedirect.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerHTTPSRedirect.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerHTTPSRedirectPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerHTTPSRedirectPatch.java index 229ffcca8f..5a37aefeb1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerHTTPSRedirectPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerHTTPSRedirectPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerHTTPSRedirectPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerHTTPSRedirectPrototype.java index bde7dc92e1..3520efc5e1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerHTTPSRedirectPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerHTTPSRedirectPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerIdentity.java index 634334b90b..a374c9d3b8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerIdentityByHref.java index dbbf923b7a..0dde9aaca7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerIdentityById.java index a06b3715d2..817b5a669b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPatch.java index d1e53c4924..31f6bfe6ab 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicy.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicy.java index f0cbf2e819..7f12a658bf 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicy.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicy.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyCollection.java index 5bdd864f54..d672219961 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyPatch.java index 3983adef2e..8fea5466ab 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyPrototype.java index f1400f0dc9..f71c16e355 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyReference.java index ef7ec2614f..5e38c54350 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRule.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRule.java index fbcb172c11..f2316108f5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRule.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRule.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRuleCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRuleCollection.java index 8b0fc834da..a2d42d8bd1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRuleCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRuleCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRulePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRulePatch.java index a818cef658..e80e4bf8ae 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRulePatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRulePatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRulePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRulePrototype.java index 242f90d6a2..105db3fd73 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRulePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRulePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRuleReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRuleReference.java index 265539c789..36da3f0a1d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRuleReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRuleReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTarget.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTarget.java index 401d55cf6e..4ccb4812a5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTarget.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTarget.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect.java index 81f2d46e65..fb8b90925a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL.java index 9e3fae6c6f..d7c5cd4af4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerListenerReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerListenerReference.java index 2692ba9a13..8b00832c61 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerListenerReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerListenerReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerPoolReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerPoolReference.java index bc5fbb2259..53276b2f7e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerPoolReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerPoolReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatch.java index ecde2fd5fe..f0961171d2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerIdentity.java index beb97f3fb7..5a1d62db7a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerIdentityLoadBalancerListenerIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerIdentityLoadBalancerListenerIdentityByHref.java index df3b3d1fa5..970b5aa6d7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerIdentityLoadBalancerListenerIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerIdentityLoadBalancerListenerIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerIdentityLoadBalancerListenerIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerIdentityLoadBalancerListenerIdentityById.java index 04da776f1f..d2beac5368 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerIdentityLoadBalancerListenerIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerIdentityLoadBalancerListenerIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch.java index 1e3887aeda..c9dbc5b149 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch.java index 9af934df56..1ff9b6d3a5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity.java index b2f0153046..1a605abfe2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.java index fa346d9b6c..86d066edf0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById.java index 782c5c9a3a..201a12a47c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototype.java index 56248f5cb7..0670577f88 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerIdentity.java index fb664d8df8..b5ac0edb4d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerIdentityLoadBalancerListenerIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerIdentityLoadBalancerListenerIdentityByHref.java index 4fdc120ebd..81fbbd1405 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerIdentityLoadBalancerListenerIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerIdentityLoadBalancerListenerIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerIdentityLoadBalancerListenerIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerIdentityLoadBalancerListenerIdentityById.java index 6b540a7513..0c55fd007d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerIdentityLoadBalancerListenerIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerIdentityLoadBalancerListenerIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype.java index 91c68fdfa5..7458d3907a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype.java index 2ee9c6d3c3..f382b81199 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity.java index 95dcfaa556..1c79adfabc 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.java index 3dc4d7713f..c2e8d9abba 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById.java index 4a3b2446f7..25e6f89c16 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPrototypeLoadBalancerContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPrototypeLoadBalancerContext.java index 132f388480..a4235ebe8b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPrototypeLoadBalancerContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPrototypeLoadBalancerContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerReference.java index d1b87889b1..3a5cfbcb66 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLogging.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLogging.java index 6d437065fd..d306daef86 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLogging.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLogging.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingDatapath.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingDatapath.java index cd1a68948b..f0c5e6a6de 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingDatapath.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingDatapath.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingDatapathPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingDatapathPatch.java index 4e07d4b1f8..72ba6f9999 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingDatapathPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingDatapathPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingDatapathPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingDatapathPrototype.java index dbc6f4d918..ceacba7607 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingDatapathPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingDatapathPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingPatch.java index 08119f8d5d..b2cbceb8d7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingPrototype.java index 2e0a570303..f0005a1498 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPatch.java index f5896a9725..094e1a4585 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPool.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPool.java index 2af2f8f4b3..7da7dad4fa 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPool.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPool.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolCollection.java index 314b016926..f6cd5086b8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicy.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicy.java index 5fd9ef98c5..40156f0ccd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicy.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicy.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyPatch.java index 614c08739f..ac3643d2f0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyPrototype.java index 3fd90914f8..39fc0de116 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTargetPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTargetPatch.java index 585f4e5990..e03bcfd6f4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTargetPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTargetPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTargetPatchLoadBalancerPoolIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTargetPatchLoadBalancerPoolIdentityByHref.java index 1f6e7163ee..825be12ac4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTargetPatchLoadBalancerPoolIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTargetPatchLoadBalancerPoolIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTargetPatchLoadBalancerPoolIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTargetPatchLoadBalancerPoolIdentityById.java index 735ba2ce3d..25d39a797d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTargetPatchLoadBalancerPoolIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTargetPatchLoadBalancerPoolIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitor.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitor.java index 371f42bb65..2d53aa57fd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitor.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitor.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPatch.java index b9fac7caaa..d7925c0f71 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPrototype.java index cb6c06929f..c451ea9de2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeHTTPHTTPSPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeHTTPHTTPSPrototype.java index 5e62871e84..d9f33118d9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeHTTPHTTPSPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeHTTPHTTPSPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeTCPPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeTCPPrototype.java index a420fc7ffb..338b1878c3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeTCPPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeTCPPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorTypeHTTPHTTPS.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorTypeHTTPHTTPS.java index f789234e18..06c0f603da 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorTypeHTTPHTTPS.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorTypeHTTPHTTPS.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorTypeTCP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorTypeTCP.java index 2dd1ee7826..b01a3748f1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorTypeTCP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorTypeTCP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentity.java index 58cfbe2862..92e3f3efb8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityByName.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityByName.java index c5b3296bd9..326ade96bc 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityByName.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityByName.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.java index 3c40ab5b15..efdde68f78 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityLoadBalancerPoolIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityLoadBalancerPoolIdentityById.java index eb7d9349d1..da5ddd9b5b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityLoadBalancerPoolIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityLoadBalancerPoolIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMember.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMember.java index ec31f4e62e..69daf62099 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMember.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMember.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberCollection.java index ed7e3f3d93..5681fd5337 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberPatch.java index a4c365f900..f6d7774993 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberPrototype.java index fdce184077..2feaabc2f6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberReference.java index b37f7f4fe1..366480f684 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTarget.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTarget.java index 4678973a86..324e8ef276 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTarget.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTarget.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -21,7 +21,8 @@ * * Classes which extend this class: * - LoadBalancerPoolMemberTargetInstanceReference - * - LoadBalancerPoolMemberTargetIP + * - LoadBalancerPoolMemberTargetByReservedIp + * - LoadBalancerPoolMemberTargetIPNotReservedIP * - LoadBalancerPoolMemberTargetLoadBalancerReference */ public class LoadBalancerPoolMemberTarget extends GenericModel { @@ -30,8 +31,8 @@ public class LoadBalancerPoolMemberTarget extends GenericModel { * The resource type. */ public interface ResourceType { - /** load_balancer. */ - String LOAD_BALANCER = "load_balancer"; + /** subnet_reserved_ip. */ + String SUBNET_RESERVED_IP = "subnet_reserved_ip"; } protected String crn; @@ -106,6 +107,8 @@ public String getName() { * * The IP address. * + * If the address has not yet been selected, the value will be `0.0.0.0`. + * * This property may [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) to support IPv6 addresses in * the future. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetByReservedIp.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetByReservedIp.java new file mode 100644 index 0000000000..ce69e31e1a --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetByReservedIp.java @@ -0,0 +1,32 @@ +/* + * (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.is.vpc.v1.model; + +/** + * LoadBalancerPoolMemberTargetByReservedIp. + */ +public class LoadBalancerPoolMemberTargetByReservedIp extends LoadBalancerPoolMemberTarget { + + /** + * The resource type. + */ + public interface ResourceType { + /** subnet_reserved_ip. */ + String SUBNET_RESERVED_IP = "subnet_reserved_ip"; + } + + + protected LoadBalancerPoolMemberTargetByReservedIp() { } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetIPNotReservedIP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetIPNotReservedIP.java new file mode 100644 index 0000000000..6c87c67b45 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetIPNotReservedIP.java @@ -0,0 +1,24 @@ +/* + * (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.is.vpc.v1.model; + +/** + * LoadBalancerPoolMemberTargetIPNotReservedIP. + */ +public class LoadBalancerPoolMemberTargetIPNotReservedIP extends LoadBalancerPoolMemberTarget { + + + protected LoadBalancerPoolMemberTargetIPNotReservedIP() { } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetInstanceReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetInstanceReference.java index 7342d23395..405e1ca870 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetInstanceReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetInstanceReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetLoadBalancerReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetLoadBalancerReference.java index 89a96d97bf..205358f42e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetLoadBalancerReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetLoadBalancerReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototype.java index 1f1b88a372..4822bed3ed 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -25,6 +25,7 @@ * * Classes which extend this class: * - LoadBalancerPoolMemberTargetPrototypeInstanceIdentity + * - LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity * - LoadBalancerPoolMemberTargetPrototypeIP * - LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentity */ diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeIP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeIP.java index 67dc156907..915e7e366d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeIP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeIP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentity.java index 89a755c7cf..4b8dcc1517 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN.java index f063a4ce2c..f6c8b5fc29 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref.java index c476d5048b..f1a26df5ac 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById.java index 581b6ab4be..a4e5b568a5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentity.java index c576de8929..4276781443 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityByCRN.java index f451eec057..32b248c209 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityByHref.java index 574fab364d..460db55eae 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityById.java index 05c3b0edaf..2bff587aba 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity.java new file mode 100644 index 0000000000..77f4c3ada8 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity.java @@ -0,0 +1,28 @@ +/* + * (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.is.vpc.v1.model; + +/** + * Identifies a reserved IP by a unique property. + * + * Classes which extend this class: + * - LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityById + * - LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref + */ +public class LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity extends LoadBalancerPoolMemberTargetPrototype { + + + protected LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity() { } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref.java new file mode 100644 index 0000000000..04b1f38a5e --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref.java @@ -0,0 +1,90 @@ +/* + * (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.is.vpc.v1.model; + +/** + * LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref. + */ +public class LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref extends LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity { + + + /** + * Builder. + */ + public static class Builder { + private String href; + + /** + * Instantiates a new Builder from an existing LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref instance. + * + * @param loadBalancerPoolMemberTargetPrototypeReservedIpIdentityByHref the instance to initialize the Builder with + */ + public Builder(LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity loadBalancerPoolMemberTargetPrototypeReservedIpIdentityByHref) { + this.href = loadBalancerPoolMemberTargetPrototypeReservedIpIdentityByHref.href; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Instantiates a new builder with required properties. + * + * @param href the href + */ + public Builder(String href) { + this.href = href; + } + + /** + * Builds a LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref. + * + * @return the new LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref instance + */ + public LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref build() { + return new LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref(this); + } + + /** + * Set the href. + * + * @param href the href + * @return the LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref builder + */ + public Builder href(String href) { + this.href = href; + return this; + } + } + + protected LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref() { } + + protected LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.href, + "href cannot be null"); + href = builder.href; + } + + /** + * New builder. + * + * @return a LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref builder + */ + public Builder newBuilder() { + return new Builder(this); + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityById.java new file mode 100644 index 0000000000..f44d00d7df --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityById.java @@ -0,0 +1,90 @@ +/* + * (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.is.vpc.v1.model; + +/** + * LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityById. + */ +public class LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityById extends LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity { + + + /** + * Builder. + */ + public static class Builder { + private String id; + + /** + * Instantiates a new Builder from an existing LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityById instance. + * + * @param loadBalancerPoolMemberTargetPrototypeReservedIpIdentityById the instance to initialize the Builder with + */ + public Builder(LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity loadBalancerPoolMemberTargetPrototypeReservedIpIdentityById) { + this.id = loadBalancerPoolMemberTargetPrototypeReservedIpIdentityById.id; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Instantiates a new builder with required properties. + * + * @param id the id + */ + public Builder(String id) { + this.id = id; + } + + /** + * Builds a LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityById. + * + * @return the new LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityById instance + */ + public LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityById build() { + return new LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityById(this); + } + + /** + * Set the id. + * + * @param id the id + * @return the LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityById builder + */ + public Builder id(String id) { + this.id = id; + return this; + } + } + + protected LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityById() { } + + protected LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityById(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.id, + "id cannot be null"); + id = builder.id; + } + + /** + * New builder. + * + * @return a LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityById builder + */ + public Builder newBuilder() { + return new Builder(this); + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolPatch.java index da510ed7c3..f3105cb43f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolPrototypeLoadBalancerContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolPrototypeLoadBalancerContext.java index 15047953b9..5877f974d1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolPrototypeLoadBalancerContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolPrototypeLoadBalancerContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolReference.java index 20f6bbbcf4..a2713e8fc8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolSessionPersistence.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolSessionPersistence.java index e1634ffd01..b95053e298 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolSessionPersistence.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolSessionPersistence.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolSessionPersistencePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolSessionPersistencePatch.java index 53df61a73c..388715a480 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolSessionPersistencePatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolSessionPersistencePatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolSessionPersistencePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolSessionPersistencePrototype.java index 019fbd98dd..b8958b8659 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolSessionPersistencePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolSessionPersistencePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfile.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfile.java index 18f6816460..a8a06ccb64 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfile.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfile.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -56,6 +56,8 @@ public interface Family { protected LoadBalancerProfileSourceIPSessionPersistenceSupported sourceIpSessionPersistenceSupported; @SerializedName("targetable_load_balancer_profiles") protected List targetableLoadBalancerProfiles; + @SerializedName("targetable_resource_types") + protected LoadBalancerProfileTargetableResourceTypes targetableResourceTypes; @SerializedName("udp_supported") protected LoadBalancerProfileUDPSupported udpSupported; @@ -182,6 +184,15 @@ public List getTargetableLoadBalancerProfiles() { return targetableLoadBalancerProfiles; } + /** + * Gets the targetableResourceTypes. + * + * @return the targetableResourceTypes + */ + public LoadBalancerProfileTargetableResourceTypes getTargetableResourceTypes() { + return targetableResourceTypes; + } + /** * Gets the udpSupported. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAccessModes.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAccessModes.java index 49aa51ba4f..7c50835c2e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAccessModes.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAccessModes.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAvailability.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAvailability.java index c63ade8717..89288faebb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAvailability.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAvailability.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAvailabilityDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAvailabilityDependent.java index 32bea2b751..d04819da29 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAvailabilityDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAvailabilityDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAvailabilityFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAvailabilityFixed.java index 090a6ac704..1c81dabe94 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAvailabilityFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAvailabilityFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileCollection.java index 797646e3cf..eb9a5627c8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileFailsafePolicyActions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileFailsafePolicyActions.java index 91a5795122..cd35761a56 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileFailsafePolicyActions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileFailsafePolicyActions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileFailsafePolicyActionsDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileFailsafePolicyActionsDependent.java index e808f449f3..12b8d635d0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileFailsafePolicyActionsDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileFailsafePolicyActionsDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileFailsafePolicyActionsEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileFailsafePolicyActionsEnum.java index 16b85a2654..9530c03723 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileFailsafePolicyActionsEnum.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileFailsafePolicyActionsEnum.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileIdentity.java index 056b2d9728..9e8582264e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileIdentityByHref.java index b0086cf7f7..223d8d949f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileIdentityByName.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileIdentityByName.java index f81fb1e087..9d495878ff 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileIdentityByName.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileIdentityByName.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileInstanceGroupsSupported.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileInstanceGroupsSupported.java index 73bd18cc93..743eeb815d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileInstanceGroupsSupported.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileInstanceGroupsSupported.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileInstanceGroupsSupportedDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileInstanceGroupsSupportedDependent.java index c81cc75592..28170dd846 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileInstanceGroupsSupportedDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileInstanceGroupsSupportedDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileInstanceGroupsSupportedFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileInstanceGroupsSupportedFixed.java index 20905cf382..f916881e02 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileInstanceGroupsSupportedFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileInstanceGroupsSupportedFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileLoggingSupported.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileLoggingSupported.java index aae9fce4e8..76c91c3b39 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileLoggingSupported.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileLoggingSupported.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileReference.java index b8984f5297..939dd7d2d4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileRouteModeSupported.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileRouteModeSupported.java index 883e15df76..047ec3b43e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileRouteModeSupported.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileRouteModeSupported.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileRouteModeSupportedDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileRouteModeSupportedDependent.java index b48be622a5..7b02fd3ca5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileRouteModeSupportedDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileRouteModeSupportedDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileRouteModeSupportedFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileRouteModeSupportedFixed.java index 2589f1d251..c808eb3952 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileRouteModeSupportedFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileRouteModeSupportedFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSecurityGroupsSupported.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSecurityGroupsSupported.java index e834449131..fc756c6088 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSecurityGroupsSupported.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSecurityGroupsSupported.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSecurityGroupsSupportedDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSecurityGroupsSupportedDependent.java index 0da83d3149..5af5daccc6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSecurityGroupsSupportedDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSecurityGroupsSupportedDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSecurityGroupsSupportedFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSecurityGroupsSupportedFixed.java index 7cf9026bcb..657546f956 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSecurityGroupsSupportedFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSecurityGroupsSupportedFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSourceIPSessionPersistenceSupported.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSourceIPSessionPersistenceSupported.java index bae7986e75..2b210e5f66 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSourceIPSessionPersistenceSupported.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSourceIPSessionPersistenceSupported.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSourceIPSessionPersistenceSupportedDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSourceIPSessionPersistenceSupportedDependent.java index f60f646125..79ed949b1b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSourceIPSessionPersistenceSupportedDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSourceIPSessionPersistenceSupportedDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed.java index 601496ec45..2a655a5690 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileTargetableResourceTypes.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileTargetableResourceTypes.java new file mode 100644 index 0000000000..5be765a575 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileTargetableResourceTypes.java @@ -0,0 +1,80 @@ +/* + * (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.is.vpc.v1.model; + +import java.util.List; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * LoadBalancerProfileTargetableResourceTypes. + */ +public class LoadBalancerProfileTargetableResourceTypes extends GenericModel { + + /** + * The type for this profile field. + */ + public interface Type { + /** enum. */ + String X_ENUM = "enum"; + } + + /** + * The [resource types](https://cloud.ibm.com/docs/vpc?topic=vpc-nlb-vs-elb&interface=ui#lb-comparison-chart) that + * can be targeted by the load balancer pool member: + * - 'instance': Traffic is forwarded to the primary IP address for the instance's + * 'primary_network_interface' or 'primary_network_attachment'. + * - 'subnet_reserved_ip': Traffic is forwarded to the reserved IP address. + * - `load_balancer`: Traffic is forwarded to the load balancer. + * - `ip`: Traffic is forwarded to the IP address. + */ + public interface Values { + /** instance. */ + String INSTANCE = "instance"; + /** ip. */ + String IP = "ip"; + /** load_balancer. */ + String LOAD_BALANCER = "load_balancer"; + /** subnet_reserved_ip. */ + String SUBNET_RESERVED_IP = "subnet_reserved_ip"; + } + + protected String type; + protected List values; + + protected LoadBalancerProfileTargetableResourceTypes() { } + + /** + * Gets the type. + * + * The type for this profile field. + * + * @return the type + */ + public String getType() { + return type; + } + + /** + * Gets the values. + * + * The resource types that pool members of load balancers with this profile can target. + * + * @return the values + */ + public List getValues() { + return values; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileUDPSupported.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileUDPSupported.java index 9ca59daf06..dc05bbcd05 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileUDPSupported.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileUDPSupported.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileUDPSupportedDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileUDPSupportedDependent.java index 208c8edab2..c5b6ab189a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileUDPSupportedDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileUDPSupportedDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileUDPSupportedFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileUDPSupportedFixed.java index e5967201bc..74b6354b67 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileUDPSupportedFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileUDPSupportedFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfilesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfilesPager.java index 553ff2a8c0..5b0f59c80b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfilesPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfilesPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerReference.java index 5c9e399241..9d2a7e935e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerStatistics.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerStatistics.java index 3114e70c7e..a8a0f480da 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerStatistics.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerStatistics.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancersPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancersPager.java index 4ae35cc1e7..a4d696fac9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancersPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancersPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACL.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACL.java index e2de9c155e..5145bec4e6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACL.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACL.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLCollection.java index 346f0a8be7..9de0e0a68a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentity.java index 5635d523f3..b1ed4ed54c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityByCRN.java index 2332d8e3e9..6525ee9a36 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityByHref.java index 3f466c081b..481f4ca9f7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityById.java index cb0f9b1ea2..203b20a4ed 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPatch.java index c5ee3e4aaf..526f9848fb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPrototype.java index d1af244b07..083e5c02ea 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPrototypeNetworkACLByRules.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPrototypeNetworkACLByRules.java index bbcf893c7f..5cf9ff5cc8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPrototypeNetworkACLByRules.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPrototypeNetworkACLByRules.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPrototypeNetworkACLBySourceNetworkACL.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPrototypeNetworkACLBySourceNetworkACL.java index a0f85266d2..5e0478e324 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPrototypeNetworkACLBySourceNetworkACL.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPrototypeNetworkACLBySourceNetworkACL.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLReference.java index 66e7782050..b88f0ea24f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRule.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRule.java index 6a7b2bfc26..d31ea8d44c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRule.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRule.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePatch.java index 4e7eeb2fa9..2f7004c724 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref.java index cacdcbbb70..511794c353 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePatchNetworkACLRuleIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePatchNetworkACLRuleIdentityById.java index d1a331ca8e..fd672c6a78 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePatchNetworkACLRuleIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePatchNetworkACLRuleIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePrototype.java index 4e08a7795c..836b1ab474 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref.java index 57a62f6610..23769e04b8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById.java index bf0b768f01..223d605758 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleCollection.java index 1fd270c274..d38fa62b64 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItem.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItem.java index 21f69b5b1f..d5dcaf05ea 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItem.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItem.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemNetworkACLRuleProtocolAll.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemNetworkACLRuleProtocolAll.java index ca9e0f67f9..3d5a2a96c8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemNetworkACLRuleProtocolAll.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemNetworkACLRuleProtocolAll.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemNetworkACLRuleProtocolICMP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemNetworkACLRuleProtocolICMP.java index 7a1fe37e12..897d3f6067 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemNetworkACLRuleProtocolICMP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemNetworkACLRuleProtocolICMP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP.java index 5b038559d1..1ea3abb0ec 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleNetworkACLRuleProtocolAll.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleNetworkACLRuleProtocolAll.java index 0bffec41ed..288bc38c57 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleNetworkACLRuleProtocolAll.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleNetworkACLRuleProtocolAll.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleNetworkACLRuleProtocolICMP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleNetworkACLRuleProtocolICMP.java index 6e6daa462b..d0059dcb3f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleNetworkACLRuleProtocolICMP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleNetworkACLRuleProtocolICMP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleNetworkACLRuleProtocolTCPUDP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleNetworkACLRuleProtocolTCPUDP.java index 359fedac35..dd07ce5238 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleNetworkACLRuleProtocolTCPUDP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleNetworkACLRuleProtocolTCPUDP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePatch.java index 9ae8c496ba..5be3195465 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototype.java index b686fc85e6..3bfbbafaa0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContext.java index 13962503b1..53f1f23fd0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype.java index 09ebb769f3..124c84891c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype.java index a19015d450..e0c77adf17 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype.java index f171d8422a..089043c003 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype.java index 703376e8a0..2a9d58ebe9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype.java index c88c309ab6..1647ed6f17 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype.java index fb79a1ba3f..db4013cf79 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleReference.java index 44a207a96e..db4ab8de96 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkAclRulesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkAclRulesPager.java index 9303e397ad..ffb107116b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkAclRulesPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkAclRulesPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkAclsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkAclsPager.java index 7d49c60c3e..bbbe2d2ec9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkAclsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkAclsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterface.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterface.java index b13de6777b..e0a376e22a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterface.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterface.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceBareMetalServerContextReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceBareMetalServerContextReference.java index 8a481d8407..a29ba83375 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceBareMetalServerContextReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceBareMetalServerContextReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceFloatingIpsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceFloatingIpsPager.java index 1903d27089..98b4078e6f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceFloatingIpsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceFloatingIpsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototype.java index 5308edecac..3f4c6dd3cf 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPIdentity.java index 9610c9a2dd..e4280f70b3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPIdentityByHref.java index 2c90d16f2e..20fbfefec2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPIdentityById.java index dc97724394..e66fa0aa72 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext.java index 416e922c97..0f64112811 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceInstanceContextReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceInstanceContextReference.java index 5bc47bb874..21b5305c1c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceInstanceContextReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceInstanceContextReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfacePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfacePatch.java index 0d68c00d89..13e4c069f5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfacePatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfacePatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfacePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfacePrototype.java index 7e4dc9ae94..a6e05d2db7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfacePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfacePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -206,10 +206,11 @@ public String name() { * Gets the primaryIp. * * The primary IP address to bind to the instance network interface. This can be - * specified using an existing reserved IP, or a prototype object for a new reserved IP. + * specified using an existing reserved IP, or a prototype object for a new reserved + * IP. * - * If an existing reserved IP or a prototype object with an address is specified, it must - * be available on the instance network interface's subnet. Otherwise, an + * If an existing reserved IP or a prototype object with an address is specified, it + * must be available on the instance network interface's subnet. Otherwise, an * available address on the subnet will be automatically selected and reserved. * * @return the primaryIp diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceUnpaginatedCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceUnpaginatedCollection.java index 255c470be6..fea65997f6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceUnpaginatedCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceUnpaginatedCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ObsoleteImageOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ObsoleteImageOptions.java index c0d3cf9208..968c26cdb7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ObsoleteImageOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ObsoleteImageOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystem.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystem.java index cb0c094ee2..fb711fd0cd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystem.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystem.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemCollection.java index d1acee58be..d1a0daeee8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemIdentity.java index 687cca229c..a7c56c79d5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemIdentityByHref.java index f24382af4f..59407817d5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemIdentityByName.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemIdentityByName.java index 54ba36318b..1d8435b3c0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemIdentityByName.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemIdentityByName.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemsPager.java index 614db6a238..46a29eaf50 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PageLink.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PageLink.java index 0adaafc99b..0b90ff4065 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PageLink.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PageLink.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PermitPrivatePathServiceGatewayEndpointGatewayBindingOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PermitPrivatePathServiceGatewayEndpointGatewayBindingOptions.java index b2a60b58d9..d97d91197a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PermitPrivatePathServiceGatewayEndpointGatewayBindingOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PermitPrivatePathServiceGatewayEndpointGatewayBindingOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroup.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroup.java index fbd389edd9..a30456e9c6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroup.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroup.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroupCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroupCollection.java index 9761ef2056..a74f3d7315 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroupCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroupCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroupPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroupPatch.java index d6aceeddac..95ea64eaa9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroupPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroupPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroupsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroupsPager.java index 7b74c227b4..7b8870500a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroupsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroupsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGateway.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGateway.java index 596efa2493..a7593883fa 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGateway.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGateway.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPoliciesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPoliciesPager.java index f7e987b552..bde8d90672 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPoliciesPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPoliciesPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPolicy.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPolicy.java index ee519824ed..20a177785b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPolicy.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPolicy.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPolicyCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPolicyCollection.java index 420408a7ce..60f84f9bd2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPolicyCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPolicyCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPolicyPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPolicyPatch.java index 93e135bfe7..67dcbc3811 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPolicyPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPolicyPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayCollection.java index c75760dc81..8590dc25ce 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayEndpointGatewayBinding.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayEndpointGatewayBinding.java index dd19a54d5b..26e0af4978 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayEndpointGatewayBinding.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayEndpointGatewayBinding.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayEndpointGatewayBindingCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayEndpointGatewayBindingCollection.java index c9427b68c6..c0305c93ef 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayEndpointGatewayBindingCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayEndpointGatewayBindingCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayEndpointGatewayBindingsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayEndpointGatewayBindingsPager.java index 09700577bc..835818798e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayEndpointGatewayBindingsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayEndpointGatewayBindingsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayPatch.java index 8c35056de4..0d03312027 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayRemote.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayRemote.java index 2a99cb15fa..b9d34a7212 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayRemote.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayRemote.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewaysPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewaysPager.java index eb79803c49..4a9e1e9ffa 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewaysPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewaysPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRange.java index af2ffed26d..63622e59c4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeCollection.java index fd73896b5e..86eb031080 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangePatch.java index 9839beb9b5..1d89cda644 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangePatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangePatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeReference.java index 685f9a08e8..b18dc9b400 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTarget.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTarget.java index f94058bb08..c8ee5ea5c5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTarget.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTarget.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTargetPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTargetPatch.java index 74148f09e0..d56b339a16 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTargetPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTargetPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTargetPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTargetPrototype.java index 70c1e1e643..3bc5fc69dc 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTargetPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTargetPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangesPager.java index 13860ce24a..ba6446e3ee 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangesPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangesPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGateway.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGateway.java index 77b920152c..711af68b79 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGateway.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGateway.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayCollection.java index 4312107496..f3deac2938 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototype.java index 2c365d0b9b..654f6e33ec 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentity.java index 112d141066..9939c090f5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress.java index b526f00233..b8389c72f4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN.java index 22296d17c5..483c29fdb5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref.java index 89a333a07d..48f7944ff0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById.java index 540225aef2..1a3ef7c46d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext.java index 342f3fabaa..3b88127993 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIp.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIp.java index 9153d9a7c1..74dae3a41d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIp.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIp.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentity.java index 477793f9cf..7af499236b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityPublicGatewayIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityPublicGatewayIdentityByCRN.java index 013b3e9fcd..a7e248f3a9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityPublicGatewayIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityPublicGatewayIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityPublicGatewayIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityPublicGatewayIdentityByHref.java index a164315588..f7eceb938c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityPublicGatewayIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityPublicGatewayIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityPublicGatewayIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityPublicGatewayIdentityById.java index 0cf6ef5912..45f53018e0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityPublicGatewayIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityPublicGatewayIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayPatch.java index 38506257e2..d111a48c61 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayReference.java index f2d549e56c..50b67d6786 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewaysPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewaysPager.java index c04c77e3f7..8032fe0542 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewaysPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewaysPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublishPrivatePathServiceGatewayOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublishPrivatePathServiceGatewayOptions.java index cffee362fe..edc71fd862 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublishPrivatePathServiceGatewayOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/PublishPrivatePathServiceGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Region.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Region.java index 2f15c38ef8..7f43bfcbeb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Region.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Region.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RegionCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RegionCollection.java index 8943c44776..2cbc52f938 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RegionCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RegionCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RegionIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RegionIdentity.java index 91782e43ca..e785747156 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RegionIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RegionIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RegionIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RegionIdentityByHref.java index d5230d83bc..54054d4fdc 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RegionIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RegionIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RegionIdentityByName.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RegionIdentityByName.java index 8292a32712..992d322c39 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RegionIdentityByName.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RegionIdentityByName.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RegionReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RegionReference.java index 826e58b246..b8285297f4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RegionReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RegionReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveBareMetalServerNetworkInterfaceFloatingIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveBareMetalServerNetworkInterfaceFloatingIpOptions.java index ad110b4863..d8ea9f6800 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveBareMetalServerNetworkInterfaceFloatingIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveBareMetalServerNetworkInterfaceFloatingIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveEndpointGatewayIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveEndpointGatewayIpOptions.java index 57e4b892af..5c2da45e39 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveEndpointGatewayIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveEndpointGatewayIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveInstanceNetworkInterfaceFloatingIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveInstanceNetworkInterfaceFloatingIpOptions.java index 895806c3e3..30da24b012 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveInstanceNetworkInterfaceFloatingIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveInstanceNetworkInterfaceFloatingIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveNetworkInterfaceFloatingIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveNetworkInterfaceFloatingIpOptions.java index 4fe39dc68d..31b5b74e5e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveNetworkInterfaceFloatingIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveNetworkInterfaceFloatingIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveVirtualNetworkInterfaceIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveVirtualNetworkInterfaceIpOptions.java index 73e54f6c87..01e8aca41c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveVirtualNetworkInterfaceIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveVirtualNetworkInterfaceIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveVpnGatewayAdvertisedCidrOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveVpnGatewayAdvertisedCidrOptions.java new file mode 100644 index 0000000000..6b79b4aa92 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveVpnGatewayAdvertisedCidrOptions.java @@ -0,0 +1,134 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * The removeVpnGatewayAdvertisedCidr options. + */ +public class RemoveVpnGatewayAdvertisedCidrOptions extends GenericModel { + + protected String vpnGatewayId; + protected String cidr; + + /** + * Builder. + */ + public static class Builder { + private String vpnGatewayId; + private String cidr; + + /** + * Instantiates a new Builder from an existing RemoveVpnGatewayAdvertisedCidrOptions instance. + * + * @param removeVpnGatewayAdvertisedCidrOptions the instance to initialize the Builder with + */ + private Builder(RemoveVpnGatewayAdvertisedCidrOptions removeVpnGatewayAdvertisedCidrOptions) { + this.vpnGatewayId = removeVpnGatewayAdvertisedCidrOptions.vpnGatewayId; + this.cidr = removeVpnGatewayAdvertisedCidrOptions.cidr; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Instantiates a new builder with required properties. + * + * @param vpnGatewayId the vpnGatewayId + * @param cidr the cidr + */ + public Builder(String vpnGatewayId, String cidr) { + this.vpnGatewayId = vpnGatewayId; + this.cidr = cidr; + } + + /** + * Builds a RemoveVpnGatewayAdvertisedCidrOptions. + * + * @return the new RemoveVpnGatewayAdvertisedCidrOptions instance + */ + public RemoveVpnGatewayAdvertisedCidrOptions build() { + return new RemoveVpnGatewayAdvertisedCidrOptions(this); + } + + /** + * Set the vpnGatewayId. + * + * @param vpnGatewayId the vpnGatewayId + * @return the RemoveVpnGatewayAdvertisedCidrOptions builder + */ + public Builder vpnGatewayId(String vpnGatewayId) { + this.vpnGatewayId = vpnGatewayId; + return this; + } + + /** + * Set the cidr. + * + * @param cidr the cidr + * @return the RemoveVpnGatewayAdvertisedCidrOptions builder + */ + public Builder cidr(String cidr) { + this.cidr = cidr; + return this; + } + } + + protected RemoveVpnGatewayAdvertisedCidrOptions() { } + + protected RemoveVpnGatewayAdvertisedCidrOptions(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.vpnGatewayId, + "vpnGatewayId cannot be empty"); + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.cidr, + "cidr cannot be empty"); + vpnGatewayId = builder.vpnGatewayId; + cidr = builder.cidr; + } + + /** + * New builder. + * + * @return a RemoveVpnGatewayAdvertisedCidrOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the vpnGatewayId. + * + * The VPN gateway identifier. + * + * @return the vpnGatewayId + */ + public String vpnGatewayId() { + return vpnGatewayId; + } + + /** + * Gets the cidr. + * + * The IP address range in CIDR block notation. + * + * @return the cidr + */ + public String cidr() { + return cidr; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveVpnGatewayConnectionsLocalCidrOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveVpnGatewayConnectionsLocalCidrOptions.java index 828445e8fd..79c732259e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveVpnGatewayConnectionsLocalCidrOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveVpnGatewayConnectionsLocalCidrOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveVpnGatewayConnectionsPeerCidrOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveVpnGatewayConnectionsPeerCidrOptions.java index 69c36ee163..43a0af3005 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveVpnGatewayConnectionsPeerCidrOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RemoveVpnGatewayConnectionsPeerCidrOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReplaceBareMetalServerInitializationOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReplaceBareMetalServerInitializationOptions.java index 5b8b8f2b13..be6fc3fb54 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReplaceBareMetalServerInitializationOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReplaceBareMetalServerInitializationOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -26,6 +26,7 @@ public class ReplaceBareMetalServerInitializationOptions extends GenericModel { protected String id; protected ImageIdentity image; protected List keys; + protected BareMetalServerInitializationDefaultTrustedProfilePrototype defaultTrustedProfile; protected String userData; /** @@ -35,6 +36,7 @@ public static class Builder { private String id; private ImageIdentity image; private List keys; + private BareMetalServerInitializationDefaultTrustedProfilePrototype defaultTrustedProfile; private String userData; /** @@ -46,6 +48,7 @@ private Builder(ReplaceBareMetalServerInitializationOptions replaceBareMetalServ this.id = replaceBareMetalServerInitializationOptions.id; this.image = replaceBareMetalServerInitializationOptions.image; this.keys = replaceBareMetalServerInitializationOptions.keys; + this.defaultTrustedProfile = replaceBareMetalServerInitializationOptions.defaultTrustedProfile; this.userData = replaceBareMetalServerInitializationOptions.userData; } @@ -127,6 +130,17 @@ public Builder keys(List keys) { return this; } + /** + * Set the defaultTrustedProfile. + * + * @param defaultTrustedProfile the defaultTrustedProfile + * @return the ReplaceBareMetalServerInitializationOptions builder + */ + public Builder defaultTrustedProfile(BareMetalServerInitializationDefaultTrustedProfilePrototype defaultTrustedProfile) { + this.defaultTrustedProfile = defaultTrustedProfile; + return this; + } + /** * Set the userData. * @@ -151,6 +165,7 @@ protected ReplaceBareMetalServerInitializationOptions(Builder builder) { id = builder.id; image = builder.image; keys = builder.keys; + defaultTrustedProfile = builder.defaultTrustedProfile; userData = builder.userData; } @@ -202,6 +217,19 @@ public List keys() { return keys; } + /** + * Gets the defaultTrustedProfile. + * + * The default trusted profile to be used when initializing the bare metal server. + * + * If unspecified, no default trusted profile will be made available. + * + * @return the defaultTrustedProfile + */ + public BareMetalServerInitializationDefaultTrustedProfilePrototype defaultTrustedProfile() { + return defaultTrustedProfile; + } + /** * Gets the userData. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReplaceLoadBalancerPoolMembersOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReplaceLoadBalancerPoolMembersOptions.java index 454d831efc..0e33c60b61 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReplaceLoadBalancerPoolMembersOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReplaceLoadBalancerPoolMembersOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReplaceSubnetNetworkAclOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReplaceSubnetNetworkAclOptions.java index a68e8a5994..42ea1be2b5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReplaceSubnetNetworkAclOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReplaceSubnetNetworkAclOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReplaceSubnetRoutingTableOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReplaceSubnetRoutingTableOptions.java index 15a0730515..9069110469 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReplaceSubnetRoutingTableOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReplaceSubnetRoutingTableOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Reservation.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Reservation.java index 4fb35e6bd4..835bbfa5b9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Reservation.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Reservation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCapacity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCapacity.java index cd4d608549..204448ae79 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCapacity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCapacity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCapacityPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCapacityPatch.java index 4681415dd3..2d05bdd085 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCapacityPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCapacityPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCapacityPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCapacityPrototype.java index 34babf9b6e..1db90c4716 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCapacityPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCapacityPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCollection.java index 21f99ee9ac..6172bc462b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCommittedUse.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCommittedUse.java index 0f2af3d796..b73e8018a4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCommittedUse.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCommittedUse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCommittedUsePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCommittedUsePatch.java index fdd26fe182..4899921ff6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCommittedUsePatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCommittedUsePatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCommittedUsePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCommittedUsePrototype.java index 2aa2916d37..dea9a17f06 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCommittedUsePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationCommittedUsePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentity.java index c3675c6ee6..14dc311eec 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityByCRN.java index 82b623aca1..adc2ff0be6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityByHref.java index 3444441afd..bbe9df0d29 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityById.java index 27d909144b..1d158b23e5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationPatch.java index 853933f55d..ec02939269 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfile.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfile.java index 12ec9e6c48..6bf5a01c8c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfile.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfile.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfileBareMetalServerProfileReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfileBareMetalServerProfileReference.java index c89e373a99..9fbedec531 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfileBareMetalServerProfileReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfileBareMetalServerProfileReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfileInstanceProfileReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfileInstanceProfileReference.java index 5a3bf0a86d..77652b5b42 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfileInstanceProfileReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfileInstanceProfileReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfilePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfilePatch.java index 5da89a4696..1d0131f5e4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfilePatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfilePatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfilePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfilePrototype.java index 61bb1e4b5c..d276692350 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfilePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfilePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationReference.java index a12940c21a..3b4d5e6230 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationStatusReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationStatusReason.java index 1bde268fe9..093b6eaf59 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationStatusReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationStatusReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationsPager.java index e358f164b4..735cb7556a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservationsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIP.java index 8d4b66cda9..8c4d9a9e29 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollection.java index 28c2e8cfb1..42746d31a6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionBareMetalServerNetworkInterfaceContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionBareMetalServerNetworkInterfaceContext.java index 04bec1749f..44e4fe0f2e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionBareMetalServerNetworkInterfaceContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionBareMetalServerNetworkInterfaceContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionEndpointGatewayContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionEndpointGatewayContext.java index 6a3a816f70..7198dab077 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionEndpointGatewayContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionEndpointGatewayContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionInstanceNetworkInterfaceContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionInstanceNetworkInterfaceContext.java index c4418060a6..1dc5da4691 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionInstanceNetworkInterfaceContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionInstanceNetworkInterfaceContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionVirtualNetworkInterfaceContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionVirtualNetworkInterfaceContext.java index 435d81500a..f02500c1f0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionVirtualNetworkInterfaceContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionVirtualNetworkInterfaceContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPPatch.java index 9ca3f3c615..6bac823415 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPReference.java index 7fd259c839..7caf9695ce 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTarget.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTarget.java index 4492032d5c..2b98ac0e9a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTarget.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTarget.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext.java index 1de9df2417..50face0b1e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetEndpointGatewayReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetEndpointGatewayReference.java index b4328403cd..f8a09967d5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetEndpointGatewayReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetEndpointGatewayReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetGenericResourceReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetGenericResourceReference.java index 47a1c8ffae..52bc3985bf 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetGenericResourceReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetGenericResourceReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetLoadBalancerReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetLoadBalancerReference.java index 2ccfabff6b..44f71eaaf0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetLoadBalancerReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetLoadBalancerReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetNetworkInterfaceReferenceTargetContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetNetworkInterfaceReferenceTargetContext.java index cd4818690d..7235a5aa32 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetNetworkInterfaceReferenceTargetContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetNetworkInterfaceReferenceTargetContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototype.java index fb73b9b879..85a274d8dc 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentity.java index bd895570f7..3e5a08d5c7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN.java index dce93370c7..fdb0d9ffab 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref.java index 7f21e462c3..a287076adb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById.java index 01e2f677e8..10941f981b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentity.java index d8ec749195..ea87e4111f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java index afaad941b2..24e989fb04 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java index 6d88ad3cdc..7e1c15895c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java index 1f4084c1d3..a8dd4d256d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetVPNGatewayReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetVPNGatewayReference.java index 0df0c6ab4b..a87530d2e0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetVPNGatewayReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetVPNGatewayReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetVPNServerReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetVPNServerReference.java index dca7e722b9..9ffedc0ae0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetVPNServerReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetVPNServerReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext.java index da02e021d9..576a3efe2d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ResourceFilter.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ResourceFilter.java index 9209804d10..3967550364 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ResourceFilter.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ResourceFilter.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ResourceGroupIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ResourceGroupIdentity.java index da91f6ab7b..44b813cad1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ResourceGroupIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ResourceGroupIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ResourceGroupIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ResourceGroupIdentityById.java index b43fc24c4e..66240a3388 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ResourceGroupIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ResourceGroupIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ResourceGroupReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ResourceGroupReference.java index 5d1cf34da7..2b0954457b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ResourceGroupReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ResourceGroupReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RestartBareMetalServerOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RestartBareMetalServerOptions.java index e5308676eb..1065c628b0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RestartBareMetalServerOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RestartBareMetalServerOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RevokeAccountForPrivatePathServiceGatewayOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RevokeAccountForPrivatePathServiceGatewayOptions.java index 8082ac3454..9875304180 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RevokeAccountForPrivatePathServiceGatewayOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RevokeAccountForPrivatePathServiceGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Route.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Route.java index cfc1f4929c..fd3a849512 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Route.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Route.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteCollection.java index 895e459d12..3ead8dbb10 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteCollectionVPCContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteCollectionVPCContext.java index d9bd7b68d4..96fc29aac6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteCollectionVPCContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteCollectionVPCContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteCreator.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteCreator.java index 17bc70fddf..79a2c98c8b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteCreator.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteCreator.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteCreatorVPNGatewayReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteCreatorVPNGatewayReference.java index 4d7e3d516c..43d5b3f813 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteCreatorVPNGatewayReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteCreatorVPNGatewayReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteCreatorVPNServerReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteCreatorVPNServerReference.java index da4c73bb9a..7537b62311 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteCreatorVPNServerReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteCreatorVPNServerReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHop.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHop.java index 7c4888954c..441408a78a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHop.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHop.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopIP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopIP.java index ab40d4a21c..892d4de7f0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopIP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopIP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatch.java index 6332469891..58678b0454 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchRouteNextHopIP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchRouteNextHopIP.java index ad730d71d5..af6f104d37 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchRouteNextHopIP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchRouteNextHopIP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP.java index ad3142ab1f..5472fe8218 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP.java index 5ddb4f8877..771fd7e59b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchVPNGatewayConnectionIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchVPNGatewayConnectionIdentity.java index c5a9304458..6fcd43f8a2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchVPNGatewayConnectionIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchVPNGatewayConnectionIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref.java index ef55ca2b86..c4be75df82 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById.java index a63282f7eb..092434166c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototype.java index e00c837a6a..d4d3349496 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeRouteNextHopIP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeRouteNextHopIP.java index d32dffa02a..0832848f9d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeRouteNextHopIP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeRouteNextHopIP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP.java index 81c952f83a..bbe84608da 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP.java index b5cecba9be..9f3dbc4859 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeVPNGatewayConnectionIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeVPNGatewayConnectionIdentity.java index 77ef654d1c..ee8e69d896 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeVPNGatewayConnectionIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeVPNGatewayConnectionIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref.java index a8a29908d1..9b3ded06ea 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById.java index dc3e530110..98b8d75d83 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopVPNGatewayConnectionReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopVPNGatewayConnectionReference.java index 095536e541..dd2c64d2f0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopVPNGatewayConnectionReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopVPNGatewayConnectionReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutePatch.java index 754ea8a462..336e23eeb6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutePatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutePatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutePrototype.java index 0ed989aac8..af8fb10a37 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteReference.java index 9b279246fe..0abf9be94e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RouteReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTable.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTable.java index 1357addc05..4fbdefaad1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTable.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTable.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableCollection.java index b56d626ee4..a2592b18af 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentity.java index e68e58592f..5917bbf104 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityByCRN.java index 66725ae43a..ec92ec373e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityByHref.java index 885e9df5d7..ab03d4a1f2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityById.java index c590d5da0c..6bef4f9d99 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTablePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTablePatch.java index c25d2b2f47..f97cff6c0f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTablePatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTablePatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableReference.java index c614d14e13..e9779d11cf 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroup.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroup.java index 3252155ea7..8387f6e8c0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroup.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroup.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupCollection.java index 124d414b43..ddb1f74323 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentity.java index 367bd77c62..b72b844989 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityByCRN.java index 080a0fe1b7..efaa545842 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityByHref.java index 46c83768cf..50bfc5a37f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityById.java index 2c49236cc9..520c2baa0b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupPatch.java index 000bc80950..67921e9006 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupReference.java index e4bd82d92c..82fcf0e00b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRule.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRule.java index 839725a19e..6af02d629a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRule.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRule.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleCollection.java index 7c45abb8f1..e2888219ac 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocal.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocal.java index 01542ca5da..1f113dc1b8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocal.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocal.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalCIDR.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalCIDR.java index dcb9102394..ba42c25acb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalCIDR.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalCIDR.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalIP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalIP.java index 6183c37e6d..0484ea5db3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalIP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalIP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPatch.java index 5d5d408de3..daa7ca0f7f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPatchCIDR.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPatchCIDR.java index c7dd7f02cb..477c4f4442 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPatchCIDR.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPatchCIDR.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPatchIP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPatchIP.java index 42eab1d10d..d31c949078 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPatchIP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPatchIP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPrototype.java index f42ff5d2a6..0191e8af8c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPrototypeCIDR.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPrototypeCIDR.java index 19eb7efd9b..c3a765100a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPrototypeCIDR.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPrototypeCIDR.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPrototypeIP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPrototypeIP.java index 43ed91a5a9..f3a1e40cc0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPrototypeIP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPrototypeIP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePatch.java index 95158f4ca1..c38dea6ced 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototype.java index e3e2a80ff3..2aa99a74f5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.java index 7b6732ddce..47340af0bf 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP.java index a64970f46c..810489698b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP.java index 1feeb151cc..3ba5315833 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemote.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemote.java index 08aa2f2611..bcb81915d2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemote.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemote.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteCIDR.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteCIDR.java index 39b7ce01b3..8732b80077 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteCIDR.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteCIDR.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteIP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteIP.java index 5db6d56efa..23fab2db98 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteIP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteIP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatch.java index acade26bea..dc4f05c4f0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchCIDR.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchCIDR.java index 01791ec641..d868b32038 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchCIDR.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchCIDR.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchIP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchIP.java index b33ad528aa..164d174cf5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchIP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchIP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentity.java index 33689642ff..221bfe0d1a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN.java index 74f3f64560..2fc6ce8fe5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref.java index eee2e991db..833aab3e8c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById.java index c29af69818..05ba3dff1d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototype.java index 25682530a6..d9f79b1cf3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeCIDR.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeCIDR.java index 54a34013ce..a9e0391c21 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeCIDR.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeCIDR.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeIP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeIP.java index 016a07fcc4..997c46bc53 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeIP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeIP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentity.java index a0361c6b21..feaddad213 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN.java index c6d12f6cfb..21a3a3f418 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref.java index dc3579b878..38400b6f8b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById.java index f225d7a980..2a86d66a70 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteSecurityGroupReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteSecurityGroupReference.java index 604df27c59..d55d331e2f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteSecurityGroupReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteSecurityGroupReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleSecurityGroupRuleProtocolAll.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleSecurityGroupRuleProtocolAll.java index 1609357da1..5ed0e2659b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleSecurityGroupRuleProtocolAll.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleSecurityGroupRuleProtocolAll.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleSecurityGroupRuleProtocolICMP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleSecurityGroupRuleProtocolICMP.java index de1d3b94ff..927e428106 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleSecurityGroupRuleProtocolICMP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleSecurityGroupRuleProtocolICMP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP.java index 2356be5704..ae3891141d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetCollection.java index 5a2f70c7dd..233c58981d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReference.java index 03d3575654..991efc8906 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext.java index b28e48b5b5..03230edcfe 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceEndpointGatewayReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceEndpointGatewayReference.java index 97d090fd54..f81ec1edf9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceEndpointGatewayReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceEndpointGatewayReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceLoadBalancerReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceLoadBalancerReference.java index 4b4ce062d7..a1a7d8f237 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceLoadBalancerReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceLoadBalancerReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext.java index 6f967f06f4..5ee2253fd3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceVPNServerReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceVPNServerReference.java index e48efbc804..da8df501ef 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceVPNServerReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceVPNServerReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceVirtualNetworkInterfaceReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceVirtualNetworkInterfaceReference.java index d0ef0876e0..2fc467d2d1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceVirtualNetworkInterfaceReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceVirtualNetworkInterfaceReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetsPager.java index 026195d900..52bb9a7a6e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupsPager.java index 02f7c12920..fa4ab282db 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SetSubnetPublicGatewayOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SetSubnetPublicGatewayOptions.java index f203f5d953..4ea44d3f00 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SetSubnetPublicGatewayOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SetSubnetPublicGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Share.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Share.java index 0b02b24183..f086a272f5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Share.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Share.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -58,11 +58,36 @@ public interface AccessorBindingRole { String ORIGIN = "origin"; } + public interface AllowedAccessProtocols { + /** nfs4. */ + String NFS4 = "nfs4"; + } + public interface AllowedTransitEncryptionModes { + /** ipsec. */ + String IPSEC = "ipsec"; /** none. */ String NONE = "none"; - /** user_managed. */ - String USER_MANAGED = "user_managed"; + /** stunnel. */ + String STUNNEL = "stunnel"; + } + + /** + * The data availability mode of the share: + * - `zonal`: The share's data will be available provided the `zone` of the share is + * available. Additionally, disasters affecting the zone may lead to data loss. + * - `regional`: The share's data will be available provided at least one zone in the + * region is available. Additionally, disasters affecting the entire region may lead + * to data loss. + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + */ + public interface AvailabilityMode { + /** regional. */ + String REGIONAL = "regional"; + /** zonal. */ + String ZONAL = "zonal"; } /** @@ -156,8 +181,13 @@ public interface ResourceType { protected String accessorBindingRole; @SerializedName("accessor_bindings") protected List accessorBindings; + @SerializedName("allowed_access_protocols") + protected List allowedAccessProtocols; @SerializedName("allowed_transit_encryption_modes") protected List allowedTransitEncryptionModes; + @SerializedName("availability_mode") + protected String availabilityMode; + protected Long bandwidth; @SerializedName("created_at") protected Date createdAt; protected String crn; @@ -206,6 +236,8 @@ public interface ResourceType { protected ShareReference sourceShare; @SerializedName("source_snapshot") protected ShareSourceSnapshot sourceSnapshot; + @SerializedName("storage_generation") + protected Long storageGeneration; @SerializedName("user_tags") protected List userTags; protected ZoneReference zone; @@ -258,12 +290,29 @@ public List getAccessorBindings() { return accessorBindings; } + /** + * Gets the allowedAccessProtocols. + * + * The access protocols to allow for this share: + * - `nfs4`: NFSv4 is used to access this share via its associated share mount target. + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + * + * @return the allowedAccessProtocols + */ + public List getAllowedAccessProtocols() { + return allowedAccessProtocols; + } + /** * Gets the allowedTransitEncryptionModes. * * The transit encryption modes allowed for this share: * - `none`: Not encrypted in transit. - * - `user_managed`: Encrypted in transit using an instance identity certificate. + * - `ipsec`: Encrypted in transit using an instance identity certificate. + * - `stunnel`: Encrypted in transit using a connection via the installed stunnel + * client. * * The enumerated values for this property may * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. @@ -274,6 +323,36 @@ public List getAllowedTransitEncryptionModes() { return allowedTransitEncryptionModes; } + /** + * Gets the availabilityMode. + * + * The data availability mode of the share: + * - `zonal`: The share's data will be available provided the `zone` of the share is + * available. Additionally, disasters affecting the zone may lead to data loss. + * - `regional`: The share's data will be available provided at least one zone in the + * region is available. Additionally, disasters affecting the entire region may lead + * to data loss. + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + * + * @return the availabilityMode + */ + public String getAvailabilityMode() { + return availabilityMode; + } + + /** + * Gets the bandwidth. + * + * The maximum bandwidth (in megabits per second) for the share. + * + * @return the bandwidth + */ + public Long getBandwidth() { + return bandwidth; + } + /** * Gets the createdAt. * @@ -356,10 +435,9 @@ public ShareInitialOwner getInitialOwner() { /** * Gets the iops. * - * The maximum input/output operations per second (IOPS) for the file share. In addition, each client accessing the - * share will be restricted to 48,000 IOPS. + * The maximum input/output operations per second (IOPS) for the file share. * - * The maximum IOPS for a share may increase in the future. + * The maximum IOPS for a share as defined by the share's profile may increase in the future. * * @return the iops */ @@ -624,6 +702,23 @@ public ShareSourceSnapshot getSourceSnapshot() { return sourceSnapshot; } + /** + * Gets the storageGeneration. + * + * The [storage + * generation](https://cloud.ibm.com/docs/vpc?topic=vpc-block-storage-profiles&interface=api#using-api-iops-profiles): + * - `1`: The first storage generation + * - `2`: The second storage generation + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + * + * @return the storageGeneration + */ + public Long getStorageGeneration() { + return storageGeneration; + } + /** * Gets the userTags. * @@ -640,6 +735,8 @@ public List getUserTags() { * * The zone this file share resides in. * + * This property will be absent for shares with an `availability_mode` of `regional`. + * * @return the zone */ public ZoneReference getZone() { diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBinding.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBinding.java index 2716d8834f..2d61655a4b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBinding.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBinding.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingAccessor.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingAccessor.java index 3504b99118..dea40ee1fe 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingAccessor.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingAccessor.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingAccessorShareReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingAccessorShareReference.java index 11e1e2f3ed..cbdab3cea6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingAccessorShareReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingAccessorShareReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingAccessorWatsonxMachineLearningReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingAccessorWatsonxMachineLearningReference.java index b56c56a06e..e025aaa3a7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingAccessorWatsonxMachineLearningReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingAccessorWatsonxMachineLearningReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingCollection.java index 47a4c6107b..a58f600650 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingReference.java index 9f201cfcb5..945d9b27a5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingsPager.java index dad7614a0d..15ad6b7611 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareCollection.java index 3d99450acd..eb572d40b8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentity.java index f42843c550..cc7102ec94 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityByCRN.java index bbfd707ea7..6e388aa8f4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityByHref.java index eb6eb735c2..9db54ac3de 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityById.java index 268affbadf..18bb91a693 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareInitialOwner.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareInitialOwner.java index c78d51b584..1bc0864361 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareInitialOwner.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareInitialOwner.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareJob.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareJob.java index 1bf7935350..43b43465d2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareJob.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareJob.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareJobStatusReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareJobStatusReason.java index e9f0293956..960cd4c0e2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareJobStatusReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareJobStatusReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareLatestSync.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareLatestSync.java index a797c04c21..8f8616d49f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareLatestSync.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareLatestSync.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareLifecycleReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareLifecycleReason.java index 3de6b9b0b6..f456dc10d1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareLifecycleReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareLifecycleReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTarget.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTarget.java index 5f56195468..c63bb63032 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTarget.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTarget.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -40,6 +40,18 @@ public interface AccessControlMode { String VPC = "vpc"; } + /** + * The protocol used to access the share for this share mount target: + * - `nfs4`: NFSv4 will be used. + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + */ + public interface AccessProtocol { + /** nfs4. */ + String NFS4 = "nfs4"; + } + /** * The lifecycle state of the mount target. */ @@ -70,21 +82,27 @@ public interface ResourceType { /** * The transit encryption mode for this share mount target: - * - `none`: Not encrypted in transit - * - `user_managed`: Encrypted in transit using an instance identity certificate + * - `none`: Not encrypted in transit. + * - `ipsec`: Encrypted in transit using an instance identity certificate. + * - `stunnel`: Encrypted in transit using a connection via the installed stunnel + * client. * * The enumerated values for this property may * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. */ public interface TransitEncryption { + /** ipsec. */ + String IPSEC = "ipsec"; /** none. */ String NONE = "none"; - /** user_managed. */ - String USER_MANAGED = "user_managed"; + /** stunnel. */ + String STUNNEL = "stunnel"; } @SerializedName("access_control_mode") protected String accessControlMode; + @SerializedName("access_protocol") + protected String accessProtocol; @SerializedName("created_at") protected Date createdAt; protected String href; @@ -125,6 +143,21 @@ public String getAccessControlMode() { return accessControlMode; } + /** + * Gets the accessProtocol. + * + * The protocol used to access the share for this share mount target: + * - `nfs4`: NFSv4 will be used. + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + * + * @return the accessProtocol + */ + public String getAccessProtocol() { + return accessProtocol; + } + /** * Gets the createdAt. * @@ -243,8 +276,10 @@ public SubnetReference getSubnet() { * Gets the transitEncryption. * * The transit encryption mode for this share mount target: - * - `none`: Not encrypted in transit - * - `user_managed`: Encrypted in transit using an instance identity certificate + * - `none`: Not encrypted in transit. + * - `ipsec`: Encrypted in transit using an instance identity certificate. + * - `stunnel`: Encrypted in transit using a connection via the installed stunnel + * client. * * The enumerated values for this property may * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetCollection.java index 22879b0234..71624e873b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPatch.java index 1c434e8367..ebd065d8fb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPrototype.java index 4020359ada..d2aea536a4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -25,22 +25,39 @@ */ public class ShareMountTargetPrototype extends GenericModel { + /** + * The protocol to use to access the share for this share mount target: + * - `nfs4`: NFSv4 will be used. + * + * The specified value must be listed in the share's `allowed_access_protocols`. + */ + public interface AccessProtocol { + /** nfs4. */ + String NFS4 = "nfs4"; + } + /** * The transit encryption mode to use for this share mount target: * - `none`: Not encrypted in transit. - * - `user_managed`: Encrypted in transit using an instance identity certificate. The - * `access_control_mode` for the share must be `security_group`. + * - `ipsec`: Encrypted in transit using an instance identity certificate. The + * `access_control_mode` for the share must be `security_group`. + * - `stunnel`: Encrypted in transit using an stunnel connection. The + * `access_control_mode` for the share must be `security_group`. * * The specified value must be listed in the share's * `allowed_transit_encryption_modes`. */ public interface TransitEncryption { + /** ipsec. */ + String IPSEC = "ipsec"; /** none. */ String NONE = "none"; - /** user_managed. */ - String USER_MANAGED = "user_managed"; + /** stunnel. */ + String STUNNEL = "stunnel"; } + @SerializedName("access_protocol") + protected String accessProtocol; protected String name; @SerializedName("transit_encryption") protected String transitEncryption; @@ -50,6 +67,20 @@ public interface TransitEncryption { protected ShareMountTargetPrototype() { } + /** + * Gets the accessProtocol. + * + * The protocol to use to access the share for this share mount target: + * - `nfs4`: NFSv4 will be used. + * + * The specified value must be listed in the share's `allowed_access_protocols`. + * + * @return the accessProtocol + */ + public String accessProtocol() { + return accessProtocol; + } + /** * Gets the name. * @@ -67,8 +98,10 @@ public String name() { * * The transit encryption mode to use for this share mount target: * - `none`: Not encrypted in transit. - * - `user_managed`: Encrypted in transit using an instance identity certificate. The - * `access_control_mode` for the share must be `security_group`. + * - `ipsec`: Encrypted in transit using an instance identity certificate. The + * `access_control_mode` for the share must be `security_group`. + * - `stunnel`: Encrypted in transit using an stunnel connection. The + * `access_control_mode` for the share must be `security_group`. * * The specified value must be listed in the share's * `allowed_transit_encryption_modes`. diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.java index 00bbc84881..4b3312cd29 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -29,20 +29,35 @@ */ public class ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup extends ShareMountTargetPrototype { + /** + * The protocol to use to access the share for this share mount target: + * - `nfs4`: NFSv4 will be used. + * + * The specified value must be listed in the share's `allowed_access_protocols`. + */ + public interface AccessProtocol { + /** nfs4. */ + String NFS4 = "nfs4"; + } + /** * The transit encryption mode to use for this share mount target: * - `none`: Not encrypted in transit. - * - `user_managed`: Encrypted in transit using an instance identity certificate. The - * `access_control_mode` for the share must be `security_group`. + * - `ipsec`: Encrypted in transit using an instance identity certificate. The + * `access_control_mode` for the share must be `security_group`. + * - `stunnel`: Encrypted in transit using an stunnel connection. The + * `access_control_mode` for the share must be `security_group`. * * The specified value must be listed in the share's * `allowed_transit_encryption_modes`. */ public interface TransitEncryption { + /** ipsec. */ + String IPSEC = "ipsec"; /** none. */ String NONE = "none"; - /** user_managed. */ - String USER_MANAGED = "user_managed"; + /** stunnel. */ + String STUNNEL = "stunnel"; } @@ -50,6 +65,7 @@ public interface TransitEncryption { * Builder. */ public static class Builder { + private String accessProtocol; private String name; private String transitEncryption; private ShareMountTargetVirtualNetworkInterfacePrototype virtualNetworkInterface; @@ -60,6 +76,7 @@ public static class Builder { * @param shareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup the instance to initialize the Builder with */ public Builder(ShareMountTargetPrototype shareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup) { + this.accessProtocol = shareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.accessProtocol; this.name = shareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.name; this.transitEncryption = shareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.transitEncryption; this.virtualNetworkInterface = shareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.virtualNetworkInterface; @@ -74,9 +91,13 @@ public Builder() { /** * Instantiates a new builder with required properties. * + * @param accessProtocol the accessProtocol + * @param transitEncryption the transitEncryption * @param virtualNetworkInterface the virtualNetworkInterface */ - public Builder(ShareMountTargetVirtualNetworkInterfacePrototype virtualNetworkInterface) { + public Builder(String accessProtocol, String transitEncryption, ShareMountTargetVirtualNetworkInterfacePrototype virtualNetworkInterface) { + this.accessProtocol = accessProtocol; + this.transitEncryption = transitEncryption; this.virtualNetworkInterface = virtualNetworkInterface; } @@ -89,6 +110,17 @@ public ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup return new ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup(this); } + /** + * Set the accessProtocol. + * + * @param accessProtocol the accessProtocol + * @return the ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup builder + */ + public Builder accessProtocol(String accessProtocol) { + this.accessProtocol = accessProtocol; + return this; + } + /** * Set the name. * @@ -126,8 +158,13 @@ public Builder virtualNetworkInterface(ShareMountTargetVirtualNetworkInterfacePr protected ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup() { } protected ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.accessProtocol, + "accessProtocol cannot be null"); + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.transitEncryption, + "transitEncryption cannot be null"); com.ibm.cloud.sdk.core.util.Validator.notNull(builder.virtualNetworkInterface, "virtualNetworkInterface cannot be null"); + accessProtocol = builder.accessProtocol; name = builder.name; transitEncryption = builder.transitEncryption; virtualNetworkInterface = builder.virtualNetworkInterface; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC.java index b4bcde7b30..0a0317cd35 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -21,20 +21,35 @@ */ public class ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC extends ShareMountTargetPrototype { + /** + * The protocol to use to access the share for this share mount target: + * - `nfs4`: NFSv4 will be used. + * + * The specified value must be listed in the share's `allowed_access_protocols`. + */ + public interface AccessProtocol { + /** nfs4. */ + String NFS4 = "nfs4"; + } + /** * The transit encryption mode to use for this share mount target: * - `none`: Not encrypted in transit. - * - `user_managed`: Encrypted in transit using an instance identity certificate. The - * `access_control_mode` for the share must be `security_group`. + * - `ipsec`: Encrypted in transit using an instance identity certificate. The + * `access_control_mode` for the share must be `security_group`. + * - `stunnel`: Encrypted in transit using an stunnel connection. The + * `access_control_mode` for the share must be `security_group`. * * The specified value must be listed in the share's * `allowed_transit_encryption_modes`. */ public interface TransitEncryption { + /** ipsec. */ + String IPSEC = "ipsec"; /** none. */ String NONE = "none"; - /** user_managed. */ - String USER_MANAGED = "user_managed"; + /** stunnel. */ + String STUNNEL = "stunnel"; } @@ -42,6 +57,7 @@ public interface TransitEncryption { * Builder. */ public static class Builder { + private String accessProtocol; private String name; private String transitEncryption; private VPCIdentity vpc; @@ -52,6 +68,7 @@ public static class Builder { * @param shareMountTargetPrototypeShareMountTargetByAccessControlModeVpc the instance to initialize the Builder with */ public Builder(ShareMountTargetPrototype shareMountTargetPrototypeShareMountTargetByAccessControlModeVpc) { + this.accessProtocol = shareMountTargetPrototypeShareMountTargetByAccessControlModeVpc.accessProtocol; this.name = shareMountTargetPrototypeShareMountTargetByAccessControlModeVpc.name; this.transitEncryption = shareMountTargetPrototypeShareMountTargetByAccessControlModeVpc.transitEncryption; this.vpc = shareMountTargetPrototypeShareMountTargetByAccessControlModeVpc.vpc; @@ -66,9 +83,13 @@ public Builder() { /** * Instantiates a new builder with required properties. * + * @param accessProtocol the accessProtocol + * @param transitEncryption the transitEncryption * @param vpc the vpc */ - public Builder(VPCIdentity vpc) { + public Builder(String accessProtocol, String transitEncryption, VPCIdentity vpc) { + this.accessProtocol = accessProtocol; + this.transitEncryption = transitEncryption; this.vpc = vpc; } @@ -81,6 +102,17 @@ public ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC build() { return new ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC(this); } + /** + * Set the accessProtocol. + * + * @param accessProtocol the accessProtocol + * @return the ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC builder + */ + public Builder accessProtocol(String accessProtocol) { + this.accessProtocol = accessProtocol; + return this; + } + /** * Set the name. * @@ -118,8 +150,13 @@ public Builder vpc(VPCIdentity vpc) { protected ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC() { } protected ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.accessProtocol, + "accessProtocol cannot be null"); + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.transitEncryption, + "transitEncryption cannot be null"); com.ibm.cloud.sdk.core.util.Validator.notNull(builder.vpc, "vpc cannot be null"); + accessProtocol = builder.accessProtocol; name = builder.name; transitEncryption = builder.transitEncryption; vpc = builder.vpc; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetReference.java index 1f4943aaa1..605dc899fa 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototype.java index 2c25af65fe..07ca60abbd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity.java index 7a051d9c75..d246633d44 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java index 2934d68398..2e152436cd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java index 858b651ede..fcbcc8118b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java index cfdf384a36..6d2096875c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext.java index 31b776e420..d7eb8ed5cb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetsPager.java index eee62e44fb..e913dfd21b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePatch.java index 077efc4111..6de6a6fec8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -43,17 +43,27 @@ public interface AccessControlMode { String VPC = "vpc"; } + public interface AllowedAccessProtocols { + /** nfs4. */ + String NFS4 = "nfs4"; + } + public interface AllowedTransitEncryptionModes { + /** ipsec. */ + String IPSEC = "ipsec"; /** none. */ String NONE = "none"; - /** user_managed. */ - String USER_MANAGED = "user_managed"; + /** stunnel. */ + String STUNNEL = "stunnel"; } @SerializedName("access_control_mode") protected String accessControlMode; + @SerializedName("allowed_access_protocols") + protected List allowedAccessProtocols; @SerializedName("allowed_transit_encryption_modes") protected List allowedTransitEncryptionModes; + protected Long bandwidth; protected Long iops; protected String name; protected ShareProfileIdentity profile; @@ -68,7 +78,9 @@ public interface AllowedTransitEncryptionModes { */ public static class Builder { private String accessControlMode; + private List allowedAccessProtocols; private List allowedTransitEncryptionModes; + private Long bandwidth; private Long iops; private String name; private ShareProfileIdentity profile; @@ -83,7 +95,9 @@ public static class Builder { */ private Builder(SharePatch sharePatch) { this.accessControlMode = sharePatch.accessControlMode; + this.allowedAccessProtocols = sharePatch.allowedAccessProtocols; this.allowedTransitEncryptionModes = sharePatch.allowedTransitEncryptionModes; + this.bandwidth = sharePatch.bandwidth; this.iops = sharePatch.iops; this.name = sharePatch.name; this.profile = sharePatch.profile; @@ -107,6 +121,22 @@ public SharePatch build() { return new SharePatch(this); } + /** + * Adds a new element to allowedAccessProtocols. + * + * @param allowedAccessProtocols the new element to be added + * @return the SharePatch builder + */ + public Builder addAllowedAccessProtocols(String allowedAccessProtocols) { + com.ibm.cloud.sdk.core.util.Validator.notNull(allowedAccessProtocols, + "allowedAccessProtocols cannot be null"); + if (this.allowedAccessProtocols == null) { + this.allowedAccessProtocols = new ArrayList(); + } + this.allowedAccessProtocols.add(allowedAccessProtocols); + return this; + } + /** * Adds a new element to allowedTransitEncryptionModes. * @@ -150,6 +180,18 @@ public Builder accessControlMode(String accessControlMode) { return this; } + /** + * Set the allowedAccessProtocols. + * Existing allowedAccessProtocols will be replaced. + * + * @param allowedAccessProtocols the allowedAccessProtocols + * @return the SharePatch builder + */ + public Builder allowedAccessProtocols(List allowedAccessProtocols) { + this.allowedAccessProtocols = allowedAccessProtocols; + return this; + } + /** * Set the allowedTransitEncryptionModes. * Existing allowedTransitEncryptionModes will be replaced. @@ -162,6 +204,17 @@ public Builder allowedTransitEncryptionModes(List allowedTransitEncrypti return this; } + /** + * Set the bandwidth. + * + * @param bandwidth the bandwidth + * @return the SharePatch builder + */ + public Builder bandwidth(long bandwidth) { + this.bandwidth = bandwidth; + return this; + } + /** * Set the iops. * @@ -234,7 +287,9 @@ protected SharePatch() { } protected SharePatch(Builder builder) { accessControlMode = builder.accessControlMode; + allowedAccessProtocols = builder.allowedAccessProtocols; allowedTransitEncryptionModes = builder.allowedTransitEncryptionModes; + bandwidth = builder.bandwidth; iops = builder.iops; name = builder.name; profile = builder.profile; @@ -270,6 +325,22 @@ public String accessControlMode() { return accessControlMode; } + /** + * Gets the allowedAccessProtocols. + * + * The access protocols to allow for this share (replacing any existing access protocols). + * + * If the share has existing mount targets, the set of allowed access protocols must contain all `access_protocol` + * modes specified by existing mount targets. + * + * For this property to be updated, the `accessor_binding_role` must be `none`. + * + * @return the allowedAccessProtocols + */ + public List allowedAccessProtocols() { + return allowedAccessProtocols; + } + /** * Gets the allowedTransitEncryptionModes. * @@ -285,6 +356,21 @@ public List allowedTransitEncryptionModes() { return allowedTransitEncryptionModes; } + /** + * Gets the bandwidth. + * + * The maximum bandwidth (in megabits per second) for the share. + * + * For this property to be changed, the share `accessor_binding_role` must not be + * `accessor`, the share profile must not have a `bandwidth.type` of `dependent` or + * `fixed`, and the specified value must be within the `bandwidth` range of the share's profile. + * + * @return the bandwidth + */ + public Long bandwidth() { + return bandwidth; + } + /** * Gets the iops. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfile.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfile.java index d6a6097016..0658626f71 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfile.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfile.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -40,6 +40,13 @@ public interface ResourceType { String SHARE_PROFILE = "share_profile"; } + @SerializedName("allowed_access_protocols") + protected ShareProfileAllowedAccessProtocols allowedAccessProtocols; + @SerializedName("allowed_transit_encryption_modes") + protected ShareProfileAllowedTransitEncryptionModes allowedTransitEncryptionModes; + @SerializedName("availability_modes") + protected ShareProfileAvailabilityModes availabilityModes; + protected ShareProfileBandwidth bandwidth; protected ShareProfileCapacity capacity; protected String family; protected String href; @@ -47,9 +54,55 @@ public interface ResourceType { protected String name; @SerializedName("resource_type") protected String resourceType; + @SerializedName("storage_generation") + protected ShareProfileStorageGeneration storageGeneration; protected ShareProfile() { } + /** + * Gets the allowedAccessProtocols. + * + * The possible allowed access protocols for a share with this profile. + * + * @return the allowedAccessProtocols + */ + public ShareProfileAllowedAccessProtocols getAllowedAccessProtocols() { + return allowedAccessProtocols; + } + + /** + * Gets the allowedTransitEncryptionModes. + * + * The possible allowed transit encryption modes for a share with this profile. + * + * @return the allowedTransitEncryptionModes + */ + public ShareProfileAllowedTransitEncryptionModes getAllowedTransitEncryptionModes() { + return allowedTransitEncryptionModes; + } + + /** + * Gets the availabilityModes. + * + * The data availability mode of a share with this profile. + * + * @return the availabilityModes + */ + public ShareProfileAvailabilityModes getAvailabilityModes() { + return availabilityModes; + } + + /** + * Gets the bandwidth. + * + * The permitted bandwidth (in megabits per second) for a share with this profile. + * + * @return the bandwidth + */ + public ShareProfileBandwidth getBandwidth() { + return bandwidth; + } + /** * Gets the capacity. * @@ -118,5 +171,16 @@ public String getName() { public String getResourceType() { return resourceType; } + + /** + * Gets the storageGeneration. + * + * The storage generation for a share with this profile. + * + * @return the storageGeneration + */ + public ShareProfileStorageGeneration getStorageGeneration() { + return storageGeneration; + } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAllowedAccessProtocols.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAllowedAccessProtocols.java new file mode 100644 index 0000000000..8c494f66fa --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAllowedAccessProtocols.java @@ -0,0 +1,91 @@ +/* + * (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.is.vpc.v1.model; + +import java.util.List; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * ShareProfileAllowedAccessProtocols. + * + * Classes which extend this class: + * - ShareProfileAllowedAccessProtocolsSubset + */ +public class ShareProfileAllowedAccessProtocols extends GenericModel { + + public interface XDefault { + /** nfs4. */ + String NFS4 = "nfs4"; + } + + /** + * The type for this profile field. + */ + public interface Type { + /** subset. */ + String SUBSET = "subset"; + } + + public interface Values { + /** nfs4. */ + String NFS4 = "nfs4"; + } + + @SerializedName("default") + protected List xDefault; + protected String type; + protected List values; + + protected ShareProfileAllowedAccessProtocols() { } + + /** + * Gets the xDefault. + * + * The default allowed access protocol modes for shares with this profile. + * + * @return the xDefault + */ + public List getXDefault() { + return xDefault; + } + + /** + * Gets the type. + * + * The type for this profile field. + * + * @return the type + */ + public String getType() { + return type; + } + + /** + * Gets the values. + * + * The possible allowed access protocols for shares with this profile: + * - `nfs4`: NFSv4 will be used. + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + * + * @return the values + */ + public List getValues() { + return values; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAllowedAccessProtocolsSubset.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAllowedAccessProtocolsSubset.java new file mode 100644 index 0000000000..defd3b89e5 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAllowedAccessProtocolsSubset.java @@ -0,0 +1,42 @@ +/* + * (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.is.vpc.v1.model; + +/** + * ShareProfileAllowedAccessProtocolsSubset. + */ +public class ShareProfileAllowedAccessProtocolsSubset extends ShareProfileAllowedAccessProtocols { + + public interface XDefault { + /** nfs4. */ + String NFS4 = "nfs4"; + } + + /** + * The type for this profile field. + */ + public interface Type { + /** subset. */ + String SUBSET = "subset"; + } + + public interface Values { + /** nfs4. */ + String NFS4 = "nfs4"; + } + + + protected ShareProfileAllowedAccessProtocolsSubset() { } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAllowedTransitEncryptionModes.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAllowedTransitEncryptionModes.java new file mode 100644 index 0000000000..63a9ad9e77 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAllowedTransitEncryptionModes.java @@ -0,0 +1,103 @@ +/* + * (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.is.vpc.v1.model; + +import java.util.List; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * ShareProfileAllowedTransitEncryptionModes. + * + * Classes which extend this class: + * - ShareProfileAllowedTransitEncryptionModesSubset + */ +public class ShareProfileAllowedTransitEncryptionModes extends GenericModel { + + public interface XDefault { + /** ipsec. */ + String IPSEC = "ipsec"; + /** none. */ + String NONE = "none"; + /** stunnel. */ + String STUNNEL = "stunnel"; + } + + /** + * The type for this profile field. + */ + public interface Type { + /** subset. */ + String SUBSET = "subset"; + } + + public interface Values { + /** ipsec. */ + String IPSEC = "ipsec"; + /** none. */ + String NONE = "none"; + /** stunnel. */ + String STUNNEL = "stunnel"; + } + + @SerializedName("default") + protected List xDefault; + protected String type; + protected List values; + + protected ShareProfileAllowedTransitEncryptionModes() { } + + /** + * Gets the xDefault. + * + * The default allowed transit encryption modes for shares with this profile. + * + * @return the xDefault + */ + public List getXDefault() { + return xDefault; + } + + /** + * Gets the type. + * + * The type for this profile field. + * + * @return the type + */ + public String getType() { + return type; + } + + /** + * Gets the values. + * + * The allowed [transit encryption + * modes](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-vpc-about&interface=ui#fs-eit) for a share with + * this profile: + * - `none`: Not encrypted in transit. + * - `ipsec`: Encrypted in transit using an instance identity certificate. + * - `stunnel`: Encrypted in transit using a connection via an stunnel connection. + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + * + * @return the values + */ + public List getValues() { + return values; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAllowedTransitEncryptionModesSubset.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAllowedTransitEncryptionModesSubset.java new file mode 100644 index 0000000000..b19dba33b0 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAllowedTransitEncryptionModesSubset.java @@ -0,0 +1,50 @@ +/* + * (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.is.vpc.v1.model; + +/** + * ShareProfileAllowedTransitEncryptionModesSubset. + */ +public class ShareProfileAllowedTransitEncryptionModesSubset extends ShareProfileAllowedTransitEncryptionModes { + + public interface XDefault { + /** ipsec. */ + String IPSEC = "ipsec"; + /** none. */ + String NONE = "none"; + /** stunnel. */ + String STUNNEL = "stunnel"; + } + + /** + * The type for this profile field. + */ + public interface Type { + /** subset. */ + String SUBSET = "subset"; + } + + public interface Values { + /** ipsec. */ + String IPSEC = "ipsec"; + /** none. */ + String NONE = "none"; + /** stunnel. */ + String STUNNEL = "stunnel"; + } + + + protected ShareProfileAllowedTransitEncryptionModesSubset() { } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAvailabilityModes.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAvailabilityModes.java new file mode 100644 index 0000000000..9d3d6a8a65 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAvailabilityModes.java @@ -0,0 +1,124 @@ +/* + * (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.is.vpc.v1.model; + +import java.util.List; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * ShareProfileAvailabilityModes. + * + * Classes which extend this class: + * - ShareProfileAvailabilityModesEnum + * - ShareProfileAvailabilityModesFixed + */ +public class ShareProfileAvailabilityModes extends GenericModel { + + /** + * The default data availability mode for this profile. + */ + public interface XDefault { + /** regional. */ + String REGIONAL = "regional"; + /** zonal. */ + String ZONAL = "zonal"; + } + + /** + * The type for this profile field. + */ + public interface Type { + /** enum. */ + String X_ENUM = "enum"; + } + + public interface Values { + /** regional. */ + String REGIONAL = "regional"; + /** zonal. */ + String ZONAL = "zonal"; + } + + /** + * The value for this profile field. + */ + public interface Value { + /** regional. */ + String REGIONAL = "regional"; + /** zonal. */ + String ZONAL = "zonal"; + } + + @SerializedName("default") + protected String xDefault; + protected String type; + protected List values; + protected String value; + + protected ShareProfileAvailabilityModes() { } + + /** + * Gets the xDefault. + * + * The default data availability mode for this profile. + * + * @return the xDefault + */ + public String getXDefault() { + return xDefault; + } + + /** + * Gets the type. + * + * The type for this profile field. + * + * @return the type + */ + public String getType() { + return type; + } + + /** + * Gets the values. + * + * The data availability mode of the share: + * - `zonal`: The data availability of this share is limited only to a single zone of a + * given region as provided by the `zone` of the share. + * - `regional`: The data availability of this share covers all zones in the region where + * the share is created. + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + * + * @return the values + */ + public List getValues() { + return values; + } + + /** + * Gets the value. + * + * The value for this profile field. + * + * @return the value + */ + public String getValue() { + return value; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAvailabilityModesEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAvailabilityModesEnum.java new file mode 100644 index 0000000000..fb63af9c40 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAvailabilityModesEnum.java @@ -0,0 +1,49 @@ +/* + * (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.is.vpc.v1.model; + +/** + * The permitted data availability modes for a share with this profile. + */ +public class ShareProfileAvailabilityModesEnum extends ShareProfileAvailabilityModes { + + /** + * The default data availability mode for this profile. + */ + public interface XDefault { + /** regional. */ + String REGIONAL = "regional"; + /** zonal. */ + String ZONAL = "zonal"; + } + + /** + * The type for this profile field. + */ + public interface Type { + /** enum. */ + String X_ENUM = "enum"; + } + + public interface Values { + /** regional. */ + String REGIONAL = "regional"; + /** zonal. */ + String ZONAL = "zonal"; + } + + + protected ShareProfileAvailabilityModesEnum() { } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAvailabilityModesFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAvailabilityModesFixed.java new file mode 100644 index 0000000000..034adc67ac --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAvailabilityModesFixed.java @@ -0,0 +1,42 @@ +/* + * (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.is.vpc.v1.model; + +/** + * The data availability mode for a share with this profile is fixed. + */ +public class ShareProfileAvailabilityModesFixed extends ShareProfileAvailabilityModes { + + /** + * The type for this profile field. + */ + public interface Type { + /** fixed. */ + String FIXED = "fixed"; + } + + /** + * The value for this profile field. + */ + public interface Value { + /** regional. */ + String REGIONAL = "regional"; + /** zonal. */ + String ZONAL = "zonal"; + } + + + protected ShareProfileAvailabilityModesFixed() { } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidth.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidth.java new file mode 100644 index 0000000000..404fedd1b5 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidth.java @@ -0,0 +1,127 @@ +/* + * (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.is.vpc.v1.model; + +import java.util.List; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * ShareProfileBandwidth. + * + * Classes which extend this class: + * - ShareProfileBandwidthRange + * - ShareProfileBandwidthDependent + * - ShareProfileBandwidthFixed + * - ShareProfileBandwidthEnum + * - ShareProfileBandwidthDependentRange + */ +public class ShareProfileBandwidth extends GenericModel { + + /** + * The type for this profile field. + */ + public interface Type { + /** range. */ + String RANGE = "range"; + } + + @SerializedName("default") + protected Long xDefault; + protected Long max; + protected Long min; + protected Long step; + protected String type; + protected Long value; + protected List values; + + protected ShareProfileBandwidth() { } + + /** + * Gets the xDefault. + * + * The default value for this profile field. + * + * @return the xDefault + */ + public Long getXDefault() { + return xDefault; + } + + /** + * Gets the max. + * + * The maximum value for this profile field. + * + * @return the max + */ + public Long getMax() { + return max; + } + + /** + * Gets the min. + * + * The minimum value for this profile field. + * + * @return the min + */ + public Long getMin() { + return min; + } + + /** + * Gets the step. + * + * The increment step value for this profile field. + * + * @return the step + */ + public Long getStep() { + return step; + } + + /** + * Gets the type. + * + * The type for this profile field. + * + * @return the type + */ + public String getType() { + return type; + } + + /** + * Gets the value. + * + * @return the value + */ + public Long getValue() { + return value; + } + + /** + * Gets the values. + * + * The permitted values for this profile field. + * + * @return the values + */ + public List getValues() { + return values; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthDependent.java new file mode 100644 index 0000000000..395d0c3bfa --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthDependent.java @@ -0,0 +1,32 @@ +/* + * (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.is.vpc.v1.model; + +/** + * The permitted bandwidth for a share with this profile depends on its configuration. + */ +public class ShareProfileBandwidthDependent extends ShareProfileBandwidth { + + /** + * The type for this profile field. + */ + public interface Type { + /** dependent. */ + String DEPENDENT = "dependent"; + } + + + protected ShareProfileBandwidthDependent() { } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthDependentRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthDependentRange.java new file mode 100644 index 0000000000..7efe916227 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthDependentRange.java @@ -0,0 +1,32 @@ +/* + * (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.is.vpc.v1.model; + +/** + * The permitted bandwidth range of a share with this profile depends on its configuration. + */ +public class ShareProfileBandwidthDependentRange extends ShareProfileBandwidth { + + /** + * The type for this profile field. + */ + public interface Type { + /** dependent_range. */ + String DEPENDENT_RANGE = "dependent_range"; + } + + + protected ShareProfileBandwidthDependentRange() { } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthEnum.java new file mode 100644 index 0000000000..6c9cf6e5b3 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthEnum.java @@ -0,0 +1,32 @@ +/* + * (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.is.vpc.v1.model; + +/** + * The permitted bandwidth values of a share with this profile. + */ +public class ShareProfileBandwidthEnum extends ShareProfileBandwidth { + + /** + * The type for this profile field. + */ + public interface Type { + /** enum. */ + String X_ENUM = "enum"; + } + + + protected ShareProfileBandwidthEnum() { } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthFixed.java new file mode 100644 index 0000000000..714e96aeb5 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthFixed.java @@ -0,0 +1,32 @@ +/* + * (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.is.vpc.v1.model; + +/** + * The permitted bandwidth of a share with this profile is fixed. + */ +public class ShareProfileBandwidthFixed extends ShareProfileBandwidth { + + /** + * The type for this profile field. + */ + public interface Type { + /** fixed. */ + String FIXED = "fixed"; + } + + + protected ShareProfileBandwidthFixed() { } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthRange.java new file mode 100644 index 0000000000..03543b1ef1 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthRange.java @@ -0,0 +1,32 @@ +/* + * (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.is.vpc.v1.model; + +/** + * The permitted bandwidth range (in megabits per second) of a share with this profile. + */ +public class ShareProfileBandwidthRange extends ShareProfileBandwidth { + + /** + * The type for this profile field. + */ + public interface Type { + /** range. */ + String RANGE = "range"; + } + + + protected ShareProfileBandwidthRange() { } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacity.java index 5657e1dd60..9d1a9f4aa4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityDependentRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityDependentRange.java index b6cc194ee3..368f1e37c5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityDependentRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityDependentRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityEnum.java index 5cfce8ffe2..77d5d19dce 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityEnum.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityEnum.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityFixed.java index 992a65ff4e..ab5b5f4f25 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityRange.java index cb219aac19..17e8905e72 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCollection.java index 782cb0b2fa..501cb4f4b6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPS.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPS.java index 3fbe82aac0..92fd147a4c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPS.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPS.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSDependent.java index d8b47cbebf..a268836e62 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSDependentRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSDependentRange.java index bb266a888d..4555116efd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSDependentRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSDependentRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSEnum.java index 31e29e4c15..195afd5dc9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSEnum.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSEnum.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSFixed.java index 89ba45978d..e3c5353c11 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSRange.java index a184c2f774..23582eb5a8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIdentity.java index dfc0be9c06..c5b14c0d16 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIdentityByHref.java index 650989043a..dbcdb96bb8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIdentityByName.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIdentityByName.java index 3bb9366956..747a38771a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIdentityByName.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIdentityByName.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileReference.java index cede877ff0..28c021f76f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileStorageGeneration.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileStorageGeneration.java new file mode 100644 index 0000000000..f32dae6969 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileStorageGeneration.java @@ -0,0 +1,61 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * ShareProfileStorageGeneration. + * + * Classes which extend this class: + * - ShareProfileStorageGenerationFixed + */ +public class ShareProfileStorageGeneration extends GenericModel { + + /** + * The type for this profile field. + */ + public interface Type { + /** fixed. */ + String FIXED = "fixed"; + } + + protected String type; + protected Long value; + + protected ShareProfileStorageGeneration() { } + + /** + * Gets the type. + * + * The type for this profile field. + * + * @return the type + */ + public String getType() { + return type; + } + + /** + * Gets the value. + * + * The value for this profile field. + * + * @return the value + */ + public Long getValue() { + return value; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileStorageGenerationFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileStorageGenerationFixed.java new file mode 100644 index 0000000000..138d363196 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileStorageGenerationFixed.java @@ -0,0 +1,32 @@ +/* + * (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.is.vpc.v1.model; + +/** + * The storage generation value of a share with this profile is fixed. + */ +public class ShareProfileStorageGenerationFixed extends ShareProfileStorageGeneration { + + /** + * The type for this profile field. + */ + public interface Type { + /** fixed. */ + String FIXED = "fixed"; + } + + + protected ShareProfileStorageGenerationFixed() { } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfilesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfilesPager.java index 9053d484d1..13a84c09ec 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfilesPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareProfilesPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePrototype.java index 181f0918be..7557550b33 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -30,10 +30,12 @@ public class SharePrototype extends GenericModel { public interface AllowedTransitEncryptionModes { + /** ipsec. */ + String IPSEC = "ipsec"; /** none. */ String NONE = "none"; - /** user_managed. */ - String USER_MANAGED = "user_managed"; + /** stunnel. */ + String STUNNEL = "stunnel"; } /** @@ -52,6 +54,11 @@ public interface AccessControlMode { String VPC = "vpc"; } + public interface AllowedAccessProtocols { + /** nfs4. */ + String NFS4 = "nfs4"; + } + @SerializedName("allowed_transit_encryption_modes") protected List allowedTransitEncryptionModes; @SerializedName("mount_targets") @@ -63,6 +70,9 @@ public interface AccessControlMode { protected List userTags; @SerializedName("access_control_mode") protected String accessControlMode; + @SerializedName("allowed_access_protocols") + protected List allowedAccessProtocols; + protected Long bandwidth; @SerializedName("encryption_key") protected EncryptionKeyIdentity encryptionKey; @SerializedName("initial_owner") @@ -88,9 +98,10 @@ protected SharePrototype() { } * Gets the allowedTransitEncryptionModes. * * The transit encryption modes to allow for this share. If unspecified: - * - If share mount targets are specified, and those share mount targets all specify a - * `transit_encryption` of `user_managed`, then only `user_managed` will be allowed. - * - Otherwise, all `transit_encryption` modes will be allowed. + * - If share mount targets are specified, then only transit encryption modes + * specified by those share mount target will be allowed. + * - Otherwise, the default allowed transit encryption modes from the profile will be + * used. * * @return the allowedTransitEncryptionModes */ @@ -128,6 +139,9 @@ public String name() { * unspecified, a replica may be subsequently added by creating a new file share with a * `source_share` referencing this file share. * + * Replica file shares can only be created for shares with an `availability_mode` of + * `zonal`. + * * @return the replicaShare */ public SharePrototypeShareContext replicaShare() { @@ -162,6 +176,38 @@ public String accessControlMode() { return accessControlMode; } + /** + * Gets the allowedAccessProtocols. + * + * The access protocols to allow for this share. If unspecified: + * - If share mount targets are specified, only the access protocols specified by those + * share mount target will be allowed. + * - Otherwise, the default access protocols from the profile will be used. + * + * @return the allowedAccessProtocols + */ + public List allowedAccessProtocols() { + return allowedAccessProtocols; + } + + /** + * Gets the bandwidth. + * + * The maximum bandwidth (in megabits per second) for the file share. + * + * If the share profile has a `bandwidth.type` of `dependent` or `fixed`, this property is system-managed and must not + * be specified. Otherwise, the specified value must be within the `bandwidth` range of the share's profile. + * + * Provided the property is user-managed, if it is unspecified, its value will be set based on the specified [`size` + * and + * `iops`](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles&interface=api). + * + * @return the bandwidth + */ + public Long bandwidth() { + return bandwidth; + } + /** * Gets the encryptionKey. * @@ -248,6 +294,9 @@ public Long size() { * The zone this file share will reside in. For a replica share in the same region as * the source share, this must be a different zone from the source share. * + * This property must be specified if the share profile `availability_mode` is `zonal`, + * and must not be specified otherwise. + * * @return the zone */ public ZoneIdentity zone() { @@ -273,9 +322,12 @@ public String replicationCronSpec() { /** * Gets the sourceShare. * - * The source file share for this replica file share. The specified file share must not - * already have a replica, and must not be a replica. If source file share is specified - * by CRN, it may be in an [associated partner + * The source file share for this replica file share. The specified file share must: + * - Not already have a replica. + * - Not be a replica. + * - Have a `storage_generation` of `1`. + * + * If source file share is specified by CRN, it may be in an [associated partner * region](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-replication). * * @return the sourceShare diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareByOriginShare.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareByOriginShare.java index 226312356f..cc1217e211 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareByOriginShare.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareByOriginShare.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -18,16 +18,21 @@ /** * Create an accessor file share for an existing file share. The values for - * `access_control_mode`, `encryption_key`, `initial_owner`, `iops`, `profile`, `size`, and - * `zone` will be inherited from `origin_share`. + * `access_control_mode`, `allowed_access_protocols`, `bandwidth`, `encryption_key`, + * `initial_owner`, `iops`, `profile`, `size`, and `zone` will be inherited from + * `origin_share`. + * + * Accessor file shares can only be created for shares with a `storage_generation` of `1`. */ public class SharePrototypeShareByOriginShare extends SharePrototype { public interface AllowedTransitEncryptionModes { + /** ipsec. */ + String IPSEC = "ipsec"; /** none. */ String NONE = "none"; - /** user_managed. */ - String USER_MANAGED = "user_managed"; + /** stunnel. */ + String STUNNEL = "stunnel"; } @@ -41,6 +46,7 @@ public static class Builder { private SharePrototypeShareContext replicaShare; private List userTags; private ShareIdentity originShare; + private ResourceGroupIdentity resourceGroup; /** * Instantiates a new Builder from an existing SharePrototypeShareByOriginShare instance. @@ -54,6 +60,7 @@ public Builder(SharePrototype sharePrototypeShareByOriginShare) { this.replicaShare = sharePrototypeShareByOriginShare.replicaShare; this.userTags = sharePrototypeShareByOriginShare.userTags; this.originShare = sharePrototypeShareByOriginShare.originShare; + this.resourceGroup = sharePrototypeShareByOriginShare.resourceGroup; } /** @@ -196,6 +203,17 @@ public Builder originShare(ShareIdentity originShare) { this.originShare = originShare; return this; } + + /** + * Set the resourceGroup. + * + * @param resourceGroup the resourceGroup + * @return the SharePrototypeShareByOriginShare builder + */ + public Builder resourceGroup(ResourceGroupIdentity resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } } protected SharePrototypeShareByOriginShare() { } @@ -209,6 +227,7 @@ protected SharePrototypeShareByOriginShare(Builder builder) { replicaShare = builder.replicaShare; userTags = builder.userTags; originShare = builder.originShare; + resourceGroup = builder.resourceGroup; } /** diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareBySize.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareBySize.java index 919caf5153..21c04eff08 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareBySize.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareBySize.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -22,10 +22,12 @@ public class SharePrototypeShareBySize extends SharePrototype { public interface AllowedTransitEncryptionModes { + /** ipsec. */ + String IPSEC = "ipsec"; /** none. */ String NONE = "none"; - /** user_managed. */ - String USER_MANAGED = "user_managed"; + /** stunnel. */ + String STUNNEL = "stunnel"; } /** @@ -44,6 +46,11 @@ public interface AccessControlMode { String VPC = "vpc"; } + public interface AllowedAccessProtocols { + /** nfs4. */ + String NFS4 = "nfs4"; + } + /** * Builder. @@ -55,6 +62,8 @@ public static class Builder { private SharePrototypeShareContext replicaShare; private List userTags; private String accessControlMode; + private List allowedAccessProtocols; + private Long bandwidth; private EncryptionKeyIdentity encryptionKey; private ShareInitialOwner initialOwner; private Long iops; @@ -75,6 +84,8 @@ public Builder(SharePrototype sharePrototypeShareBySize) { this.replicaShare = sharePrototypeShareBySize.replicaShare; this.userTags = sharePrototypeShareBySize.userTags; this.accessControlMode = sharePrototypeShareBySize.accessControlMode; + this.allowedAccessProtocols = sharePrototypeShareBySize.allowedAccessProtocols; + this.bandwidth = sharePrototypeShareBySize.bandwidth; this.encryptionKey = sharePrototypeShareBySize.encryptionKey; this.initialOwner = sharePrototypeShareBySize.initialOwner; this.iops = sharePrototypeShareBySize.iops; @@ -95,12 +106,10 @@ public Builder() { * * @param profile the profile * @param size the size - * @param zone the zone */ - public Builder(ShareProfileIdentity profile, Long size, ZoneIdentity zone) { + public Builder(ShareProfileIdentity profile, Long size) { this.profile = profile; this.size = size; - this.zone = zone; } /** @@ -160,6 +169,22 @@ public Builder addUserTags(String userTags) { return this; } + /** + * Adds a new element to allowedAccessProtocols. + * + * @param allowedAccessProtocols the new element to be added + * @return the SharePrototypeShareBySize builder + */ + public Builder addAllowedAccessProtocols(String allowedAccessProtocols) { + com.ibm.cloud.sdk.core.util.Validator.notNull(allowedAccessProtocols, + "allowedAccessProtocols cannot be null"); + if (this.allowedAccessProtocols == null) { + this.allowedAccessProtocols = new ArrayList(); + } + this.allowedAccessProtocols.add(allowedAccessProtocols); + return this; + } + /** * Set the allowedTransitEncryptionModes. * Existing allowedTransitEncryptionModes will be replaced. @@ -229,6 +254,29 @@ public Builder accessControlMode(String accessControlMode) { return this; } + /** + * Set the allowedAccessProtocols. + * Existing allowedAccessProtocols will be replaced. + * + * @param allowedAccessProtocols the allowedAccessProtocols + * @return the SharePrototypeShareBySize builder + */ + public Builder allowedAccessProtocols(List allowedAccessProtocols) { + this.allowedAccessProtocols = allowedAccessProtocols; + return this; + } + + /** + * Set the bandwidth. + * + * @param bandwidth the bandwidth + * @return the SharePrototypeShareBySize builder + */ + public Builder bandwidth(long bandwidth) { + this.bandwidth = bandwidth; + return this; + } + /** * Set the encryptionKey. * @@ -314,14 +362,14 @@ protected SharePrototypeShareBySize(Builder builder) { "profile cannot be null"); com.ibm.cloud.sdk.core.util.Validator.notNull(builder.size, "size cannot be null"); - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.zone, - "zone cannot be null"); allowedTransitEncryptionModes = builder.allowedTransitEncryptionModes; mountTargets = builder.mountTargets; name = builder.name; replicaShare = builder.replicaShare; userTags = builder.userTags; accessControlMode = builder.accessControlMode; + allowedAccessProtocols = builder.allowedAccessProtocols; + bandwidth = builder.bandwidth; encryptionKey = builder.encryptionKey; initialOwner = builder.initialOwner; iops = builder.iops; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareBySourceShare.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareBySourceShare.java index 5c9eb2dfe3..d4cdf5bb8d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareBySourceShare.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareBySourceShare.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -18,15 +18,21 @@ /** * Create a replica file share for an existing file share. The values for - * `access_control_mode`, `encryption_key`, `initial_owner`, and `size` will be inherited from `source_share`. + * `access_control_mode`, `allowed_access_protocols`, `bandwidth`, `encryption_key`, + * `initial_owner`, and `size` will be inherited from the `source_share`. + * + * Replica file shares can only be created if the source share has a `storage_generation` of + * `1`. */ public class SharePrototypeShareBySourceShare extends SharePrototype { public interface AllowedTransitEncryptionModes { + /** ipsec. */ + String IPSEC = "ipsec"; /** none. */ String NONE = "none"; - /** user_managed. */ - String USER_MANAGED = "user_managed"; + /** stunnel. */ + String STUNNEL = "stunnel"; } @@ -79,13 +85,11 @@ public Builder() { * @param profile the profile * @param replicationCronSpec the replicationCronSpec * @param sourceShare the sourceShare - * @param zone the zone */ - public Builder(ShareProfileIdentity profile, String replicationCronSpec, ShareIdentity sourceShare, ZoneIdentity zone) { + public Builder(ShareProfileIdentity profile, String replicationCronSpec, ShareIdentity sourceShare) { this.profile = profile; this.replicationCronSpec = replicationCronSpec; this.sourceShare = sourceShare; - this.zone = zone; } /** @@ -290,8 +294,6 @@ protected SharePrototypeShareBySourceShare(Builder builder) { "replicationCronSpec cannot be null"); com.ibm.cloud.sdk.core.util.Validator.notNull(builder.sourceShare, "sourceShare cannot be null"); - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.zone, - "zone cannot be null"); allowedTransitEncryptionModes = builder.allowedTransitEncryptionModes; mountTargets = builder.mountTargets; name = builder.name; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareBySourceSnapshot.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareBySourceSnapshot.java index 76a93c23ac..1294dde831 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareBySourceSnapshot.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareBySourceSnapshot.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -17,16 +17,23 @@ import java.util.List; /** - * Create a file share from a source snapshot. The initial value for `access_control_mode`, and the zone the file share - * resides in will be inherited from `source_snapshot`. + * Create a file share from a source snapshot. The initial value for `access_control_mode`, + * `initial_owner` and `zone` will be inherited from `source_snapshot`. */ public class SharePrototypeShareBySourceSnapshot extends SharePrototype { public interface AllowedTransitEncryptionModes { + /** ipsec. */ + String IPSEC = "ipsec"; /** none. */ String NONE = "none"; - /** user_managed. */ - String USER_MANAGED = "user_managed"; + /** stunnel. */ + String STUNNEL = "stunnel"; + } + + public interface AllowedAccessProtocols { + /** nfs4. */ + String NFS4 = "nfs4"; } @@ -39,6 +46,8 @@ public static class Builder { private String name; private SharePrototypeShareContext replicaShare; private List userTags; + private List allowedAccessProtocols; + private Long bandwidth; private EncryptionKeyIdentity encryptionKey; private ShareInitialOwner initialOwner; private Long iops; @@ -58,6 +67,8 @@ public Builder(SharePrototype sharePrototypeShareBySourceSnapshot) { this.name = sharePrototypeShareBySourceSnapshot.name; this.replicaShare = sharePrototypeShareBySourceSnapshot.replicaShare; this.userTags = sharePrototypeShareBySourceSnapshot.userTags; + this.allowedAccessProtocols = sharePrototypeShareBySourceSnapshot.allowedAccessProtocols; + this.bandwidth = sharePrototypeShareBySourceSnapshot.bandwidth; this.encryptionKey = sharePrototypeShareBySourceSnapshot.encryptionKey; this.initialOwner = sharePrototypeShareBySourceSnapshot.initialOwner; this.iops = sharePrototypeShareBySourceSnapshot.iops; @@ -141,6 +152,22 @@ public Builder addUserTags(String userTags) { return this; } + /** + * Adds a new element to allowedAccessProtocols. + * + * @param allowedAccessProtocols the new element to be added + * @return the SharePrototypeShareBySourceSnapshot builder + */ + public Builder addAllowedAccessProtocols(String allowedAccessProtocols) { + com.ibm.cloud.sdk.core.util.Validator.notNull(allowedAccessProtocols, + "allowedAccessProtocols cannot be null"); + if (this.allowedAccessProtocols == null) { + this.allowedAccessProtocols = new ArrayList(); + } + this.allowedAccessProtocols.add(allowedAccessProtocols); + return this; + } + /** * Set the allowedTransitEncryptionModes. * Existing allowedTransitEncryptionModes will be replaced. @@ -199,6 +226,29 @@ public Builder userTags(List userTags) { return this; } + /** + * Set the allowedAccessProtocols. + * Existing allowedAccessProtocols will be replaced. + * + * @param allowedAccessProtocols the allowedAccessProtocols + * @return the SharePrototypeShareBySourceSnapshot builder + */ + public Builder allowedAccessProtocols(List allowedAccessProtocols) { + this.allowedAccessProtocols = allowedAccessProtocols; + return this; + } + + /** + * Set the bandwidth. + * + * @param bandwidth the bandwidth + * @return the SharePrototypeShareBySourceSnapshot builder + */ + public Builder bandwidth(long bandwidth) { + this.bandwidth = bandwidth; + return this; + } + /** * Set the encryptionKey. * @@ -289,6 +339,8 @@ protected SharePrototypeShareBySourceSnapshot(Builder builder) { name = builder.name; replicaShare = builder.replicaShare; userTags = builder.userTags; + allowedAccessProtocols = builder.allowedAccessProtocols; + bandwidth = builder.bandwidth; encryptionKey = builder.encryptionKey; initialOwner = builder.initialOwner; iops = builder.iops; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareContext.java index 3c61e26290..1ab2ab45e1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -23,14 +23,19 @@ * Configuration for a replica file share to create and associate with this file share. If unspecified, a replica may be * subsequently added by creating a new file share with a * `source_share` referencing this file share. + * + * Replica file shares can only be created for shares with an `availability_mode` of + * `zonal`. */ public class SharePrototypeShareContext extends GenericModel { public interface AllowedTransitEncryptionModes { + /** ipsec. */ + String IPSEC = "ipsec"; /** none. */ String NONE = "none"; - /** user_managed. */ - String USER_MANAGED = "user_managed"; + /** stunnel. */ + String STUNNEL = "stunnel"; } @SerializedName("allowed_transit_encryption_modes") @@ -90,12 +95,10 @@ public Builder() { * * @param profile the profile * @param replicationCronSpec the replicationCronSpec - * @param zone the zone */ - public Builder(ShareProfileIdentity profile, String replicationCronSpec, ZoneIdentity zone) { + public Builder(ShareProfileIdentity profile, String replicationCronSpec) { this.profile = profile; this.replicationCronSpec = replicationCronSpec; - this.zone = zone; } /** @@ -265,8 +268,6 @@ protected SharePrototypeShareContext(Builder builder) { "profile cannot be null"); com.ibm.cloud.sdk.core.util.Validator.notNull(builder.replicationCronSpec, "replicationCronSpec cannot be null"); - com.ibm.cloud.sdk.core.util.Validator.notNull(builder.zone, - "zone cannot be null"); allowedTransitEncryptionModes = builder.allowedTransitEncryptionModes; iops = builder.iops; mountTargets = builder.mountTargets; @@ -291,9 +292,10 @@ public Builder newBuilder() { * Gets the allowedTransitEncryptionModes. * * The transit encryption modes to allow for this share. If unspecified: - * - If share mount targets are specified, and those share mount targets all specify a - * `transit_encryption` of `user_managed`, then only `user_managed` will be allowed. - * - Otherwise, all `transit_encryption` modes will be allowed. + * - If share mount targets are specified, then only transit encryption modes + * specified by those share mount target will be allowed. + * - Otherwise, the default allowed transit encryption modes from the profile will be + * used. * * @return the allowedTransitEncryptionModes */ @@ -345,7 +347,9 @@ public String name() { * Gets the profile. * * The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles) to use - * for this file share. The profile must support the share's specified IOPS and size. + * for this file share. The profile must: + * - support the share's specified IOPS and size, and + * - have the same `storage_generation` as the share. * * @return the profile */ diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareReference.java index 667e516bb3..f1bd674bd6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareRemote.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareRemote.java index c5181f5f20..44b09ff2e5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareRemote.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareRemote.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareReplicationStatusReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareReplicationStatusReason.java index ff410241a1..112e305cd1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareReplicationStatusReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareReplicationStatusReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshot.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshot.java index 72407d5297..1328cf2f72 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshot.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshot.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -314,7 +314,8 @@ public List getUserTags() { /** * Gets the zone. * - * The zone this share snapshot resides in. + * The zone this share snapshot resides in. For shares with `availability_mode` of + * `regional`, this property will be absent. * * @return the zone */ diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotCollection.java index 2e9f6cd94d..740e490176 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotLifecycleReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotLifecycleReason.java index cd2b85042b..ff613c24d3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotLifecycleReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotLifecycleReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotPatch.java index c2fe4b0874..cf84647ebb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -26,6 +26,7 @@ */ public class ShareSnapshotPatch extends GenericModel { + protected String name; @SerializedName("user_tags") protected List userTags; @@ -33,6 +34,7 @@ public class ShareSnapshotPatch extends GenericModel { * Builder. */ public static class Builder { + private String name; private List userTags; /** @@ -41,6 +43,7 @@ public static class Builder { * @param shareSnapshotPatch the instance to initialize the Builder with */ private Builder(ShareSnapshotPatch shareSnapshotPatch) { + this.name = shareSnapshotPatch.name; this.userTags = shareSnapshotPatch.userTags; } @@ -75,6 +78,17 @@ public Builder addUserTags(String userTags) { return this; } + /** + * Set the name. + * + * @param name the name + * @return the ShareSnapshotPatch builder + */ + public Builder name(String name) { + this.name = name; + return this; + } + /** * Set the userTags. * Existing userTags will be replaced. @@ -91,6 +105,7 @@ public Builder userTags(List userTags) { protected ShareSnapshotPatch() { } protected ShareSnapshotPatch(Builder builder) { + name = builder.name; userTags = builder.userTags; } @@ -103,6 +118,19 @@ public Builder newBuilder() { return new Builder(this); } + /** + * Gets the name. + * + * The name for this share snapshot. The name must be unique among all snapshots for the file share. For this property + * to be changed, the share's `replication_role` must not be + * `replica`. + * + * @return the name + */ + public String name() { + return name; + } + /** * Gets the userTags. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotStatusReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotStatusReason.java index cca0c18987..da594b4153 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotStatusReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotStatusReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotsPager.java index c894ea37c2..1762dcdbf0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshot.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshot.java index b1c22215c4..28a65552b1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshot.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshot.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototype.java index ab616c7aea..ac87b04f4f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentity.java index 5f7708d633..92b168b1d7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRN.java index d7d7a9a0a9..ba71ed5969 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHref.java index dc0aa12b6c..3cf11116ef 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityById.java index 36f64890db..4cca1d9d1e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotShareSnapshotReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotShareSnapshotReference.java index 956ac0c1ab..4aaa09925e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotShareSnapshotReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotShareSnapshotReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharesPager.java index 594eeb43ad..7b73d82748 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharesPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SharesPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Snapshot.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Snapshot.java index 2ead88ab62..547c9c0629 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Snapshot.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Snapshot.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -64,6 +64,8 @@ public interface ResourceType { String SNAPSHOT = "snapshot"; } + @SerializedName("allowed_use") + protected SnapshotAllowedUse allowedUse; @SerializedName("backup_policy_plan") protected BackupPolicyPlanReference backupPolicyPlan; protected Boolean bootable; @@ -112,6 +114,22 @@ public interface ResourceType { protected Snapshot() { } + /** + * Gets the allowedUse. + * + * The usage constraints to be matched against the requested instance properties to + * determine compatibility. While bare metal servers cannot be provisioned from snapshots, + * an image or volume created from this snapshot will inherit its `allowed_use` value. + * + * Only present on bootable snapshots. The value of this property will be inherited from + * the source volume or source snapshot at snapshot creation, but can be changed. + * + * @return the allowedUse + */ + public SnapshotAllowedUse getAllowedUse() { + return allowedUse; + } + /** * Gets the backupPolicyPlan. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotAllowedUse.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotAllowedUse.java new file mode 100644 index 0000000000..34ffeab415 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotAllowedUse.java @@ -0,0 +1,81 @@ +/* + * (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.is.vpc.v1.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * SnapshotAllowedUse. + */ +public class SnapshotAllowedUse extends GenericModel { + + @SerializedName("api_version") + protected String apiVersion; + @SerializedName("bare_metal_server") + protected String bareMetalServer; + protected String instance; + + protected SnapshotAllowedUse() { } + + /** + * Gets the apiVersion. + * + * The API version with which to evaluate the expressions. + * + * @return the apiVersion + */ + public String getApiVersion() { + return apiVersion; + } + + /** + * Gets the bareMetalServer. + * + * The expression that must be satisfied by the properties of a bare metal server provisioned using the image data in + * this snapshot. + * + * The expression follows [Common Expression Language](https://github.com/google/cel-spec/blob/master/doc/langdef.md), + * but does not support built-in functions and macros. In addition, the following variable is supported, corresponding + * to the `BareMetalServer` property: + * - `enable_secure_boot` (boolean): Indicates whether secure boot is enabled. + * + * @return the bareMetalServer + */ + public String getBareMetalServer() { + return bareMetalServer; + } + + /** + * Gets the instance. + * + * The expression that must be satisfied by the properties of a virtual server instance provisioned using this + * snapshot. + * + * The expression follows [Common Expression Language](https://github.com/google/cel-spec/blob/master/doc/langdef.md), + * but does not support built-in functions and macros. In addition, the following variables are supported, + * corresponding to `Instance` properties: + * - `enable_secure_boot` (boolean): Indicates whether secure boot is enabled + * - `gpu.count` (integer): The number of GPUs + * - `gpu.manufacturer` (string): The GPU manufacturer + * - `gpu.memory` (integer): The overall amount of GPU memory in GiB (gibibytes) + * - `gpu.model` (string): The GPU model. + * + * @return the instance + */ + public String getInstance() { + return instance; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotAllowedUsePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotAllowedUsePatch.java new file mode 100644 index 0000000000..3a6d373f3b --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotAllowedUsePatch.java @@ -0,0 +1,166 @@ +/* + * (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.is.vpc.v1.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * SnapshotAllowedUsePatch. + */ +public class SnapshotAllowedUsePatch extends GenericModel { + + @SerializedName("api_version") + protected String apiVersion; + @SerializedName("bare_metal_server") + protected String bareMetalServer; + protected String instance; + + /** + * Builder. + */ + public static class Builder { + private String apiVersion; + private String bareMetalServer; + private String instance; + + /** + * Instantiates a new Builder from an existing SnapshotAllowedUsePatch instance. + * + * @param snapshotAllowedUsePatch the instance to initialize the Builder with + */ + private Builder(SnapshotAllowedUsePatch snapshotAllowedUsePatch) { + this.apiVersion = snapshotAllowedUsePatch.apiVersion; + this.bareMetalServer = snapshotAllowedUsePatch.bareMetalServer; + this.instance = snapshotAllowedUsePatch.instance; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Builds a SnapshotAllowedUsePatch. + * + * @return the new SnapshotAllowedUsePatch instance + */ + public SnapshotAllowedUsePatch build() { + return new SnapshotAllowedUsePatch(this); + } + + /** + * Set the apiVersion. + * + * @param apiVersion the apiVersion + * @return the SnapshotAllowedUsePatch builder + */ + public Builder apiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return this; + } + + /** + * Set the bareMetalServer. + * + * @param bareMetalServer the bareMetalServer + * @return the SnapshotAllowedUsePatch builder + */ + public Builder bareMetalServer(String bareMetalServer) { + this.bareMetalServer = bareMetalServer; + return this; + } + + /** + * Set the instance. + * + * @param instance the instance + * @return the SnapshotAllowedUsePatch builder + */ + public Builder instance(String instance) { + this.instance = instance; + return this; + } + } + + protected SnapshotAllowedUsePatch() { } + + protected SnapshotAllowedUsePatch(Builder builder) { + apiVersion = builder.apiVersion; + bareMetalServer = builder.bareMetalServer; + instance = builder.instance; + } + + /** + * New builder. + * + * @return a SnapshotAllowedUsePatch builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the apiVersion. + * + * The API version with which to evaluate the expressions. + * + * If specified, the value must be between `2019-01-01` and today's date (in UTC). + * + * @return the apiVersion + */ + public String apiVersion() { + return apiVersion; + } + + /** + * Gets the bareMetalServer. + * + * The expression that must be satisfied by the properties of a bare metal server provisioned using the image data in + * this snapshot. + * + * The expression follows [Common Expression Language](https://github.com/google/cel-spec/blob/master/doc/langdef.md), + * but does not support built-in functions and macros. In addition, the following variable is supported, corresponding + * to the `BareMetalServer` property: + * - `enable_secure_boot` (boolean): Indicates whether secure boot is enabled. + * + * @return the bareMetalServer + */ + public String bareMetalServer() { + return bareMetalServer; + } + + /** + * Gets the instance. + * + * The expression that must be satisfied by the properties of a virtual server instance provisioned using this + * snapshot. + * + * The expression follows [Common Expression Language](https://github.com/google/cel-spec/blob/master/doc/langdef.md), + * but does not support built-in functions and macros. In addition, the following variables are supported, + * corresponding to `Instance` properties: + * - `enable_secure_boot` (boolean): Indicates whether secure boot is enabled + * - `gpu.count` (integer): The number of GPUs + * - `gpu.manufacturer` (string): The GPU manufacturer + * - `gpu.memory` (integer): The overall amount of GPU memory in GiB (gibibytes) + * - `gpu.model` (string): The GPU model. + * + * @return the instance + */ + public String instance() { + return instance; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotAllowedUsePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotAllowedUsePrototype.java new file mode 100644 index 0000000000..27d722d861 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotAllowedUsePrototype.java @@ -0,0 +1,171 @@ +/* + * (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.is.vpc.v1.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * SnapshotAllowedUsePrototype. + */ +public class SnapshotAllowedUsePrototype extends GenericModel { + + @SerializedName("api_version") + protected String apiVersion; + @SerializedName("bare_metal_server") + protected String bareMetalServer; + protected String instance; + + /** + * Builder. + */ + public static class Builder { + private String apiVersion; + private String bareMetalServer; + private String instance; + + /** + * Instantiates a new Builder from an existing SnapshotAllowedUsePrototype instance. + * + * @param snapshotAllowedUsePrototype the instance to initialize the Builder with + */ + private Builder(SnapshotAllowedUsePrototype snapshotAllowedUsePrototype) { + this.apiVersion = snapshotAllowedUsePrototype.apiVersion; + this.bareMetalServer = snapshotAllowedUsePrototype.bareMetalServer; + this.instance = snapshotAllowedUsePrototype.instance; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Builds a SnapshotAllowedUsePrototype. + * + * @return the new SnapshotAllowedUsePrototype instance + */ + public SnapshotAllowedUsePrototype build() { + return new SnapshotAllowedUsePrototype(this); + } + + /** + * Set the apiVersion. + * + * @param apiVersion the apiVersion + * @return the SnapshotAllowedUsePrototype builder + */ + public Builder apiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return this; + } + + /** + * Set the bareMetalServer. + * + * @param bareMetalServer the bareMetalServer + * @return the SnapshotAllowedUsePrototype builder + */ + public Builder bareMetalServer(String bareMetalServer) { + this.bareMetalServer = bareMetalServer; + return this; + } + + /** + * Set the instance. + * + * @param instance the instance + * @return the SnapshotAllowedUsePrototype builder + */ + public Builder instance(String instance) { + this.instance = instance; + return this; + } + } + + protected SnapshotAllowedUsePrototype() { } + + protected SnapshotAllowedUsePrototype(Builder builder) { + apiVersion = builder.apiVersion; + bareMetalServer = builder.bareMetalServer; + instance = builder.instance; + } + + /** + * New builder. + * + * @return a SnapshotAllowedUsePrototype builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the apiVersion. + * + * The API version with which to evaluate the expressions. + * + * If specified, the value must be between `2019-01-01` and today's date (in UTC). If unspecified, the `version` query + * parameter value will be used. + * + * @return the apiVersion + */ + public String apiVersion() { + return apiVersion; + } + + /** + * Gets the bareMetalServer. + * + * The expression that must be satisfied by the properties of a bare metal server provisioned using the image data in + * this snapshot. + * + * If unspecified, the expression will be set to `true`. + * + * The expression follows [Common Expression Language](https://github.com/google/cel-spec/blob/master/doc/langdef.md), + * but does not support built-in functions and macros. In addition, the following variable is supported, corresponding + * to the `BareMetalServer` property: + * - `enable_secure_boot` (boolean): Indicates whether secure boot is enabled. + * + * @return the bareMetalServer + */ + public String bareMetalServer() { + return bareMetalServer; + } + + /** + * Gets the instance. + * + * The expression that must be satisfied by the properties of a virtual server instance provisioned using this + * snapshot. + * + * If unspecified, the expression will be set to `true`. + * + * The expression follows [Common Expression Language](https://github.com/google/cel-spec/blob/master/doc/langdef.md), + * but does not support built-in functions and macros. In addition, the following variables are supported, + * corresponding to `Instance` properties: + * - `enable_secure_boot` (boolean): Indicates whether secure boot is enabled + * - `gpu.count` (integer): The number of GPUs + * - `gpu.manufacturer` (string): The GPU manufacturer + * - `gpu.memory` (integer): The overall amount of GPU memory in GiB (gibibytes) + * - `gpu.model` (string): The GPU model. + * + * @return the instance + */ + public String instance() { + return instance; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCatalogOffering.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCatalogOffering.java index 1965cfa5fb..4fd18b487b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCatalogOffering.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCatalogOffering.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotClone.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotClone.java index 5196e56301..2c7fc7c7c8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotClone.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotClone.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCloneCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCloneCollection.java index 6b97be6341..d0da7297af 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCloneCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCloneCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotClonePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotClonePrototype.java index 1c55a63079..333006d3a3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotClonePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotClonePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCollection.java index c672a6ed4a..d0a36e93fd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroup.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroup.java index 2bbbed0e08..cb7f6fac5f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroup.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroup.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupCollection.java index 52971a87f4..a4c8ce74e2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupPatch.java index 79af781565..0a890d2fab 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupPrototype.java index f601cbe578..2e17957531 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -75,8 +75,9 @@ public ResourceGroupIdentity resourceGroup() { /** * Gets the snapshots. * - * The data-consistent member snapshots to create. All snapshots must specify a - * `source_volume` attached to the same virtual server instance. + * The data-consistent member snapshots to create. Each snapshot must specify a + * `source_volume` attached to the same virtual server instance, and all source volumes must have a + * `storage_generation` value of `1`. * * @return the snapshots */ diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots.java index 3d43b04ed4..26bb9c2e6e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupReference.java index f3b1dcb984..a3d37db82d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupsPager.java index 995a6907ba..e1630c12cd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCopiesItem.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCopiesItem.java index 81791656c7..b97fb9d7f4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCopiesItem.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCopiesItem.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentity.java index 4678afd861..cfdf0edb5d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityByCRN.java index 74fcdffcd0..7f99a73c43 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityByHref.java index 12d2bacc70..475ab41764 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityById.java index cb5ee0fe0b..bfd89e7621 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotInstanceProfileCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotInstanceProfileCollection.java new file mode 100644 index 0000000000..87e6e3c115 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotInstanceProfileCollection.java @@ -0,0 +1,92 @@ +/* + * (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.is.vpc.v1.model; + +import java.util.List; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * SnapshotInstanceProfileCollection. + */ +public class SnapshotInstanceProfileCollection extends GenericModel { + + protected PageLink first; + @SerializedName("instance_profiles") + protected List instanceProfiles; + protected Long limit; + protected PageLink next; + @SerializedName("total_count") + protected Long totalCount; + + protected SnapshotInstanceProfileCollection() { } + + /** + * Gets the first. + * + * A link to the first page of resources. + * + * @return the first + */ + public PageLink getFirst() { + return first; + } + + /** + * Gets the instanceProfiles. + * + * A page of instance profiles compatible with the snapshot. + * + * @return the instanceProfiles + */ + public List getInstanceProfiles() { + return instanceProfiles; + } + + /** + * Gets the limit. + * + * The maximum number of resources that can be returned by the request. + * + * @return the limit + */ + public Long getLimit() { + return limit; + } + + /** + * Gets the next. + * + * A link to the next page of resources. This property is present for all pages + * except the last page. + * + * @return the next + */ + public PageLink getNext() { + return next; + } + + /** + * Gets the totalCount. + * + * The total number of resources across all pages. + * + * @return the totalCount + */ + public Long getTotalCount() { + return totalCount; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotInstanceProfilesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotInstanceProfilesPager.java new file mode 100644 index 0000000000..5cbff7a3ec --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotInstanceProfilesPager.java @@ -0,0 +1,112 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.Vpc; +import com.ibm.cloud.sdk.core.util.UrlHelper; +import java.util.ArrayList; +import java.util.List; +import java.util.NoSuchElementException; + +/** + * SnapshotInstanceProfilesPager can be used to simplify the use of the "listSnapshotInstanceProfiles" method. + */ +public class SnapshotInstanceProfilesPager { + private static class PageContext { + private String next; + public String getNext() { + return next; + } + public void setNext(String next) { + this.next = next; + } + } + + protected boolean hasNext; + protected ListSnapshotInstanceProfilesOptions options; + protected Vpc client; + protected PageContext pageContext; + + // Hide the default ctor. + protected SnapshotInstanceProfilesPager() { } + + /** + * Constructs a new SnapshotInstanceProfilesPager instance with the specified client and options model instance. + * @param client the Vpc instance to be used to invoke the "listSnapshotInstanceProfiles" method + * @param options the ListSnapshotInstanceProfilesOptions instance to be used to invoke the "listSnapshotInstanceProfiles" method + */ + public SnapshotInstanceProfilesPager(Vpc client, ListSnapshotInstanceProfilesOptions options) { + if (options.start() != null) { + throw new IllegalArgumentException("The options 'start' field should not be set"); + } + + this.hasNext = true; + this.client = client; + this.options = options.newBuilder().build(); + this.pageContext = new PageContext(); + } + + /** + * Returns true if there are more results to be retrieved. + * @return boolean + */ + public boolean hasNext() { + return hasNext; + } + + /** + * Returns the next page of results. + * @return a List<InstanceProfileReference> that contains the next page of results + */ + public List getNext() { + if (!hasNext()) { + throw new NoSuchElementException("No more results available"); + } + + ListSnapshotInstanceProfilesOptions.Builder builder = this.options.newBuilder(); + if (this.pageContext.getNext() != null) { + builder.start(this.pageContext.getNext()); + } + this.options = builder.build(); + + SnapshotInstanceProfileCollection result = client.listSnapshotInstanceProfiles(options).execute().getResult(); + + String next = null; + if (result.getNext() != null) { + String queryParam = UrlHelper.getQueryParam(result.getNext().getHref(), "start"); + if (queryParam != null) { + next = queryParam; + } + } + this.pageContext.setNext(next); + if (next == null) { + this.hasNext = false; + } + + return result.getInstanceProfiles(); + } + + /** + * Returns all results by invoking getNext() repeatedly until all pages of results have been retrieved. + * @return a List<InstanceProfileReference> containing all results returned by the "listSnapshotInstanceProfiles" method + */ + public List getAll() { + List results = new ArrayList<>(); + while (hasNext()) { + List nextPage = getNext(); + results.addAll(nextPage); + } + return results; + } +} diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPatch.java index 51eb4ac68e..f599225f8d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -26,6 +26,8 @@ */ public class SnapshotPatch extends GenericModel { + @SerializedName("allowed_use") + protected SnapshotAllowedUsePatch allowedUse; protected String name; @SerializedName("user_tags") protected List userTags; @@ -34,6 +36,7 @@ public class SnapshotPatch extends GenericModel { * Builder. */ public static class Builder { + private SnapshotAllowedUsePatch allowedUse; private String name; private List userTags; @@ -43,6 +46,7 @@ public static class Builder { * @param snapshotPatch the instance to initialize the Builder with */ private Builder(SnapshotPatch snapshotPatch) { + this.allowedUse = snapshotPatch.allowedUse; this.name = snapshotPatch.name; this.userTags = snapshotPatch.userTags; } @@ -78,6 +82,17 @@ public Builder addUserTags(String userTags) { return this; } + /** + * Set the allowedUse. + * + * @param allowedUse the allowedUse + * @return the SnapshotPatch builder + */ + public Builder allowedUse(SnapshotAllowedUsePatch allowedUse) { + this.allowedUse = allowedUse; + return this; + } + /** * Set the name. * @@ -105,6 +120,7 @@ public Builder userTags(List userTags) { protected SnapshotPatch() { } protected SnapshotPatch(Builder builder) { + allowedUse = builder.allowedUse; name = builder.name; userTags = builder.userTags; } @@ -118,6 +134,21 @@ public Builder newBuilder() { return new Builder(this); } + /** + * Gets the allowedUse. + * + * The usage constraints to be matched against the requested instance properties to + * determine compatibility. While bare metal servers cannot be provisioned from snapshots, + * an image or volume created from this snapshot will inherit its `allowed_use` value. + * + * Can only be specified for bootable snapshots. + * + * @return the allowedUse + */ + public SnapshotAllowedUsePatch allowedUse() { + return allowedUse; + } + /** * Gets the name. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototype.java index 37b4be6008..2191b338e0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -27,6 +27,8 @@ */ public class SnapshotPrototype extends GenericModel { + @SerializedName("allowed_use") + protected SnapshotAllowedUsePrototype allowedUse; protected List clones; protected String name; @SerializedName("resource_group") @@ -42,6 +44,20 @@ public class SnapshotPrototype extends GenericModel { protected SnapshotPrototype() { } + /** + * Gets the allowedUse. + * + * The usage constraints to match against the requested instance or bare metal server + * properties to determine compatibility. + * + * Can only be specified for bootable snapshots. + * + * @return the allowedUse + */ + public SnapshotAllowedUsePrototype allowedUse() { + return allowedUse; + } + /** * Gets the clones. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeSnapshotBySourceSnapshot.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeSnapshotBySourceSnapshot.java index b79f8bd36f..2279140800 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeSnapshotBySourceSnapshot.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeSnapshotBySourceSnapshot.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -26,6 +26,7 @@ public class SnapshotPrototypeSnapshotBySourceSnapshot extends SnapshotPrototype * Builder. */ public static class Builder { + private SnapshotAllowedUsePrototype allowedUse; private List clones; private String name; private ResourceGroupIdentity resourceGroup; @@ -39,6 +40,7 @@ public static class Builder { * @param snapshotPrototypeSnapshotBySourceSnapshot the instance to initialize the Builder with */ public Builder(SnapshotPrototype snapshotPrototypeSnapshotBySourceSnapshot) { + this.allowedUse = snapshotPrototypeSnapshotBySourceSnapshot.allowedUse; this.clones = snapshotPrototypeSnapshotBySourceSnapshot.clones; this.name = snapshotPrototypeSnapshotBySourceSnapshot.name; this.resourceGroup = snapshotPrototypeSnapshotBySourceSnapshot.resourceGroup; @@ -103,6 +105,17 @@ public Builder addUserTags(String userTags) { return this; } + /** + * Set the allowedUse. + * + * @param allowedUse the allowedUse + * @return the SnapshotPrototypeSnapshotBySourceSnapshot builder + */ + public Builder allowedUse(SnapshotAllowedUsePrototype allowedUse) { + this.allowedUse = allowedUse; + return this; + } + /** * Set the clones. * Existing clones will be replaced. @@ -177,6 +190,7 @@ protected SnapshotPrototypeSnapshotBySourceSnapshot() { } protected SnapshotPrototypeSnapshotBySourceSnapshot(Builder builder) { com.ibm.cloud.sdk.core.util.Validator.notNull(builder.sourceSnapshot, "sourceSnapshot cannot be null"); + allowedUse = builder.allowedUse; clones = builder.clones; name = builder.name; resourceGroup = builder.resourceGroup; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeSnapshotBySourceVolume.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeSnapshotBySourceVolume.java index e98e1d38ab..6b0e4fa766 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeSnapshotBySourceVolume.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeSnapshotBySourceVolume.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -26,6 +26,7 @@ public class SnapshotPrototypeSnapshotBySourceVolume extends SnapshotPrototype { * Builder. */ public static class Builder { + private SnapshotAllowedUsePrototype allowedUse; private List clones; private String name; private ResourceGroupIdentity resourceGroup; @@ -38,6 +39,7 @@ public static class Builder { * @param snapshotPrototypeSnapshotBySourceVolume the instance to initialize the Builder with */ public Builder(SnapshotPrototype snapshotPrototypeSnapshotBySourceVolume) { + this.allowedUse = snapshotPrototypeSnapshotBySourceVolume.allowedUse; this.clones = snapshotPrototypeSnapshotBySourceVolume.clones; this.name = snapshotPrototypeSnapshotBySourceVolume.name; this.resourceGroup = snapshotPrototypeSnapshotBySourceVolume.resourceGroup; @@ -101,6 +103,17 @@ public Builder addUserTags(String userTags) { return this; } + /** + * Set the allowedUse. + * + * @param allowedUse the allowedUse + * @return the SnapshotPrototypeSnapshotBySourceVolume builder + */ + public Builder allowedUse(SnapshotAllowedUsePrototype allowedUse) { + this.allowedUse = allowedUse; + return this; + } + /** * Set the clones. * Existing clones will be replaced. @@ -164,6 +177,7 @@ protected SnapshotPrototypeSnapshotBySourceVolume() { } protected SnapshotPrototypeSnapshotBySourceVolume(Builder builder) { com.ibm.cloud.sdk.core.util.Validator.notNull(builder.sourceVolume, "sourceVolume cannot be null"); + allowedUse = builder.allowedUse; clones = builder.clones; name = builder.name; resourceGroup = builder.resourceGroup; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeSnapshotConsistencyGroupContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeSnapshotConsistencyGroupContext.java index e4aea4b0de..3584495b0a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeSnapshotConsistencyGroupContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeSnapshotConsistencyGroupContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotReference.java index ea8536e5af..3b8bca892d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotRemote.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotRemote.java index f04c7adf87..0250b11a70 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotRemote.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotRemote.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotSourceSnapshot.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotSourceSnapshot.java index 4851d393a3..f706b3ed69 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotSourceSnapshot.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotSourceSnapshot.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotsPager.java index ca43099f61..242e2439b5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SnapshotsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/StartBareMetalServerOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/StartBareMetalServerOptions.java index b54efa0058..986b2cd830 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/StartBareMetalServerOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/StartBareMetalServerOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/StopBareMetalServerOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/StopBareMetalServerOptions.java index 6f738fe2f9..ff90c6b1ca 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/StopBareMetalServerOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/StopBareMetalServerOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Subnet.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Subnet.java index 63bafe1bb0..7132e5e459 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Subnet.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Subnet.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetCollection.java index 91ac7ff96f..dbe16bf534 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentity.java index a3558b1d87..589a802946 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityByCRN.java index 83a7851d88..fcc1b708b3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityByHref.java index 5cc6bb8bb3..7317b33162 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityById.java index 15d0d9ab1d..f4cf9a4658 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPatch.java index a73ffe1356..6b1bddcf5f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPrototype.java index 7e1013b9be..13ab2857c6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPrototypeSubnetByCIDR.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPrototypeSubnetByCIDR.java index 6dd55485c6..211922c359 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPrototypeSubnetByCIDR.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPrototypeSubnetByCIDR.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPrototypeSubnetByTotalCount.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPrototypeSubnetByTotalCount.java index 66c00705d5..128e1e904a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPrototypeSubnetByTotalCount.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPrototypeSubnetByTotalCount.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatch.java index c012ead831..3106f6d3e5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchPublicGatewayIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchPublicGatewayIdentityByCRN.java index e8a634ffd7..0dc120e812 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchPublicGatewayIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchPublicGatewayIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchPublicGatewayIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchPublicGatewayIdentityByHref.java index 3f7a26ef5b..eb421e3923 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchPublicGatewayIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchPublicGatewayIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchPublicGatewayIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchPublicGatewayIdentityById.java index 3e5aa5878a..695b3f3d29 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchPublicGatewayIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchPublicGatewayIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetReference.java index 089a7f8760..c7d9030658 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetReservedIpsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetReservedIpsPager.java index 73358245ce..671af22d14 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetReservedIpsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetReservedIpsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetsPager.java index 9628d8e02d..c644b72bce 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/SubnetsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileIdentity.java index 6297d8993a..0d9564b777 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileIdentityByCRN.java index 90c0efeec0..1ae9cd9ab0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileIdentityById.java index f397ed0e0c..b0df06975b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileReference.java index f01a57a912..0b98c31506 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UnpublishPrivatePathServiceGatewayOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UnpublishPrivatePathServiceGatewayOptions.java index d30e042035..e544380e6c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UnpublishPrivatePathServiceGatewayOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UnpublishPrivatePathServiceGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UnsetSubnetPublicGatewayOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UnsetSubnetPublicGatewayOptions.java index a58d2ee54f..e983abd9fe 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UnsetSubnetPublicGatewayOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UnsetSubnetPublicGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateBackupPolicyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateBackupPolicyOptions.java index 22a5849db9..197fce9c63 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateBackupPolicyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateBackupPolicyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateBackupPolicyPlanOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateBackupPolicyPlanOptions.java index 4144eb9ff3..46ceb4873f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateBackupPolicyPlanOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateBackupPolicyPlanOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerDiskOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerDiskOptions.java index 1b801a7d43..63de06b502 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerDiskOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerDiskOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerNetworkAttachmentOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerNetworkAttachmentOptions.java index 21ea7438b3..103844b97a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerNetworkAttachmentOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerNetworkAttachmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerNetworkInterfaceOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerNetworkInterfaceOptions.java index 6987a45fdb..47a6ee7dfb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerNetworkInterfaceOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerNetworkInterfaceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerOptions.java index 58dfcb3433..e2531d0ff3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkInterfaceOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkInterfaceOptions.java index 5b3a511666..08e96aac1c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkInterfaceOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkInterfaceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkOptions.java index a6ae349be5..d46f1a83dd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkSubnetOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkSubnetOptions.java index 3175393fdd..f335300f37 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkSubnetOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkSubnetOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkSubnetReservedIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkSubnetReservedIpOptions.java index 01bddfa3d1..b0699b54fc 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkSubnetReservedIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkSubnetReservedIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateDedicatedHostDiskOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateDedicatedHostDiskOptions.java index 9e0f31904e..53d2e68fdf 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateDedicatedHostDiskOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateDedicatedHostDiskOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateDedicatedHostGroupOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateDedicatedHostGroupOptions.java index 706e5f5ba8..c9ca23833b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateDedicatedHostGroupOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateDedicatedHostGroupOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateDedicatedHostOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateDedicatedHostOptions.java index 3c81ac085b..7acd26f7db 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateDedicatedHostOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateDedicatedHostOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateEndpointGatewayOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateEndpointGatewayOptions.java index 99d51389dc..cc6d033383 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateEndpointGatewayOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateEndpointGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateFirmwareForBareMetalServerOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateFirmwareForBareMetalServerOptions.java index f4e452a264..941148006e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateFirmwareForBareMetalServerOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateFirmwareForBareMetalServerOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateFloatingIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateFloatingIpOptions.java index 4842ceb2c6..dd48586bdd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateFloatingIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateFloatingIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateFlowLogCollectorOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateFlowLogCollectorOptions.java index 064ed37689..23d71c9782 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateFlowLogCollectorOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateFlowLogCollectorOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateIkePolicyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateIkePolicyOptions.java index 9eef609067..ec92de8382 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateIkePolicyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateIkePolicyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateImageExportJobOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateImageExportJobOptions.java index 59147f0a54..6af61df208 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateImageExportJobOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateImageExportJobOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateImageOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateImageOptions.java index 0637905b87..7abafa1e56 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateImageOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateImageOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceClusterNetworkAttachmentOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceClusterNetworkAttachmentOptions.java index 35b6797b4c..7649eb15d0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceClusterNetworkAttachmentOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceClusterNetworkAttachmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceDiskOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceDiskOptions.java index 2c4c7e5f2f..3ca3627100 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceDiskOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceDiskOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupManagerActionOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupManagerActionOptions.java index 023e2cbede..e3ea8e23c0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupManagerActionOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupManagerActionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupManagerOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupManagerOptions.java index c155e777fc..16568f351c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupManagerOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupManagerOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupManagerPolicyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupManagerPolicyOptions.java index 77be730fa1..c94891713c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupManagerPolicyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupManagerPolicyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupMembershipOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupMembershipOptions.java index e798676c52..0c791592a2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupMembershipOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupMembershipOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupOptions.java index 806e632754..343997b48e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceNetworkAttachmentOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceNetworkAttachmentOptions.java index cf4649871e..700dcb9617 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceNetworkAttachmentOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceNetworkAttachmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceNetworkInterfaceOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceNetworkInterfaceOptions.java index 64f784b693..9180debe8c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceNetworkInterfaceOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceNetworkInterfaceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceOptions.java index 851ff6a5bf..8d590b55e0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceTemplateOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceTemplateOptions.java index 2aa98c44b5..7ab07ecf04 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceTemplateOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceTemplateOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceVolumeAttachmentOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceVolumeAttachmentOptions.java index 38dacc602c..f3d190931f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceVolumeAttachmentOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceVolumeAttachmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateIpsecPolicyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateIpsecPolicyOptions.java index 6f850ca9b0..d868742979 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateIpsecPolicyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateIpsecPolicyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateKeyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateKeyOptions.java index cc8ba3d9a3..abf815c349 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateKeyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateKeyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerListenerOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerListenerOptions.java index cf493b3541..e48fa1d43f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerListenerOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerListenerOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerListenerPolicyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerListenerPolicyOptions.java index 3caed174cf..9d48a02b3c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerListenerPolicyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerListenerPolicyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerListenerPolicyRuleOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerListenerPolicyRuleOptions.java index 96842868a2..ad4c0b1e99 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerListenerPolicyRuleOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerListenerPolicyRuleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerOptions.java index 2b475cb115..4cf123a65f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerPoolMemberOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerPoolMemberOptions.java index 97adf27ef8..483b1e1216 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerPoolMemberOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerPoolMemberOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerPoolOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerPoolOptions.java index c8c1a6fee7..88e0384b7d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerPoolOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerPoolOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateNetworkAclOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateNetworkAclOptions.java index 90e826c879..1b455835de 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateNetworkAclOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateNetworkAclOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateNetworkAclRuleOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateNetworkAclRuleOptions.java index 9f81aea6b1..4239e4beb5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateNetworkAclRuleOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateNetworkAclRuleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdatePlacementGroupOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdatePlacementGroupOptions.java index 24e16e4c2d..f65188885a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdatePlacementGroupOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdatePlacementGroupOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdatePrivatePathServiceGatewayAccountPolicyOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdatePrivatePathServiceGatewayAccountPolicyOptions.java index 14f22cde8c..a3170cd9d4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdatePrivatePathServiceGatewayAccountPolicyOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdatePrivatePathServiceGatewayAccountPolicyOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdatePrivatePathServiceGatewayOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdatePrivatePathServiceGatewayOptions.java index 39821ff820..f85582a40c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdatePrivatePathServiceGatewayOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdatePrivatePathServiceGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdatePublicAddressRangeOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdatePublicAddressRangeOptions.java index ca850c5915..414bbb6bdd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdatePublicAddressRangeOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdatePublicAddressRangeOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdatePublicGatewayOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdatePublicGatewayOptions.java index 52ec7b83de..00dce4d3c1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdatePublicGatewayOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdatePublicGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateReservationOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateReservationOptions.java index b69c8626ac..6876e8e18a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateReservationOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateReservationOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateSecurityGroupOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateSecurityGroupOptions.java index c74ca1febf..503389e1f0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateSecurityGroupOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateSecurityGroupOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateSecurityGroupRuleOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateSecurityGroupRuleOptions.java index efa4057c5d..2f33f17115 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateSecurityGroupRuleOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateSecurityGroupRuleOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateShareMountTargetOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateShareMountTargetOptions.java index 4b65106ac3..4427c7b1b2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateShareMountTargetOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateShareMountTargetOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateShareOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateShareOptions.java index 2b0745a440..93bfa5ab5c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateShareOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateShareOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateShareSnapshotOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateShareSnapshotOptions.java index 78b5a1b014..434aacd09c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateShareSnapshotOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateShareSnapshotOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateSnapshotConsistencyGroupOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateSnapshotConsistencyGroupOptions.java index 8a518a43ef..a232ce2f76 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateSnapshotConsistencyGroupOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateSnapshotConsistencyGroupOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateSnapshotOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateSnapshotOptions.java index f2b76006d2..426192ef3a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateSnapshotOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateSnapshotOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateSubnetOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateSubnetOptions.java index f46d121288..5ffd76d78c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateSubnetOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateSubnetOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateSubnetReservedIpOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateSubnetReservedIpOptions.java index c21c1218e6..1d765be27a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateSubnetReservedIpOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateSubnetReservedIpOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVirtualNetworkInterfaceOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVirtualNetworkInterfaceOptions.java index 6dccdd8af8..f911c76686 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVirtualNetworkInterfaceOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVirtualNetworkInterfaceOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVolumeOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVolumeOptions.java index d114ea654d..d8b90c9a10 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVolumeOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVolumeOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcAddressPrefixOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcAddressPrefixOptions.java index 786de7d788..73dc3e20ea 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcAddressPrefixOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcAddressPrefixOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcDnsResolutionBindingOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcDnsResolutionBindingOptions.java index 2b7baf27eb..affa70fabc 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcDnsResolutionBindingOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcDnsResolutionBindingOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcOptions.java index 720c75a2d5..434bbbcd04 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRouteOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRouteOptions.java index 9f8e15a1a6..e0585d5c07 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRouteOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRouteOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRouteResponse.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRouteResponse.java new file mode 100644 index 0000000000..767654d635 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRouteResponse.java @@ -0,0 +1,270 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import java.util.Date; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * UpdateVpcRouteResponse. + */ +public class UpdateVpcRouteResponse extends GenericModel { + + /** + * The action to perform with a packet matching the route: + * - `delegate`: delegate to system-provided routes + * - `delegate_vpc`: delegate to system-provided routes, ignoring Internet-bound routes + * - `deliver`: deliver the packet to the specified `next_hop` + * - `drop`: drop the packet + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + */ + public interface Action { + /** delegate. */ + String DELEGATE = "delegate"; + /** delegate_vpc. */ + String DELEGATE_VPC = "delegate_vpc"; + /** deliver. */ + String DELIVER = "deliver"; + /** drop. */ + String DROP = "drop"; + } + + /** + * The lifecycle state of the route. + */ + public interface LifecycleState { + /** deleting. */ + String DELETING = "deleting"; + /** failed. */ + String FAILED = "failed"; + /** pending. */ + String PENDING = "pending"; + /** stable. */ + String STABLE = "stable"; + /** suspended. */ + String SUSPENDED = "suspended"; + /** updating. */ + String UPDATING = "updating"; + /** waiting. */ + String WAITING = "waiting"; + } + + /** + * The origin of this route: + * - `service`: route was directly created by a service + * - `user`: route was directly created by a user + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + */ + public interface Origin { + /** service. */ + String SERVICE = "service"; + /** user. */ + String USER = "user"; + } + + protected String action; + protected Boolean advertise; + @SerializedName("created_at") + protected Date createdAt; + protected RouteCreator creator; + protected String destination; + protected String href; + protected String id; + @SerializedName("lifecycle_state") + protected String lifecycleState; + protected String name; + @SerializedName("next_hop") + protected RouteNextHop nextHop; + protected String origin; + protected Long priority; + protected ZoneReference zone; + + protected UpdateVpcRouteResponse() { } + + /** + * Gets the action. + * + * The action to perform with a packet matching the route: + * - `delegate`: delegate to system-provided routes + * - `delegate_vpc`: delegate to system-provided routes, ignoring Internet-bound routes + * - `deliver`: deliver the packet to the specified `next_hop` + * - `drop`: drop the packet + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + * + * @return the action + */ + public String getAction() { + return action; + } + + /** + * Gets the advertise. + * + * Indicates whether this route will be advertised to the ingress sources specified by the `advertise_routes_to` + * routing table property. + * + * @return the advertise + */ + public Boolean isAdvertise() { + return advertise; + } + + /** + * Gets the createdAt. + * + * The date and time that the route was created. + * + * @return the createdAt + */ + public Date getCreatedAt() { + return createdAt; + } + + /** + * Gets the creator. + * + * If present, the resource that created the route. Routes with this property present cannot + * be directly deleted. All routes with an `origin` of `service` will have this property set, + * and future `origin` values may also have this property set. + * + * @return the creator + */ + public RouteCreator getCreator() { + return creator; + } + + /** + * Gets the destination. + * + * The destination CIDR of the route. + * + * @return the destination + */ + public String getDestination() { + return destination; + } + + /** + * Gets the href. + * + * The URL for this route. + * + * @return the href + */ + public String getHref() { + return href; + } + + /** + * Gets the id. + * + * The unique identifier for this route. + * + * @return the id + */ + public String getId() { + return id; + } + + /** + * Gets the lifecycleState. + * + * The lifecycle state of the route. + * + * @return the lifecycleState + */ + public String getLifecycleState() { + return lifecycleState; + } + + /** + * Gets the name. + * + * The name for this route. The name is unique across all routes in the routing table. + * + * @return the name + */ + public String getName() { + return name; + } + + /** + * Gets the nextHop. + * + * If `action` is `deliver`, the next hop that packets will be delivered to. For + * other `action` values, its `address` will be `0.0.0.0`. + * + * @return the nextHop + */ + public RouteNextHop getNextHop() { + return nextHop; + } + + /** + * Gets the origin. + * + * The origin of this route: + * - `service`: route was directly created by a service + * - `user`: route was directly created by a user + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + * + * @return the origin + */ + public String getOrigin() { + return origin; + } + + /** + * Gets the priority. + * + * The priority of this route. Smaller values have higher priority. + * + * If a routing table contains multiple routes with the same `zone` and `destination`, the route with the highest + * priority (smallest value) is selected. If two routes have the same `destination` and `priority`, traffic is + * distributed between them. + * + * @return the priority + */ + public Long getPriority() { + return priority; + } + + /** + * Gets the zone. + * + * The zone the route applies to. + * + * If subnets are attached to the route's routing table, egress traffic from those + * subnets in this zone will be subject to this route. If this route's routing table + * has any of `route_direct_link_ingress`, `route_internet_ingress`, + * `route_transit_gateway_ingress` or `route_vpc_zone_ingress` set to`true`, traffic + * from those ingress sources arriving in this zone will be subject to this route. + * + * @return the zone + */ + public ZoneReference getZone() { + return zone; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRoutingTableOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRoutingTableOptions.java index 5aa45b5727..5f0411ccef 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRoutingTableOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRoutingTableOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRoutingTableRouteOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRoutingTableRouteOptions.java index b9fda7bad5..910ebae882 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRoutingTableRouteOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRoutingTableRouteOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnGatewayConnectionOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnGatewayConnectionOptions.java index e97abeb092..71ac267e0e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnGatewayConnectionOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnGatewayConnectionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -25,6 +25,7 @@ public class UpdateVpnGatewayConnectionOptions extends GenericModel { protected String vpnGatewayId; protected String id; protected Map vpnGatewayConnectionPatch; + protected String ifMatch; /** * Builder. @@ -33,6 +34,7 @@ public static class Builder { private String vpnGatewayId; private String id; private Map vpnGatewayConnectionPatch; + private String ifMatch; /** * Instantiates a new Builder from an existing UpdateVpnGatewayConnectionOptions instance. @@ -43,6 +45,7 @@ private Builder(UpdateVpnGatewayConnectionOptions updateVpnGatewayConnectionOpti this.vpnGatewayId = updateVpnGatewayConnectionOptions.vpnGatewayId; this.id = updateVpnGatewayConnectionOptions.id; this.vpnGatewayConnectionPatch = updateVpnGatewayConnectionOptions.vpnGatewayConnectionPatch; + this.ifMatch = updateVpnGatewayConnectionOptions.ifMatch; } /** @@ -105,6 +108,17 @@ public Builder vpnGatewayConnectionPatch(Map vpnGatewayConnectio this.vpnGatewayConnectionPatch = vpnGatewayConnectionPatch; return this; } + + /** + * Set the ifMatch. + * + * @param ifMatch the ifMatch + * @return the UpdateVpnGatewayConnectionOptions builder + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } } protected UpdateVpnGatewayConnectionOptions() { } @@ -119,6 +133,7 @@ protected UpdateVpnGatewayConnectionOptions(Builder builder) { vpnGatewayId = builder.vpnGatewayId; id = builder.id; vpnGatewayConnectionPatch = builder.vpnGatewayConnectionPatch; + ifMatch = builder.ifMatch; } /** @@ -162,5 +177,17 @@ public String id() { public Map vpnGatewayConnectionPatch() { return vpnGatewayConnectionPatch; } + + /** + * Gets the ifMatch. + * + * If present, the request will fail if the specified ETag value does not match the resource's current ETag value. + * Required if the request body includes an array. + * + * @return the ifMatch + */ + public String ifMatch() { + return ifMatch; + } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnGatewayOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnGatewayOptions.java index b251502e44..ff17a3e102 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnGatewayOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnGatewayOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnServerOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnServerOptions.java index 24393154b8..dbc7a266e8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnServerOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnServerOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnServerRouteOptions.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnServerRouteOptions.java index 3adb7e48b0..4072bdbbe8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnServerRouteOptions.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnServerRouteOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VCPU.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VCPU.java index d29cb47424..664cc7d63e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VCPU.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VCPU.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPC.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPC.java index be7b19040d..f180377f90 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPC.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPC.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -104,8 +104,7 @@ protected VPC() { } * Gets the classicAccess. * * Indicates whether this VPC is connected to Classic Infrastructure. If true, this VPC's resources have private - * network connectivity to the account's Classic Infrastructure resources. Only one VPC, per region, may be connected - * in this way. This value is set at creation and subsequently immutable. + * network connectivity to the account's Classic Infrastructure resources. * * @return the classicAccess */ diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCCSESourceIP.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCCSESourceIP.java index 06bf300cb5..71846f3456 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCCSESourceIP.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCCSESourceIP.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCCollection.java index 3d74935de6..12dd8bdec8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNS.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNS.java index 399f1bb579..90c62d8400 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNS.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNS.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSPatch.java index 30c365a446..adf8974512 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSPrototype.java index 5c844ff077..b3b5d666e3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBinding.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBinding.java index 04a7ed95c4..95e07e39d5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBinding.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBinding.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingCollection.java index e08f474c6e..e970f4c208 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingHealthReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingHealthReason.java index 1c492a4b37..70abed1f07 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingHealthReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingHealthReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingPatch.java index cd8ba32044..d627eb4ffe 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolver.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolver.java index 4d7be741dd..5bb5ce708c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolver.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolver.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPatch.java index 68b16fba48..0229e3ffce 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPrototype.java index db26b34210..a1ef2ead6c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype.java index 698d9af4ce..6ce14ba719 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype.java index 46676947b4..c3de42fa2d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTypeDelegated.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTypeDelegated.java index 58df1891d4..6d7eb594a7 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTypeDelegated.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTypeDelegated.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTypeManual.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTypeManual.java index a43170a663..0fbb5cc57d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTypeManual.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTypeManual.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTypeSystem.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTypeSystem.java index bc618c157b..4ef679ca19 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTypeSystem.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTypeSystem.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatch.java index 9e5daeea91..0b6be06e6a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchVPCIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchVPCIdentityByCRN.java index aee7ad544d..b28ec83664 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchVPCIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchVPCIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchVPCIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchVPCIdentityByHref.java index 7130161b8e..c034d67b59 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchVPCIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchVPCIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchVPCIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchVPCIdentityById.java index b1da55841e..a742d689b4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchVPCIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchVPCIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCHealthReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCHealthReason.java index b47f71da54..4e29b6a0d9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCHealthReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCHealthReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentity.java index 347f488b50..86d2899c68 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityByCRN.java index affb4e7a7f..f7f3c529d4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityByHref.java index 760b5879ce..fa1e9d38d3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityById.java index 1ed3281aeb..06ab403a70 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCPatch.java index 14b6cb0c50..8217d00482 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCReference.java index cbc28da1f9..7b7fb1d9c4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCReferenceDNSResolverContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCReferenceDNSResolverContext.java index c488e1e08e..3271b47ddd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCReferenceDNSResolverContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCReferenceDNSResolverContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCReferenceRemote.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCReferenceRemote.java index 2d92cb3c52..855998c71b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCReferenceRemote.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCReferenceRemote.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCRemote.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCRemote.java index 084492cc72..4490f89497 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCRemote.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPCRemote.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGateway.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGateway.java index 174cebb58a..3f54317f2a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGateway.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGateway.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -107,6 +107,10 @@ public interface Mode { protected SubnetReference subnet; protected VPCReference vpc; protected String mode; + @SerializedName("advertised_cidrs") + protected List advertisedCidrs; + @SerializedName("local_asn") + protected Long localAsn; protected VPNGateway() { } @@ -289,5 +293,28 @@ public VPCReference getVpc() { public String getMode() { return mode; } + + /** + * Gets the advertisedCidrs. + * + * The static CIDRs advertised through any enabled routing protocol (for example, BGP). The routing protocol will + * advertise routes with these CIDRs as route destinations. + * + * @return the advertisedCidrs + */ + public List getAdvertisedCidrs() { + return advertisedCidrs; + } + + /** + * Gets the localAsn. + * + * The local autonomous system number (ASN) for this VPN gateway and its connections. + * + * @return the localAsn + */ + public Long getLocalAsn() { + return localAsn; + } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayAdvertisedCIDRCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayAdvertisedCIDRCollection.java new file mode 100644 index 0000000000..38a42c9de2 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayAdvertisedCIDRCollection.java @@ -0,0 +1,43 @@ +/* + * (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.is.vpc.v1.model; + +import java.util.List; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * VPNGatewayAdvertisedCIDRCollection. + */ +public class VPNGatewayAdvertisedCIDRCollection extends GenericModel { + + @SerializedName("advertised_cidrs") + protected List advertisedCidrs; + + protected VPNGatewayAdvertisedCIDRCollection() { } + + /** + * Gets the advertisedCidrs. + * + * The static CIDRs advertised through any enabled routing protocol (for example, BGP). The routing protocol will + * advertise routes with these CIDRs as route destinations. + * + * @return the advertisedCidrs + */ + public List getAdvertisedCidrs() { + return advertisedCidrs; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayCollection.java index 8025f7aaa4..8e6ea78d12 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnection.java index c3a2eed02d..03dad7162a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionCIDRs.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionCIDRs.java index e5dbada752..4560d08d4b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionCIDRs.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionCIDRs.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionCollection.java index 998e4214ff..4dc0b6427c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDPD.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDPD.java index 63d1985a7b..08120445c4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDPD.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDPD.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDPDPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDPDPatch.java index 9202d3b815..359b7ed20b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDPDPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDPDPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDPDPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDPDPrototype.java index 01ea27c437..26aa14e60e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDPDPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDPDPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModeLocal.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModeLocal.java new file mode 100644 index 0000000000..0894f5d4a7 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModeLocal.java @@ -0,0 +1,45 @@ +/* + * (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.is.vpc.v1.model; + +import java.util.List; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * VPNGatewayConnectionDynamicRouteModeLocal. + */ +public class VPNGatewayConnectionDynamicRouteModeLocal extends GenericModel { + + @SerializedName("ike_identities") + protected List ikeIdentities; + + protected VPNGatewayConnectionDynamicRouteModeLocal() { } + + /** + * Gets the ikeIdentities. + * + * The local IKE identities. + * + * A VPN gateway in dynamic route mode consists of two members in active-active mode. The first identity applies to + * the first member, and the second identity applies to the second member. + * + * @return the ikeIdentities + */ + public List getIkeIdentities() { + return ikeIdentities; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModeLocalPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModeLocalPrototype.java new file mode 100644 index 0000000000..8cccf54c49 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModeLocalPrototype.java @@ -0,0 +1,121 @@ +/* + * (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.is.vpc.v1.model; + +import java.util.ArrayList; +import java.util.List; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * VPNGatewayConnectionDynamicRouteModeLocalPrototype. + */ +public class VPNGatewayConnectionDynamicRouteModeLocalPrototype extends GenericModel { + + @SerializedName("ike_identities") + protected List ikeIdentities; + + /** + * Builder. + */ + public static class Builder { + private List ikeIdentities; + + /** + * Instantiates a new Builder from an existing VPNGatewayConnectionDynamicRouteModeLocalPrototype instance. + * + * @param vpnGatewayConnectionDynamicRouteModeLocalPrototype the instance to initialize the Builder with + */ + private Builder(VPNGatewayConnectionDynamicRouteModeLocalPrototype vpnGatewayConnectionDynamicRouteModeLocalPrototype) { + this.ikeIdentities = vpnGatewayConnectionDynamicRouteModeLocalPrototype.ikeIdentities; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Builds a VPNGatewayConnectionDynamicRouteModeLocalPrototype. + * + * @return the new VPNGatewayConnectionDynamicRouteModeLocalPrototype instance + */ + public VPNGatewayConnectionDynamicRouteModeLocalPrototype build() { + return new VPNGatewayConnectionDynamicRouteModeLocalPrototype(this); + } + + /** + * Adds a new element to ikeIdentities. + * + * @param ikeIdentities the new element to be added + * @return the VPNGatewayConnectionDynamicRouteModeLocalPrototype builder + */ + public Builder addIkeIdentities(VPNGatewayConnectionIKEIdentityPrototype ikeIdentities) { + com.ibm.cloud.sdk.core.util.Validator.notNull(ikeIdentities, + "ikeIdentities cannot be null"); + if (this.ikeIdentities == null) { + this.ikeIdentities = new ArrayList(); + } + this.ikeIdentities.add(ikeIdentities); + return this; + } + + /** + * Set the ikeIdentities. + * Existing ikeIdentities will be replaced. + * + * @param ikeIdentities the ikeIdentities + * @return the VPNGatewayConnectionDynamicRouteModeLocalPrototype builder + */ + public Builder ikeIdentities(List ikeIdentities) { + this.ikeIdentities = ikeIdentities; + return this; + } + } + + protected VPNGatewayConnectionDynamicRouteModeLocalPrototype() { } + + protected VPNGatewayConnectionDynamicRouteModeLocalPrototype(Builder builder) { + ikeIdentities = builder.ikeIdentities; + } + + /** + * New builder. + * + * @return a VPNGatewayConnectionDynamicRouteModeLocalPrototype builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the ikeIdentities. + * + * The local IKE identities to use. + * + * A VPN gateway in dynamic route mode consists of two members in active-active mode. The first specified identity + * will be applied to the first member, and the second specified identity will be applied to the second member. + * + * If unspecified, then `type` will be `ipv4_address` and `value` will be the public IP address of the member's VPN + * connection tunnel. + * + * @return the ikeIdentities + */ + public List ikeIdentities() { + return ikeIdentities; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeer.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeer.java new file mode 100644 index 0000000000..ac32e2db5d --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeer.java @@ -0,0 +1,102 @@ +/* + * (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.is.vpc.v1.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * VPNGatewayConnectionDynamicRouteModePeer. + * + * Classes which extend this class: + * - VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddress + * - VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFQDN + */ +public class VPNGatewayConnectionDynamicRouteModePeer extends GenericModel { + + /** + * Indicates whether `peer.address` or `peer.fqdn` is used. + */ + public interface Type { + /** address. */ + String ADDRESS = "address"; + /** fqdn. */ + String FQDN = "fqdn"; + } + + protected Long asn; + @SerializedName("ike_identity") + protected VPNGatewayConnectionIKEIdentity ikeIdentity; + protected String type; + protected String address; + protected String fqdn; + + protected VPNGatewayConnectionDynamicRouteModePeer() { } + + /** + * Gets the asn. + * + * The peer autonomous system number (ASN) for this VPN gateway connection. + * + * @return the asn + */ + public Long getAsn() { + return asn; + } + + /** + * Gets the ikeIdentity. + * + * The peer IKE identity. + * + * @return the ikeIdentity + */ + public VPNGatewayConnectionIKEIdentity getIkeIdentity() { + return ikeIdentity; + } + + /** + * Gets the type. + * + * Indicates whether `peer.address` or `peer.fqdn` is used. + * + * @return the type + */ + public String getType() { + return type; + } + + /** + * Gets the address. + * + * The IP address of the peer VPN gateway for this connection. + * + * @return the address + */ + public String getAddress() { + return address; + } + + /** + * Gets the fqdn. + * + * The FQDN of the peer VPN gateway for this connection. + * + * @return the fqdn + */ + public String getFqdn() { + return fqdn; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerPrototype.java new file mode 100644 index 0000000000..e96afb7f21 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerPrototype.java @@ -0,0 +1,89 @@ +/* + * (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.is.vpc.v1.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * VPNGatewayConnectionDynamicRouteModePeerPrototype. + * + * Classes which extend this class: + * - VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress + * - VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN + */ +public class VPNGatewayConnectionDynamicRouteModePeerPrototype extends GenericModel { + + protected Long asn; + @SerializedName("ike_identity") + protected VPNGatewayConnectionIKEIdentityPrototype ikeIdentity; + protected String address; + protected String fqdn; + + protected VPNGatewayConnectionDynamicRouteModePeerPrototype() { } + + /** + * Gets the asn. + * + * The peer autonomous system number (ASN) for this VPN gateway connection. The ASN values in the + * [restricted ASN list]( + * https://cloud.ibm.com/docs/vpc?topic=vpc-planning-considerations-vpn#dynamic-route-based-considerations) are + * reserved and unavailable. + * + * @return the asn + */ + public Long asn() { + return asn; + } + + /** + * Gets the ikeIdentity. + * + * The peer IKE identity to use. + * + * If unspecified: + * - If `peer.address` is specified, the `type` will be `ipv4_address`, and + * the `value` will be `peer.address`. + * - If `peer.fqdn` is specified, the `type` will be `fqdn`, and the `value` + * will be `peer.fqdn`. + * + * @return the ikeIdentity + */ + public VPNGatewayConnectionIKEIdentityPrototype ikeIdentity() { + return ikeIdentity; + } + + /** + * Gets the address. + * + * The IP address of the peer VPN gateway for this connection. + * + * @return the address + */ + public String address() { + return address; + } + + /** + * Gets the fqdn. + * + * The FQDN of the peer VPN gateway for this connection. + * + * @return the fqdn + */ + public String fqdn() { + return fqdn; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress.java new file mode 100644 index 0000000000..af70a3540d --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress.java @@ -0,0 +1,122 @@ +/* + * (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.is.vpc.v1.model; + +/** + * VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress. + */ +public class VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress extends VPNGatewayConnectionDynamicRouteModePeerPrototype { + + + /** + * Builder. + */ + public static class Builder { + private Long asn; + private VPNGatewayConnectionIKEIdentityPrototype ikeIdentity; + private String address; + + /** + * Instantiates a new Builder from an existing VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress instance. + * + * @param vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByAddress the instance to initialize the Builder with + */ + public Builder(VPNGatewayConnectionDynamicRouteModePeerPrototype vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByAddress) { + this.asn = vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByAddress.asn; + this.ikeIdentity = vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByAddress.ikeIdentity; + this.address = vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByAddress.address; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Instantiates a new builder with required properties. + * + * @param asn the asn + * @param address the address + */ + public Builder(Long asn, String address) { + this.asn = asn; + this.address = address; + } + + /** + * Builds a VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress. + * + * @return the new VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress instance + */ + public VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress build() { + return new VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress(this); + } + + /** + * Set the asn. + * + * @param asn the asn + * @return the VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress builder + */ + public Builder asn(long asn) { + this.asn = asn; + return this; + } + + /** + * Set the ikeIdentity. + * + * @param ikeIdentity the ikeIdentity + * @return the VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress builder + */ + public Builder ikeIdentity(VPNGatewayConnectionIKEIdentityPrototype ikeIdentity) { + this.ikeIdentity = ikeIdentity; + return this; + } + + /** + * Set the address. + * + * @param address the address + * @return the VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress builder + */ + public Builder address(String address) { + this.address = address; + return this; + } + } + + protected VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress() { } + + protected VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.asn, + "asn cannot be null"); + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.address, + "address cannot be null"); + asn = builder.asn; + ikeIdentity = builder.ikeIdentity; + address = builder.address; + } + + /** + * New builder. + * + * @return a VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress builder + */ + public Builder newBuilder() { + return new Builder(this); + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN.java new file mode 100644 index 0000000000..b251c41c1b --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN.java @@ -0,0 +1,122 @@ +/* + * (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.is.vpc.v1.model; + +/** + * VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN. + */ +public class VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN extends VPNGatewayConnectionDynamicRouteModePeerPrototype { + + + /** + * Builder. + */ + public static class Builder { + private Long asn; + private VPNGatewayConnectionIKEIdentityPrototype ikeIdentity; + private String fqdn; + + /** + * Instantiates a new Builder from an existing VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN instance. + * + * @param vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByFqdn the instance to initialize the Builder with + */ + public Builder(VPNGatewayConnectionDynamicRouteModePeerPrototype vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByFqdn) { + this.asn = vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByFqdn.asn; + this.ikeIdentity = vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByFqdn.ikeIdentity; + this.fqdn = vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByFqdn.fqdn; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Instantiates a new builder with required properties. + * + * @param asn the asn + * @param fqdn the fqdn + */ + public Builder(Long asn, String fqdn) { + this.asn = asn; + this.fqdn = fqdn; + } + + /** + * Builds a VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN. + * + * @return the new VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN instance + */ + public VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN build() { + return new VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN(this); + } + + /** + * Set the asn. + * + * @param asn the asn + * @return the VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN builder + */ + public Builder asn(long asn) { + this.asn = asn; + return this; + } + + /** + * Set the ikeIdentity. + * + * @param ikeIdentity the ikeIdentity + * @return the VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN builder + */ + public Builder ikeIdentity(VPNGatewayConnectionIKEIdentityPrototype ikeIdentity) { + this.ikeIdentity = ikeIdentity; + return this; + } + + /** + * Set the fqdn. + * + * @param fqdn the fqdn + * @return the VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN builder + */ + public Builder fqdn(String fqdn) { + this.fqdn = fqdn; + return this; + } + } + + protected VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN() { } + + protected VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.asn, + "asn cannot be null"); + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.fqdn, + "fqdn cannot be null"); + asn = builder.asn; + ikeIdentity = builder.ikeIdentity; + fqdn = builder.fqdn; + } + + /** + * New builder. + * + * @return a VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN builder + */ + public Builder newBuilder() { + return new Builder(this); + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddress.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddress.java new file mode 100644 index 0000000000..5a0b62edaf --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddress.java @@ -0,0 +1,34 @@ +/* + * (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.is.vpc.v1.model; + +/** + * VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddress. + */ +public class VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddress extends VPNGatewayConnectionDynamicRouteModePeer { + + /** + * Indicates whether `peer.address` or `peer.fqdn` is used. + */ + public interface Type { + /** address. */ + String ADDRESS = "address"; + /** fqdn. */ + String FQDN = "fqdn"; + } + + + protected VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddress() { } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFQDN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFQDN.java new file mode 100644 index 0000000000..7ee1ffe8fc --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFQDN.java @@ -0,0 +1,34 @@ +/* + * (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.is.vpc.v1.model; + +/** + * VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFQDN. + */ +public class VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFQDN extends VPNGatewayConnectionDynamicRouteModePeer { + + /** + * Indicates whether `peer.address` or `peer.fqdn` is used. + */ + public interface Type { + /** address. */ + String ADDRESS = "address"; + /** fqdn. */ + String FQDN = "fqdn"; + } + + + protected VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFQDN() { } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModeTunnel.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModeTunnel.java new file mode 100644 index 0000000000..520811cff8 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModeTunnel.java @@ -0,0 +1,146 @@ +/* + * (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.is.vpc.v1.model; + +import java.util.List; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * VPNGatewayConnectionDynamicRouteModeTunnel. + */ +public class VPNGatewayConnectionDynamicRouteModeTunnel extends GenericModel { + + /** + * BGP routing protocol state as defined in + * [RFC 4721](https://www.rfc-editor.org/rfc/rfc4271#section-8.2.2). + */ + public interface ProtocolState { + /** active. */ + String ACTIVE = "active"; + /** connect. */ + String CONNECT = "connect"; + /** established. */ + String ESTABLISHED = "established"; + /** idle. */ + String IDLE = "idle"; + /** open_confirm. */ + String OPEN_CONFIRM = "open_confirm"; + /** open_sent. */ + String OPEN_SENT = "open_sent"; + } + + /** + * The status of the VPN Tunnel. + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + */ + public interface Status { + /** down. */ + String DOWN = "down"; + /** up. */ + String UP = "up"; + } + + @SerializedName("neighbor_ip") + protected IP neighborIp; + @SerializedName("protocol_state") + protected String protocolState; + @SerializedName("public_ip") + protected IP publicIp; + protected String status; + @SerializedName("status_reasons") + protected List statusReasons; + @SerializedName("tunnel_interface_ip") + protected IP tunnelInterfaceIp; + + protected VPNGatewayConnectionDynamicRouteModeTunnel() { } + + /** + * Gets the neighborIp. + * + * The IP address of the neighbor on the virtual tunnel interface. + * This serves as the destination address for BGP peering sessions on the peer gateway + * within the tunnel. + * + * @return the neighborIp + */ + public IP getNeighborIp() { + return neighborIp; + } + + /** + * Gets the protocolState. + * + * BGP routing protocol state as defined in + * [RFC 4721](https://www.rfc-editor.org/rfc/rfc4271#section-8.2.2). + * + * @return the protocolState + */ + public String getProtocolState() { + return protocolState; + } + + /** + * Gets the publicIp. + * + * The IP address of the VPN gateway member in which the tunnel resides. + * + * @return the publicIp + */ + public IP getPublicIp() { + return publicIp; + } + + /** + * Gets the status. + * + * The status of the VPN Tunnel. + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + * + * @return the status + */ + public String getStatus() { + return status; + } + + /** + * Gets the statusReasons. + * + * The reasons for the current status (if any). + * + * @return the statusReasons + */ + public List getStatusReasons() { + return statusReasons; + } + + /** + * Gets the tunnelInterfaceIp. + * + * The IP address assigned to the VPN gateway's virtual tunnel interface. + * This serves as the source address for BGP peering sessions initiated from the VPN + * gateway towards the peer gateway within the tunnel. + * + * @return the tunnelInterfaceIp + */ + public IP getTunnelInterfaceIp() { + return tunnelInterfaceIp; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentity.java index 14430fe5ef..a1a65a5202 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototype.java index 6f75589817..df1e16b97d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN.java index 521822b3c9..fe4c2f8649 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname.java index a28ea6645c..a889353182 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4.java index 2acad32bad..2c2cda9bb5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID.java index 5be859ca3e..8b1a776f95 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN.java index a014e9ea5a..3a44ebf1ef 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname.java index 943d6d47dc..b9aefb0c23 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4.java index 6f1bc6cb4a..929aac3465 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID.java index bbdd0da19b..a3db76a470 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPatch.java index 9775addb40..97bccefa02 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref.java index 3edb2e3446..06e9ecb6e9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById.java index ad430a38e0..e6a8804f70 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPrototype.java index 02fff8424a..eb40a6bf33 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref.java index 309ce51d70..84e242e62b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById.java index 0a7c93f25f..c0f3e07970 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPatch.java index 57a79cc3e0..163a47597c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref.java index 193f0fd200..d668530725 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById.java index 63fd52290f..ee12670b09 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPrototype.java index ecaefbd74a..6fabef0008 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref.java index a14628b867..e5d99a81e6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById.java index 80093f3303..ef226d6c81 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPatch.java index 80f3701270..ca8a1618ce 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -13,6 +13,8 @@ package com.ibm.cloud.is.vpc.v1.model; +import java.util.ArrayList; +import java.util.List; import java.util.Map; import com.google.gson.annotations.SerializedName; @@ -40,6 +42,19 @@ public interface EstablishMode { String PEER_ONLY = "peer_only"; } + /** + * The routing protocol for this VPN gateway connection. For this property to be specified, `mode` must be `route`. + * + * - `none`: No routing protocol will be used. + * - `bgp`: The BGP routing protocol will be used. + */ + public interface RoutingProtocol { + /** bgp. */ + String BGP = "bgp"; + /** none. */ + String NONE = "none"; + } + @SerializedName("admin_state_up") protected Boolean adminStateUp; @SerializedName("dead_peer_detection") @@ -55,6 +70,9 @@ public interface EstablishMode { protected String name; protected VPNGatewayConnectionPeerPatch peer; protected String psk; + @SerializedName("routing_protocol") + protected String routingProtocol; + protected List tunnels; /** * Builder. @@ -69,6 +87,8 @@ public static class Builder { private String name; private VPNGatewayConnectionPeerPatch peer; private String psk; + private String routingProtocol; + private List tunnels; /** * Instantiates a new Builder from an existing VPNGatewayConnectionPatch instance. @@ -85,6 +105,8 @@ private Builder(VPNGatewayConnectionPatch vpnGatewayConnectionPatch) { this.name = vpnGatewayConnectionPatch.name; this.peer = vpnGatewayConnectionPatch.peer; this.psk = vpnGatewayConnectionPatch.psk; + this.routingProtocol = vpnGatewayConnectionPatch.routingProtocol; + this.tunnels = vpnGatewayConnectionPatch.tunnels; } /** @@ -102,6 +124,22 @@ public VPNGatewayConnectionPatch build() { return new VPNGatewayConnectionPatch(this); } + /** + * Adds a new element to tunnels. + * + * @param tunnels the new element to be added + * @return the VPNGatewayConnectionPatch builder + */ + public Builder addTunnels(VPNGatewayConnectionTunnel tunnels) { + com.ibm.cloud.sdk.core.util.Validator.notNull(tunnels, + "tunnels cannot be null"); + if (this.tunnels == null) { + this.tunnels = new ArrayList(); + } + this.tunnels.add(tunnels); + return this; + } + /** * Set the adminStateUp. * @@ -200,6 +238,29 @@ public Builder psk(String psk) { this.psk = psk; return this; } + + /** + * Set the routingProtocol. + * + * @param routingProtocol the routingProtocol + * @return the VPNGatewayConnectionPatch builder + */ + public Builder routingProtocol(String routingProtocol) { + this.routingProtocol = routingProtocol; + return this; + } + + /** + * Set the tunnels. + * Existing tunnels will be replaced. + * + * @param tunnels the tunnels + * @return the VPNGatewayConnectionPatch builder + */ + public Builder tunnels(List tunnels) { + this.tunnels = tunnels; + return this; + } } protected VPNGatewayConnectionPatch() { } @@ -214,6 +275,8 @@ protected VPNGatewayConnectionPatch(Builder builder) { name = builder.name; peer = builder.peer; psk = builder.psk; + routingProtocol = builder.routingProtocol; + tunnels = builder.tunnels; } /** @@ -336,6 +399,32 @@ public String psk() { return psk; } + /** + * Gets the routingProtocol. + * + * The routing protocol for this VPN gateway connection. For this property to be specified, `mode` must be `route`. + * + * - `none`: No routing protocol will be used. + * - `bgp`: The BGP routing protocol will be used. + * + * @return the routingProtocol + */ + public String routingProtocol() { + return routingProtocol; + } + + /** + * Gets the tunnels. + * + * The VPN tunnel configuration to use for this VPN gateway connection + * (in dynamic route mode). + * + * @return the tunnels + */ + public List tunnels() { + return tunnels; + } + /** * Construct a JSON merge-patch from the VPNGatewayConnectionPatch. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatch.java index 5af1b6ec22..84c570ba60 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -21,11 +21,13 @@ * Classes which extend this class: * - VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch * - VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch + * - VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch */ public class VPNGatewayConnectionPeerPatch extends GenericModel { protected String address; protected String fqdn; + protected Long asn; protected VPNGatewayConnectionPeerPatch() { } @@ -50,5 +52,19 @@ public String address() { public String fqdn() { return fqdn; } + + /** + * Gets the asn. + * + * The peer autonomous system number (ASN) for this VPN gateway connection. The ASN values in the + * [restricted ASN list]( + * https://cloud.ibm.com/docs/vpc?topic=vpc-planning-considerations-vpn#dynamic-route-based-considerations) are + * reserved and unavailable. + * + * @return the asn + */ + public Long asn() { + return asn; + } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch.java new file mode 100644 index 0000000000..c89c26b888 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch.java @@ -0,0 +1,29 @@ +/* + * (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.is.vpc.v1.model; + +/** + * The peer VPN gateway for this connection. If `peer.type` is `ipv4_address`, only `peer.address` may be specified. If + * `peer.type` is fqdn, only `peer.fqdn` may be specified. + * + * Classes which extend this class: + * - VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch + * - VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch + */ +public class VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch extends VPNGatewayConnectionPeerPatch { + + + protected VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch() { } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch.java new file mode 100644 index 0000000000..a4b658edea --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch.java @@ -0,0 +1,93 @@ +/* + * (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.is.vpc.v1.model; + +/** + * VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch. + */ +public class VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch extends VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch { + + + /** + * Builder. + */ + public static class Builder { + private Long asn; + private String address; + + /** + * Instantiates a new Builder from an existing VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch instance. + * + * @param vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionPeerAddressPatch the instance to initialize the Builder with + */ + public Builder(VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionPeerAddressPatch) { + this.asn = vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionPeerAddressPatch.asn; + this.address = vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionPeerAddressPatch.address; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Builds a VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch. + * + * @return the new VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch instance + */ + public VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch build() { + return new VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch(this); + } + + /** + * Set the asn. + * + * @param asn the asn + * @return the VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch builder + */ + public Builder asn(long asn) { + this.asn = asn; + return this; + } + + /** + * Set the address. + * + * @param address the address + * @return the VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch builder + */ + public Builder address(String address) { + this.address = address; + return this; + } + } + + protected VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch() { } + + protected VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch(Builder builder) { + asn = builder.asn; + address = builder.address; + } + + /** + * New builder. + * + * @return a VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch builder + */ + public Builder newBuilder() { + return new Builder(this); + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch.java new file mode 100644 index 0000000000..4fe5a50b57 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch.java @@ -0,0 +1,93 @@ +/* + * (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.is.vpc.v1.model; + +/** + * VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch. + */ +public class VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch extends VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch { + + + /** + * Builder. + */ + public static class Builder { + private Long asn; + private String fqdn; + + /** + * Instantiates a new Builder from an existing VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch instance. + * + * @param vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionPeerFqdnPatch the instance to initialize the Builder with + */ + public Builder(VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionPeerFqdnPatch) { + this.asn = vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionPeerFqdnPatch.asn; + this.fqdn = vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionPeerFqdnPatch.fqdn; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Builds a VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch. + * + * @return the new VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch instance + */ + public VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch build() { + return new VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch(this); + } + + /** + * Set the asn. + * + * @param asn the asn + * @return the VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch builder + */ + public Builder asn(long asn) { + this.asn = asn; + return this; + } + + /** + * Set the fqdn. + * + * @param fqdn the fqdn + * @return the VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch builder + */ + public Builder fqdn(String fqdn) { + this.fqdn = fqdn; + return this; + } + } + + protected VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch() { } + + protected VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch(Builder builder) { + asn = builder.asn; + fqdn = builder.fqdn; + } + + /** + * New builder. + * + * @return a VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch builder + */ + public Builder newBuilder() { + return new Builder(this); + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch.java index 09ad1c633d..1c9e7c50e3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch.java index 029b5a313a..a114c6b7fd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch.java index a50e4c7dc3..88575a325b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch.java index f1b016ac94..45d5525da9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch.java index f0d121b7ff..1576f00785 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch.java index fc4da80c73..86ac36c7f3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyMode.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyMode.java index 4572d7bddd..b2802a107c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyMode.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyMode.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModeLocal.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModeLocal.java index 1928890eb0..7cc0be831c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModeLocal.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModeLocal.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModeLocalPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModeLocalPrototype.java index ec2bbe6e43..920cc3493c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModeLocalPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModeLocalPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -16,10 +16,17 @@ import java.util.ArrayList; import java.util.List; +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + /** * VPNGatewayConnectionPolicyModeLocalPrototype. */ -public class VPNGatewayConnectionPolicyModeLocalPrototype extends VPNGatewayConnectionLocalPrototype { +public class VPNGatewayConnectionPolicyModeLocalPrototype extends GenericModel { + + protected List cidrs; + @SerializedName("ike_identities") + protected List ikeIdentities; /** * Builder. diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeer.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeer.java index 3e63f11584..686c597ece 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeer.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeer.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerPrototype.java index 00520d3736..290f6c759a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -15,6 +15,9 @@ import java.util.List; +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + /** * VPNGatewayConnectionPolicyModePeerPrototype. * @@ -22,7 +25,13 @@ * - VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress * - VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN */ -public class VPNGatewayConnectionPolicyModePeerPrototype extends VPNGatewayConnectionPeerPrototype { +public class VPNGatewayConnectionPolicyModePeerPrototype extends GenericModel { + + protected List cidrs; + @SerializedName("ike_identity") + protected VPNGatewayConnectionIKEIdentityPrototype ikeIdentity; + protected String address; + protected String fqdn; protected VPNGatewayConnectionPolicyModePeerPrototype() { } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress.java index ac614a0ec2..b12988732f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN.java index 6e9914ae57..364c545a29 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress.java index b46b8ffc3e..5af6e2f9a4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN.java index 25dd7950de..6685a39adf 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototype.java index 785a788819..9a340d5668 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -13,6 +13,8 @@ package com.ibm.cloud.is.vpc.v1.model; +import java.util.List; + import com.google.gson.annotations.SerializedName; import com.ibm.cloud.sdk.core.service.model.GenericModel; @@ -21,6 +23,7 @@ * * Classes which extend this class: * - VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype + * - VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype * - VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype */ public class VPNGatewayConnectionPrototype extends GenericModel { @@ -61,12 +64,13 @@ public interface RoutingProtocol { protected VPNGatewayConnectionIPsecPolicyPrototype ipsecPolicy; protected String name; protected String psk; - protected VPNGatewayConnectionLocalPrototype local; - protected VPNGatewayConnectionPeerPrototype peer; @SerializedName("distribute_traffic") protected Boolean distributeTraffic; + protected VPNGatewayConnectionStaticRouteModeLocalPrototype local; + protected VPNGatewayConnectionStaticRouteModePeerPrototype peer; @SerializedName("routing_protocol") protected String routingProtocol; + protected List tunnels; protected VPNGatewayConnectionPrototype() { } @@ -176,7 +180,7 @@ public Boolean distributeTraffic() { * * @return the local */ - public VPNGatewayConnectionLocalPrototype local() { + public VPNGatewayConnectionStaticRouteModeLocalPrototype local() { return local; } @@ -185,7 +189,7 @@ public VPNGatewayConnectionLocalPrototype local() { * * @return the peer */ - public VPNGatewayConnectionPeerPrototype peer() { + public VPNGatewayConnectionStaticRouteModePeerPrototype peer() { return peer; } @@ -199,5 +203,17 @@ public VPNGatewayConnectionPeerPrototype peer() { public String routingProtocol() { return routingProtocol; } + + /** + * Gets the tunnels. + * + * The VPN tunnel configuration to use for this VPN gateway connection + * (in dynamic route mode). + * + * @return the tunnels + */ + public List tunnels() { + return tunnels; + } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype.java new file mode 100644 index 0000000000..3f7fdec6bd --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype.java @@ -0,0 +1,300 @@ +/* + * (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.is.vpc.v1.model; + +import java.util.ArrayList; +import java.util.List; + +/** + * VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype. + */ +public class VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype extends VPNGatewayConnectionPrototype { + + /** + * The establish mode of the VPN gateway connection: + * - `bidirectional`: Either side of the VPN gateway can initiate IKE protocol + * negotiations or rekeying processes. + * - `peer_only`: Only the peer can initiate IKE protocol negotiations for this VPN gateway + * connection. Additionally, the peer is responsible for initiating the rekeying process + * after the connection is established. If rekeying does not occur, the VPN gateway + * connection will be brought down after its lifetime expires. + */ + public interface EstablishMode { + /** bidirectional. */ + String BIDIRECTIONAL = "bidirectional"; + /** peer_only. */ + String PEER_ONLY = "peer_only"; + } + + /** + * The routing protocol for this VPN gateway connection. + */ + public interface RoutingProtocol { + /** bgp. */ + String BGP = "bgp"; + } + + + /** + * Builder. + */ + public static class Builder { + private Boolean adminStateUp; + private VPNGatewayConnectionDPDPrototype deadPeerDetection; + private String establishMode; + private VPNGatewayConnectionIKEPolicyPrototype ikePolicy; + private VPNGatewayConnectionIPsecPolicyPrototype ipsecPolicy; + private String name; + private String psk; + private Boolean distributeTraffic; + private VPNGatewayConnectionDynamicRouteModeLocalPrototype local; + private VPNGatewayConnectionDynamicRouteModePeerPrototype peer; + private String routingProtocol; + private List tunnels; + + /** + * Instantiates a new Builder from an existing VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype instance. + * + * @param vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototype the instance to initialize the Builder with + */ + public Builder(VPNGatewayConnectionPrototype vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototype) { + this.adminStateUp = vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototype.adminStateUp; + this.deadPeerDetection = vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototype.deadPeerDetection; + this.establishMode = vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototype.establishMode; + this.ikePolicy = vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototype.ikePolicy; + this.ipsecPolicy = vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototype.ipsecPolicy; + this.name = vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototype.name; + this.psk = vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototype.psk; + this.distributeTraffic = vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototype.distributeTraffic; + this.local = vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototype.local; + this.peer = vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototype.peer; + this.routingProtocol = vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototype.routingProtocol; + this.tunnels = vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototype.tunnels; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Instantiates a new builder with required properties. + * + * @param psk the psk + * @param peer the peer + * @param routingProtocol the routingProtocol + * @param tunnels the tunnels + */ + public Builder(String psk, VPNGatewayConnectionDynamicRouteModePeerPrototype peer, String routingProtocol, List tunnels) { + this.psk = psk; + this.peer = peer; + this.routingProtocol = routingProtocol; + this.tunnels = tunnels; + } + + /** + * Builds a VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype. + * + * @return the new VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype instance + */ + public VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype build() { + return new VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype(this); + } + + /** + * Adds a new element to tunnels. + * + * @param tunnels the new element to be added + * @return the VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype builder + */ + public Builder addTunnels(VPNGatewayConnectionTunnelPrototype tunnels) { + com.ibm.cloud.sdk.core.util.Validator.notNull(tunnels, + "tunnels cannot be null"); + if (this.tunnels == null) { + this.tunnels = new ArrayList(); + } + this.tunnels.add(tunnels); + return this; + } + + /** + * Set the adminStateUp. + * + * @param adminStateUp the adminStateUp + * @return the VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype builder + */ + public Builder adminStateUp(Boolean adminStateUp) { + this.adminStateUp = adminStateUp; + return this; + } + + /** + * Set the deadPeerDetection. + * + * @param deadPeerDetection the deadPeerDetection + * @return the VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype builder + */ + public Builder deadPeerDetection(VPNGatewayConnectionDPDPrototype deadPeerDetection) { + this.deadPeerDetection = deadPeerDetection; + return this; + } + + /** + * Set the establishMode. + * + * @param establishMode the establishMode + * @return the VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype builder + */ + public Builder establishMode(String establishMode) { + this.establishMode = establishMode; + return this; + } + + /** + * Set the ikePolicy. + * + * @param ikePolicy the ikePolicy + * @return the VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype builder + */ + public Builder ikePolicy(VPNGatewayConnectionIKEPolicyPrototype ikePolicy) { + this.ikePolicy = ikePolicy; + return this; + } + + /** + * Set the ipsecPolicy. + * + * @param ipsecPolicy the ipsecPolicy + * @return the VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype builder + */ + public Builder ipsecPolicy(VPNGatewayConnectionIPsecPolicyPrototype ipsecPolicy) { + this.ipsecPolicy = ipsecPolicy; + return this; + } + + /** + * Set the name. + * + * @param name the name + * @return the VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype builder + */ + public Builder name(String name) { + this.name = name; + return this; + } + + /** + * Set the psk. + * + * @param psk the psk + * @return the VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype builder + */ + public Builder psk(String psk) { + this.psk = psk; + return this; + } + + /** + * Set the distributeTraffic. + * + * @param distributeTraffic the distributeTraffic + * @return the VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype builder + */ + public Builder distributeTraffic(Boolean distributeTraffic) { + this.distributeTraffic = distributeTraffic; + return this; + } + + /** + * Set the local. + * + * @param local the local + * @return the VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype builder + */ + public Builder local(VPNGatewayConnectionDynamicRouteModeLocalPrototype local) { + this.local = local; + return this; + } + + /** + * Set the peer. + * + * @param peer the peer + * @return the VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype builder + */ + public Builder peer(VPNGatewayConnectionDynamicRouteModePeerPrototype peer) { + this.peer = peer; + return this; + } + + /** + * Set the routingProtocol. + * + * @param routingProtocol the routingProtocol + * @return the VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype builder + */ + public Builder routingProtocol(String routingProtocol) { + this.routingProtocol = routingProtocol; + return this; + } + + /** + * Set the tunnels. + * Existing tunnels will be replaced. + * + * @param tunnels the tunnels + * @return the VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype builder + */ + public Builder tunnels(List tunnels) { + this.tunnels = tunnels; + return this; + } + } + + protected VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype() { } + + protected VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.psk, + "psk cannot be null"); + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.peer, + "peer cannot be null"); + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.routingProtocol, + "routingProtocol cannot be null"); + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.tunnels, + "tunnels cannot be null"); + adminStateUp = builder.adminStateUp; + deadPeerDetection = builder.deadPeerDetection; + establishMode = builder.establishMode; + ikePolicy = builder.ikePolicy; + ipsecPolicy = builder.ipsecPolicy; + name = builder.name; + psk = builder.psk; + distributeTraffic = builder.distributeTraffic; + local = builder.local; + peer = builder.peer; + routingProtocol = builder.routingProtocol; + tunnels = builder.tunnels; + } + + /** + * New builder. + * + * @return a VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype builder + */ + public Builder newBuilder() { + return new Builder(this); + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype.java index 9f01ca5f6a..cde3853db0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -62,8 +62,8 @@ public Builder(VPNGatewayConnectionPrototype vpnGatewayConnectionPrototypeVpnGat this.ipsecPolicy = vpnGatewayConnectionPrototypeVpnGatewayConnectionPolicyModePrototype.ipsecPolicy; this.name = vpnGatewayConnectionPrototypeVpnGatewayConnectionPolicyModePrototype.name; this.psk = vpnGatewayConnectionPrototypeVpnGatewayConnectionPolicyModePrototype.psk; - this.local = (VPNGatewayConnectionPolicyModeLocalPrototype) vpnGatewayConnectionPrototypeVpnGatewayConnectionPolicyModePrototype.local; - this.peer = (VPNGatewayConnectionPolicyModePeerPrototype) vpnGatewayConnectionPrototypeVpnGatewayConnectionPolicyModePrototype.peer; + this.local = vpnGatewayConnectionPrototypeVpnGatewayConnectionPolicyModePrototype.local; + this.peer = vpnGatewayConnectionPrototypeVpnGatewayConnectionPolicyModePrototype.peer; } /** diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype.java index c4bc19d421..4d13002be1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -72,9 +72,9 @@ public Builder(VPNGatewayConnectionPrototype vpnGatewayConnectionPrototypeVpnGat this.ipsecPolicy = vpnGatewayConnectionPrototypeVpnGatewayConnectionStaticRouteModePrototype.ipsecPolicy; this.name = vpnGatewayConnectionPrototypeVpnGatewayConnectionStaticRouteModePrototype.name; this.psk = vpnGatewayConnectionPrototypeVpnGatewayConnectionStaticRouteModePrototype.psk; - this.local = (VPNGatewayConnectionStaticRouteModeLocalPrototype) vpnGatewayConnectionPrototypeVpnGatewayConnectionStaticRouteModePrototype.local; - this.peer = (VPNGatewayConnectionStaticRouteModePeerPrototype) vpnGatewayConnectionPrototypeVpnGatewayConnectionStaticRouteModePrototype.peer; this.distributeTraffic = vpnGatewayConnectionPrototypeVpnGatewayConnectionStaticRouteModePrototype.distributeTraffic; + this.local = vpnGatewayConnectionPrototypeVpnGatewayConnectionStaticRouteModePrototype.local; + this.peer = vpnGatewayConnectionPrototypeVpnGatewayConnectionStaticRouteModePrototype.peer; this.routingProtocol = vpnGatewayConnectionPrototypeVpnGatewayConnectionStaticRouteModePrototype.routingProtocol; } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionReference.java index 66aad74f7d..2274746bf8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionRouteMode.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionRouteMode.java index 5213295306..3cd8e55ff9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionRouteMode.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionRouteMode.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -18,6 +18,7 @@ * * Classes which extend this class: * - VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode + * - VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode */ public class VPNGatewayConnectionRouteMode extends VPNGatewayConnection { @SuppressWarnings("unused") @@ -25,6 +26,7 @@ public class VPNGatewayConnectionRouteMode extends VPNGatewayConnection { protected static java.util.Map> discriminatorMapping; static { discriminatorMapping = new java.util.HashMap<>(); + discriminatorMapping.put("bgp", VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode.class); discriminatorMapping.put("none", VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode.class); } /** diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode.java new file mode 100644 index 0000000000..68b10971a6 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode.java @@ -0,0 +1,90 @@ +/* + * (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.is.vpc.v1.model; + +/** + * VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode. + */ +public class VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode extends VPNGatewayConnectionRouteMode { + + /** + * The authentication mode. + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + */ + public interface AuthenticationMode { + /** psk. */ + String PSK = "psk"; + } + + /** + * The establish mode of the VPN gateway connection: + * - `bidirectional`: Either side of the VPN gateway can initiate IKE protocol + * negotiations or rekeying processes. + * - `peer_only`: Only the peer can initiate IKE protocol negotiations for this VPN gateway + * connection. Additionally, the peer is responsible for initiating the rekeying process + * after the connection is established. If rekeying does not occur, the VPN gateway + * connection will be brought down after its lifetime expires. + */ + public interface EstablishMode { + /** bidirectional. */ + String BIDIRECTIONAL = "bidirectional"; + /** peer_only. */ + String PEER_ONLY = "peer_only"; + } + + /** + * The mode of the VPN gateway. + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + */ + public interface Mode { + /** policy. */ + String POLICY = "policy"; + /** route. */ + String ROUTE = "route"; + } + + /** + * The resource type. + */ + public interface ResourceType { + /** vpn_gateway_connection. */ + String VPN_GATEWAY_CONNECTION = "vpn_gateway_connection"; + } + + /** + * The status of a VPN gateway connection. + */ + public interface Status { + /** down. */ + String DOWN = "down"; + /** up. */ + String UP = "up"; + } + + /** + * The routing protocol for this VPN gateway connection. + */ + public interface RoutingProtocol { + /** bgp. */ + String BGP = "bgp"; + } + + + protected VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode() { } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode.java index f925e777c1..f159f60601 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModeLocal.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModeLocal.java index 25a8d1f5ee..336c70e9d9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModeLocal.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModeLocal.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModeLocalPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModeLocalPrototype.java index 9c4e1edd7b..e9cd0d642e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModeLocalPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModeLocalPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -16,10 +16,16 @@ import java.util.ArrayList; import java.util.List; +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + /** * VPNGatewayConnectionStaticRouteModeLocalPrototype. */ -public class VPNGatewayConnectionStaticRouteModeLocalPrototype extends VPNGatewayConnectionLocalPrototype { +public class VPNGatewayConnectionStaticRouteModeLocalPrototype extends GenericModel { + + @SerializedName("ike_identities") + protected List ikeIdentities; /** * Builder. diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeer.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeer.java index 960c0f5548..cce65ada69 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeer.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeer.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerPrototype.java index 9feef0fb99..7df0d980a2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -13,6 +13,9 @@ package com.ibm.cloud.is.vpc.v1.model; +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + /** * VPNGatewayConnectionStaticRouteModePeerPrototype. * @@ -20,7 +23,12 @@ * - VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress * - VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN */ -public class VPNGatewayConnectionStaticRouteModePeerPrototype extends VPNGatewayConnectionPeerPrototype { +public class VPNGatewayConnectionStaticRouteModePeerPrototype extends GenericModel { + + @SerializedName("ike_identity") + protected VPNGatewayConnectionIKEIdentityPrototype ikeIdentity; + protected String address; + protected String fqdn; protected VPNGatewayConnectionStaticRouteModePeerPrototype() { } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress.java index 1b566681e7..4549ab338b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN.java index 83f0d31910..729ea758cb 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress.java index 842a4bcdcb..aceaa09801 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN.java index 324767955b..e01019268d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModeTunnel.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModeTunnel.java index b0e6fcb36a..2d0a67bc30 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModeTunnel.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModeTunnel.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStatusReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStatusReason.java index b96a100391..a1db54d05e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStatusReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStatusReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionTunnel.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionTunnel.java new file mode 100644 index 0000000000..60caa6ffc1 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionTunnel.java @@ -0,0 +1,126 @@ +/* + * (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.is.vpc.v1.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * VPNGatewayConnectionTunnel. + */ +public class VPNGatewayConnectionTunnel extends GenericModel { + + @SerializedName("neighbor_ip") + protected IP neighborIp; + @SerializedName("tunnel_interface_ip") + protected IP tunnelInterfaceIp; + + /** + * Builder. + */ + public static class Builder { + private IP neighborIp; + private IP tunnelInterfaceIp; + + /** + * Instantiates a new Builder from an existing VPNGatewayConnectionTunnel instance. + * + * @param vpnGatewayConnectionTunnel the instance to initialize the Builder with + */ + private Builder(VPNGatewayConnectionTunnel vpnGatewayConnectionTunnel) { + this.neighborIp = vpnGatewayConnectionTunnel.neighborIp; + this.tunnelInterfaceIp = vpnGatewayConnectionTunnel.tunnelInterfaceIp; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Builds a VPNGatewayConnectionTunnel. + * + * @return the new VPNGatewayConnectionTunnel instance + */ + public VPNGatewayConnectionTunnel build() { + return new VPNGatewayConnectionTunnel(this); + } + + /** + * Set the neighborIp. + * + * @param neighborIp the neighborIp + * @return the VPNGatewayConnectionTunnel builder + */ + public Builder neighborIp(IP neighborIp) { + this.neighborIp = neighborIp; + return this; + } + + /** + * Set the tunnelInterfaceIp. + * + * @param tunnelInterfaceIp the tunnelInterfaceIp + * @return the VPNGatewayConnectionTunnel builder + */ + public Builder tunnelInterfaceIp(IP tunnelInterfaceIp) { + this.tunnelInterfaceIp = tunnelInterfaceIp; + return this; + } + } + + protected VPNGatewayConnectionTunnel() { } + + protected VPNGatewayConnectionTunnel(Builder builder) { + neighborIp = builder.neighborIp; + tunnelInterfaceIp = builder.tunnelInterfaceIp; + } + + /** + * New builder. + * + * @return a VPNGatewayConnectionTunnel builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the neighborIp. + * + * The IP address of the neighbor on the virtual tunnel interface. + * This serves as the destination address for BGP peering sessions on the peer gateway + * within the tunnel. + * + * @return the neighborIp + */ + public IP neighborIp() { + return neighborIp; + } + + /** + * Gets the tunnelInterfaceIp. + * + * The IP address assigned to the VPN gateway's virtual tunnel interface. + * This serves as the source address for BGP peering sessions initiated from the VPN + * gateway towards the peer gateway within the tunnel. + * + * @return the tunnelInterfaceIp + */ + public IP tunnelInterfaceIp() { + return tunnelInterfaceIp; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionTunnelPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionTunnelPrototype.java new file mode 100644 index 0000000000..0d58912341 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionTunnelPrototype.java @@ -0,0 +1,141 @@ +/* + * (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.is.vpc.v1.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * VPNGatewayConnectionTunnelPrototype. + */ +public class VPNGatewayConnectionTunnelPrototype extends GenericModel { + + @SerializedName("neighbor_ip") + protected IP neighborIp; + @SerializedName("tunnel_interface_ip") + protected IP tunnelInterfaceIp; + + /** + * Builder. + */ + public static class Builder { + private IP neighborIp; + private IP tunnelInterfaceIp; + + /** + * Instantiates a new Builder from an existing VPNGatewayConnectionTunnelPrototype instance. + * + * @param vpnGatewayConnectionTunnelPrototype the instance to initialize the Builder with + */ + private Builder(VPNGatewayConnectionTunnelPrototype vpnGatewayConnectionTunnelPrototype) { + this.neighborIp = vpnGatewayConnectionTunnelPrototype.neighborIp; + this.tunnelInterfaceIp = vpnGatewayConnectionTunnelPrototype.tunnelInterfaceIp; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Instantiates a new builder with required properties. + * + * @param neighborIp the neighborIp + * @param tunnelInterfaceIp the tunnelInterfaceIp + */ + public Builder(IP neighborIp, IP tunnelInterfaceIp) { + this.neighborIp = neighborIp; + this.tunnelInterfaceIp = tunnelInterfaceIp; + } + + /** + * Builds a VPNGatewayConnectionTunnelPrototype. + * + * @return the new VPNGatewayConnectionTunnelPrototype instance + */ + public VPNGatewayConnectionTunnelPrototype build() { + return new VPNGatewayConnectionTunnelPrototype(this); + } + + /** + * Set the neighborIp. + * + * @param neighborIp the neighborIp + * @return the VPNGatewayConnectionTunnelPrototype builder + */ + public Builder neighborIp(IP neighborIp) { + this.neighborIp = neighborIp; + return this; + } + + /** + * Set the tunnelInterfaceIp. + * + * @param tunnelInterfaceIp the tunnelInterfaceIp + * @return the VPNGatewayConnectionTunnelPrototype builder + */ + public Builder tunnelInterfaceIp(IP tunnelInterfaceIp) { + this.tunnelInterfaceIp = tunnelInterfaceIp; + return this; + } + } + + protected VPNGatewayConnectionTunnelPrototype() { } + + protected VPNGatewayConnectionTunnelPrototype(Builder builder) { + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.neighborIp, + "neighborIp cannot be null"); + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.tunnelInterfaceIp, + "tunnelInterfaceIp cannot be null"); + neighborIp = builder.neighborIp; + tunnelInterfaceIp = builder.tunnelInterfaceIp; + } + + /** + * New builder. + * + * @return a VPNGatewayConnectionTunnelPrototype builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the neighborIp. + * + * The IP address of the neighbor on the virtual tunnel interface. + * This serves as the destination address for BGP peering sessions on the peer gateway + * within the tunnel. + * + * @return the neighborIp + */ + public IP neighborIp() { + return neighborIp; + } + + /** + * Gets the tunnelInterfaceIp. + * + * The IP address assigned to the VPN gateway's virtual tunnel interface. + * This serves as the source address for BGP peering sessions initiated from the VPN + * gateway towards the peer gateway within the tunnel. + * + * @return the tunnelInterfaceIp + */ + public IP tunnelInterfaceIp() { + return tunnelInterfaceIp; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionTunnelStatusReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionTunnelStatusReason.java index 7be5c282b4..eb14268ba8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionTunnelStatusReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionTunnelStatusReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayHealthReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayHealthReason.java index 0ff0ca8c25..840d90c3a9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayHealthReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayHealthReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayLifecycleReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayLifecycleReason.java index 1b2d2037f3..7553ef9ac5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayLifecycleReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayLifecycleReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayMember.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayMember.java index 59ecb16499..e787eb0c71 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayMember.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayMember.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayMemberHealthReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayMemberHealthReason.java index 2087253db2..698faa0aa8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayMemberHealthReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayMemberHealthReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayMemberLifecycleReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayMemberLifecycleReason.java index 60619af2ab..40fc71382b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayMemberLifecycleReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayMemberLifecycleReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPatch.java index d3eac85292..65820860d4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -15,6 +15,7 @@ import java.util.Map; +import com.google.gson.annotations.SerializedName; import com.ibm.cloud.sdk.core.service.model.GenericModel; import com.ibm.cloud.sdk.core.util.GsonSingleton; @@ -23,12 +24,15 @@ */ public class VPNGatewayPatch extends GenericModel { + @SerializedName("local_asn") + protected Long localAsn; protected String name; /** * Builder. */ public static class Builder { + private Long localAsn; private String name; /** @@ -37,6 +41,7 @@ public static class Builder { * @param vpnGatewayPatch the instance to initialize the Builder with */ private Builder(VPNGatewayPatch vpnGatewayPatch) { + this.localAsn = vpnGatewayPatch.localAsn; this.name = vpnGatewayPatch.name; } @@ -55,6 +60,17 @@ public VPNGatewayPatch build() { return new VPNGatewayPatch(this); } + /** + * Set the localAsn. + * + * @param localAsn the localAsn + * @return the VPNGatewayPatch builder + */ + public Builder localAsn(long localAsn) { + this.localAsn = localAsn; + return this; + } + /** * Set the name. * @@ -70,6 +86,7 @@ public Builder name(String name) { protected VPNGatewayPatch() { } protected VPNGatewayPatch(Builder builder) { + localAsn = builder.localAsn; name = builder.name; } @@ -82,6 +99,20 @@ public Builder newBuilder() { return new Builder(this); } + /** + * Gets the localAsn. + * + * The local autonomous system number (ASN) for this VPN gateway and its connections. The ASN values in the + * [restricted ASN list]( + * https://cloud.ibm.com/docs/vpc?topic=vpc-planning-considerations-vpn#dynamic-route-based-considerations) are + * reserved and unavailable. + * + * @return the localAsn + */ + public Long localAsn() { + return localAsn; + } + /** * Gets the name. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPolicyMode.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPolicyMode.java index 95bae1ebdb..e7d4e6886e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPolicyMode.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPolicyMode.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPrototype.java index d96d1e5639..39895c7c9c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -13,6 +13,8 @@ package com.ibm.cloud.is.vpc.v1.model; +import java.util.List; + import com.google.gson.annotations.SerializedName; import com.ibm.cloud.sdk.core.service.model.GenericModel; @@ -37,6 +39,10 @@ public interface Mode { @SerializedName("resource_group") protected ResourceGroupIdentity resourceGroup; protected SubnetIdentity subnet; + @SerializedName("advertised_cidrs") + protected List advertisedCidrs; + @SerializedName("local_asn") + protected Long localAsn; protected String mode; protected VPNGatewayPrototype() { } @@ -76,6 +82,32 @@ public SubnetIdentity subnet() { return subnet; } + /** + * Gets the advertisedCidrs. + * + * The static CIDRs advertised through any enabled routing protocol (for example, BGP). The routing protocol will + * advertise routes with these CIDRs as route destinations. + * + * @return the advertisedCidrs + */ + public List advertisedCidrs() { + return advertisedCidrs; + } + + /** + * Gets the localAsn. + * + * The local autonomous system number (ASN) for this VPN gateway and its connections. The ASN values in the + * [restricted ASN list]( + * https://cloud.ibm.com/docs/vpc?topic=vpc-planning-considerations-vpn#dynamic-route-based-considerations) are + * reserved and unavailable. + * + * @return the localAsn + */ + public Long localAsn() { + return localAsn; + } + /** * Gets the mode. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPrototypeVPNGatewayPolicyModePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPrototypeVPNGatewayPolicyModePrototype.java index befccb536d..f7edcb8737 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPrototypeVPNGatewayPolicyModePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPrototypeVPNGatewayPolicyModePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPrototypeVPNGatewayRouteModePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPrototypeVPNGatewayRouteModePrototype.java index faf07361f1..f98c5d3e72 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPrototypeVPNGatewayRouteModePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPrototypeVPNGatewayRouteModePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -13,6 +13,9 @@ package com.ibm.cloud.is.vpc.v1.model; +import java.util.ArrayList; +import java.util.List; + /** * VPNGatewayPrototypeVPNGatewayRouteModePrototype. */ @@ -34,6 +37,8 @@ public static class Builder { private String name; private ResourceGroupIdentity resourceGroup; private SubnetIdentity subnet; + private List advertisedCidrs; + private Long localAsn; private String mode; /** @@ -45,6 +50,8 @@ public Builder(VPNGatewayPrototype vpnGatewayPrototypeVpnGatewayRouteModePrototy this.name = vpnGatewayPrototypeVpnGatewayRouteModePrototype.name; this.resourceGroup = vpnGatewayPrototypeVpnGatewayRouteModePrototype.resourceGroup; this.subnet = vpnGatewayPrototypeVpnGatewayRouteModePrototype.subnet; + this.advertisedCidrs = vpnGatewayPrototypeVpnGatewayRouteModePrototype.advertisedCidrs; + this.localAsn = vpnGatewayPrototypeVpnGatewayRouteModePrototype.localAsn; this.mode = vpnGatewayPrototypeVpnGatewayRouteModePrototype.mode; } @@ -72,6 +79,22 @@ public VPNGatewayPrototypeVPNGatewayRouteModePrototype build() { return new VPNGatewayPrototypeVPNGatewayRouteModePrototype(this); } + /** + * Adds a new element to advertisedCidrs. + * + * @param advertisedCidrs the new element to be added + * @return the VPNGatewayPrototypeVPNGatewayRouteModePrototype builder + */ + public Builder addAdvertisedCidrs(String advertisedCidrs) { + com.ibm.cloud.sdk.core.util.Validator.notNull(advertisedCidrs, + "advertisedCidrs cannot be null"); + if (this.advertisedCidrs == null) { + this.advertisedCidrs = new ArrayList(); + } + this.advertisedCidrs.add(advertisedCidrs); + return this; + } + /** * Set the name. * @@ -105,6 +128,29 @@ public Builder subnet(SubnetIdentity subnet) { return this; } + /** + * Set the advertisedCidrs. + * Existing advertisedCidrs will be replaced. + * + * @param advertisedCidrs the advertisedCidrs + * @return the VPNGatewayPrototypeVPNGatewayRouteModePrototype builder + */ + public Builder advertisedCidrs(List advertisedCidrs) { + this.advertisedCidrs = advertisedCidrs; + return this; + } + + /** + * Set the localAsn. + * + * @param localAsn the localAsn + * @return the VPNGatewayPrototypeVPNGatewayRouteModePrototype builder + */ + public Builder localAsn(long localAsn) { + this.localAsn = localAsn; + return this; + } + /** * Set the mode. * @@ -125,6 +171,8 @@ protected VPNGatewayPrototypeVPNGatewayRouteModePrototype(Builder builder) { name = builder.name; resourceGroup = builder.resourceGroup; subnet = builder.subnet; + advertisedCidrs = builder.advertisedCidrs; + localAsn = builder.localAsn; mode = builder.mode; } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayRouteMode.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayRouteMode.java index 5a36a9864b..22f63f21e4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayRouteMode.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayRouteMode.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnection.java new file mode 100644 index 0000000000..64b1be7e31 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnection.java @@ -0,0 +1,154 @@ +/* + * (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.is.vpc.v1.model; + +import java.util.Date; +import java.util.List; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * VPNGatewayServiceConnection. + */ +public class VPNGatewayServiceConnection extends GenericModel { + + /** + * The lifecycle state of the VPN gateway service connection. + */ + public interface LifecycleState { + /** deleting. */ + String DELETING = "deleting"; + /** failed. */ + String FAILED = "failed"; + /** pending. */ + String PENDING = "pending"; + /** stable. */ + String STABLE = "stable"; + /** suspended. */ + String SUSPENDED = "suspended"; + /** updating. */ + String UPDATING = "updating"; + /** waiting. */ + String WAITING = "waiting"; + } + + /** + * The status of this VPN gateway service connection: + * - `degraded`: operating with compromised performance. + * - `down`: not operational. + * - `up`: operating normally. + */ + public interface Status { + /** degraded. */ + String DEGRADED = "degraded"; + /** down. */ + String DOWN = "down"; + /** up. */ + String UP = "up"; + } + + @SerializedName("created_at") + protected Date createdAt; + protected VPNGatewayServiceConnectionCreator creator; + protected String id; + @SerializedName("lifecycle_reasons") + protected List lifecycleReasons; + @SerializedName("lifecycle_state") + protected String lifecycleState; + protected String status; + @SerializedName("status_reasons") + protected List statusReasons; + + protected VPNGatewayServiceConnection() { } + + /** + * Gets the createdAt. + * + * The date and time that this VPN gateway service connection was created. + * + * @return the createdAt + */ + public Date getCreatedAt() { + return createdAt; + } + + /** + * Gets the creator. + * + * @return the creator + */ + public VPNGatewayServiceConnectionCreator getCreator() { + return creator; + } + + /** + * Gets the id. + * + * The unique identifier for this VPN gateway service connection. + * + * @return the id + */ + public String getId() { + return id; + } + + /** + * Gets the lifecycleReasons. + * + * The reasons for the current `lifecycle_state` (if any). + * + * @return the lifecycleReasons + */ + public List getLifecycleReasons() { + return lifecycleReasons; + } + + /** + * Gets the lifecycleState. + * + * The lifecycle state of the VPN gateway service connection. + * + * @return the lifecycleState + */ + public String getLifecycleState() { + return lifecycleState; + } + + /** + * Gets the status. + * + * The status of this VPN gateway service connection: + * - `degraded`: operating with compromised performance. + * - `down`: not operational. + * - `up`: operating normally. + * + * @return the status + */ + public String getStatus() { + return status; + } + + /** + * Gets the statusReasons. + * + * The reasons for the current VPN gateway service connection status (if any). + * + * @return the statusReasons + */ + public List getStatusReasons() { + return statusReasons; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionCollection.java new file mode 100644 index 0000000000..313d9b99cd --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionCollection.java @@ -0,0 +1,92 @@ +/* + * (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.is.vpc.v1.model; + +import java.util.List; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * VPNGatewayServiceConnectionCollection. + */ +public class VPNGatewayServiceConnectionCollection extends GenericModel { + + protected PageLink first; + protected Long limit; + protected PageLink next; + @SerializedName("service_connections") + protected List serviceConnections; + @SerializedName("total_count") + protected Long totalCount; + + protected VPNGatewayServiceConnectionCollection() { } + + /** + * Gets the first. + * + * A link to the first page of resources. + * + * @return the first + */ + public PageLink getFirst() { + return first; + } + + /** + * Gets the limit. + * + * The maximum number of resources that can be returned by the request. + * + * @return the limit + */ + public Long getLimit() { + return limit; + } + + /** + * Gets the next. + * + * A link to the next page of resources. This property is present for all pages + * except the last page. + * + * @return the next + */ + public PageLink getNext() { + return next; + } + + /** + * Gets the serviceConnections. + * + * A page of service connections for the VPN gateway. + * + * @return the serviceConnections + */ + public List getServiceConnections() { + return serviceConnections; + } + + /** + * Gets the totalCount. + * + * The total number of resources across all pages. + * + * @return the totalCount + */ + public Long getTotalCount() { + return totalCount; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionCreator.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionCreator.java new file mode 100644 index 0000000000..360f623939 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionCreator.java @@ -0,0 +1,75 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * VPNGatewayServiceConnectionCreator. + * + * Classes which extend this class: + * - VPNGatewayServiceConnectionCreatorTransitGatewayReference + */ +public class VPNGatewayServiceConnectionCreator extends GenericModel { + + /** + * The resource type. + */ + public interface ResourceType { + /** transit_gateway. */ + String TRANSIT_GATEWAY = "transit_gateway"; + } + + protected String crn; + protected String id; + @SerializedName("resource_type") + protected String resourceType; + + protected VPNGatewayServiceConnectionCreator() { } + + /** + * Gets the crn. + * + * The CRN for this transit gateway. + * + * @return the crn + */ + public String getCrn() { + return crn; + } + + /** + * Gets the id. + * + * The unique identifier for this transit gateway. + * + * @return the id + */ + public String getId() { + return id; + } + + /** + * Gets the resourceType. + * + * The resource type. + * + * @return the resourceType + */ + public String getResourceType() { + return resourceType; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionCreatorTransitGatewayReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionCreatorTransitGatewayReference.java new file mode 100644 index 0000000000..08df3a665d --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionCreatorTransitGatewayReference.java @@ -0,0 +1,32 @@ +/* + * (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.is.vpc.v1.model; + +/** + * VPNGatewayServiceConnectionCreatorTransitGatewayReference. + */ +public class VPNGatewayServiceConnectionCreatorTransitGatewayReference extends VPNGatewayServiceConnectionCreator { + + /** + * The resource type. + */ + public interface ResourceType { + /** transit_gateway. */ + String TRANSIT_GATEWAY = "transit_gateway"; + } + + + protected VPNGatewayServiceConnectionCreatorTransitGatewayReference() { } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionLifecycleReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionLifecycleReason.java new file mode 100644 index 0000000000..b218e66375 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionLifecycleReason.java @@ -0,0 +1,86 @@ +/* + * (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.is.vpc.v1.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * VPNGatewayServiceConnectionLifecycleReason. + */ +public class VPNGatewayServiceConnectionLifecycleReason extends GenericModel { + + /** + * A reason code for this lifecycle state: + * - `internal_error`: internal error (contact IBM support) + * - `resource_suspended_by_provider`: The resource has been suspended (contact IBM + * support) + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + */ + public interface Code { + /** internal_error. */ + String INTERNAL_ERROR = "internal_error"; + /** resource_suspended_by_provider. */ + String RESOURCE_SUSPENDED_BY_PROVIDER = "resource_suspended_by_provider"; + } + + protected String code; + protected String message; + @SerializedName("more_info") + protected String moreInfo; + + protected VPNGatewayServiceConnectionLifecycleReason() { } + + /** + * Gets the code. + * + * A reason code for this lifecycle state: + * - `internal_error`: internal error (contact IBM support) + * - `resource_suspended_by_provider`: The resource has been suspended (contact IBM + * support) + * + * The enumerated values for this property may + * [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + * + * @return the code + */ + public String getCode() { + return code; + } + + /** + * Gets the message. + * + * An explanation of the reason for this lifecycle state. + * + * @return the message + */ + public String getMessage() { + return message; + } + + /** + * Gets the moreInfo. + * + * A link to documentation about the reason for this lifecycle state. + * + * @return the moreInfo + */ + public String getMoreInfo() { + return moreInfo; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionStatusReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionStatusReason.java new file mode 100644 index 0000000000..5aba74dd73 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionStatusReason.java @@ -0,0 +1,78 @@ +/* + * (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.is.vpc.v1.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * VPNGatewayServiceConnectionStatusReason. + */ +public class VPNGatewayServiceConnectionStatusReason extends GenericModel { + + /** + * The reasons for the current VPN gateway service connection status (if any). + * - `internal_error` + * - `peer_not_responding`. + */ + public interface Code { + /** internal_error. */ + String INTERNAL_ERROR = "internal_error"; + /** peer_not_responding. */ + String PEER_NOT_RESPONDING = "peer_not_responding"; + } + + protected String code; + protected String message; + @SerializedName("more_info") + protected String moreInfo; + + protected VPNGatewayServiceConnectionStatusReason() { } + + /** + * Gets the code. + * + * The reasons for the current VPN gateway service connection status (if any). + * - `internal_error` + * - `peer_not_responding`. + * + * @return the code + */ + public String getCode() { + return code; + } + + /** + * Gets the message. + * + * An explanation of the reason for this VPN gateway service connection's status. + * + * @return the message + */ + public String getMessage() { + return message; + } + + /** + * Gets the moreInfo. + * + * A link to documentation about this status reason. + * + * @return the moreInfo + */ + public String getMoreInfo() { + return moreInfo; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServer.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServer.java index 6ddae587f4..553d0c7778 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServer.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServer.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthentication.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthentication.java index 260eb7e469..54d2783861 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthentication.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthentication.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByCertificate.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByCertificate.java index 9716ccbb07..a8ef2abb43 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByCertificate.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByCertificate.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByUsername.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByUsername.java index b35a9f3cd0..574cd435af 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByUsername.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByUsername.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByUsernameIdProvider.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByUsernameIdProvider.java index 7fe2244ecf..4941f8eb83 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByUsernameIdProvider.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByUsernameIdProvider.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByUsernameIdProviderByIAM.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByUsernameIdProviderByIAM.java index 177bd5d454..bb3d1404e5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByUsernameIdProviderByIAM.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByUsernameIdProviderByIAM.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationPrototype.java index eb552440b3..3c08b8451a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype.java index 13f2c49b28..175f274611 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype.java index 82354c7f92..78a13310c9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerClient.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerClient.java index c4ce353351..8d05ff1bef 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerClient.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerClient.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerClientCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerClientCollection.java index 6dbbcf8431..400ec84f11 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerClientCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerClientCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerCollection.java index 6ac6009d70..b21bf6ed58 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerHealthReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerHealthReason.java index 9d8e19542e..196feacd3f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerHealthReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerHealthReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerLifecycleReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerLifecycleReason.java index 9398bac635..a352c19b8a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerLifecycleReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerLifecycleReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerPatch.java index 162b2eb89c..4454a584a6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRoute.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRoute.java index f02a79c8cd..1dd8af3575 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRoute.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRoute.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteCollection.java index 683c5ba100..2a6820739e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteHealthReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteHealthReason.java index 2c1275775d..2aa0783ebc 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteHealthReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteHealthReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteLifecycleReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteLifecycleReason.java index 9f569d58af..25afdefed6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteLifecycleReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteLifecycleReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRoutePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRoutePatch.java index 573b9437b4..81aaf2b925 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRoutePatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRoutePatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterface.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterface.java index 3fe3f892e9..7fd04f4749 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterface.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterface.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceCollection.java index ca9ef7aedc..1f5df379c6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototype.java index 8d27f0edab..e0b58439e4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -25,8 +25,6 @@ */ public class VirtualNetworkInterfaceIPPrototype extends GenericModel { - protected String id; - protected String href; protected String address; @SerializedName("auto_delete") protected Boolean autoDelete; @@ -34,28 +32,6 @@ public class VirtualNetworkInterfaceIPPrototype extends GenericModel { protected VirtualNetworkInterfaceIPPrototype() { } - /** - * Gets the id. - * - * The unique identifier for this reserved IP. - * - * @return the id - */ - public String id() { - return id; - } - - /** - * Gets the href. - * - * The URL for this reserved IP. - * - * @return the href - */ - public String href() { - return href; - } - /** * Gets the address. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContext.java index e4294be223..4c36d85e3a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref.java index 6d4e1d7f09..6bd25fc082 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById.java index 8dc4f1010e..1727038dc6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext.java index 0de7b367a3..645d0fb80f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIpsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIpsPager.java index dfd96118ef..52a389bacc 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIpsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIpsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePatch.java index b41bc3f307..7c620c8729 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototype.java index 609db945de..87b829e103 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext.java index e795e9f773..378e513efd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref.java index d14aefce89..fbd2b5cc54 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById.java index 397731524f..32695f6768 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext.java index 11b1c22dc8..7fab1209bd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceReferenceAttachmentContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceReferenceAttachmentContext.java index 269ef7be68..85735be98a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceReferenceAttachmentContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceReferenceAttachmentContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTarget.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTarget.java index 4f7f96f3b4..1d62eb3d3c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTarget.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTarget.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext.java index aeb1daf540..ab6ddb0cd2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext.java index 76cf60c2c5..fdf6bb46a9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetShareMountTargetReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetShareMountTargetReference.java index a44b812591..59fe8527b9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetShareMountTargetReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetShareMountTargetReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacesPager.java index 9a0990dfb9..1fde4ec244 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacesPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacesPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Volume.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Volume.java index a2f5478bdb..802924ad5c 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Volume.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Volume.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -133,6 +133,8 @@ public interface Status { protected List adjustableCapacityStates; @SerializedName("adjustable_iops_states") protected List adjustableIopsStates; + @SerializedName("allowed_use") + protected VolumeAllowedUse allowedUse; @SerializedName("attachment_state") protected String attachmentState; protected Long bandwidth; @@ -211,6 +213,20 @@ public List getAdjustableIopsStates() { return adjustableIopsStates; } + /** + * Gets the allowedUse. + * + * The usage constraints to be matched against the requested instance or bare metal server + * properties to determine compatibility. + * + * Only present for boot volumes. + * + * @return the allowedUse + */ + public VolumeAllowedUse getAllowedUse() { + return allowedUse; + } + /** * Gets the attachmentState. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAllowedUse.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAllowedUse.java new file mode 100644 index 0000000000..c75f3e22cb --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAllowedUse.java @@ -0,0 +1,80 @@ +/* + * (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.is.vpc.v1.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * VolumeAllowedUse. + */ +public class VolumeAllowedUse extends GenericModel { + + @SerializedName("api_version") + protected String apiVersion; + @SerializedName("bare_metal_server") + protected String bareMetalServer; + protected String instance; + + protected VolumeAllowedUse() { } + + /** + * Gets the apiVersion. + * + * The API version with which to evaluate the expressions. + * + * @return the apiVersion + */ + public String getApiVersion() { + return apiVersion; + } + + /** + * Gets the bareMetalServer. + * + * The expression that must be satisfied by the properties of a bare metal server provisioned using the image data in + * this volume. + * + * The expression follows [Common Expression Language](https://github.com/google/cel-spec/blob/master/doc/langdef.md), + * but does not support built-in functions and macros. In addition, the following variable is supported, corresponding + * to the `BareMetalServer` property: + * - `enable_secure_boot` (boolean): Indicates whether secure boot is enabled. + * + * @return the bareMetalServer + */ + public String getBareMetalServer() { + return bareMetalServer; + } + + /** + * Gets the instance. + * + * The expression that must be satisfied by the properties of a virtual server instance provisioned using this volume. + * + * The expression follows [Common Expression Language](https://github.com/google/cel-spec/blob/master/doc/langdef.md), + * but does not support built-in functions and macros. In addition, the following variables are supported, + * corresponding to `Instance` properties: + * - `enable_secure_boot` (boolean): Indicates whether secure boot is enabled + * - `gpu.count` (integer): The number of GPUs + * - `gpu.manufacturer` (string): The GPU manufacturer + * - `gpu.memory` (integer): The overall amount of GPU memory in GiB (gibibytes) + * - `gpu.model` (string): The GPU model. + * + * @return the instance + */ + public String getInstance() { + return instance; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAllowedUsePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAllowedUsePatch.java new file mode 100644 index 0000000000..4a043501bb --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAllowedUsePatch.java @@ -0,0 +1,165 @@ +/* + * (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.is.vpc.v1.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * VolumeAllowedUsePatch. + */ +public class VolumeAllowedUsePatch extends GenericModel { + + @SerializedName("api_version") + protected String apiVersion; + @SerializedName("bare_metal_server") + protected String bareMetalServer; + protected String instance; + + /** + * Builder. + */ + public static class Builder { + private String apiVersion; + private String bareMetalServer; + private String instance; + + /** + * Instantiates a new Builder from an existing VolumeAllowedUsePatch instance. + * + * @param volumeAllowedUsePatch the instance to initialize the Builder with + */ + private Builder(VolumeAllowedUsePatch volumeAllowedUsePatch) { + this.apiVersion = volumeAllowedUsePatch.apiVersion; + this.bareMetalServer = volumeAllowedUsePatch.bareMetalServer; + this.instance = volumeAllowedUsePatch.instance; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Builds a VolumeAllowedUsePatch. + * + * @return the new VolumeAllowedUsePatch instance + */ + public VolumeAllowedUsePatch build() { + return new VolumeAllowedUsePatch(this); + } + + /** + * Set the apiVersion. + * + * @param apiVersion the apiVersion + * @return the VolumeAllowedUsePatch builder + */ + public Builder apiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return this; + } + + /** + * Set the bareMetalServer. + * + * @param bareMetalServer the bareMetalServer + * @return the VolumeAllowedUsePatch builder + */ + public Builder bareMetalServer(String bareMetalServer) { + this.bareMetalServer = bareMetalServer; + return this; + } + + /** + * Set the instance. + * + * @param instance the instance + * @return the VolumeAllowedUsePatch builder + */ + public Builder instance(String instance) { + this.instance = instance; + return this; + } + } + + protected VolumeAllowedUsePatch() { } + + protected VolumeAllowedUsePatch(Builder builder) { + apiVersion = builder.apiVersion; + bareMetalServer = builder.bareMetalServer; + instance = builder.instance; + } + + /** + * New builder. + * + * @return a VolumeAllowedUsePatch builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the apiVersion. + * + * The API version with which to evaluate the expressions. + * + * If specified, the value must be between `2019-01-01` and today's date (in UTC). + * + * @return the apiVersion + */ + public String apiVersion() { + return apiVersion; + } + + /** + * Gets the bareMetalServer. + * + * The expression that must be satisfied by the properties of a bare metal server provisioned using the image data in + * this volume. + * + * The expression follows [Common Expression Language](https://github.com/google/cel-spec/blob/master/doc/langdef.md), + * but does not support built-in functions and macros. In addition, the following variable is supported, corresponding + * to the `BareMetalServer` property: + * - `enable_secure_boot` (boolean): Indicates whether secure boot is enabled. + * + * @return the bareMetalServer + */ + public String bareMetalServer() { + return bareMetalServer; + } + + /** + * Gets the instance. + * + * The expression that must be satisfied by the properties of a virtual server instance provisioned using this volume + * + * The expression follows [Common Expression Language](https://github.com/google/cel-spec/blob/master/doc/langdef.md), + * but does not support built-in functions and macros. In addition, the following variables are supported, + * corresponding to `Instance` properties: + * - `enable_secure_boot` (boolean): Indicates whether secure boot is enabled + * - `gpu.count` (integer): The number of GPUs + * - `gpu.manufacturer` (string): The GPU manufacturer + * - `gpu.memory` (integer): The overall amount of GPU memory in GiB (gibibytes) + * - `gpu.model` (string): The GPU model. + * + * @return the instance + */ + public String instance() { + return instance; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAllowedUsePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAllowedUsePrototype.java new file mode 100644 index 0000000000..9c2dda3c4f --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAllowedUsePrototype.java @@ -0,0 +1,170 @@ +/* + * (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.is.vpc.v1.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * VolumeAllowedUsePrototype. + */ +public class VolumeAllowedUsePrototype extends GenericModel { + + @SerializedName("api_version") + protected String apiVersion; + @SerializedName("bare_metal_server") + protected String bareMetalServer; + protected String instance; + + /** + * Builder. + */ + public static class Builder { + private String apiVersion; + private String bareMetalServer; + private String instance; + + /** + * Instantiates a new Builder from an existing VolumeAllowedUsePrototype instance. + * + * @param volumeAllowedUsePrototype the instance to initialize the Builder with + */ + private Builder(VolumeAllowedUsePrototype volumeAllowedUsePrototype) { + this.apiVersion = volumeAllowedUsePrototype.apiVersion; + this.bareMetalServer = volumeAllowedUsePrototype.bareMetalServer; + this.instance = volumeAllowedUsePrototype.instance; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Builds a VolumeAllowedUsePrototype. + * + * @return the new VolumeAllowedUsePrototype instance + */ + public VolumeAllowedUsePrototype build() { + return new VolumeAllowedUsePrototype(this); + } + + /** + * Set the apiVersion. + * + * @param apiVersion the apiVersion + * @return the VolumeAllowedUsePrototype builder + */ + public Builder apiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return this; + } + + /** + * Set the bareMetalServer. + * + * @param bareMetalServer the bareMetalServer + * @return the VolumeAllowedUsePrototype builder + */ + public Builder bareMetalServer(String bareMetalServer) { + this.bareMetalServer = bareMetalServer; + return this; + } + + /** + * Set the instance. + * + * @param instance the instance + * @return the VolumeAllowedUsePrototype builder + */ + public Builder instance(String instance) { + this.instance = instance; + return this; + } + } + + protected VolumeAllowedUsePrototype() { } + + protected VolumeAllowedUsePrototype(Builder builder) { + apiVersion = builder.apiVersion; + bareMetalServer = builder.bareMetalServer; + instance = builder.instance; + } + + /** + * New builder. + * + * @return a VolumeAllowedUsePrototype builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the apiVersion. + * + * The API version with which to evaluate the expressions. + * + * If specified, the value must be between `2019-01-01` and today's date (in UTC). If unspecified, the `version` query + * parameter value will be used. + * + * @return the apiVersion + */ + public String apiVersion() { + return apiVersion; + } + + /** + * Gets the bareMetalServer. + * + * The expression that must be satisfied by the properties of a bare metal server provisioned using the image data in + * this volume. + * + * If unspecified, the expression will be set to `true`. + * + * The expression follows [Common Expression Language](https://github.com/google/cel-spec/blob/master/doc/langdef.md), + * but does not support built-in functions and macros. In addition, the following variable is supported, corresponding + * to the `BareMetalServer` property: + * - `enable_secure_boot` (boolean): Indicates whether secure boot is enabled. + * + * @return the bareMetalServer + */ + public String bareMetalServer() { + return bareMetalServer; + } + + /** + * Gets the instance. + * + * The expression that must be satisfied by the properties of a virtual server instance provisioned using this volume. + * + * If unspecified, the expression will be set to `true`. + * + * The expression follows [Common Expression Language](https://github.com/google/cel-spec/blob/master/doc/langdef.md), + * but does not support built-in functions and macros. In addition, the following variables are supported, + * corresponding to `Instance` properties: + * - `enable_secure_boot` (boolean): Indicates whether secure boot is enabled + * - `gpu.count` (integer): The number of GPUs + * - `gpu.manufacturer` (string): The GPU manufacturer + * - `gpu.memory` (integer): The overall amount of GPU memory in GiB (gibibytes) + * - `gpu.model` (string): The GPU model. + * + * @return the instance + */ + public String instance() { + return instance; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachment.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachment.java index 5a80c1a71c..016a683ec3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachment.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentCollection.java index a7140d45d5..a4c01457ac 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentDevice.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentDevice.java index f1b6570d20..32f803d43a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentDevice.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentDevice.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPatch.java index 51bfdfb2c8..d2803d909d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototype.java index 1de6395a27..96d8968ba4 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeInstanceByImageContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeInstanceByImageContext.java index a8673dc833..d18814e790 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeInstanceByImageContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeInstanceByImageContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -13,10 +13,18 @@ package com.ibm.cloud.is.vpc.v1.model; +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + /** * VolumeAttachmentPrototypeInstanceByImageContext. */ -public class VolumeAttachmentPrototypeInstanceByImageContext extends VolumeAttachmentPrototypeInstance { +public class VolumeAttachmentPrototypeInstanceByImageContext extends GenericModel { + + @SerializedName("delete_volume_on_instance_delete") + protected Boolean deleteVolumeOnInstanceDelete; + protected String name; + protected VolumePrototypeInstanceByImageContext volume; /** * Builder. @@ -34,7 +42,7 @@ public static class Builder { private Builder(VolumeAttachmentPrototypeInstanceByImageContext volumeAttachmentPrototypeInstanceByImageContext) { this.deleteVolumeOnInstanceDelete = volumeAttachmentPrototypeInstanceByImageContext.deleteVolumeOnInstanceDelete; this.name = volumeAttachmentPrototypeInstanceByImageContext.name; - this.volume = (VolumePrototypeInstanceByImageContext) volumeAttachmentPrototypeInstanceByImageContext.volume; + this.volume = volumeAttachmentPrototypeInstanceByImageContext.volume; } /** @@ -144,7 +152,7 @@ public String name() { * * @return the volume */ - public VolumePrototypeInstance volume() { + public VolumePrototypeInstanceByImageContext volume() { return volume; } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.java index 5cc1084354..bd98d0aca0 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -10,13 +10,21 @@ * 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.is.vpc.v1.model; +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; /** * VolumeAttachmentPrototypeInstanceBySourceSnapshotContext. */ -public class VolumeAttachmentPrototypeInstanceBySourceSnapshotContext extends VolumeAttachmentPrototypeInstance { +public class VolumeAttachmentPrototypeInstanceBySourceSnapshotContext extends GenericModel { + + @SerializedName("delete_volume_on_instance_delete") + protected Boolean deleteVolumeOnInstanceDelete; + protected String name; + protected VolumePrototypeInstanceBySourceSnapshotContext volume; /** * Builder. @@ -34,7 +42,7 @@ public static class Builder { private Builder(VolumeAttachmentPrototypeInstanceBySourceSnapshotContext volumeAttachmentPrototypeInstanceBySourceSnapshotContext) { this.deleteVolumeOnInstanceDelete = volumeAttachmentPrototypeInstanceBySourceSnapshotContext.deleteVolumeOnInstanceDelete; this.name = volumeAttachmentPrototypeInstanceBySourceSnapshotContext.name; - this.volume = (VolumePrototypeInstanceBySourceSnapshotContext) volumeAttachmentPrototypeInstanceBySourceSnapshotContext.volume; + this.volume = volumeAttachmentPrototypeInstanceBySourceSnapshotContext.volume; } /** @@ -144,7 +152,7 @@ public String name() { * * @return the volume */ - public VolumePrototypeInstance volume() { + public VolumePrototypeInstanceBySourceSnapshotContext volume() { return volume; } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeInstanceByVolumeContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeInstanceByVolumeContext.java index 8a6cf6f77c..058c27c48e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeInstanceByVolumeContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeInstanceByVolumeContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -13,11 +13,18 @@ package com.ibm.cloud.is.vpc.v1.model; +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; /** * VolumeAttachmentPrototypeInstanceByVolumeContext. */ -public class VolumeAttachmentPrototypeInstanceByVolumeContext extends VolumeAttachmentPrototypeInstance { +public class VolumeAttachmentPrototypeInstanceByVolumeContext extends GenericModel { + + @SerializedName("delete_volume_on_instance_delete") + protected Boolean deleteVolumeOnInstanceDelete; + protected String name; + protected VolumeIdentity volume; /** * Builder. @@ -35,7 +42,7 @@ public static class Builder { private Builder(VolumeAttachmentPrototypeInstanceByVolumeContext volumeAttachmentPrototypeInstanceByVolumeContext) { this.deleteVolumeOnInstanceDelete = volumeAttachmentPrototypeInstanceByVolumeContext.deleteVolumeOnInstanceDelete; this.name = volumeAttachmentPrototypeInstanceByVolumeContext.name; - this.volume = (VolumeIdentity) volumeAttachmentPrototypeInstanceByVolumeContext.volume; + this.volume = volumeAttachmentPrototypeInstanceByVolumeContext.volume; } /** @@ -145,7 +152,7 @@ public String name() { * * @return the volume */ - public VolumePrototypeInstance volume() { + public VolumeIdentity volume() { return volume; } } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolume.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolume.java index d59959ffe3..7331c7829f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolume.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolume.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -42,6 +42,8 @@ public class VolumeAttachmentPrototypeVolume extends GenericModel { protected Long capacity; @SerializedName("encryption_key") protected EncryptionKeyIdentity encryptionKey; + @SerializedName("allowed_use") + protected VolumeAllowedUsePrototype allowedUse; @SerializedName("source_snapshot") protected SnapshotIdentity sourceSnapshot; @@ -186,6 +188,21 @@ public EncryptionKeyIdentity encryptionKey() { return encryptionKey; } + /** + * Gets the allowedUse. + * + * The usage constraints to be matched against requested instance or bare metal server + * properties to determine compatibility. + * + * Can only be specified if `source_snapshot` is bootable. If not specified, the value of + * this property will be inherited from the `source_snapshot`. + * + * @return the allowedUse + */ + public VolumeAllowedUsePrototype allowedUse() { + return allowedUse; + } + /** * Gets the sourceSnapshot. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentity.java index f9aef0bfb4..a1c184b4af 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN.java index fe98893faa..56b8825455 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref.java index 5184830fce..cc06e62d11 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById.java index c93e70947b..dd282bc8e5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext.java index dba17cd142..5eecb583f6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity.java index 78d92bf9b0..ed16819898 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot.java index 425dd6ab5c..cbfd5c3dc6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -32,6 +32,7 @@ public static class Builder { private VolumeProfileIdentity profile; private ResourceGroupIdentity resourceGroup; private List userTags; + private VolumeAllowedUsePrototype allowedUse; private Long capacity; private EncryptionKeyIdentity encryptionKey; private SnapshotIdentity sourceSnapshot; @@ -48,6 +49,7 @@ public Builder(VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext vol this.profile = volumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot.profile; this.resourceGroup = volumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot.resourceGroup; this.userTags = volumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot.userTags; + this.allowedUse = volumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot.allowedUse; this.capacity = volumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot.capacity; this.encryptionKey = volumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot.encryptionKey; this.sourceSnapshot = volumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot.sourceSnapshot; @@ -162,6 +164,17 @@ public Builder userTags(List userTags) { return this; } + /** + * Set the allowedUse. + * + * @param allowedUse the allowedUse + * @return the VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot builder + */ + public Builder allowedUse(VolumeAllowedUsePrototype allowedUse) { + this.allowedUse = allowedUse; + return this; + } + /** * Set the capacity. * @@ -209,6 +222,7 @@ protected VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePro profile = builder.profile; resourceGroup = builder.resourceGroup; userTags = builder.userTags; + allowedUse = builder.allowedUse; capacity = builder.capacity; encryptionKey = builder.encryptionKey; sourceSnapshot = builder.sourceSnapshot; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentReferenceInstanceContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentReferenceInstanceContext.java index a0c360df0a..2edc36086d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentReferenceInstanceContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentReferenceInstanceContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentReferenceVolumeContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentReferenceVolumeContext.java index 72cbe69657..4bfa6f5291 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentReferenceVolumeContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentReferenceVolumeContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeCatalogOffering.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeCatalogOffering.java index 0d3bad1ac0..05835be977 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeCatalogOffering.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeCatalogOffering.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeCollection.java index fc5e651224..f153409c41 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeHealthReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeHealthReason.java index 0868dc78a1..4c59fa8c88 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeHealthReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeHealthReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentity.java index cc842048c8..c40cb4be9e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -10,8 +10,11 @@ * 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.is.vpc.v1.model; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + /** * Identifies a volume by a unique property. * @@ -20,7 +23,11 @@ * - VolumeIdentityByCRN * - VolumeIdentityByHref */ -public class VolumeIdentity extends VolumePrototypeInstance { +public class VolumeIdentity extends GenericModel { + + protected String id; + protected String crn; + protected String href; protected VolumeIdentity() { } diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityByCRN.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityByCRN.java index 785bbc0796..4180e16ddc 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityByCRN.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityByCRN.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityByHref.java index 03922c1a75..de91d5e99d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityById.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityById.java index c592cf3b6d..c9c379ee22 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityById.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityById.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeInstanceProfileCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeInstanceProfileCollection.java new file mode 100644 index 0000000000..7ee481e9de --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeInstanceProfileCollection.java @@ -0,0 +1,92 @@ +/* + * (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.is.vpc.v1.model; + +import java.util.List; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * VolumeInstanceProfileCollection. + */ +public class VolumeInstanceProfileCollection extends GenericModel { + + protected PageLink first; + @SerializedName("instance_profiles") + protected List instanceProfiles; + protected Long limit; + protected PageLink next; + @SerializedName("total_count") + protected Long totalCount; + + protected VolumeInstanceProfileCollection() { } + + /** + * Gets the first. + * + * A link to the first page of resources. + * + * @return the first + */ + public PageLink getFirst() { + return first; + } + + /** + * Gets the instanceProfiles. + * + * A page of instance profiles compatible with the volume. + * + * @return the instanceProfiles + */ + public List getInstanceProfiles() { + return instanceProfiles; + } + + /** + * Gets the limit. + * + * The maximum number of resources that can be returned by the request. + * + * @return the limit + */ + public Long getLimit() { + return limit; + } + + /** + * Gets the next. + * + * A link to the next page of resources. This property is present for all pages + * except the last page. + * + * @return the next + */ + public PageLink getNext() { + return next; + } + + /** + * Gets the totalCount. + * + * The total number of resources across all pages. + * + * @return the totalCount + */ + public Long getTotalCount() { + return totalCount; + } +} + diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeInstanceProfilesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeInstanceProfilesPager.java new file mode 100644 index 0000000000..25a53fb099 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeInstanceProfilesPager.java @@ -0,0 +1,112 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.Vpc; +import com.ibm.cloud.sdk.core.util.UrlHelper; +import java.util.ArrayList; +import java.util.List; +import java.util.NoSuchElementException; + +/** + * VolumeInstanceProfilesPager can be used to simplify the use of the "listVolumeInstanceProfiles" method. + */ +public class VolumeInstanceProfilesPager { + private static class PageContext { + private String next; + public String getNext() { + return next; + } + public void setNext(String next) { + this.next = next; + } + } + + protected boolean hasNext; + protected ListVolumeInstanceProfilesOptions options; + protected Vpc client; + protected PageContext pageContext; + + // Hide the default ctor. + protected VolumeInstanceProfilesPager() { } + + /** + * Constructs a new VolumeInstanceProfilesPager instance with the specified client and options model instance. + * @param client the Vpc instance to be used to invoke the "listVolumeInstanceProfiles" method + * @param options the ListVolumeInstanceProfilesOptions instance to be used to invoke the "listVolumeInstanceProfiles" method + */ + public VolumeInstanceProfilesPager(Vpc client, ListVolumeInstanceProfilesOptions options) { + if (options.start() != null) { + throw new IllegalArgumentException("The options 'start' field should not be set"); + } + + this.hasNext = true; + this.client = client; + this.options = options.newBuilder().build(); + this.pageContext = new PageContext(); + } + + /** + * Returns true if there are more results to be retrieved. + * @return boolean + */ + public boolean hasNext() { + return hasNext; + } + + /** + * Returns the next page of results. + * @return a List<InstanceProfileReference> that contains the next page of results + */ + public List getNext() { + if (!hasNext()) { + throw new NoSuchElementException("No more results available"); + } + + ListVolumeInstanceProfilesOptions.Builder builder = this.options.newBuilder(); + if (this.pageContext.getNext() != null) { + builder.start(this.pageContext.getNext()); + } + this.options = builder.build(); + + VolumeInstanceProfileCollection result = client.listVolumeInstanceProfiles(options).execute().getResult(); + + String next = null; + if (result.getNext() != null) { + String queryParam = UrlHelper.getQueryParam(result.getNext().getHref(), "start"); + if (queryParam != null) { + next = queryParam; + } + } + this.pageContext.setNext(next); + if (next == null) { + this.hasNext = false; + } + + return result.getInstanceProfiles(); + } + + /** + * Returns all results by invoking getNext() repeatedly until all pages of results have been retrieved. + * @return a List<InstanceProfileReference> containing all results returned by the "listVolumeInstanceProfiles" method + */ + public List getAll() { + List results = new ArrayList<>(); + while (hasNext()) { + List nextPage = getNext(); + results.addAll(nextPage); + } + return results; + } +} diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumePatch.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumePatch.java index a10e8f1a66..d1d9ba31dd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumePatch.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumePatch.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -26,6 +26,8 @@ */ public class VolumePatch extends GenericModel { + @SerializedName("allowed_use") + protected VolumeAllowedUsePatch allowedUse; protected Long bandwidth; protected Long capacity; protected Long iops; @@ -38,6 +40,7 @@ public class VolumePatch extends GenericModel { * Builder. */ public static class Builder { + private VolumeAllowedUsePatch allowedUse; private Long bandwidth; private Long capacity; private Long iops; @@ -51,6 +54,7 @@ public static class Builder { * @param volumePatch the instance to initialize the Builder with */ private Builder(VolumePatch volumePatch) { + this.allowedUse = volumePatch.allowedUse; this.bandwidth = volumePatch.bandwidth; this.capacity = volumePatch.capacity; this.iops = volumePatch.iops; @@ -90,6 +94,17 @@ public Builder addUserTags(String userTags) { return this; } + /** + * Set the allowedUse. + * + * @param allowedUse the allowedUse + * @return the VolumePatch builder + */ + public Builder allowedUse(VolumeAllowedUsePatch allowedUse) { + this.allowedUse = allowedUse; + return this; + } + /** * Set the bandwidth. * @@ -161,6 +176,7 @@ public Builder userTags(List userTags) { protected VolumePatch() { } protected VolumePatch(Builder builder) { + allowedUse = builder.allowedUse; bandwidth = builder.bandwidth; capacity = builder.capacity; iops = builder.iops; @@ -178,6 +194,20 @@ public Builder newBuilder() { return new Builder(this); } + /** + * Gets the allowedUse. + * + * The usage constraints to be matched against the requested instance or bare metal server + * properties to determine compatibility. + * + * Can only be specified for boot volumes with an `attachment_state` of `unattached`. + * + * @return the allowedUse + */ + public VolumeAllowedUsePatch allowedUse() { + return allowedUse; + } + /** * Gets the bandwidth. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfile.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfile.java index 82c61abac2..a6492c4701 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfile.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfile.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileAdjustableCapacityStates.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileAdjustableCapacityStates.java index 4902433bdd..a6a016dc34 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileAdjustableCapacityStates.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileAdjustableCapacityStates.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileAdjustableIOPSStates.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileAdjustableIOPSStates.java index 60015ffd95..7eebf66287 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileAdjustableIOPSStates.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileAdjustableIOPSStates.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidth.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidth.java index e8c0c4d076..64a19051f9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidth.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidth.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthDependent.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthDependent.java index cb5c811791..81381d0e51 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthDependent.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthDependent.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthDependentRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthDependentRange.java index f888b3b817..0c2f1b3529 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthDependentRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthDependentRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthEnum.java index 819c26bdd7..b7048cc964 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthEnum.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthEnum.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthFixed.java index 2e7cfab177..a51da23e57 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthRange.java index 325124cae7..79bf2e0c41 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacity.java index daa4b3f956..67cdecb012 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityDependentRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityDependentRange.java index 0d67c909b4..bc92e6782a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityDependentRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityDependentRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityEnum.java index 719ef51cd6..daff6d4742 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityEnum.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityEnum.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityFixed.java index a88268ef3d..56ad9a74ec 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityRange.java index 9be684397d..5df1a28fd5 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacity.java index 2c429865f4..148d6f7cf2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityDependentRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityDependentRange.java index 8c8b05ebcd..df6dd50264 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityDependentRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityDependentRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityEnum.java index 7bc86cff7b..31b5c3d7e8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityEnum.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityEnum.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityFixed.java index 9117548ec4..bf189b363f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityRange.java index ab89697c07..21d8947dda 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCollection.java index 9f9d058be7..80b2c8fa1d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPS.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPS.java index 61f77eddf6..8154630025 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPS.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPS.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSDependentRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSDependentRange.java index e832c4b669..1a0098e65e 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSDependentRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSDependentRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSEnum.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSEnum.java index 4990b61aa8..3df31b7467 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSEnum.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSEnum.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSFixed.java index bcd254db4c..1803879536 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSRange.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSRange.java index c2c775f69a..3e9c36d5bd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSRange.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSRange.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIdentity.java index f7a24552d4..5945970f03 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIdentityByHref.java index 7b4dd89862..5f5ec5acb9 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIdentityByName.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIdentityByName.java index 35a9157e7c..c257eabc29 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIdentityByName.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIdentityByName.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileReference.java index 9b9bdc7ad6..84f49a974f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileStorageGenerationFixed.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileStorageGenerationFixed.java index d3a35c764a..b2116c59aa 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileStorageGenerationFixed.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileStorageGenerationFixed.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfilesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfilesPager.java index 0386578ecd..f0958d8a9b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfilesPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfilesPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototype.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototype.java index 44997f5bbd..6d196b5e54 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototype.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototype.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -39,6 +39,8 @@ public class VolumePrototype extends GenericModel { protected Long capacity; @SerializedName("encryption_key") protected EncryptionKeyIdentity encryptionKey; + @SerializedName("allowed_use") + protected VolumeAllowedUsePrototype allowedUse; @SerializedName("source_snapshot") protected SnapshotIdentity sourceSnapshot; @@ -161,6 +163,21 @@ public EncryptionKeyIdentity encryptionKey() { return encryptionKey; } + /** + * Gets the allowedUse. + * + * The usage constraints to be matched against requested instance or bare metal server + * properties to determine compatibility. + * + * Can only be specified if `source_snapshot` is bootable. If not specified, the value of + * this property will be inherited from the `source_snapshot`. + * + * @return the allowedUse + */ + public VolumeAllowedUsePrototype allowedUse() { + return allowedUse; + } + /** * Gets the sourceSnapshot. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeInstanceByImageContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeInstanceByImageContext.java index 4fa53f86ac..42c1191cb8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeInstanceByImageContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeInstanceByImageContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -16,15 +16,33 @@ import java.util.ArrayList; import java.util.List; +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + /** * VolumePrototypeInstanceByImageContext. */ -public class VolumePrototypeInstanceByImageContext extends VolumePrototypeInstance { +public class VolumePrototypeInstanceByImageContext extends GenericModel { + + @SerializedName("allowed_use") + protected VolumeAllowedUsePrototype allowedUse; + protected Long bandwidth; + protected Long capacity; + @SerializedName("encryption_key") + protected EncryptionKeyIdentity encryptionKey; + protected Long iops; + protected String name; + protected VolumeProfileIdentity profile; + @SerializedName("resource_group") + protected ResourceGroupIdentity resourceGroup; + @SerializedName("user_tags") + protected List userTags; /** * Builder. */ public static class Builder { + private VolumeAllowedUsePrototype allowedUse; private Long bandwidth; private Long capacity; private EncryptionKeyIdentity encryptionKey; @@ -40,6 +58,7 @@ public static class Builder { * @param volumePrototypeInstanceByImageContext the instance to initialize the Builder with */ private Builder(VolumePrototypeInstanceByImageContext volumePrototypeInstanceByImageContext) { + this.allowedUse = volumePrototypeInstanceByImageContext.allowedUse; this.bandwidth = volumePrototypeInstanceByImageContext.bandwidth; this.capacity = volumePrototypeInstanceByImageContext.capacity; this.encryptionKey = volumePrototypeInstanceByImageContext.encryptionKey; @@ -90,6 +109,17 @@ public Builder addUserTags(String userTags) { return this; } + /** + * Set the allowedUse. + * + * @param allowedUse the allowedUse + * @return the VolumePrototypeInstanceByImageContext builder + */ + public Builder allowedUse(VolumeAllowedUsePrototype allowedUse) { + this.allowedUse = allowedUse; + return this; + } + /** * Set the bandwidth. * @@ -185,6 +215,7 @@ protected VolumePrototypeInstanceByImageContext() { } protected VolumePrototypeInstanceByImageContext(Builder builder) { com.ibm.cloud.sdk.core.util.Validator.notNull(builder.profile, "profile cannot be null"); + allowedUse = builder.allowedUse; bandwidth = builder.bandwidth; capacity = builder.capacity; encryptionKey = builder.encryptionKey; @@ -204,6 +235,21 @@ public Builder newBuilder() { return new Builder(this); } + /** + * Gets the allowedUse. + * + * The usage constraints to be matched against requested instance or bare metal server + * properties to determine compatibility. + * + * Can only be specified if `source_snapshot` is bootable. If not specified, the value of + * this property will be inherited from the `source_image`. + * + * @return the allowedUse + */ + public VolumeAllowedUsePrototype allowedUse() { + return allowedUse; + } + /** * Gets the bandwidth. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeInstanceBySourceSnapshotContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeInstanceBySourceSnapshotContext.java index 6fee2b86fc..b0b2333d0f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeInstanceBySourceSnapshotContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeInstanceBySourceSnapshotContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -16,15 +16,35 @@ import java.util.ArrayList; import java.util.List; +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + /** * VolumePrototypeInstanceBySourceSnapshotContext. */ -public class VolumePrototypeInstanceBySourceSnapshotContext extends VolumePrototypeInstance { +public class VolumePrototypeInstanceBySourceSnapshotContext extends GenericModel { + + @SerializedName("allowed_use") + protected VolumeAllowedUsePrototype allowedUse; + protected Long bandwidth; + protected Long capacity; + @SerializedName("encryption_key") + protected EncryptionKeyIdentity encryptionKey; + protected Long iops; + protected String name; + protected VolumeProfileIdentity profile; + @SerializedName("resource_group") + protected ResourceGroupIdentity resourceGroup; + @SerializedName("source_snapshot") + protected SnapshotIdentity sourceSnapshot; + @SerializedName("user_tags") + protected List userTags; /** * Builder. */ public static class Builder { + private VolumeAllowedUsePrototype allowedUse; private Long bandwidth; private Long capacity; private EncryptionKeyIdentity encryptionKey; @@ -41,6 +61,7 @@ public static class Builder { * @param volumePrototypeInstanceBySourceSnapshotContext the instance to initialize the Builder with */ private Builder(VolumePrototypeInstanceBySourceSnapshotContext volumePrototypeInstanceBySourceSnapshotContext) { + this.allowedUse = volumePrototypeInstanceBySourceSnapshotContext.allowedUse; this.bandwidth = volumePrototypeInstanceBySourceSnapshotContext.bandwidth; this.capacity = volumePrototypeInstanceBySourceSnapshotContext.capacity; this.encryptionKey = volumePrototypeInstanceBySourceSnapshotContext.encryptionKey; @@ -94,6 +115,17 @@ public Builder addUserTags(String userTags) { return this; } + /** + * Set the allowedUse. + * + * @param allowedUse the allowedUse + * @return the VolumePrototypeInstanceBySourceSnapshotContext builder + */ + public Builder allowedUse(VolumeAllowedUsePrototype allowedUse) { + this.allowedUse = allowedUse; + return this; + } + /** * Set the bandwidth. * @@ -202,6 +234,7 @@ protected VolumePrototypeInstanceBySourceSnapshotContext(Builder builder) { "profile cannot be null"); com.ibm.cloud.sdk.core.util.Validator.notNull(builder.sourceSnapshot, "sourceSnapshot cannot be null"); + allowedUse = builder.allowedUse; bandwidth = builder.bandwidth; capacity = builder.capacity; encryptionKey = builder.encryptionKey; @@ -222,6 +255,21 @@ public Builder newBuilder() { return new Builder(this); } + /** + * Gets the allowedUse. + * + * The usage constraints to be matched against requested instance or bare metal server + * properties to determine compatibility. + * + * Can only be specified if `source_snapshot` is bootable. If not specified, the value of + * this property will be inherited from the `source_snapshot`. + * + * @return the allowedUse + */ + public VolumeAllowedUsePrototype allowedUse() { + return allowedUse; + } + /** * Gets the bandwidth. * diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeVolumeByCapacity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeVolumeByCapacity.java index 28f9453779..38690ed350 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeVolumeByCapacity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeVolumeByCapacity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeVolumeBySourceSnapshot.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeVolumeBySourceSnapshot.java index c0e708bf9e..45c7999eb1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeVolumeBySourceSnapshot.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeVolumeBySourceSnapshot.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -33,6 +33,7 @@ public static class Builder { private ResourceGroupIdentity resourceGroup; private List userTags; private ZoneIdentity zone; + private VolumeAllowedUsePrototype allowedUse; private Long capacity; private EncryptionKeyIdentity encryptionKey; private SnapshotIdentity sourceSnapshot; @@ -50,6 +51,7 @@ public Builder(VolumePrototype volumePrototypeVolumeBySourceSnapshot) { this.resourceGroup = volumePrototypeVolumeBySourceSnapshot.resourceGroup; this.userTags = volumePrototypeVolumeBySourceSnapshot.userTags; this.zone = volumePrototypeVolumeBySourceSnapshot.zone; + this.allowedUse = volumePrototypeVolumeBySourceSnapshot.allowedUse; this.capacity = volumePrototypeVolumeBySourceSnapshot.capacity; this.encryptionKey = volumePrototypeVolumeBySourceSnapshot.encryptionKey; this.sourceSnapshot = volumePrototypeVolumeBySourceSnapshot.sourceSnapshot; @@ -177,6 +179,17 @@ public Builder zone(ZoneIdentity zone) { return this; } + /** + * Set the allowedUse. + * + * @param allowedUse the allowedUse + * @return the VolumePrototypeVolumeBySourceSnapshot builder + */ + public Builder allowedUse(VolumeAllowedUsePrototype allowedUse) { + this.allowedUse = allowedUse; + return this; + } + /** * Set the capacity. * @@ -227,6 +240,7 @@ protected VolumePrototypeVolumeBySourceSnapshot(Builder builder) { resourceGroup = builder.resourceGroup; userTags = builder.userTags; zone = builder.zone; + allowedUse = builder.allowedUse; capacity = builder.capacity; encryptionKey = builder.encryptionKey; sourceSnapshot = builder.sourceSnapshot; diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeReference.java index a64479d1f1..95b682ba32 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeReferenceVolumeAttachmentContext.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeReferenceVolumeAttachmentContext.java index f9d585a30a..77b8153c83 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeReferenceVolumeAttachmentContext.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeReferenceVolumeAttachmentContext.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeRemote.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeRemote.java index 8818ecdd18..f8cd882bb1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeRemote.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeRemote.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeStatusReason.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeStatusReason.java index c95fe6b2d2..7152f6403d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeStatusReason.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumeStatusReason.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumesPager.java index 3725e0350a..dfd2569a3a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumesPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VolumesPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpcAddressPrefixesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpcAddressPrefixesPager.java index 8c44f9159f..27ec5360ec 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpcAddressPrefixesPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpcAddressPrefixesPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpcDnsResolutionBindingsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpcDnsResolutionBindingsPager.java index ae5ac538a0..9ed21495b8 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpcDnsResolutionBindingsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpcDnsResolutionBindingsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpcRoutesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpcRoutesPager.java index 42369d9b3d..804b41fac3 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpcRoutesPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpcRoutesPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpcRoutingTableRoutesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpcRoutingTableRoutesPager.java index cd1bee5368..dca7d5a2cd 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpcRoutingTableRoutesPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpcRoutingTableRoutesPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpcRoutingTablesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpcRoutingTablesPager.java index 582a5ccabf..26a8d22ae2 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpcRoutingTablesPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpcRoutingTablesPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpcsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpcsPager.java index b028209696..8962be5439 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpcsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpcsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpnGatewayConnectionsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpnGatewayConnectionsPager.java index ac26b04f2a..0391903a4b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpnGatewayConnectionsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpnGatewayConnectionsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpnGatewayServiceConnectionsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpnGatewayServiceConnectionsPager.java new file mode 100644 index 0000000000..110271edf3 --- /dev/null +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpnGatewayServiceConnectionsPager.java @@ -0,0 +1,112 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.Vpc; +import com.ibm.cloud.sdk.core.util.UrlHelper; +import java.util.ArrayList; +import java.util.List; +import java.util.NoSuchElementException; + +/** + * VpnGatewayServiceConnectionsPager can be used to simplify the use of the "listVpnGatewayServiceConnections" method. + */ +public class VpnGatewayServiceConnectionsPager { + private static class PageContext { + private String next; + public String getNext() { + return next; + } + public void setNext(String next) { + this.next = next; + } + } + + protected boolean hasNext; + protected ListVpnGatewayServiceConnectionsOptions options; + protected Vpc client; + protected PageContext pageContext; + + // Hide the default ctor. + protected VpnGatewayServiceConnectionsPager() { } + + /** + * Constructs a new VpnGatewayServiceConnectionsPager instance with the specified client and options model instance. + * @param client the Vpc instance to be used to invoke the "listVpnGatewayServiceConnections" method + * @param options the ListVpnGatewayServiceConnectionsOptions instance to be used to invoke the "listVpnGatewayServiceConnections" method + */ + public VpnGatewayServiceConnectionsPager(Vpc client, ListVpnGatewayServiceConnectionsOptions options) { + if (options.start() != null) { + throw new IllegalArgumentException("The options 'start' field should not be set"); + } + + this.hasNext = true; + this.client = client; + this.options = options.newBuilder().build(); + this.pageContext = new PageContext(); + } + + /** + * Returns true if there are more results to be retrieved. + * @return boolean + */ + public boolean hasNext() { + return hasNext; + } + + /** + * Returns the next page of results. + * @return a List<VPNGatewayServiceConnection> that contains the next page of results + */ + public List getNext() { + if (!hasNext()) { + throw new NoSuchElementException("No more results available"); + } + + ListVpnGatewayServiceConnectionsOptions.Builder builder = this.options.newBuilder(); + if (this.pageContext.getNext() != null) { + builder.start(this.pageContext.getNext()); + } + this.options = builder.build(); + + VPNGatewayServiceConnectionCollection result = client.listVpnGatewayServiceConnections(options).execute().getResult(); + + String next = null; + if (result.getNext() != null) { + String queryParam = UrlHelper.getQueryParam(result.getNext().getHref(), "start"); + if (queryParam != null) { + next = queryParam; + } + } + this.pageContext.setNext(next); + if (next == null) { + this.hasNext = false; + } + + return result.getServiceConnections(); + } + + /** + * Returns all results by invoking getNext() repeatedly until all pages of results have been retrieved. + * @return a List<VPNGatewayServiceConnection> containing all results returned by the "listVpnGatewayServiceConnections" method + */ + public List getAll() { + List results = new ArrayList<>(); + while (hasNext()) { + List nextPage = getNext(); + results.addAll(nextPage); + } + return results; + } +} diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpnGatewaysPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpnGatewaysPager.java index bc9fdd3628..0435d8f25f 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpnGatewaysPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpnGatewaysPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpnServerClientsPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpnServerClientsPager.java index d83152c89e..b13efa226a 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpnServerClientsPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpnServerClientsPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpnServerRoutesPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpnServerRoutesPager.java index a690e514f8..c1469a9fdc 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpnServerRoutesPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpnServerRoutesPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpnServersPager.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpnServersPager.java index 8549a48833..c568c9008d 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpnServersPager.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/VpnServersPager.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Zone.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Zone.java index 6c185dbe6a..725eac57ba 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Zone.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/Zone.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ZoneCollection.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ZoneCollection.java index 54c98f0fe0..c7e2160819 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ZoneCollection.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ZoneCollection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ZoneIdentity.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ZoneIdentity.java index bead445408..9425f38ee1 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ZoneIdentity.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ZoneIdentity.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ZoneIdentityByHref.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ZoneIdentityByHref.java index ae7b662844..b4b0e84569 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ZoneIdentityByHref.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ZoneIdentityByHref.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ZoneIdentityByName.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ZoneIdentityByName.java index 783dd6d65c..221e1d4c3b 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ZoneIdentityByName.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ZoneIdentityByName.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ZoneReference.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ZoneReference.java index 9ee86e9531..caccd478d6 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ZoneReference.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/ZoneReference.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/package-info.java b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/package-info.java index a36ef1af61..7db829bf52 100644 --- a/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/package-info.java +++ b/modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/package-info.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/VpcTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/VpcTest.java index 9ce99bc64a..fcca902810 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/VpcTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/VpcTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -23,6 +23,7 @@ import com.ibm.cloud.is.vpc.v1.model.AddInstanceNetworkInterfaceFloatingIpOptions; import com.ibm.cloud.is.vpc.v1.model.AddNetworkInterfaceFloatingIpOptions; import com.ibm.cloud.is.vpc.v1.model.AddVirtualNetworkInterfaceIpOptions; +import com.ibm.cloud.is.vpc.v1.model.AddVpnGatewayAdvertisedCidrOptions; import com.ibm.cloud.is.vpc.v1.model.AddVpnGatewayConnectionsLocalCidrOptions; import com.ibm.cloud.is.vpc.v1.model.AddVpnGatewayConnectionsPeerCidrOptions; import com.ibm.cloud.is.vpc.v1.model.AddressPrefix; @@ -78,15 +79,21 @@ import com.ibm.cloud.is.vpc.v1.model.BareMetalServerCollection; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerConsoleAccessToken; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerDisk; +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerDiskAllowedUse; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerDiskCollection; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerDiskPatch; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerFirmware; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerHealthReason; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerInitialization; +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerInitializationDefaultTrustedProfile; +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerInitializationDefaultTrustedProfilePrototype; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerInitializationPrototype; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerInitializationUserAccount; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerLifecycleReason; +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerMetadataService; +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerMetadataServicePatch; +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerMetadataServicePrototype; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerNetworkAttachment; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerNetworkAttachmentByPCI; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerNetworkAttachmentByVLAN; @@ -191,6 +198,7 @@ import com.ibm.cloud.is.vpc.v1.model.CertificateInstanceIdentity; import com.ibm.cloud.is.vpc.v1.model.CertificateInstanceIdentityByCRN; import com.ibm.cloud.is.vpc.v1.model.CertificateInstanceReference; +import com.ibm.cloud.is.vpc.v1.model.CheckVpnGatewayAdvertisedCidrOptions; import com.ibm.cloud.is.vpc.v1.model.CheckVpnGatewayConnectionsLocalCidrOptions; import com.ibm.cloud.is.vpc.v1.model.CheckVpnGatewayConnectionsPeerCidrOptions; import com.ibm.cloud.is.vpc.v1.model.CloudObjectStorageBucketIdentity; @@ -309,6 +317,7 @@ import com.ibm.cloud.is.vpc.v1.model.CreateVpcDnsResolutionBindingOptions; import com.ibm.cloud.is.vpc.v1.model.CreateVpcOptions; import com.ibm.cloud.is.vpc.v1.model.CreateVpcRouteOptions; +import com.ibm.cloud.is.vpc.v1.model.CreateVpcRouteResponse; import com.ibm.cloud.is.vpc.v1.model.CreateVpcRoutingTableOptions; import com.ibm.cloud.is.vpc.v1.model.CreateVpcRoutingTableRouteOptions; import com.ibm.cloud.is.vpc.v1.model.CreateVpnGatewayConnectionOptions; @@ -645,10 +654,12 @@ import com.ibm.cloud.is.vpc.v1.model.GetVpcDnsResolutionBindingOptions; import com.ibm.cloud.is.vpc.v1.model.GetVpcOptions; import com.ibm.cloud.is.vpc.v1.model.GetVpcRouteOptions; +import com.ibm.cloud.is.vpc.v1.model.GetVpcRouteResponse; import com.ibm.cloud.is.vpc.v1.model.GetVpcRoutingTableOptions; import com.ibm.cloud.is.vpc.v1.model.GetVpcRoutingTableRouteOptions; import com.ibm.cloud.is.vpc.v1.model.GetVpnGatewayConnectionOptions; import com.ibm.cloud.is.vpc.v1.model.GetVpnGatewayOptions; +import com.ibm.cloud.is.vpc.v1.model.GetVpnGatewayServiceConnectionOptions; import com.ibm.cloud.is.vpc.v1.model.GetVpnServerClientConfigurationOptions; import com.ibm.cloud.is.vpc.v1.model.GetVpnServerClientOptions; import com.ibm.cloud.is.vpc.v1.model.GetVpnServerOptions; @@ -667,6 +678,11 @@ import com.ibm.cloud.is.vpc.v1.model.IkePoliciesPager; import com.ibm.cloud.is.vpc.v1.model.IkePolicyConnectionsPager; import com.ibm.cloud.is.vpc.v1.model.Image; +import com.ibm.cloud.is.vpc.v1.model.ImageAllowedUse; +import com.ibm.cloud.is.vpc.v1.model.ImageAllowedUsePatch; +import com.ibm.cloud.is.vpc.v1.model.ImageAllowedUsePrototype; +import com.ibm.cloud.is.vpc.v1.model.ImageBareMetalServerProfileCollection; +import com.ibm.cloud.is.vpc.v1.model.ImageBareMetalServerProfilesPager; import com.ibm.cloud.is.vpc.v1.model.ImageCatalogOffering; import com.ibm.cloud.is.vpc.v1.model.ImageCollection; import com.ibm.cloud.is.vpc.v1.model.ImageExportJob; @@ -680,6 +696,8 @@ import com.ibm.cloud.is.vpc.v1.model.ImageIdentityByCRN; import com.ibm.cloud.is.vpc.v1.model.ImageIdentityByHref; import com.ibm.cloud.is.vpc.v1.model.ImageIdentityById; +import com.ibm.cloud.is.vpc.v1.model.ImageInstanceProfileCollection; +import com.ibm.cloud.is.vpc.v1.model.ImageInstanceProfilesPager; import com.ibm.cloud.is.vpc.v1.model.ImagePatch; import com.ibm.cloud.is.vpc.v1.model.ImagePrototype; import com.ibm.cloud.is.vpc.v1.model.ImagePrototypeImageByFile; @@ -899,6 +917,9 @@ import com.ibm.cloud.is.vpc.v1.model.InstanceProfileVolumeBandwidthDependent; import com.ibm.cloud.is.vpc.v1.model.InstanceProfileVolumeBandwidthEnum; import com.ibm.cloud.is.vpc.v1.model.InstanceProfileVolumeBandwidthFixed; +import com.ibm.cloud.is.vpc.v1.model.InstanceProfileVolumeBandwidthQoSModes; +import com.ibm.cloud.is.vpc.v1.model.InstanceProfileVolumeBandwidthQoSModesDependent; +import com.ibm.cloud.is.vpc.v1.model.InstanceProfileVolumeBandwidthQoSModesEnum; import com.ibm.cloud.is.vpc.v1.model.InstanceProfileVolumeBandwidthRange; import com.ibm.cloud.is.vpc.v1.model.InstancePrototype; import com.ibm.cloud.is.vpc.v1.model.InstancePrototypeInstanceByCatalogOffering; @@ -989,7 +1010,9 @@ import com.ibm.cloud.is.vpc.v1.model.ListFlowLogCollectorsOptions; import com.ibm.cloud.is.vpc.v1.model.ListIkePoliciesOptions; import com.ibm.cloud.is.vpc.v1.model.ListIkePolicyConnectionsOptions; +import com.ibm.cloud.is.vpc.v1.model.ListImageBareMetalServerProfilesOptions; import com.ibm.cloud.is.vpc.v1.model.ListImageExportJobsOptions; +import com.ibm.cloud.is.vpc.v1.model.ListImageInstanceProfilesOptions; import com.ibm.cloud.is.vpc.v1.model.ListImagesOptions; import com.ibm.cloud.is.vpc.v1.model.ListInstanceClusterNetworkAttachmentsOptions; import com.ibm.cloud.is.vpc.v1.model.ListInstanceDisksOptions; @@ -1039,11 +1062,13 @@ import com.ibm.cloud.is.vpc.v1.model.ListSharesOptions; import com.ibm.cloud.is.vpc.v1.model.ListSnapshotClonesOptions; import com.ibm.cloud.is.vpc.v1.model.ListSnapshotConsistencyGroupsOptions; +import com.ibm.cloud.is.vpc.v1.model.ListSnapshotInstanceProfilesOptions; import com.ibm.cloud.is.vpc.v1.model.ListSnapshotsOptions; import com.ibm.cloud.is.vpc.v1.model.ListSubnetReservedIpsOptions; import com.ibm.cloud.is.vpc.v1.model.ListSubnetsOptions; import com.ibm.cloud.is.vpc.v1.model.ListVirtualNetworkInterfaceIpsOptions; import com.ibm.cloud.is.vpc.v1.model.ListVirtualNetworkInterfacesOptions; +import com.ibm.cloud.is.vpc.v1.model.ListVolumeInstanceProfilesOptions; import com.ibm.cloud.is.vpc.v1.model.ListVolumeProfilesOptions; import com.ibm.cloud.is.vpc.v1.model.ListVolumesOptions; import com.ibm.cloud.is.vpc.v1.model.ListVpcAddressPrefixesOptions; @@ -1052,9 +1077,11 @@ import com.ibm.cloud.is.vpc.v1.model.ListVpcRoutingTableRoutesOptions; import com.ibm.cloud.is.vpc.v1.model.ListVpcRoutingTablesOptions; import com.ibm.cloud.is.vpc.v1.model.ListVpcsOptions; +import com.ibm.cloud.is.vpc.v1.model.ListVpnGatewayAdvertisedCidrsOptions; import com.ibm.cloud.is.vpc.v1.model.ListVpnGatewayConnectionsLocalCidrsOptions; import com.ibm.cloud.is.vpc.v1.model.ListVpnGatewayConnectionsOptions; import com.ibm.cloud.is.vpc.v1.model.ListVpnGatewayConnectionsPeerCidrsOptions; +import com.ibm.cloud.is.vpc.v1.model.ListVpnGatewayServiceConnectionsOptions; import com.ibm.cloud.is.vpc.v1.model.ListVpnGatewaysOptions; import com.ibm.cloud.is.vpc.v1.model.ListVpnServerClientsOptions; import com.ibm.cloud.is.vpc.v1.model.ListVpnServerRoutesOptions; @@ -1147,7 +1174,8 @@ import com.ibm.cloud.is.vpc.v1.model.LoadBalancerPoolMemberPrototype; import com.ibm.cloud.is.vpc.v1.model.LoadBalancerPoolMemberReference; import com.ibm.cloud.is.vpc.v1.model.LoadBalancerPoolMemberTarget; -import com.ibm.cloud.is.vpc.v1.model.LoadBalancerPoolMemberTargetIP; +import com.ibm.cloud.is.vpc.v1.model.LoadBalancerPoolMemberTargetByReservedIp; +import com.ibm.cloud.is.vpc.v1.model.LoadBalancerPoolMemberTargetIPNotReservedIP; import com.ibm.cloud.is.vpc.v1.model.LoadBalancerPoolMemberTargetInstanceReference; import com.ibm.cloud.is.vpc.v1.model.LoadBalancerPoolMemberTargetLoadBalancerReference; import com.ibm.cloud.is.vpc.v1.model.LoadBalancerPoolMemberTargetPrototype; @@ -1160,6 +1188,9 @@ import com.ibm.cloud.is.vpc.v1.model.LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityByCRN; import com.ibm.cloud.is.vpc.v1.model.LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityByHref; import com.ibm.cloud.is.vpc.v1.model.LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityById; +import com.ibm.cloud.is.vpc.v1.model.LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity; +import com.ibm.cloud.is.vpc.v1.model.LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref; +import com.ibm.cloud.is.vpc.v1.model.LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityById; import com.ibm.cloud.is.vpc.v1.model.LoadBalancerPoolPatch; import com.ibm.cloud.is.vpc.v1.model.LoadBalancerPoolPrototypeLoadBalancerContext; import com.ibm.cloud.is.vpc.v1.model.LoadBalancerPoolReference; @@ -1192,6 +1223,7 @@ import com.ibm.cloud.is.vpc.v1.model.LoadBalancerProfileSourceIPSessionPersistenceSupported; import com.ibm.cloud.is.vpc.v1.model.LoadBalancerProfileSourceIPSessionPersistenceSupportedDependent; import com.ibm.cloud.is.vpc.v1.model.LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed; +import com.ibm.cloud.is.vpc.v1.model.LoadBalancerProfileTargetableResourceTypes; import com.ibm.cloud.is.vpc.v1.model.LoadBalancerProfileUDPSupported; import com.ibm.cloud.is.vpc.v1.model.LoadBalancerProfileUDPSupportedDependent; import com.ibm.cloud.is.vpc.v1.model.LoadBalancerProfileUDPSupportedFixed; @@ -1311,6 +1343,7 @@ import com.ibm.cloud.is.vpc.v1.model.RemoveInstanceNetworkInterfaceFloatingIpOptions; import com.ibm.cloud.is.vpc.v1.model.RemoveNetworkInterfaceFloatingIpOptions; import com.ibm.cloud.is.vpc.v1.model.RemoveVirtualNetworkInterfaceIpOptions; +import com.ibm.cloud.is.vpc.v1.model.RemoveVpnGatewayAdvertisedCidrOptions; import com.ibm.cloud.is.vpc.v1.model.RemoveVpnGatewayConnectionsLocalCidrOptions; import com.ibm.cloud.is.vpc.v1.model.RemoveVpnGatewayConnectionsPeerCidrOptions; import com.ibm.cloud.is.vpc.v1.model.ReplaceBareMetalServerInitializationOptions; @@ -1494,6 +1527,19 @@ import com.ibm.cloud.is.vpc.v1.model.ShareMountTargetsPager; import com.ibm.cloud.is.vpc.v1.model.SharePatch; import com.ibm.cloud.is.vpc.v1.model.ShareProfile; +import com.ibm.cloud.is.vpc.v1.model.ShareProfileAllowedAccessProtocols; +import com.ibm.cloud.is.vpc.v1.model.ShareProfileAllowedAccessProtocolsSubset; +import com.ibm.cloud.is.vpc.v1.model.ShareProfileAllowedTransitEncryptionModes; +import com.ibm.cloud.is.vpc.v1.model.ShareProfileAllowedTransitEncryptionModesSubset; +import com.ibm.cloud.is.vpc.v1.model.ShareProfileAvailabilityModes; +import com.ibm.cloud.is.vpc.v1.model.ShareProfileAvailabilityModesEnum; +import com.ibm.cloud.is.vpc.v1.model.ShareProfileAvailabilityModesFixed; +import com.ibm.cloud.is.vpc.v1.model.ShareProfileBandwidth; +import com.ibm.cloud.is.vpc.v1.model.ShareProfileBandwidthDependent; +import com.ibm.cloud.is.vpc.v1.model.ShareProfileBandwidthDependentRange; +import com.ibm.cloud.is.vpc.v1.model.ShareProfileBandwidthEnum; +import com.ibm.cloud.is.vpc.v1.model.ShareProfileBandwidthFixed; +import com.ibm.cloud.is.vpc.v1.model.ShareProfileBandwidthRange; import com.ibm.cloud.is.vpc.v1.model.ShareProfileCapacity; import com.ibm.cloud.is.vpc.v1.model.ShareProfileCapacityDependentRange; import com.ibm.cloud.is.vpc.v1.model.ShareProfileCapacityEnum; @@ -1510,6 +1556,8 @@ import com.ibm.cloud.is.vpc.v1.model.ShareProfileIdentityByHref; import com.ibm.cloud.is.vpc.v1.model.ShareProfileIdentityByName; import com.ibm.cloud.is.vpc.v1.model.ShareProfileReference; +import com.ibm.cloud.is.vpc.v1.model.ShareProfileStorageGeneration; +import com.ibm.cloud.is.vpc.v1.model.ShareProfileStorageGenerationFixed; import com.ibm.cloud.is.vpc.v1.model.ShareProfilesPager; import com.ibm.cloud.is.vpc.v1.model.SharePrototype; import com.ibm.cloud.is.vpc.v1.model.SharePrototypeShareByOriginShare; @@ -1535,6 +1583,9 @@ import com.ibm.cloud.is.vpc.v1.model.ShareSourceSnapshotShareSnapshotReference; import com.ibm.cloud.is.vpc.v1.model.SharesPager; import com.ibm.cloud.is.vpc.v1.model.Snapshot; +import com.ibm.cloud.is.vpc.v1.model.SnapshotAllowedUse; +import com.ibm.cloud.is.vpc.v1.model.SnapshotAllowedUsePatch; +import com.ibm.cloud.is.vpc.v1.model.SnapshotAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.SnapshotCatalogOffering; import com.ibm.cloud.is.vpc.v1.model.SnapshotClone; import com.ibm.cloud.is.vpc.v1.model.SnapshotCloneCollection; @@ -1552,6 +1603,8 @@ import com.ibm.cloud.is.vpc.v1.model.SnapshotIdentityByCRN; import com.ibm.cloud.is.vpc.v1.model.SnapshotIdentityByHref; import com.ibm.cloud.is.vpc.v1.model.SnapshotIdentityById; +import com.ibm.cloud.is.vpc.v1.model.SnapshotInstanceProfileCollection; +import com.ibm.cloud.is.vpc.v1.model.SnapshotInstanceProfilesPager; import com.ibm.cloud.is.vpc.v1.model.SnapshotPatch; import com.ibm.cloud.is.vpc.v1.model.SnapshotPrototype; import com.ibm.cloud.is.vpc.v1.model.SnapshotPrototypeSnapshotBySourceSnapshot; @@ -1649,6 +1702,7 @@ import com.ibm.cloud.is.vpc.v1.model.UpdateVpcDnsResolutionBindingOptions; import com.ibm.cloud.is.vpc.v1.model.UpdateVpcOptions; import com.ibm.cloud.is.vpc.v1.model.UpdateVpcRouteOptions; +import com.ibm.cloud.is.vpc.v1.model.UpdateVpcRouteResponse; import com.ibm.cloud.is.vpc.v1.model.UpdateVpcRoutingTableOptions; import com.ibm.cloud.is.vpc.v1.model.UpdateVpcRoutingTableRouteOptions; import com.ibm.cloud.is.vpc.v1.model.UpdateVpnGatewayConnectionOptions; @@ -1689,6 +1743,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCReferenceRemote; import com.ibm.cloud.is.vpc.v1.model.VPCRemote; import com.ibm.cloud.is.vpc.v1.model.VPNGateway; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayAdvertisedCIDRCollection; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayCollection; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnection; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionCIDRs; @@ -1696,6 +1751,15 @@ import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDPD; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDPDPatch; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDPDPrototype; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDynamicRouteModeLocal; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDynamicRouteModeLocalPrototype; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDynamicRouteModePeer; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDynamicRouteModePeerPrototype; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddress; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFQDN; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDynamicRouteModeTunnel; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionIKEIdentity; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionIKEIdentityPrototype; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN; @@ -1720,6 +1784,9 @@ import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionPatch; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionPeerPatch; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch; @@ -1736,10 +1803,12 @@ import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionPrototype; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionReference; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionRouteMode; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionStaticRouteModeLocal; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionStaticRouteModeLocalPrototype; @@ -1751,6 +1820,8 @@ import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionStaticRouteModeTunnel; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionStatusReason; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionTunnel; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionTunnelPrototype; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionTunnelStatusReason; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayHealthReason; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayLifecycleReason; @@ -1763,6 +1834,12 @@ import com.ibm.cloud.is.vpc.v1.model.VPNGatewayPrototypeVPNGatewayPolicyModePrototype; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayPrototypeVPNGatewayRouteModePrototype; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayRouteMode; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayServiceConnection; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayServiceConnectionCollection; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayServiceConnectionCreator; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayServiceConnectionCreatorTransitGatewayReference; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayServiceConnectionLifecycleReason; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayServiceConnectionStatusReason; import com.ibm.cloud.is.vpc.v1.model.VPNServer; import com.ibm.cloud.is.vpc.v1.model.VPNServerAuthentication; import com.ibm.cloud.is.vpc.v1.model.VPNServerAuthenticationByCertificate; @@ -1804,6 +1881,9 @@ import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceTargetShareMountTargetReference; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacesPager; import com.ibm.cloud.is.vpc.v1.model.Volume; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUse; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePatch; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachment; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentCollection; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentDevice; @@ -1829,6 +1909,8 @@ import com.ibm.cloud.is.vpc.v1.model.VolumeIdentityByCRN; import com.ibm.cloud.is.vpc.v1.model.VolumeIdentityByHref; import com.ibm.cloud.is.vpc.v1.model.VolumeIdentityById; +import com.ibm.cloud.is.vpc.v1.model.VolumeInstanceProfileCollection; +import com.ibm.cloud.is.vpc.v1.model.VolumeInstanceProfilesPager; import com.ibm.cloud.is.vpc.v1.model.VolumePatch; import com.ibm.cloud.is.vpc.v1.model.VolumeProfile; import com.ibm.cloud.is.vpc.v1.model.VolumeProfileAdjustableCapacityStates; @@ -1878,6 +1960,7 @@ import com.ibm.cloud.is.vpc.v1.model.VpcRoutingTablesPager; import com.ibm.cloud.is.vpc.v1.model.VpcsPager; import com.ibm.cloud.is.vpc.v1.model.VpnGatewayConnectionsPager; +import com.ibm.cloud.is.vpc.v1.model.VpnGatewayServiceConnectionsPager; import com.ibm.cloud.is.vpc.v1.model.VpnGatewaysPager; import com.ibm.cloud.is.vpc.v1.model.VpnServerClientsPager; import com.ibm.cloud.is.vpc.v1.model.VpnServerRoutesPager; @@ -1924,7 +2007,8 @@ public class VpcTest { @Test(expectedExceptions = IllegalArgumentException.class) public void testConstructorWithNullAuthenticator() throws Throwable { final String serviceName = "testService"; - new Vpc(serviceName, null); + String version = "2024-06-23"; + new Vpc(version, serviceName, null); } // Test the getServiceUrlForRegion() method @@ -1938,6 +2022,7 @@ public void testGetServiceUrlForRegion() throws Throwable { assertEquals(Vpc.getServiceUrlForRegion("eu-de"), "https://eu-de.iaas.cloud.ibm.com/v1"); assertEquals(Vpc.getServiceUrlForRegion("eu-es"), "https://eu-es.iaas.cloud.ibm.com/v1"); assertEquals(Vpc.getServiceUrlForRegion("eu-gb"), "https://eu-gb.iaas.cloud.ibm.com/v1"); + assertEquals(Vpc.getServiceUrlForRegion("in-che"), "https://in-che.iaas.cloud.ibm.com/v1"); assertEquals(Vpc.getServiceUrlForRegion("jp-osa"), "https://jp-osa.iaas.cloud.ibm.com/v1"); assertEquals(Vpc.getServiceUrlForRegion("jp-tok"), "https://jp-tok.iaas.cloud.ibm.com/v1"); assertEquals(Vpc.getServiceUrlForRegion("us-east"), "https://us-east.iaas.cloud.ibm.com/v1"); @@ -1948,134 +2033,134 @@ public void testGetServiceUrlForRegion() throws Throwable { // Test the getter for the version global parameter @Test public void testGetVersion() throws Throwable { - assertEquals(vpcService.getVersion(), "2025-07-08"); + assertEquals(vpcService.getVersion(), "2024-06-23"); } - // Test the listVpcs operation with a valid options model parameter + // Test the createBackupPolicy operation with a valid options model parameter @Test - public void testListVpcsWOptions() throws Throwable { + public void testCreateBackupPolicyWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132, \"vpcs\": [{\"classic_access\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"cse_source_ips\": [{\"ip\": {\"address\": \"192.168.3.4\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"default_network_acl\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\"}, \"default_routing_table\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"name\": \"my-routing-table-1\", \"resource_type\": \"routing_table\"}, \"default_security_group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}, \"dns\": {\"enable_hub\": false, \"resolution_binding_count\": 0, \"resolver\": {\"servers\": [{\"address\": \"192.168.3.4\", \"zone_affinity\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"type\": \"delegated\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"vpc\"}}}, \"health_reasons\": [{\"code\": \"dns_resolution_binding_failed\", \"message\": \"The VPC specified in the DNS resolution binding has been disconnected.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"vpc\", \"status\": \"available\"}]}"; - String listVpcsPath = "/vpcs"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"health_reasons\": [{\"code\": \"missing_service_authorization_policies\", \"message\": \"One or more accounts are missing service authorization policies\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"id\": \"r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"last_job_completed_at\": \"2019-01-01T12:00:00.000Z\", \"lifecycle_state\": \"stable\", \"match_user_tags\": [\"matchUserTags\"], \"name\": \"my-backup-policy\", \"plans\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"backup_policy\", \"scope\": {\"crn\": \"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce\", \"id\": \"ebc2b430240943458b9e91e1432cfcce\", \"resource_type\": \"enterprise\"}, \"included_content\": [\"data_volumes\"], \"match_resource_type\": \"instance\"}"; + String createBackupPolicyPath = "/backup_policies"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the ListVpcsOptions model - ListVpcsOptions listVpcsOptionsModel = new ListVpcsOptions.Builder() - .start("testString") - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .classicAccess(true) + // Construct an instance of the ZoneIdentityByName model + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() + .name("us-south-1") .build(); - // Invoke listVpcs() with a valid options model and verify the result - Response response = vpcService.listVpcs(listVpcsOptionsModel).execute(); + // Construct an instance of the BackupPolicyPlanClonePolicyPrototype model + BackupPolicyPlanClonePolicyPrototype backupPolicyPlanClonePolicyPrototypeModel = new BackupPolicyPlanClonePolicyPrototype.Builder() + .maxSnapshots(Long.valueOf("5")) + .zones(java.util.Arrays.asList(zoneIdentityModel)) + .build(); + + // Construct an instance of the BackupPolicyPlanDeletionTriggerPrototype model + BackupPolicyPlanDeletionTriggerPrototype backupPolicyPlanDeletionTriggerPrototypeModel = new BackupPolicyPlanDeletionTriggerPrototype.Builder() + .deleteAfter(Long.valueOf("20")) + .deleteOverCount(Long.valueOf("20")) + .build(); + + // Construct an instance of the EncryptionKeyIdentityByCRN model + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() + .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + .build(); + + // Construct an instance of the RegionIdentityByName model + RegionIdentityByName regionIdentityModel = new RegionIdentityByName.Builder() + .name("us-south") + .build(); + + // Construct an instance of the BackupPolicyPlanRemoteRegionPolicyPrototype model + BackupPolicyPlanRemoteRegionPolicyPrototype backupPolicyPlanRemoteRegionPolicyPrototypeModel = new BackupPolicyPlanRemoteRegionPolicyPrototype.Builder() + .deleteOverCount(Long.valueOf("5")) + .encryptionKey(encryptionKeyIdentityModel) + .region(regionIdentityModel) + .build(); + + // Construct an instance of the BackupPolicyPlanPrototype model + BackupPolicyPlanPrototype backupPolicyPlanPrototypeModel = new BackupPolicyPlanPrototype.Builder() + .active(true) + .attachUserTags(java.util.Arrays.asList("my-daily-backup-plan")) + .clonePolicy(backupPolicyPlanClonePolicyPrototypeModel) + .copyUserTags(true) + .cronSpec("30 */2 * * 1-5") + .deletionTrigger(backupPolicyPlanDeletionTriggerPrototypeModel) + .name("my-policy-plan") + .remoteRegionPolicies(java.util.Arrays.asList(backupPolicyPlanRemoteRegionPolicyPrototypeModel)) + .build(); + + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") + .build(); + + // Construct an instance of the BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN model + BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN backupPolicyScopePrototypeModel = new BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN.Builder() + .crn("crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce") + .build(); + + // Construct an instance of the BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype model + BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype backupPolicyPrototypeModel = new BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype.Builder() + .matchUserTags(java.util.Arrays.asList("my-daily-backup-policy")) + .name("my-backup-policy") + .plans(java.util.Arrays.asList(backupPolicyPlanPrototypeModel)) + .resourceGroup(resourceGroupIdentityModel) + .scope(backupPolicyScopePrototypeModel) + .matchResourceType("volume") + .build(); + + // Construct an instance of the CreateBackupPolicyOptions model + CreateBackupPolicyOptions createBackupPolicyOptionsModel = new CreateBackupPolicyOptions.Builder() + .backupPolicyPrototype(backupPolicyPrototypeModel) + .build(); + + // Invoke createBackupPolicy() with a valid options model and verify the result + Response response = vpcService.createBackupPolicy(createBackupPolicyOptionsModel).execute(); assertNotNull(response); - VPCCollection responseObj = response.getResult(); + BackupPolicy responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listVpcsPath); + assertEquals(parsedPath, createBackupPolicyPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("resource_group.id"), "testString"); - assertEquals(Boolean.valueOf(query.get("classic_access")), Boolean.valueOf(true)); } - // Test the listVpcs operation with and without retries enabled + // Test the createBackupPolicy operation with and without retries enabled @Test - public void testListVpcsWRetries() throws Throwable { + public void testCreateBackupPolicyWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListVpcsWOptions(); + testCreateBackupPolicyWOptions(); vpcService.disableRetries(); - testListVpcsWOptions(); + testCreateBackupPolicyWOptions(); } - // Test the listVpcs operation using the VpcsPager.getNext() method - @Test - public void testListVpcsWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"vpcs\":[{\"classic_access\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"cse_source_ips\":[{\"ip\":{\"address\":\"192.168.3.4\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"default_network_acl\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"id\":\"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"name\":\"my-network-acl\"},\"default_routing_table\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"id\":\"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"name\":\"my-routing-table-1\",\"resource_type\":\"routing_table\"},\"default_security_group\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"},\"dns\":{\"enable_hub\":false,\"resolution_binding_count\":0,\"resolver\":{\"servers\":[{\"address\":\"192.168.3.4\",\"zone_affinity\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"type\":\"delegated\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"vpc\"}}},\"health_reasons\":[{\"code\":\"dns_resolution_binding_failed\",\"message\":\"The VPC specified in the DNS resolution binding has been disconnected.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"public_address_ranges\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"id\":\"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"name\":\"my-public-address-range\",\"resource_type\":\"public_address_range\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"vpc\",\"status\":\"available\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"vpcs\":[{\"classic_access\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"cse_source_ips\":[{\"ip\":{\"address\":\"192.168.3.4\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"default_network_acl\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"id\":\"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"name\":\"my-network-acl\"},\"default_routing_table\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"id\":\"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"name\":\"my-routing-table-1\",\"resource_type\":\"routing_table\"},\"default_security_group\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"},\"dns\":{\"enable_hub\":false,\"resolution_binding_count\":0,\"resolver\":{\"servers\":[{\"address\":\"192.168.3.4\",\"zone_affinity\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"type\":\"delegated\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"vpc\"}}},\"health_reasons\":[{\"code\":\"dns_resolution_binding_failed\",\"message\":\"The VPC specified in the DNS resolution binding has been disconnected.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"public_address_ranges\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"id\":\"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"name\":\"my-public-address-range\",\"resource_type\":\"public_address_range\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"vpc\",\"status\":\"available\"}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListVpcsOptions listVpcsOptions = new ListVpcsOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .classicAccess(true) - .build(); - - List allResults = new ArrayList<>(); - VpcsPager pager = new VpcsPager(vpcService, listVpcsOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + // Test the createBackupPolicy operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testCreateBackupPolicyNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.createBackupPolicy(null).execute(); } - - // Test the listVpcs operation using the VpcsPager.getAll() method - @Test - public void testListVpcsWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"vpcs\":[{\"classic_access\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"cse_source_ips\":[{\"ip\":{\"address\":\"192.168.3.4\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"default_network_acl\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"id\":\"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"name\":\"my-network-acl\"},\"default_routing_table\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"id\":\"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"name\":\"my-routing-table-1\",\"resource_type\":\"routing_table\"},\"default_security_group\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"},\"dns\":{\"enable_hub\":false,\"resolution_binding_count\":0,\"resolver\":{\"servers\":[{\"address\":\"192.168.3.4\",\"zone_affinity\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"type\":\"delegated\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"vpc\"}}},\"health_reasons\":[{\"code\":\"dns_resolution_binding_failed\",\"message\":\"The VPC specified in the DNS resolution binding has been disconnected.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"public_address_ranges\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"id\":\"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"name\":\"my-public-address-range\",\"resource_type\":\"public_address_range\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"vpc\",\"status\":\"available\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"vpcs\":[{\"classic_access\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"cse_source_ips\":[{\"ip\":{\"address\":\"192.168.3.4\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"default_network_acl\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"id\":\"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"name\":\"my-network-acl\"},\"default_routing_table\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"id\":\"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"name\":\"my-routing-table-1\",\"resource_type\":\"routing_table\"},\"default_security_group\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"},\"dns\":{\"enable_hub\":false,\"resolution_binding_count\":0,\"resolver\":{\"servers\":[{\"address\":\"192.168.3.4\",\"zone_affinity\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"type\":\"delegated\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"vpc\"}}},\"health_reasons\":[{\"code\":\"dns_resolution_binding_failed\",\"message\":\"The VPC specified in the DNS resolution binding has been disconnected.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"public_address_ranges\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"id\":\"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"name\":\"my-public-address-range\",\"resource_type\":\"public_address_range\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"vpc\",\"status\":\"available\"}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListVpcsOptions listVpcsOptions = new ListVpcsOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .classicAccess(true) - .build(); - VpcsPager pager = new VpcsPager(vpcService, listVpcsOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the createVpc operation with a valid options model parameter + // Test the createBackupPolicyPlan operation with a valid options model parameter @Test - public void testCreateVpcWOptions() throws Throwable { + public void testCreateBackupPolicyPlanWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"classic_access\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"cse_source_ips\": [{\"ip\": {\"address\": \"192.168.3.4\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"default_network_acl\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\"}, \"default_routing_table\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"name\": \"my-routing-table-1\", \"resource_type\": \"routing_table\"}, \"default_security_group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}, \"dns\": {\"enable_hub\": false, \"resolution_binding_count\": 0, \"resolver\": {\"servers\": [{\"address\": \"192.168.3.4\", \"zone_affinity\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"type\": \"delegated\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"vpc\"}}}, \"health_reasons\": [{\"code\": \"dns_resolution_binding_failed\", \"message\": \"The VPC specified in the DNS resolution binding has been disconnected.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"public_address_ranges\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"id\": \"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"name\": \"my-public-address-range\", \"resource_type\": \"public_address_range\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"vpc\", \"status\": \"available\"}"; - String createVpcPath = "/vpcs"; + String mockResponseBody = "{\"active\": true, \"attach_user_tags\": [\"attachUserTags\"], \"clone_policy\": {\"max_snapshots\": 1, \"zones\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}]}, \"copy_user_tags\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"cron_spec\": \"30 */2 * * 1-5\", \"deletion_trigger\": {\"delete_after\": 20, \"delete_over_count\": 20}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"lifecycle_state\": \"stable\", \"name\": \"my-policy-plan\", \"remote_region_policies\": [{\"delete_over_count\": 1, \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}], \"resource_type\": \"backup_policy_plan\"}"; + String createBackupPolicyPlanPath = "/backup_policies/testString/plans"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(201) @@ -2086,42 +2171,52 @@ public void testCreateVpcWOptions() throws Throwable { .name("us-south-1") .build(); - // Construct an instance of the DNSServerPrototype model - DNSServerPrototype dnsServerPrototypeModel = new DNSServerPrototype.Builder() - .address("192.168.3.4") - .zoneAffinity(zoneIdentityModel) + // Construct an instance of the BackupPolicyPlanClonePolicyPrototype model + BackupPolicyPlanClonePolicyPrototype backupPolicyPlanClonePolicyPrototypeModel = new BackupPolicyPlanClonePolicyPrototype.Builder() + .maxSnapshots(Long.valueOf("5")) + .zones(java.util.Arrays.asList(zoneIdentityModel)) .build(); - // Construct an instance of the VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype model - VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype vpcdnsResolverPrototypeModel = new VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype.Builder() - .manualServers(java.util.Arrays.asList(dnsServerPrototypeModel)) - .type("manual") + // Construct an instance of the BackupPolicyPlanDeletionTriggerPrototype model + BackupPolicyPlanDeletionTriggerPrototype backupPolicyPlanDeletionTriggerPrototypeModel = new BackupPolicyPlanDeletionTriggerPrototype.Builder() + .deleteAfter(Long.valueOf("20")) + .deleteOverCount(Long.valueOf("20")) .build(); - // Construct an instance of the VPCDNSPrototype model - VPCDNSPrototype vpcdnsPrototypeModel = new VPCDNSPrototype.Builder() - .enableHub(false) - .resolver(vpcdnsResolverPrototypeModel) + // Construct an instance of the EncryptionKeyIdentityByCRN model + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() + .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") .build(); - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") + // Construct an instance of the RegionIdentityByName model + RegionIdentityByName regionIdentityModel = new RegionIdentityByName.Builder() + .name("us-south") .build(); - // Construct an instance of the CreateVpcOptions model - CreateVpcOptions createVpcOptionsModel = new CreateVpcOptions.Builder() - .addressPrefixManagement("auto") - .classicAccess(false) - .dns(vpcdnsPrototypeModel) - .name("my-vpc") - .resourceGroup(resourceGroupIdentityModel) + // Construct an instance of the BackupPolicyPlanRemoteRegionPolicyPrototype model + BackupPolicyPlanRemoteRegionPolicyPrototype backupPolicyPlanRemoteRegionPolicyPrototypeModel = new BackupPolicyPlanRemoteRegionPolicyPrototype.Builder() + .deleteOverCount(Long.valueOf("5")) + .encryptionKey(encryptionKeyIdentityModel) + .region(regionIdentityModel) .build(); - // Invoke createVpc() with a valid options model and verify the result - Response response = vpcService.createVpc(createVpcOptionsModel).execute(); + // Construct an instance of the CreateBackupPolicyPlanOptions model + CreateBackupPolicyPlanOptions createBackupPolicyPlanOptionsModel = new CreateBackupPolicyPlanOptions.Builder() + .backupPolicyId("testString") + .cronSpec("30 */2 * * 1-5") + .active(true) + .attachUserTags(java.util.Arrays.asList("my-daily-backup-plan")) + .clonePolicy(backupPolicyPlanClonePolicyPrototypeModel) + .copyUserTags(true) + .deletionTrigger(backupPolicyPlanDeletionTriggerPrototypeModel) + .name("my-policy-plan") + .remoteRegionPolicies(java.util.Arrays.asList(backupPolicyPlanRemoteRegionPolicyPrototypeModel)) + .build(); + + // Invoke createBackupPolicyPlan() with a valid options model and verify the result + Response response = vpcService.createBackupPolicyPlan(createBackupPolicyPlanOptionsModel).execute(); assertNotNull(response); - VPC responseObj = response.getResult(); + BackupPolicyPlan responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -2130,45 +2225,53 @@ public void testCreateVpcWOptions() throws Throwable { assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createVpcPath); + assertEquals(parsedPath, createBackupPolicyPlanPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createVpc operation with and without retries enabled + // Test the createBackupPolicyPlan operation with and without retries enabled @Test - public void testCreateVpcWRetries() throws Throwable { + public void testCreateBackupPolicyPlanWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateVpcWOptions(); + testCreateBackupPolicyPlanWOptions(); vpcService.disableRetries(); - testCreateVpcWOptions(); + testCreateBackupPolicyPlanWOptions(); } - // Test the deleteVpc operation with a valid options model parameter + // Test the createBackupPolicyPlan operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testCreateBackupPolicyPlanNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.createBackupPolicyPlan(null).execute(); + } + + // Test the deleteBackupPolicy operation with a valid options model parameter @Test - public void testDeleteVpcWOptions() throws Throwable { + public void testDeleteBackupPolicyWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteVpcPath = "/vpcs/testString"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"health_reasons\": [{\"code\": \"missing_service_authorization_policies\", \"message\": \"One or more accounts are missing service authorization policies\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"id\": \"r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"last_job_completed_at\": \"2019-01-01T12:00:00.000Z\", \"lifecycle_state\": \"stable\", \"match_user_tags\": [\"matchUserTags\"], \"name\": \"my-backup-policy\", \"plans\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"backup_policy\", \"scope\": {\"crn\": \"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce\", \"id\": \"ebc2b430240943458b9e91e1432cfcce\", \"resource_type\": \"enterprise\"}, \"included_content\": [\"data_volumes\"], \"match_resource_type\": \"instance\"}"; + String deleteBackupPolicyPath = "/backup_policies/testString"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the DeleteVpcOptions model - DeleteVpcOptions deleteVpcOptionsModel = new DeleteVpcOptions.Builder() + // Construct an instance of the DeleteBackupPolicyOptions model + DeleteBackupPolicyOptions deleteBackupPolicyOptionsModel = new DeleteBackupPolicyOptions.Builder() .id("testString") .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke deleteVpc() with a valid options model and verify the result - Response response = vpcService.deleteVpc(deleteVpcOptionsModel).execute(); + // Invoke deleteBackupPolicy() with a valid options model and verify the result + Response response = vpcService.deleteBackupPolicy(deleteBackupPolicyOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + BackupPolicy responseObj = response.getResult(); + assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); @@ -2176,195 +2279,160 @@ public void testDeleteVpcWOptions() throws Throwable { assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteVpcPath); + assertEquals(parsedPath, deleteBackupPolicyPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteVpc operation with and without retries enabled + // Test the deleteBackupPolicy operation with and without retries enabled @Test - public void testDeleteVpcWRetries() throws Throwable { + public void testDeleteBackupPolicyWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteVpcWOptions(); + testDeleteBackupPolicyWOptions(); vpcService.disableRetries(); - testDeleteVpcWOptions(); + testDeleteBackupPolicyWOptions(); } - // Test the deleteVpc operation with a null options model (negative test) + // Test the deleteBackupPolicy operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteVpcNoOptions() throws Throwable { + public void testDeleteBackupPolicyNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteVpc(null).execute(); + vpcService.deleteBackupPolicy(null).execute(); } - // Test the getVpc operation with a valid options model parameter + // Test the deleteBackupPolicyPlan operation with a valid options model parameter @Test - public void testGetVpcWOptions() throws Throwable { + public void testDeleteBackupPolicyPlanWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"classic_access\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"cse_source_ips\": [{\"ip\": {\"address\": \"192.168.3.4\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"default_network_acl\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\"}, \"default_routing_table\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"name\": \"my-routing-table-1\", \"resource_type\": \"routing_table\"}, \"default_security_group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}, \"dns\": {\"enable_hub\": false, \"resolution_binding_count\": 0, \"resolver\": {\"servers\": [{\"address\": \"192.168.3.4\", \"zone_affinity\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"type\": \"delegated\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"vpc\"}}}, \"health_reasons\": [{\"code\": \"dns_resolution_binding_failed\", \"message\": \"The VPC specified in the DNS resolution binding has been disconnected.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"public_address_ranges\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"id\": \"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"name\": \"my-public-address-range\", \"resource_type\": \"public_address_range\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"vpc\", \"status\": \"available\"}"; - String getVpcPath = "/vpcs/testString"; + String mockResponseBody = "{\"active\": true, \"attach_user_tags\": [\"attachUserTags\"], \"clone_policy\": {\"max_snapshots\": 1, \"zones\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}]}, \"copy_user_tags\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"cron_spec\": \"30 */2 * * 1-5\", \"deletion_trigger\": {\"delete_after\": 20, \"delete_over_count\": 20}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"lifecycle_state\": \"stable\", \"name\": \"my-policy-plan\", \"remote_region_policies\": [{\"delete_over_count\": 1, \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}], \"resource_type\": \"backup_policy_plan\"}"; + String deleteBackupPolicyPlanPath = "/backup_policies/testString/plans/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the GetVpcOptions model - GetVpcOptions getVpcOptionsModel = new GetVpcOptions.Builder() + // Construct an instance of the DeleteBackupPolicyPlanOptions model + DeleteBackupPolicyPlanOptions deleteBackupPolicyPlanOptionsModel = new DeleteBackupPolicyPlanOptions.Builder() + .backupPolicyId("testString") .id("testString") + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke getVpc() with a valid options model and verify the result - Response response = vpcService.getVpc(getVpcOptionsModel).execute(); + // Invoke deleteBackupPolicyPlan() with a valid options model and verify the result + Response response = vpcService.deleteBackupPolicyPlan(deleteBackupPolicyPlanOptionsModel).execute(); assertNotNull(response); - VPC responseObj = response.getResult(); + BackupPolicyPlan responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getVpcPath); + assertEquals(parsedPath, deleteBackupPolicyPlanPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getVpc operation with and without retries enabled + // Test the deleteBackupPolicyPlan operation with and without retries enabled @Test - public void testGetVpcWRetries() throws Throwable { + public void testDeleteBackupPolicyPlanWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetVpcWOptions(); + testDeleteBackupPolicyPlanWOptions(); vpcService.disableRetries(); - testGetVpcWOptions(); + testDeleteBackupPolicyPlanWOptions(); } - // Test the getVpc operation with a null options model (negative test) + // Test the deleteBackupPolicyPlan operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetVpcNoOptions() throws Throwable { + public void testDeleteBackupPolicyPlanNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getVpc(null).execute(); + vpcService.deleteBackupPolicyPlan(null).execute(); } - // Test the updateVpc operation with a valid options model parameter + // Test the getBackupPolicy operation with a valid options model parameter @Test - public void testUpdateVpcWOptions() throws Throwable { + public void testGetBackupPolicyWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"classic_access\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"cse_source_ips\": [{\"ip\": {\"address\": \"192.168.3.4\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"default_network_acl\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\"}, \"default_routing_table\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"name\": \"my-routing-table-1\", \"resource_type\": \"routing_table\"}, \"default_security_group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}, \"dns\": {\"enable_hub\": false, \"resolution_binding_count\": 0, \"resolver\": {\"servers\": [{\"address\": \"192.168.3.4\", \"zone_affinity\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"type\": \"delegated\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"vpc\"}}}, \"health_reasons\": [{\"code\": \"dns_resolution_binding_failed\", \"message\": \"The VPC specified in the DNS resolution binding has been disconnected.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"public_address_ranges\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"id\": \"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"name\": \"my-public-address-range\", \"resource_type\": \"public_address_range\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"vpc\", \"status\": \"available\"}"; - String updateVpcPath = "/vpcs/testString"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"health_reasons\": [{\"code\": \"missing_service_authorization_policies\", \"message\": \"One or more accounts are missing service authorization policies\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"id\": \"r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"last_job_completed_at\": \"2019-01-01T12:00:00.000Z\", \"lifecycle_state\": \"stable\", \"match_user_tags\": [\"matchUserTags\"], \"name\": \"my-backup-policy\", \"plans\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"backup_policy\", \"scope\": {\"crn\": \"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce\", \"id\": \"ebc2b430240943458b9e91e1432cfcce\", \"resource_type\": \"enterprise\"}, \"included_content\": [\"data_volumes\"], \"match_resource_type\": \"instance\"}"; + String getBackupPolicyPath = "/backup_policies/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ZoneIdentityByName model - ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() - .name("us-south-1") - .build(); - - // Construct an instance of the DNSServerPrototype model - DNSServerPrototype dnsServerPrototypeModel = new DNSServerPrototype.Builder() - .address("192.168.3.4") - .zoneAffinity(zoneIdentityModel) - .build(); - - // Construct an instance of the VPCDNSResolverVPCPatchVPCIdentityById model - VPCDNSResolverVPCPatchVPCIdentityById vpcdnsResolverVpcPatchModel = new VPCDNSResolverVPCPatchVPCIdentityById.Builder() - .id("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .build(); - - // Construct an instance of the VPCDNSResolverPatch model - VPCDNSResolverPatch vpcdnsResolverPatchModel = new VPCDNSResolverPatch.Builder() - .manualServers(java.util.Arrays.asList(dnsServerPrototypeModel)) - .type("delegated") - .vpc(vpcdnsResolverVpcPatchModel) - .build(); - - // Construct an instance of the VPCDNSPatch model - VPCDNSPatch vpcdnsPatchModel = new VPCDNSPatch.Builder() - .enableHub(true) - .resolver(vpcdnsResolverPatchModel) - .build(); - - // Construct an instance of the VPCPatch model - VPCPatch vpcPatchModel = new VPCPatch.Builder() - .dns(vpcdnsPatchModel) - .name("my-vpc") - .build(); - Map vpcPatchModelAsPatch = vpcPatchModel.asPatch(); - - // Construct an instance of the UpdateVpcOptions model - UpdateVpcOptions updateVpcOptionsModel = new UpdateVpcOptions.Builder() + // Construct an instance of the GetBackupPolicyOptions model + GetBackupPolicyOptions getBackupPolicyOptionsModel = new GetBackupPolicyOptions.Builder() .id("testString") - .vpcPatch(vpcPatchModelAsPatch) - .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke updateVpc() with a valid options model and verify the result - Response response = vpcService.updateVpc(updateVpcOptionsModel).execute(); + // Invoke getBackupPolicy() with a valid options model and verify the result + Response response = vpcService.getBackupPolicy(getBackupPolicyOptionsModel).execute(); assertNotNull(response); - VPC responseObj = response.getResult(); + BackupPolicy responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateVpcPath); + assertEquals(parsedPath, getBackupPolicyPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateVpc operation with and without retries enabled + // Test the getBackupPolicy operation with and without retries enabled @Test - public void testUpdateVpcWRetries() throws Throwable { + public void testGetBackupPolicyWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateVpcWOptions(); + testGetBackupPolicyWOptions(); vpcService.disableRetries(); - testUpdateVpcWOptions(); + testGetBackupPolicyWOptions(); } - // Test the updateVpc operation with a null options model (negative test) + // Test the getBackupPolicy operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateVpcNoOptions() throws Throwable { + public void testGetBackupPolicyNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateVpc(null).execute(); + vpcService.getBackupPolicy(null).execute(); } - // Test the getVpcDefaultNetworkAcl operation with a valid options model parameter + // Test the getBackupPolicyJob operation with a valid options model parameter @Test - public void testGetVpcDefaultNetworkAclWOptions() throws Throwable { + public void testGetBackupPolicyJobWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"mnemonic-ersatz-eatery-mythology\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"rules\": [{\"action\": \"allow\", \"before\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"name\": \"my-network-acl-rule\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"ip_version\": \"ipv4\", \"name\": \"my-network-acl-rule\", \"source\": \"192.168.3.0/24\", \"protocol\": \"all\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String getVpcDefaultNetworkAclPath = "/vpcs/testString/default_network_acl"; + String mockResponseBody = "{\"auto_delete\": true, \"auto_delete_after\": 90, \"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"completed_at\": \"2019-01-01T12:00:00.000Z\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/jobs/r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90\", \"id\": \"r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90\", \"job_type\": \"creation\", \"resource_type\": \"backup_policy_job\", \"source\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"volume\"}, \"status\": \"failed\", \"status_reasons\": [{\"code\": \"source_volume_busy\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot\"}], \"target_snapshots\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}]}"; + String getBackupPolicyJobPath = "/backup_policies/testString/jobs/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetVpcDefaultNetworkAclOptions model - GetVpcDefaultNetworkAclOptions getVpcDefaultNetworkAclOptionsModel = new GetVpcDefaultNetworkAclOptions.Builder() + // Construct an instance of the GetBackupPolicyJobOptions model + GetBackupPolicyJobOptions getBackupPolicyJobOptionsModel = new GetBackupPolicyJobOptions.Builder() + .backupPolicyId("testString") .id("testString") .build(); - // Invoke getVpcDefaultNetworkAcl() with a valid options model and verify the result - Response response = vpcService.getVpcDefaultNetworkAcl(getVpcDefaultNetworkAclOptionsModel).execute(); + // Invoke getBackupPolicyJob() with a valid options model and verify the result + Response response = vpcService.getBackupPolicyJob(getBackupPolicyJobOptionsModel).execute(); assertNotNull(response); - DefaultNetworkACL responseObj = response.getResult(); + BackupPolicyJob responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -2373,51 +2441,52 @@ public void testGetVpcDefaultNetworkAclWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getVpcDefaultNetworkAclPath); + assertEquals(parsedPath, getBackupPolicyJobPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getVpcDefaultNetworkAcl operation with and without retries enabled + // Test the getBackupPolicyJob operation with and without retries enabled @Test - public void testGetVpcDefaultNetworkAclWRetries() throws Throwable { + public void testGetBackupPolicyJobWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetVpcDefaultNetworkAclWOptions(); + testGetBackupPolicyJobWOptions(); vpcService.disableRetries(); - testGetVpcDefaultNetworkAclWOptions(); + testGetBackupPolicyJobWOptions(); } - // Test the getVpcDefaultNetworkAcl operation with a null options model (negative test) + // Test the getBackupPolicyJob operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetVpcDefaultNetworkAclNoOptions() throws Throwable { + public void testGetBackupPolicyJobNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getVpcDefaultNetworkAcl(null).execute(); + vpcService.getBackupPolicyJob(null).execute(); } - // Test the getVpcDefaultRoutingTable operation with a valid options model parameter + // Test the getBackupPolicyPlan operation with a valid options model parameter @Test - public void testGetVpcDefaultRoutingTableWOptions() throws Throwable { + public void testGetBackupPolicyPlanWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"accept_routes_from\": [{\"resource_type\": \"vpn_server\"}], \"advertise_routes_to\": [\"transit_gateway\"], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"is_default\": false, \"lifecycle_state\": \"stable\", \"name\": \"milled-easy-equine-machines\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"routing_table\", \"route_direct_link_ingress\": true, \"route_internet_ingress\": true, \"route_transit_gateway_ingress\": true, \"route_vpc_zone_ingress\": false, \"routes\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"name\": \"my-vpc-routing-table-route\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}]}"; - String getVpcDefaultRoutingTablePath = "/vpcs/testString/default_routing_table"; + String mockResponseBody = "{\"active\": true, \"attach_user_tags\": [\"attachUserTags\"], \"clone_policy\": {\"max_snapshots\": 1, \"zones\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}]}, \"copy_user_tags\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"cron_spec\": \"30 */2 * * 1-5\", \"deletion_trigger\": {\"delete_after\": 20, \"delete_over_count\": 20}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"lifecycle_state\": \"stable\", \"name\": \"my-policy-plan\", \"remote_region_policies\": [{\"delete_over_count\": 1, \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}], \"resource_type\": \"backup_policy_plan\"}"; + String getBackupPolicyPlanPath = "/backup_policies/testString/plans/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetVpcDefaultRoutingTableOptions model - GetVpcDefaultRoutingTableOptions getVpcDefaultRoutingTableOptionsModel = new GetVpcDefaultRoutingTableOptions.Builder() + // Construct an instance of the GetBackupPolicyPlanOptions model + GetBackupPolicyPlanOptions getBackupPolicyPlanOptionsModel = new GetBackupPolicyPlanOptions.Builder() + .backupPolicyId("testString") .id("testString") .build(); - // Invoke getVpcDefaultRoutingTable() with a valid options model and verify the result - Response response = vpcService.getVpcDefaultRoutingTable(getVpcDefaultRoutingTableOptionsModel).execute(); + // Invoke getBackupPolicyPlan() with a valid options model and verify the result + Response response = vpcService.getBackupPolicyPlan(getBackupPolicyPlanOptionsModel).execute(); assertNotNull(response); - DefaultRoutingTable responseObj = response.getResult(); + BackupPolicyPlan responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -2426,51 +2495,55 @@ public void testGetVpcDefaultRoutingTableWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getVpcDefaultRoutingTablePath); + assertEquals(parsedPath, getBackupPolicyPlanPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getVpcDefaultRoutingTable operation with and without retries enabled + // Test the getBackupPolicyPlan operation with and without retries enabled @Test - public void testGetVpcDefaultRoutingTableWRetries() throws Throwable { + public void testGetBackupPolicyPlanWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetVpcDefaultRoutingTableWOptions(); + testGetBackupPolicyPlanWOptions(); vpcService.disableRetries(); - testGetVpcDefaultRoutingTableWOptions(); + testGetBackupPolicyPlanWOptions(); } - // Test the getVpcDefaultRoutingTable operation with a null options model (negative test) + // Test the getBackupPolicyPlan operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetVpcDefaultRoutingTableNoOptions() throws Throwable { + public void testGetBackupPolicyPlanNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getVpcDefaultRoutingTable(null).execute(); + vpcService.getBackupPolicyPlan(null).execute(); } - // Test the getVpcDefaultSecurityGroup operation with a valid options model parameter + // Test the listBackupPolicies operation with a valid options model parameter @Test - public void testGetVpcDefaultSecurityGroupWOptions() throws Throwable { + public void testListBackupPoliciesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"observant-chip-emphatic-engraver\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"rules\": [{\"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"id\": \"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"ip_version\": \"ipv4\", \"local\": {\"address\": \"192.168.3.4\"}, \"remote\": {\"address\": \"192.168.3.4\"}, \"protocol\": \"all\"}], \"targets\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"resource_type\": \"network_interface\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String getVpcDefaultSecurityGroupPath = "/vpcs/testString/default_security_group"; + String mockResponseBody = "{\"backup_policies\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"health_reasons\": [{\"code\": \"missing_service_authorization_policies\", \"message\": \"One or more accounts are missing service authorization policies\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"id\": \"r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"last_job_completed_at\": \"2019-01-01T12:00:00.000Z\", \"lifecycle_state\": \"stable\", \"match_user_tags\": [\"matchUserTags\"], \"name\": \"my-backup-policy\", \"plans\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"backup_policy\", \"scope\": {\"crn\": \"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce\", \"id\": \"ebc2b430240943458b9e91e1432cfcce\", \"resource_type\": \"enterprise\"}, \"included_content\": [\"data_volumes\"], \"match_resource_type\": \"instance\"}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listBackupPoliciesPath = "/backup_policies"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetVpcDefaultSecurityGroupOptions model - GetVpcDefaultSecurityGroupOptions getVpcDefaultSecurityGroupOptionsModel = new GetVpcDefaultSecurityGroupOptions.Builder() - .id("testString") + // Construct an instance of the ListBackupPoliciesOptions model + ListBackupPoliciesOptions listBackupPoliciesOptionsModel = new ListBackupPoliciesOptions.Builder() + .start("testString") + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .name("my-name") + .tag("testString") .build(); - // Invoke getVpcDefaultSecurityGroup() with a valid options model and verify the result - Response response = vpcService.getVpcDefaultSecurityGroup(getVpcDefaultSecurityGroupOptionsModel).execute(); + // Invoke listBackupPolicies() with a valid options model and verify the result + Response response = vpcService.listBackupPolicies(listBackupPoliciesOptionsModel).execute(); assertNotNull(response); - DefaultSecurityGroup responseObj = response.getResult(); + BackupPolicyCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -2479,53 +2552,125 @@ public void testGetVpcDefaultSecurityGroupWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getVpcDefaultSecurityGroupPath); + assertEquals(parsedPath, listBackupPoliciesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - } - - // Test the getVpcDefaultSecurityGroup operation with and without retries enabled + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("resource_group.id"), "testString"); + assertEquals(query.get("name"), "my-name"); + assertEquals(query.get("tag"), "testString"); + } + + // Test the listBackupPolicies operation with and without retries enabled @Test - public void testGetVpcDefaultSecurityGroupWRetries() throws Throwable { + public void testListBackupPoliciesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetVpcDefaultSecurityGroupWOptions(); + testListBackupPoliciesWOptions(); vpcService.disableRetries(); - testGetVpcDefaultSecurityGroupWOptions(); + testListBackupPoliciesWOptions(); } - // Test the getVpcDefaultSecurityGroup operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetVpcDefaultSecurityGroupNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.getVpcDefaultSecurityGroup(null).execute(); + // Test the listBackupPolicies operation using the BackupPoliciesPager.getNext() method + @Test + public void testListBackupPoliciesWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"backup_policies\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6\",\"health_reasons\":[{\"code\":\"missing_service_authorization_policies\",\"message\":\"One or more accounts are missing service authorization policies\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6\",\"id\":\"r006-076191ba-49c2-4763-94fd-c70de73ee2e6\",\"last_job_completed_at\":\"2019-01-01T12:00:00.000Z\",\"lifecycle_state\":\"stable\",\"match_user_tags\":[\"matchUserTags\"],\"name\":\"my-backup-policy\",\"plans\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"backup_policy\",\"scope\":{\"crn\":\"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce\",\"id\":\"ebc2b430240943458b9e91e1432cfcce\",\"resource_type\":\"enterprise\"},\"included_content\":[\"data_volumes\"],\"match_resource_type\":\"instance\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"backup_policies\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6\",\"health_reasons\":[{\"code\":\"missing_service_authorization_policies\",\"message\":\"One or more accounts are missing service authorization policies\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6\",\"id\":\"r006-076191ba-49c2-4763-94fd-c70de73ee2e6\",\"last_job_completed_at\":\"2019-01-01T12:00:00.000Z\",\"lifecycle_state\":\"stable\",\"match_user_tags\":[\"matchUserTags\"],\"name\":\"my-backup-policy\",\"plans\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"backup_policy\",\"scope\":{\"crn\":\"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce\",\"id\":\"ebc2b430240943458b9e91e1432cfcce\",\"resource_type\":\"enterprise\"},\"included_content\":[\"data_volumes\"],\"match_resource_type\":\"instance\"}],\"total_count\":2,\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListBackupPoliciesOptions listBackupPoliciesOptions = new ListBackupPoliciesOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .name("my-name") + .tag("testString") + .build(); + + List allResults = new ArrayList<>(); + BackupPoliciesPager pager = new BackupPoliciesPager(vpcService, listBackupPoliciesOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } + + // Test the listBackupPolicies operation using the BackupPoliciesPager.getAll() method + @Test + public void testListBackupPoliciesWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"backup_policies\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6\",\"health_reasons\":[{\"code\":\"missing_service_authorization_policies\",\"message\":\"One or more accounts are missing service authorization policies\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6\",\"id\":\"r006-076191ba-49c2-4763-94fd-c70de73ee2e6\",\"last_job_completed_at\":\"2019-01-01T12:00:00.000Z\",\"lifecycle_state\":\"stable\",\"match_user_tags\":[\"matchUserTags\"],\"name\":\"my-backup-policy\",\"plans\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"backup_policy\",\"scope\":{\"crn\":\"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce\",\"id\":\"ebc2b430240943458b9e91e1432cfcce\",\"resource_type\":\"enterprise\"},\"included_content\":[\"data_volumes\"],\"match_resource_type\":\"instance\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"backup_policies\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6\",\"health_reasons\":[{\"code\":\"missing_service_authorization_policies\",\"message\":\"One or more accounts are missing service authorization policies\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6\",\"id\":\"r006-076191ba-49c2-4763-94fd-c70de73ee2e6\",\"last_job_completed_at\":\"2019-01-01T12:00:00.000Z\",\"lifecycle_state\":\"stable\",\"match_user_tags\":[\"matchUserTags\"],\"name\":\"my-backup-policy\",\"plans\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"backup_policy\",\"scope\":{\"crn\":\"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce\",\"id\":\"ebc2b430240943458b9e91e1432cfcce\",\"resource_type\":\"enterprise\"},\"included_content\":[\"data_volumes\"],\"match_resource_type\":\"instance\"}],\"total_count\":2,\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Test the listVpcAddressPrefixes operation with a valid options model parameter + ListBackupPoliciesOptions listBackupPoliciesOptions = new ListBackupPoliciesOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .name("my-name") + .tag("testString") + .build(); + + BackupPoliciesPager pager = new BackupPoliciesPager(vpcService, listBackupPoliciesOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); + } + + // Test the listBackupPolicyJobs operation with a valid options model parameter @Test - public void testListVpcAddressPrefixesWOptions() throws Throwable { + public void testListBackupPolicyJobsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"address_prefixes\": [{\"cidr\": \"192.168.3.0/24\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"has_subnets\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/address_prefixes/r006-68574057-c5e0-4675-ada4-99377d8f4789\", \"id\": \"r006-68574057-c5e0-4675-ada4-99377d8f4789\", \"is_default\": false, \"name\": \"my-vpc-address-prefix-zone-1\", \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listVpcAddressPrefixesPath = "/vpcs/testString/address_prefixes"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"jobs\": [{\"auto_delete\": true, \"auto_delete_after\": 90, \"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"completed_at\": \"2019-01-01T12:00:00.000Z\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/jobs/r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90\", \"id\": \"r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90\", \"job_type\": \"creation\", \"resource_type\": \"backup_policy_job\", \"source\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"volume\"}, \"status\": \"failed\", \"status_reasons\": [{\"code\": \"source_volume_busy\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot\"}], \"target_snapshots\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}]}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listBackupPolicyJobsPath = "/backup_policies/testString/jobs"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListVpcAddressPrefixesOptions model - ListVpcAddressPrefixesOptions listVpcAddressPrefixesOptionsModel = new ListVpcAddressPrefixesOptions.Builder() - .vpcId("testString") + // Construct an instance of the ListBackupPolicyJobsOptions model + ListBackupPolicyJobsOptions listBackupPolicyJobsOptionsModel = new ListBackupPolicyJobsOptions.Builder() + .backupPolicyId("testString") + .status("failed") + .backupPolicyPlanId("testString") .start("testString") .limit(Long.valueOf("10")) + .sort("name") + .sourceId("testString") + .targetSnapshotsId("testString") + .targetSnapshotsCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263") .build(); - // Invoke listVpcAddressPrefixes() with a valid options model and verify the result - Response response = vpcService.listVpcAddressPrefixes(listVpcAddressPrefixesOptionsModel).execute(); + // Invoke listBackupPolicyJobs() with a valid options model and verify the result + Response response = vpcService.listBackupPolicyJobs(listBackupPolicyJobsOptionsModel).execute(); assertNotNull(response); - AddressPrefixCollection responseObj = response.getResult(); + BackupPolicyJobCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -2534,39 +2679,45 @@ public void testListVpcAddressPrefixesWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listVpcAddressPrefixesPath); + assertEquals(parsedPath, listBackupPolicyJobsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("status"), "failed"); + assertEquals(query.get("backup_policy_plan.id"), "testString"); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("sort"), "name"); + assertEquals(query.get("source.id"), "testString"); + assertEquals(query.get("target_snapshots[].id"), "testString"); + assertEquals(query.get("target_snapshots[].crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263"); } - // Test the listVpcAddressPrefixes operation with and without retries enabled + // Test the listBackupPolicyJobs operation with and without retries enabled @Test - public void testListVpcAddressPrefixesWRetries() throws Throwable { + public void testListBackupPolicyJobsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListVpcAddressPrefixesWOptions(); + testListBackupPolicyJobsWOptions(); vpcService.disableRetries(); - testListVpcAddressPrefixesWOptions(); + testListBackupPolicyJobsWOptions(); } - // Test the listVpcAddressPrefixes operation with a null options model (negative test) + // Test the listBackupPolicyJobs operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListVpcAddressPrefixesNoOptions() throws Throwable { + public void testListBackupPolicyJobsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listVpcAddressPrefixes(null).execute(); + vpcService.listBackupPolicyJobs(null).execute(); } - // Test the listVpcAddressPrefixes operation using the VpcAddressPrefixesPager.getNext() method + // Test the listBackupPolicyJobs operation using the BackupPolicyJobsPager.getNext() method @Test - public void testListVpcAddressPrefixesWithPagerGetNext() throws Throwable { + public void testListBackupPolicyJobsWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"address_prefixes\":[{\"cidr\":\"192.168.3.0/24\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"has_subnets\":true,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/address_prefixes/r006-68574057-c5e0-4675-ada4-99377d8f4789\",\"id\":\"r006-68574057-c5e0-4675-ada4-99377d8f4789\",\"is_default\":false,\"name\":\"my-vpc-address-prefix-zone-1\",\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"address_prefixes\":[{\"cidr\":\"192.168.3.0/24\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"has_subnets\":true,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/address_prefixes/r006-68574057-c5e0-4675-ada4-99377d8f4789\",\"id\":\"r006-68574057-c5e0-4675-ada4-99377d8f4789\",\"is_default\":false,\"name\":\"my-vpc-address-prefix-zone-1\",\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"jobs\":[{\"auto_delete\":true,\"auto_delete_after\":90,\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"completed_at\":\"2019-01-01T12:00:00.000Z\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/jobs/r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90\",\"id\":\"r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90\",\"job_type\":\"creation\",\"resource_type\":\"backup_policy_job\",\"source\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"volume\"},\"status\":\"failed\",\"status_reasons\":[{\"code\":\"source_volume_busy\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot\"}],\"target_snapshots\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"}]}],\"limit\":1}"; + String mockResponsePage2 = "{\"total_count\":2,\"jobs\":[{\"auto_delete\":true,\"auto_delete_after\":90,\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"completed_at\":\"2019-01-01T12:00:00.000Z\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/jobs/r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90\",\"id\":\"r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90\",\"job_type\":\"creation\",\"resource_type\":\"backup_policy_job\",\"source\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"volume\"},\"status\":\"failed\",\"status_reasons\":[{\"code\":\"source_volume_busy\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot\"}],\"target_snapshots\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"}]}],\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -2580,27 +2731,33 @@ public void testListVpcAddressPrefixesWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListVpcAddressPrefixesOptions listVpcAddressPrefixesOptions = new ListVpcAddressPrefixesOptions.Builder() - .vpcId("testString") + ListBackupPolicyJobsOptions listBackupPolicyJobsOptions = new ListBackupPolicyJobsOptions.Builder() + .backupPolicyId("testString") + .status("failed") + .backupPolicyPlanId("testString") .limit(Long.valueOf("10")) + .sort("name") + .sourceId("testString") + .targetSnapshotsId("testString") + .targetSnapshotsCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263") .build(); - List allResults = new ArrayList<>(); - VpcAddressPrefixesPager pager = new VpcAddressPrefixesPager(vpcService, listVpcAddressPrefixesOptions); + List allResults = new ArrayList<>(); + BackupPolicyJobsPager pager = new BackupPolicyJobsPager(vpcService, listBackupPolicyJobsOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listVpcAddressPrefixes operation using the VpcAddressPrefixesPager.getAll() method + // Test the listBackupPolicyJobs operation using the BackupPolicyJobsPager.getAll() method @Test - public void testListVpcAddressPrefixesWithPagerGetAll() throws Throwable { + public void testListBackupPolicyJobsWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"address_prefixes\":[{\"cidr\":\"192.168.3.0/24\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"has_subnets\":true,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/address_prefixes/r006-68574057-c5e0-4675-ada4-99377d8f4789\",\"id\":\"r006-68574057-c5e0-4675-ada4-99377d8f4789\",\"is_default\":false,\"name\":\"my-vpc-address-prefix-zone-1\",\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"address_prefixes\":[{\"cidr\":\"192.168.3.0/24\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"has_subnets\":true,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/address_prefixes/r006-68574057-c5e0-4675-ada4-99377d8f4789\",\"id\":\"r006-68574057-c5e0-4675-ada4-99377d8f4789\",\"is_default\":false,\"name\":\"my-vpc-address-prefix-zone-1\",\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"jobs\":[{\"auto_delete\":true,\"auto_delete_after\":90,\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"completed_at\":\"2019-01-01T12:00:00.000Z\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/jobs/r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90\",\"id\":\"r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90\",\"job_type\":\"creation\",\"resource_type\":\"backup_policy_job\",\"source\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"volume\"},\"status\":\"failed\",\"status_reasons\":[{\"code\":\"source_volume_busy\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot\"}],\"target_snapshots\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"}]}],\"limit\":1}"; + String mockResponsePage2 = "{\"total_count\":2,\"jobs\":[{\"auto_delete\":true,\"auto_delete_after\":90,\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"completed_at\":\"2019-01-01T12:00:00.000Z\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/jobs/r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90\",\"id\":\"r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90\",\"job_type\":\"creation\",\"resource_type\":\"backup_policy_job\",\"source\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"volume\"},\"status\":\"failed\",\"status_reasons\":[{\"code\":\"source_volume_busy\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot\"}],\"target_snapshots\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"}]}],\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -2614,215 +2771,211 @@ public void testListVpcAddressPrefixesWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListVpcAddressPrefixesOptions listVpcAddressPrefixesOptions = new ListVpcAddressPrefixesOptions.Builder() - .vpcId("testString") + ListBackupPolicyJobsOptions listBackupPolicyJobsOptions = new ListBackupPolicyJobsOptions.Builder() + .backupPolicyId("testString") + .status("failed") + .backupPolicyPlanId("testString") .limit(Long.valueOf("10")) + .sort("name") + .sourceId("testString") + .targetSnapshotsId("testString") + .targetSnapshotsCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263") .build(); - VpcAddressPrefixesPager pager = new VpcAddressPrefixesPager(vpcService, listVpcAddressPrefixesOptions); - List allResults = pager.getAll(); + BackupPolicyJobsPager pager = new BackupPolicyJobsPager(vpcService, listBackupPolicyJobsOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the createVpcAddressPrefix operation with a valid options model parameter + // Test the listBackupPolicyPlans operation with a valid options model parameter @Test - public void testCreateVpcAddressPrefixWOptions() throws Throwable { + public void testListBackupPolicyPlansWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"cidr\": \"192.168.3.0/24\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"has_subnets\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/address_prefixes/r006-68574057-c5e0-4675-ada4-99377d8f4789\", \"id\": \"r006-68574057-c5e0-4675-ada4-99377d8f4789\", \"is_default\": false, \"name\": \"my-vpc-address-prefix-zone-1\", \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String createVpcAddressPrefixPath = "/vpcs/testString/address_prefixes"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"plans\": [{\"active\": true, \"attach_user_tags\": [\"attachUserTags\"], \"clone_policy\": {\"max_snapshots\": 1, \"zones\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}]}, \"copy_user_tags\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"cron_spec\": \"30 */2 * * 1-5\", \"deletion_trigger\": {\"delete_after\": 20, \"delete_over_count\": 20}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"lifecycle_state\": \"stable\", \"name\": \"my-policy-plan\", \"remote_region_policies\": [{\"delete_over_count\": 1, \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}], \"resource_type\": \"backup_policy_plan\"}], \"total_count\": 132}"; + String listBackupPolicyPlansPath = "/backup_policies/testString/plans"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ZoneIdentityByName model - ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() - .name("us-south-1") - .build(); - - // Construct an instance of the CreateVpcAddressPrefixOptions model - CreateVpcAddressPrefixOptions createVpcAddressPrefixOptionsModel = new CreateVpcAddressPrefixOptions.Builder() - .vpcId("testString") - .cidr("10.240.0.0/18") - .zone(zoneIdentityModel) - .isDefault(true) - .name("my-vpc-address-prefix-zone-1") + // Construct an instance of the ListBackupPolicyPlansOptions model + ListBackupPolicyPlansOptions listBackupPolicyPlansOptionsModel = new ListBackupPolicyPlansOptions.Builder() + .backupPolicyId("testString") + .name("my-name") .build(); - // Invoke createVpcAddressPrefix() with a valid options model and verify the result - Response response = vpcService.createVpcAddressPrefix(createVpcAddressPrefixOptionsModel).execute(); + // Invoke listBackupPolicyPlans() with a valid options model and verify the result + Response response = vpcService.listBackupPolicyPlans(listBackupPolicyPlansOptionsModel).execute(); assertNotNull(response); - AddressPrefix responseObj = response.getResult(); + BackupPolicyPlanCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createVpcAddressPrefixPath); + assertEquals(parsedPath, listBackupPolicyPlansPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("name"), "my-name"); } - // Test the createVpcAddressPrefix operation with and without retries enabled + // Test the listBackupPolicyPlans operation with and without retries enabled @Test - public void testCreateVpcAddressPrefixWRetries() throws Throwable { + public void testListBackupPolicyPlansWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateVpcAddressPrefixWOptions(); + testListBackupPolicyPlansWOptions(); vpcService.disableRetries(); - testCreateVpcAddressPrefixWOptions(); + testListBackupPolicyPlansWOptions(); } - // Test the createVpcAddressPrefix operation with a null options model (negative test) + // Test the listBackupPolicyPlans operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateVpcAddressPrefixNoOptions() throws Throwable { + public void testListBackupPolicyPlansNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createVpcAddressPrefix(null).execute(); + vpcService.listBackupPolicyPlans(null).execute(); } - // Test the deleteVpcAddressPrefix operation with a valid options model parameter + // Test the updateBackupPolicy operation with a valid options model parameter @Test - public void testDeleteVpcAddressPrefixWOptions() throws Throwable { + public void testUpdateBackupPolicyWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteVpcAddressPrefixPath = "/vpcs/testString/address_prefixes/testString"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"health_reasons\": [{\"code\": \"missing_service_authorization_policies\", \"message\": \"One or more accounts are missing service authorization policies\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"id\": \"r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"last_job_completed_at\": \"2019-01-01T12:00:00.000Z\", \"lifecycle_state\": \"stable\", \"match_user_tags\": [\"matchUserTags\"], \"name\": \"my-backup-policy\", \"plans\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"backup_policy\", \"scope\": {\"crn\": \"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce\", \"id\": \"ebc2b430240943458b9e91e1432cfcce\", \"resource_type\": \"enterprise\"}, \"included_content\": [\"data_volumes\"], \"match_resource_type\": \"instance\"}"; + String updateBackupPolicyPath = "/backup_policies/testString"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteVpcAddressPrefixOptions model - DeleteVpcAddressPrefixOptions deleteVpcAddressPrefixOptionsModel = new DeleteVpcAddressPrefixOptions.Builder() - .vpcId("testString") + // Construct an instance of the BackupPolicyPatch model + BackupPolicyPatch backupPolicyPatchModel = new BackupPolicyPatch.Builder() + .includedContent(java.util.Arrays.asList("data_volumes")) + .matchUserTags(java.util.Arrays.asList("my-tag-1", "my-tag-2", "my-tag-3")) + .name("my-backup-policy") + .build(); + Map backupPolicyPatchModelAsPatch = backupPolicyPatchModel.asPatch(); + + // Construct an instance of the UpdateBackupPolicyOptions model + UpdateBackupPolicyOptions updateBackupPolicyOptionsModel = new UpdateBackupPolicyOptions.Builder() .id("testString") + .backupPolicyPatch(backupPolicyPatchModelAsPatch) + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke deleteVpcAddressPrefix() with a valid options model and verify the result - Response response = vpcService.deleteVpcAddressPrefix(deleteVpcAddressPrefixOptionsModel).execute(); + // Invoke updateBackupPolicy() with a valid options model and verify the result + Response response = vpcService.updateBackupPolicy(updateBackupPolicyOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + BackupPolicy 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(), "DELETE"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteVpcAddressPrefixPath); + assertEquals(parsedPath, updateBackupPolicyPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteVpcAddressPrefix operation with and without retries enabled + // Test the updateBackupPolicy operation with and without retries enabled @Test - public void testDeleteVpcAddressPrefixWRetries() throws Throwable { + public void testUpdateBackupPolicyWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteVpcAddressPrefixWOptions(); + testUpdateBackupPolicyWOptions(); vpcService.disableRetries(); - testDeleteVpcAddressPrefixWOptions(); + testUpdateBackupPolicyWOptions(); } - // Test the deleteVpcAddressPrefix operation with a null options model (negative test) + // Test the updateBackupPolicy operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteVpcAddressPrefixNoOptions() throws Throwable { + public void testUpdateBackupPolicyNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteVpcAddressPrefix(null).execute(); + vpcService.updateBackupPolicy(null).execute(); } - // Test the getVpcAddressPrefix operation with a valid options model parameter + // Test the updateBackupPolicyPlan operation with a valid options model parameter @Test - public void testGetVpcAddressPrefixWOptions() throws Throwable { + public void testUpdateBackupPolicyPlanWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"cidr\": \"192.168.3.0/24\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"has_subnets\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/address_prefixes/r006-68574057-c5e0-4675-ada4-99377d8f4789\", \"id\": \"r006-68574057-c5e0-4675-ada4-99377d8f4789\", \"is_default\": false, \"name\": \"my-vpc-address-prefix-zone-1\", \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String getVpcAddressPrefixPath = "/vpcs/testString/address_prefixes/testString"; + String mockResponseBody = "{\"active\": true, \"attach_user_tags\": [\"attachUserTags\"], \"clone_policy\": {\"max_snapshots\": 1, \"zones\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}]}, \"copy_user_tags\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"cron_spec\": \"30 */2 * * 1-5\", \"deletion_trigger\": {\"delete_after\": 20, \"delete_over_count\": 20}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"lifecycle_state\": \"stable\", \"name\": \"my-policy-plan\", \"remote_region_policies\": [{\"delete_over_count\": 1, \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}], \"resource_type\": \"backup_policy_plan\"}"; + String updateBackupPolicyPlanPath = "/backup_policies/testString/plans/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetVpcAddressPrefixOptions model - GetVpcAddressPrefixOptions getVpcAddressPrefixOptionsModel = new GetVpcAddressPrefixOptions.Builder() - .vpcId("testString") - .id("testString") + // Construct an instance of the ZoneIdentityByName model + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() + .name("us-south-1") .build(); - // Invoke getVpcAddressPrefix() with a valid options model and verify the result - Response response = vpcService.getVpcAddressPrefix(getVpcAddressPrefixOptionsModel).execute(); - assertNotNull(response); - AddressPrefix responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getVpcAddressPrefixPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - } + // Construct an instance of the BackupPolicyPlanClonePolicyPatch model + BackupPolicyPlanClonePolicyPatch backupPolicyPlanClonePolicyPatchModel = new BackupPolicyPlanClonePolicyPatch.Builder() + .maxSnapshots(Long.valueOf("1")) + .zones(java.util.Arrays.asList(zoneIdentityModel)) + .build(); - // Test the getVpcAddressPrefix operation with and without retries enabled - @Test - public void testGetVpcAddressPrefixWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testGetVpcAddressPrefixWOptions(); + // Construct an instance of the BackupPolicyPlanDeletionTriggerPatch model + BackupPolicyPlanDeletionTriggerPatch backupPolicyPlanDeletionTriggerPatchModel = new BackupPolicyPlanDeletionTriggerPatch.Builder() + .deleteAfter(Long.valueOf("20")) + .deleteOverCount(Long.valueOf("1")) + .build(); - vpcService.disableRetries(); - testGetVpcAddressPrefixWOptions(); - } + // Construct an instance of the EncryptionKeyIdentityByCRN model + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() + .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + .build(); - // Test the getVpcAddressPrefix operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetVpcAddressPrefixNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.getVpcAddressPrefix(null).execute(); - } + // Construct an instance of the RegionIdentityByName model + RegionIdentityByName regionIdentityModel = new RegionIdentityByName.Builder() + .name("us-south") + .build(); - // Test the updateVpcAddressPrefix operation with a valid options model parameter - @Test - public void testUpdateVpcAddressPrefixWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"cidr\": \"192.168.3.0/24\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"has_subnets\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/address_prefixes/r006-68574057-c5e0-4675-ada4-99377d8f4789\", \"id\": \"r006-68574057-c5e0-4675-ada4-99377d8f4789\", \"is_default\": false, \"name\": \"my-vpc-address-prefix-zone-1\", \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String updateVpcAddressPrefixPath = "/vpcs/testString/address_prefixes/testString"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); + // Construct an instance of the BackupPolicyPlanRemoteRegionPolicyPrototype model + BackupPolicyPlanRemoteRegionPolicyPrototype backupPolicyPlanRemoteRegionPolicyPrototypeModel = new BackupPolicyPlanRemoteRegionPolicyPrototype.Builder() + .deleteOverCount(Long.valueOf("5")) + .encryptionKey(encryptionKeyIdentityModel) + .region(regionIdentityModel) + .build(); - // Construct an instance of the AddressPrefixPatch model - AddressPrefixPatch addressPrefixPatchModel = new AddressPrefixPatch.Builder() - .isDefault(false) - .name("my-vpc-address-prefix-updated") + // Construct an instance of the BackupPolicyPlanPatch model + BackupPolicyPlanPatch backupPolicyPlanPatchModel = new BackupPolicyPlanPatch.Builder() + .active(true) + .attachUserTags(java.util.Arrays.asList("my-daily-backup-plan")) + .clonePolicy(backupPolicyPlanClonePolicyPatchModel) + .copyUserTags(false) + .cronSpec("30 */2 * * 1-5") + .deletionTrigger(backupPolicyPlanDeletionTriggerPatchModel) + .name("my-policy-plan") + .remoteRegionPolicies(java.util.Arrays.asList(backupPolicyPlanRemoteRegionPolicyPrototypeModel)) .build(); - Map addressPrefixPatchModelAsPatch = addressPrefixPatchModel.asPatch(); + Map backupPolicyPlanPatchModelAsPatch = backupPolicyPlanPatchModel.asPatch(); - // Construct an instance of the UpdateVpcAddressPrefixOptions model - UpdateVpcAddressPrefixOptions updateVpcAddressPrefixOptionsModel = new UpdateVpcAddressPrefixOptions.Builder() - .vpcId("testString") + // Construct an instance of the UpdateBackupPolicyPlanOptions model + UpdateBackupPolicyPlanOptions updateBackupPolicyPlanOptionsModel = new UpdateBackupPolicyPlanOptions.Builder() + .backupPolicyId("testString") .id("testString") - .addressPrefixPatch(addressPrefixPatchModelAsPatch) + .backupPolicyPlanPatch(backupPolicyPlanPatchModelAsPatch) + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke updateVpcAddressPrefix() with a valid options model and verify the result - Response response = vpcService.updateVpcAddressPrefix(updateVpcAddressPrefixOptionsModel).execute(); + // Invoke updateBackupPolicyPlan() with a valid options model and verify the result + Response response = vpcService.updateBackupPolicyPlan(updateBackupPolicyPlanOptionsModel).execute(); assertNotNull(response); - AddressPrefix responseObj = response.getResult(); + BackupPolicyPlan responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -2831,199 +2984,248 @@ public void testUpdateVpcAddressPrefixWOptions() throws Throwable { assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateVpcAddressPrefixPath); + assertEquals(parsedPath, updateBackupPolicyPlanPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateVpcAddressPrefix operation with and without retries enabled + // Test the updateBackupPolicyPlan operation with and without retries enabled @Test - public void testUpdateVpcAddressPrefixWRetries() throws Throwable { + public void testUpdateBackupPolicyPlanWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateVpcAddressPrefixWOptions(); + testUpdateBackupPolicyPlanWOptions(); vpcService.disableRetries(); - testUpdateVpcAddressPrefixWOptions(); + testUpdateBackupPolicyPlanWOptions(); } - // Test the updateVpcAddressPrefix operation with a null options model (negative test) + // Test the updateBackupPolicyPlan operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateVpcAddressPrefixNoOptions() throws Throwable { + public void testUpdateBackupPolicyPlanNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateVpcAddressPrefix(null).execute(); + vpcService.updateBackupPolicyPlan(null).execute(); } - // Test the listVpcDnsResolutionBindings operation with a valid options model parameter + // Test the addBareMetalServerNetworkInterfaceFloatingIp operation with a valid options model parameter @Test - public void testListVpcDnsResolutionBindingsWOptions() throws Throwable { + public void testAddBareMetalServerNetworkInterfaceFloatingIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"dns_resolution_bindings\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"endpoint_gateways\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"endpoint_gateway\"}], \"health_reasons\": [{\"code\": \"disconnected_from_bound_vpc\", \"message\": \"The VPC specified in the DNS resolution binding has been disconnected.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\", \"id\": \"r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\", \"lifecycle_state\": \"stable\", \"name\": \"my-dns-resolution-binding\", \"resource_type\": \"vpc_dns_resolution_binding\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"vpc\"}}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listVpcDnsResolutionBindingsPath = "/vpcs/testString/dns_resolution_bindings"; + String mockResponseBody = "{\"address\": \"203.0.113.1\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"available\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String addBareMetalServerNetworkInterfaceFloatingIpPath = "/bare_metal_servers/testString/network_interfaces/testString/floating_ips/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the ListVpcDnsResolutionBindingsOptions model - ListVpcDnsResolutionBindingsOptions listVpcDnsResolutionBindingsOptionsModel = new ListVpcDnsResolutionBindingsOptions.Builder() - .vpcId("testString") - .sort("name") - .start("testString") - .limit(Long.valueOf("10")) - .name("my-name") - .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .vpcName("my-vpc") - .accountId("bb1b52262f7441a586f49068482f1e60") + // Construct an instance of the AddBareMetalServerNetworkInterfaceFloatingIpOptions model + AddBareMetalServerNetworkInterfaceFloatingIpOptions addBareMetalServerNetworkInterfaceFloatingIpOptionsModel = new AddBareMetalServerNetworkInterfaceFloatingIpOptions.Builder() + .bareMetalServerId("testString") + .networkInterfaceId("testString") + .id("testString") .build(); - // Invoke listVpcDnsResolutionBindings() with a valid options model and verify the result - Response response = vpcService.listVpcDnsResolutionBindings(listVpcDnsResolutionBindingsOptionsModel).execute(); + // Invoke addBareMetalServerNetworkInterfaceFloatingIp() with a valid options model and verify the result + Response response = vpcService.addBareMetalServerNetworkInterfaceFloatingIp(addBareMetalServerNetworkInterfaceFloatingIpOptionsModel).execute(); assertNotNull(response); - VPCDNSResolutionBindingCollection responseObj = response.getResult(); + FloatingIP responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PUT"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listVpcDnsResolutionBindingsPath); + assertEquals(parsedPath, addBareMetalServerNetworkInterfaceFloatingIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("sort"), "name"); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("name"), "my-name"); - assertEquals(query.get("vpc.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); - assertEquals(query.get("vpc.name"), "my-vpc"); - assertEquals(query.get("account.id"), "bb1b52262f7441a586f49068482f1e60"); } - // Test the listVpcDnsResolutionBindings operation with and without retries enabled + // Test the addBareMetalServerNetworkInterfaceFloatingIp operation with and without retries enabled @Test - public void testListVpcDnsResolutionBindingsWRetries() throws Throwable { + public void testAddBareMetalServerNetworkInterfaceFloatingIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListVpcDnsResolutionBindingsWOptions(); + testAddBareMetalServerNetworkInterfaceFloatingIpWOptions(); vpcService.disableRetries(); - testListVpcDnsResolutionBindingsWOptions(); + testAddBareMetalServerNetworkInterfaceFloatingIpWOptions(); } - // Test the listVpcDnsResolutionBindings operation with a null options model (negative test) + // Test the addBareMetalServerNetworkInterfaceFloatingIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListVpcDnsResolutionBindingsNoOptions() throws Throwable { + public void testAddBareMetalServerNetworkInterfaceFloatingIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listVpcDnsResolutionBindings(null).execute(); + vpcService.addBareMetalServerNetworkInterfaceFloatingIp(null).execute(); } - // Test the listVpcDnsResolutionBindings operation using the VpcDnsResolutionBindingsPager.getNext() method + // Test the createBareMetalServer operation with a valid options model parameter @Test - public void testListVpcDnsResolutionBindingsWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"dns_resolution_bindings\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"endpoint_gateways\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"endpoint_gateway\"}],\"health_reasons\":[{\"code\":\"disconnected_from_bound_vpc\",\"message\":\"The VPC specified in the DNS resolution binding has been disconnected.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\",\"id\":\"r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\",\"lifecycle_state\":\"stable\",\"name\":\"my-dns-resolution-binding\",\"resource_type\":\"vpc_dns_resolution_binding\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"vpc\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"dns_resolution_bindings\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"endpoint_gateways\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"endpoint_gateway\"}],\"health_reasons\":[{\"code\":\"disconnected_from_bound_vpc\",\"message\":\"The VPC specified in the DNS resolution binding has been disconnected.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\",\"id\":\"r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\",\"lifecycle_state\":\"stable\",\"name\":\"my-dns-resolution-binding\",\"resource_type\":\"vpc_dns_resolution_binding\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"vpc\"}}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); + public void testCreateBareMetalServerWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"bandwidth\": 20000, \"boot_target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"id\": \"0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"name\": \"my-bare-metal-server-disk\", \"resource_type\": \"bare_metal_server_disk\"}, \"cpu\": {\"architecture\": \"amd64\", \"core_count\": 80, \"socket_count\": 4, \"threads_per_core\": 2}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\", \"disks\": [{\"allowed_use\": {\"api_version\": \"2024-06-23\", \"bare_metal_server\": \"enable_secure_boot == true\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"id\": \"0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"interface_type\": \"fcp\", \"name\": \"my-bare-metal-server-disk\", \"resource_type\": \"bare_metal_server_disk\", \"size\": 100}], \"enable_secure_boot\": false, \"firmware\": {\"update\": \"none\"}, \"health_reasons\": [{\"code\": \"reservation_expired\", \"message\": \"The reservation cannot be used because it has expired.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\", \"id\": \"0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"memory\": 1536, \"metadata_service\": {\"enabled\": false, \"protocol\": \"http\"}, \"name\": \"my-bare-metal-server\", \"network_attachments\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"bare_metal_server_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}], \"network_interfaces\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}], \"primary_network_attachment\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"bare_metal_server_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}, \"primary_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\", \"name\": \"bx2-metal-192x768\", \"resource_type\": \"bare_metal_server_profile\"}, \"reservation\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}, \"reservation_affinity\": {\"policy\": \"automatic\", \"pool\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}]}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"bare_metal_server\", \"status\": \"deleting\", \"status_reasons\": [{\"code\": \"cannot_start_capacity\", \"message\": \"The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.\", \"more_info\": \"https://console.bluemix.net/docs/iaas/bare_metal_server.html\"}], \"trusted_platform_module\": {\"enabled\": true, \"mode\": \"disabled\", \"supported_modes\": [\"disabled\"]}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String createBareMetalServerPath = "/bare_metal_servers"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); + .setResponseCode(201) + .setBody(mockResponseBody)); - ListVpcDnsResolutionBindingsOptions listVpcDnsResolutionBindingsOptions = new ListVpcDnsResolutionBindingsOptions.Builder() - .vpcId("testString") - .sort("name") - .limit(Long.valueOf("10")) - .name("my-name") - .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .vpcName("my-vpc") - .accountId("bb1b52262f7441a586f49068482f1e60") + // Construct an instance of the TrustedProfileIdentityById model + TrustedProfileIdentityById trustedProfileIdentityModel = new TrustedProfileIdentityById.Builder() + .id("Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5") .build(); - List allResults = new ArrayList<>(); - VpcDnsResolutionBindingsPager pager = new VpcDnsResolutionBindingsPager(vpcService, listVpcDnsResolutionBindingsOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); - } - - // Test the listVpcDnsResolutionBindings operation using the VpcDnsResolutionBindingsPager.getAll() method - @Test - public void testListVpcDnsResolutionBindingsWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"dns_resolution_bindings\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"endpoint_gateways\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"endpoint_gateway\"}],\"health_reasons\":[{\"code\":\"disconnected_from_bound_vpc\",\"message\":\"The VPC specified in the DNS resolution binding has been disconnected.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\",\"id\":\"r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\",\"lifecycle_state\":\"stable\",\"name\":\"my-dns-resolution-binding\",\"resource_type\":\"vpc_dns_resolution_binding\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"vpc\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"dns_resolution_bindings\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"endpoint_gateways\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"endpoint_gateway\"}],\"health_reasons\":[{\"code\":\"disconnected_from_bound_vpc\",\"message\":\"The VPC specified in the DNS resolution binding has been disconnected.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\",\"id\":\"r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\",\"lifecycle_state\":\"stable\",\"name\":\"my-dns-resolution-binding\",\"resource_type\":\"vpc_dns_resolution_binding\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"vpc\"}}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); + // Construct an instance of the BareMetalServerInitializationDefaultTrustedProfilePrototype model + BareMetalServerInitializationDefaultTrustedProfilePrototype bareMetalServerInitializationDefaultTrustedProfilePrototypeModel = new BareMetalServerInitializationDefaultTrustedProfilePrototype.Builder() + .autoLink(false) + .target(trustedProfileIdentityModel) + .build(); - ListVpcDnsResolutionBindingsOptions listVpcDnsResolutionBindingsOptions = new ListVpcDnsResolutionBindingsOptions.Builder() - .vpcId("testString") - .sort("name") - .limit(Long.valueOf("10")) - .name("my-name") - .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .vpcName("my-vpc") - .accountId("bb1b52262f7441a586f49068482f1e60") + // Construct an instance of the ImageIdentityById model + ImageIdentityById imageIdentityModel = new ImageIdentityById.Builder() + .id("r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") .build(); - VpcDnsResolutionBindingsPager pager = new VpcDnsResolutionBindingsPager(vpcService, listVpcDnsResolutionBindingsOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the createVpcDnsResolutionBinding operation with a valid options model parameter - @Test - public void testCreateVpcDnsResolutionBindingWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"endpoint_gateways\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"endpoint_gateway\"}], \"health_reasons\": [{\"code\": \"disconnected_from_bound_vpc\", \"message\": \"The VPC specified in the DNS resolution binding has been disconnected.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\", \"id\": \"r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\", \"lifecycle_state\": \"stable\", \"name\": \"my-dns-resolution-binding\", \"resource_type\": \"vpc_dns_resolution_binding\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"vpc\"}}"; - String createVpcDnsResolutionBindingPath = "/vpcs/testString/dns_resolution_bindings"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(201) - .setBody(mockResponseBody)); + // Construct an instance of the KeyIdentityById model + KeyIdentityById keyIdentityModel = new KeyIdentityById.Builder() + .id("r006-82679077-ac3b-4c10-be16-63e9c21f0f45") + .build(); + + // Construct an instance of the BareMetalServerInitializationPrototype model + BareMetalServerInitializationPrototype bareMetalServerInitializationPrototypeModel = new BareMetalServerInitializationPrototype.Builder() + .defaultTrustedProfile(bareMetalServerInitializationDefaultTrustedProfilePrototypeModel) + .image(imageIdentityModel) + .keys(java.util.Arrays.asList(keyIdentityModel)) + .userData("testString") + .build(); + + // Construct an instance of the BareMetalServerMetadataServicePrototype model + BareMetalServerMetadataServicePrototype bareMetalServerMetadataServicePrototypeModel = new BareMetalServerMetadataServicePrototype.Builder() + .enabled(true) + .protocol("https") + .build(); + + // Construct an instance of the BareMetalServerProfileIdentityByName model + BareMetalServerProfileIdentityByName bareMetalServerProfileIdentityModel = new BareMetalServerProfileIdentityByName.Builder() + .name("bx2-metal-192x768") + .build(); + + // Construct an instance of the ReservationIdentityById model + ReservationIdentityById reservationIdentityModel = new ReservationIdentityById.Builder() + .id("0717-ba49df72-37b8-43ac-98da-f8e029de0e63") + .build(); + + // Construct an instance of the BareMetalServerReservationAffinityPrototype model + BareMetalServerReservationAffinityPrototype bareMetalServerReservationAffinityPrototypeModel = new BareMetalServerReservationAffinityPrototype.Builder() + .policy("automatic") + .pool(java.util.Arrays.asList(reservationIdentityModel)) + .build(); + + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") + .build(); + + // Construct an instance of the BareMetalServerTrustedPlatformModulePrototype model + BareMetalServerTrustedPlatformModulePrototype bareMetalServerTrustedPlatformModulePrototypeModel = new BareMetalServerTrustedPlatformModulePrototype.Builder() + .mode("disabled") + .build(); // Construct an instance of the VPCIdentityById model VPCIdentityById vpcIdentityModel = new VPCIdentityById.Builder() .id("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") .build(); - // Construct an instance of the CreateVpcDnsResolutionBindingOptions model - CreateVpcDnsResolutionBindingOptions createVpcDnsResolutionBindingOptionsModel = new CreateVpcDnsResolutionBindingOptions.Builder() - .vpcId("testString") + // Construct an instance of the ZoneIdentityByName model + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() + .name("us-south-1") + .build(); + + // Construct an instance of the VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext model + VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtualNetworkInterfaceIpPrototypeModel = new VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext.Builder() + .address("10.0.0.5") + .autoDelete(false) + .name("my-reserved-ip") + .build(); + + // Construct an instance of the VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model + VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext virtualNetworkInterfacePrimaryIpPrototypeModel = new VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext.Builder() + .address("10.0.0.5") + .autoDelete(false) + .name("my-reserved-ip") + .build(); + + // Construct an instance of the SecurityGroupIdentityById model + SecurityGroupIdentityById securityGroupIdentityModel = new SecurityGroupIdentityById.Builder() + .id("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + .build(); + + // Construct an instance of the SubnetIdentityById model + SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() + .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + .build(); + + // Construct an instance of the BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext model + BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext bareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceModel = new BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext.Builder() + .allowIpSpoofing(true) + .autoDelete(false) + .enableInfrastructureNat(true) + .ips(java.util.Arrays.asList(virtualNetworkInterfaceIpPrototypeModel)) + .name("my-virtual-network-interface") + .primaryIp(virtualNetworkInterfacePrimaryIpPrototypeModel) + .protocolStateFilteringMode("auto") + .resourceGroup(resourceGroupIdentityModel) + .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) + .subnet(subnetIdentityModel) + .build(); + + // Construct an instance of the BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype model + BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype bareMetalServerNetworkAttachmentPrototypeModel = new BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype.Builder() + .name("my-bare-metal-server-network-attachment") + .virtualNetworkInterface(bareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceModel) + .allowedVlans(java.util.Arrays.asList(Long.valueOf(""))) + .interfaceType("pci") + .build(); + + // Construct an instance of the BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype model + BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype bareMetalServerPrimaryNetworkAttachmentPrototypeModel = new BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype.Builder() + .name("my-bare-metal-server-network-attachment") + .virtualNetworkInterface(bareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceModel) + .allowedVlans(java.util.Arrays.asList(Long.valueOf(""))) + .interfaceType("pci") + .build(); + + // Construct an instance of the BareMetalServerPrototypeBareMetalServerByNetworkAttachment model + BareMetalServerPrototypeBareMetalServerByNetworkAttachment bareMetalServerPrototypeModel = new BareMetalServerPrototypeBareMetalServerByNetworkAttachment.Builder() + .bandwidth(Long.valueOf("20000")) + .enableSecureBoot(false) + .initialization(bareMetalServerInitializationPrototypeModel) + .metadataService(bareMetalServerMetadataServicePrototypeModel) + .name("my-bare-metal-server") + .profile(bareMetalServerProfileIdentityModel) + .reservationAffinity(bareMetalServerReservationAffinityPrototypeModel) + .resourceGroup(resourceGroupIdentityModel) + .trustedPlatformModule(bareMetalServerTrustedPlatformModulePrototypeModel) .vpc(vpcIdentityModel) - .name("my-dns-resolution-binding") + .zone(zoneIdentityModel) + .networkAttachments(java.util.Arrays.asList(bareMetalServerNetworkAttachmentPrototypeModel)) + .primaryNetworkAttachment(bareMetalServerPrimaryNetworkAttachmentPrototypeModel) .build(); - // Invoke createVpcDnsResolutionBinding() with a valid options model and verify the result - Response response = vpcService.createVpcDnsResolutionBinding(createVpcDnsResolutionBindingOptionsModel).execute(); + // Construct an instance of the CreateBareMetalServerOptions model + CreateBareMetalServerOptions createBareMetalServerOptionsModel = new CreateBareMetalServerOptions.Builder() + .bareMetalServerPrototype(bareMetalServerPrototypeModel) + .build(); + + // Invoke createBareMetalServer() with a valid options model and verify the result + Response response = vpcService.createBareMetalServer(createBareMetalServerOptionsModel).execute(); assertNotNull(response); - VPCDNSResolutionBinding responseObj = response.getResult(); + BareMetalServer responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -3032,469 +3234,505 @@ public void testCreateVpcDnsResolutionBindingWOptions() throws Throwable { assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createVpcDnsResolutionBindingPath); + assertEquals(parsedPath, createBareMetalServerPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createVpcDnsResolutionBinding operation with and without retries enabled + // Test the createBareMetalServer operation with and without retries enabled @Test - public void testCreateVpcDnsResolutionBindingWRetries() throws Throwable { + public void testCreateBareMetalServerWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateVpcDnsResolutionBindingWOptions(); + testCreateBareMetalServerWOptions(); vpcService.disableRetries(); - testCreateVpcDnsResolutionBindingWOptions(); + testCreateBareMetalServerWOptions(); } - // Test the createVpcDnsResolutionBinding operation with a null options model (negative test) + // Test the createBareMetalServer operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateVpcDnsResolutionBindingNoOptions() throws Throwable { + public void testCreateBareMetalServerNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createVpcDnsResolutionBinding(null).execute(); + vpcService.createBareMetalServer(null).execute(); } - // Test the deleteVpcDnsResolutionBinding operation with a valid options model parameter + // Test the createBareMetalServerConsoleAccessToken operation with a valid options model parameter @Test - public void testDeleteVpcDnsResolutionBindingWOptions() throws Throwable { + public void testCreateBareMetalServerConsoleAccessTokenWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"endpoint_gateways\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"endpoint_gateway\"}], \"health_reasons\": [{\"code\": \"disconnected_from_bound_vpc\", \"message\": \"The VPC specified in the DNS resolution binding has been disconnected.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\", \"id\": \"r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\", \"lifecycle_state\": \"stable\", \"name\": \"my-dns-resolution-binding\", \"resource_type\": \"vpc_dns_resolution_binding\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"vpc\"}}"; - String deleteVpcDnsResolutionBindingPath = "/vpcs/testString/dns_resolution_bindings/testString"; + String mockResponseBody = "{\"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjoiYWEyNDMyYjFmYTRkNGFjZTg5MWU5YjgwZmMxMDRlMzQiLCJzZWNyZXQiOiJRVzRnWlhoaGJYQnNaU0J6WldOeVpYUUsiLCJleHAiOjE3MjYwNzU1OTR9.UFDVzzGJ54Go9Z4jgyPSLG49zNx-AjHTQrJA6ee8KLI\", \"console_type\": \"serial\", \"created_at\": \"2020-07-27T21:50:14.000Z\", \"expires_at\": \"2020-07-27T21:51:14.000Z\", \"force\": false, \"href\": \"wss://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/console?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjoiYWEyNDMyYjFmYTRkNGFjZTg5MWU5YjgwZmMxMDRlMzQiLCJzZWNyZXQiOiJRVzRnWlhoaGJYQnNaU0J6WldOeVpYUUsiLCJleHAiOjE3MjYwNzU1OTR9.UFDVzzGJ54Go9Z4jgyPSLG49zNx-AjHTQrJA6ee8KLI\"}"; + String createBareMetalServerConsoleAccessTokenPath = "/bare_metal_servers/testString/console_access_token"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(202) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteVpcDnsResolutionBindingOptions model - DeleteVpcDnsResolutionBindingOptions deleteVpcDnsResolutionBindingOptionsModel = new DeleteVpcDnsResolutionBindingOptions.Builder() - .vpcId("testString") - .id("testString") + // Construct an instance of the CreateBareMetalServerConsoleAccessTokenOptions model + CreateBareMetalServerConsoleAccessTokenOptions createBareMetalServerConsoleAccessTokenOptionsModel = new CreateBareMetalServerConsoleAccessTokenOptions.Builder() + .bareMetalServerId("testString") + .consoleType("serial") + .force(false) .build(); - // Invoke deleteVpcDnsResolutionBinding() with a valid options model and verify the result - Response response = vpcService.deleteVpcDnsResolutionBinding(deleteVpcDnsResolutionBindingOptionsModel).execute(); + // Invoke createBareMetalServerConsoleAccessToken() with a valid options model and verify the result + Response response = vpcService.createBareMetalServerConsoleAccessToken(createBareMetalServerConsoleAccessTokenOptionsModel).execute(); assertNotNull(response); - VPCDNSResolutionBinding responseObj = response.getResult(); + BareMetalServerConsoleAccessToken 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(), "DELETE"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteVpcDnsResolutionBindingPath); + assertEquals(parsedPath, createBareMetalServerConsoleAccessTokenPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteVpcDnsResolutionBinding operation with and without retries enabled + // Test the createBareMetalServerConsoleAccessToken operation with and without retries enabled @Test - public void testDeleteVpcDnsResolutionBindingWRetries() throws Throwable { + public void testCreateBareMetalServerConsoleAccessTokenWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteVpcDnsResolutionBindingWOptions(); + testCreateBareMetalServerConsoleAccessTokenWOptions(); vpcService.disableRetries(); - testDeleteVpcDnsResolutionBindingWOptions(); + testCreateBareMetalServerConsoleAccessTokenWOptions(); } - // Test the deleteVpcDnsResolutionBinding operation with a null options model (negative test) + // Test the createBareMetalServerConsoleAccessToken operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteVpcDnsResolutionBindingNoOptions() throws Throwable { + public void testCreateBareMetalServerConsoleAccessTokenNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteVpcDnsResolutionBinding(null).execute(); + vpcService.createBareMetalServerConsoleAccessToken(null).execute(); } - // Test the getVpcDnsResolutionBinding operation with a valid options model parameter + // Test the createBareMetalServerNetworkAttachment operation with a valid options model parameter @Test - public void testGetVpcDnsResolutionBindingWOptions() throws Throwable { + public void testCreateBareMetalServerNetworkAttachmentWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"endpoint_gateways\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"endpoint_gateway\"}], \"health_reasons\": [{\"code\": \"disconnected_from_bound_vpc\", \"message\": \"The VPC specified in the DNS resolution binding has been disconnected.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\", \"id\": \"r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\", \"lifecycle_state\": \"stable\", \"name\": \"my-dns-resolution-binding\", \"resource_type\": \"vpc_dns_resolution_binding\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"vpc\"}}"; - String getVpcDnsResolutionBindingPath = "/vpcs/testString/dns_resolution_bindings/testString"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"lifecycle_state\": \"stable\", \"name\": \"my-bare-metal-server-network-attachment\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"bare_metal_server_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}, \"allowed_vlans\": [4], \"interface_type\": \"pci\"}"; + String createBareMetalServerNetworkAttachmentPath = "/bare_metal_servers/testString/network_attachments"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the GetVpcDnsResolutionBindingOptions model - GetVpcDnsResolutionBindingOptions getVpcDnsResolutionBindingOptionsModel = new GetVpcDnsResolutionBindingOptions.Builder() - .vpcId("testString") - .id("testString") + // Construct an instance of the VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext model + VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtualNetworkInterfaceIpPrototypeModel = new VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext.Builder() + .address("10.0.0.5") + .autoDelete(false) + .name("my-reserved-ip") .build(); - // Invoke getVpcDnsResolutionBinding() with a valid options model and verify the result - Response response = vpcService.getVpcDnsResolutionBinding(getVpcDnsResolutionBindingOptionsModel).execute(); + // Construct an instance of the VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model + VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext virtualNetworkInterfacePrimaryIpPrototypeModel = new VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext.Builder() + .address("10.0.0.5") + .autoDelete(false) + .name("my-reserved-ip") + .build(); + + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") + .build(); + + // Construct an instance of the SecurityGroupIdentityById model + SecurityGroupIdentityById securityGroupIdentityModel = new SecurityGroupIdentityById.Builder() + .id("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + .build(); + + // Construct an instance of the SubnetIdentityById model + SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() + .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + .build(); + + // Construct an instance of the BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext model + BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext bareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceModel = new BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext.Builder() + .allowIpSpoofing(true) + .autoDelete(false) + .enableInfrastructureNat(true) + .ips(java.util.Arrays.asList(virtualNetworkInterfaceIpPrototypeModel)) + .name("my-virtual-network-interface") + .primaryIp(virtualNetworkInterfacePrimaryIpPrototypeModel) + .protocolStateFilteringMode("auto") + .resourceGroup(resourceGroupIdentityModel) + .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) + .subnet(subnetIdentityModel) + .build(); + + // Construct an instance of the BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype model + BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype bareMetalServerNetworkAttachmentPrototypeModel = new BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype.Builder() + .name("my-bare-metal-server-network-attachment") + .virtualNetworkInterface(bareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceModel) + .allowedVlans(java.util.Arrays.asList(Long.valueOf(""))) + .interfaceType("pci") + .build(); + + // Construct an instance of the CreateBareMetalServerNetworkAttachmentOptions model + CreateBareMetalServerNetworkAttachmentOptions createBareMetalServerNetworkAttachmentOptionsModel = new CreateBareMetalServerNetworkAttachmentOptions.Builder() + .bareMetalServerId("testString") + .bareMetalServerNetworkAttachmentPrototype(bareMetalServerNetworkAttachmentPrototypeModel) + .build(); + + // Invoke createBareMetalServerNetworkAttachment() with a valid options model and verify the result + Response response = vpcService.createBareMetalServerNetworkAttachment(createBareMetalServerNetworkAttachmentOptionsModel).execute(); assertNotNull(response); - VPCDNSResolutionBinding responseObj = response.getResult(); + BareMetalServerNetworkAttachment responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getVpcDnsResolutionBindingPath); + assertEquals(parsedPath, createBareMetalServerNetworkAttachmentPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getVpcDnsResolutionBinding operation with and without retries enabled + // Test the createBareMetalServerNetworkAttachment operation with and without retries enabled @Test - public void testGetVpcDnsResolutionBindingWRetries() throws Throwable { + public void testCreateBareMetalServerNetworkAttachmentWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetVpcDnsResolutionBindingWOptions(); + testCreateBareMetalServerNetworkAttachmentWOptions(); vpcService.disableRetries(); - testGetVpcDnsResolutionBindingWOptions(); + testCreateBareMetalServerNetworkAttachmentWOptions(); } - // Test the getVpcDnsResolutionBinding operation with a null options model (negative test) + // Test the createBareMetalServerNetworkAttachment operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetVpcDnsResolutionBindingNoOptions() throws Throwable { + public void testCreateBareMetalServerNetworkAttachmentNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getVpcDnsResolutionBinding(null).execute(); + vpcService.createBareMetalServerNetworkAttachment(null).execute(); } - // Test the updateVpcDnsResolutionBinding operation with a valid options model parameter + // Test the createBareMetalServerNetworkInterface operation with a valid options model parameter @Test - public void testUpdateVpcDnsResolutionBindingWOptions() throws Throwable { + public void testCreateBareMetalServerNetworkInterfaceWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"endpoint_gateways\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"endpoint_gateway\"}], \"health_reasons\": [{\"code\": \"disconnected_from_bound_vpc\", \"message\": \"The VPC specified in the DNS resolution binding has been disconnected.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\", \"id\": \"r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\", \"lifecycle_state\": \"stable\", \"name\": \"my-dns-resolution-binding\", \"resource_type\": \"vpc_dns_resolution_binding\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"vpc\"}}"; - String updateVpcDnsResolutionBindingPath = "/vpcs/testString/dns_resolution_bindings/testString"; + String mockResponseBody = "{\"allow_ip_spoofing\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"enable_infrastructure_nat\": true, \"floating_ips\": [{\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}], \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"mac_address\": \"02:00:04:00:C4:6A\", \"name\": \"my-bare-metal-server-network-interface\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"status\": \"available\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\", \"interface_type\": \"hipersocket\"}"; + String createBareMetalServerNetworkInterfacePath = "/bare_metal_servers/testString/network_interfaces"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the VPCDNSResolutionBindingPatch model - VPCDNSResolutionBindingPatch vpcdnsResolutionBindingPatchModel = new VPCDNSResolutionBindingPatch.Builder() - .name("my-dns-resolution-binding-updated") + // Construct an instance of the NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext model + NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext networkInterfaceIpPrototypeModel = new NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext.Builder() + .address("10.0.0.5") + .autoDelete(false) + .name("my-reserved-ip") .build(); - Map vpcdnsResolutionBindingPatchModelAsPatch = vpcdnsResolutionBindingPatchModel.asPatch(); - // Construct an instance of the UpdateVpcDnsResolutionBindingOptions model - UpdateVpcDnsResolutionBindingOptions updateVpcDnsResolutionBindingOptionsModel = new UpdateVpcDnsResolutionBindingOptions.Builder() - .vpcId("testString") - .id("testString") - .vpcdnsResolutionBindingPatch(vpcdnsResolutionBindingPatchModelAsPatch) + // Construct an instance of the SecurityGroupIdentityById model + SecurityGroupIdentityById securityGroupIdentityModel = new SecurityGroupIdentityById.Builder() + .id("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") .build(); - // Invoke updateVpcDnsResolutionBinding() with a valid options model and verify the result - Response response = vpcService.updateVpcDnsResolutionBinding(updateVpcDnsResolutionBindingOptionsModel).execute(); + // Construct an instance of the SubnetIdentityById model + SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() + .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + .build(); + + // Construct an instance of the BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype model + BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype bareMetalServerNetworkInterfacePrototypeModel = new BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype.Builder() + .allowIpSpoofing(true) + .enableInfrastructureNat(true) + .name("my-bare-metal-server-network-interface") + .primaryIp(networkInterfaceIpPrototypeModel) + .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) + .subnet(subnetIdentityModel) + .interfaceType("hipersocket") + .build(); + + // Construct an instance of the CreateBareMetalServerNetworkInterfaceOptions model + CreateBareMetalServerNetworkInterfaceOptions createBareMetalServerNetworkInterfaceOptionsModel = new CreateBareMetalServerNetworkInterfaceOptions.Builder() + .bareMetalServerId("testString") + .bareMetalServerNetworkInterfacePrototype(bareMetalServerNetworkInterfacePrototypeModel) + .build(); + + // Invoke createBareMetalServerNetworkInterface() with a valid options model and verify the result + Response response = vpcService.createBareMetalServerNetworkInterface(createBareMetalServerNetworkInterfaceOptionsModel).execute(); assertNotNull(response); - VPCDNSResolutionBinding responseObj = response.getResult(); + BareMetalServerNetworkInterface responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateVpcDnsResolutionBindingPath); + assertEquals(parsedPath, createBareMetalServerNetworkInterfacePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateVpcDnsResolutionBinding operation with and without retries enabled + // Test the createBareMetalServerNetworkInterface operation with and without retries enabled @Test - public void testUpdateVpcDnsResolutionBindingWRetries() throws Throwable { + public void testCreateBareMetalServerNetworkInterfaceWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateVpcDnsResolutionBindingWOptions(); + testCreateBareMetalServerNetworkInterfaceWOptions(); vpcService.disableRetries(); - testUpdateVpcDnsResolutionBindingWOptions(); + testCreateBareMetalServerNetworkInterfaceWOptions(); } - // Test the updateVpcDnsResolutionBinding operation with a null options model (negative test) + // Test the createBareMetalServerNetworkInterface operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateVpcDnsResolutionBindingNoOptions() throws Throwable { + public void testCreateBareMetalServerNetworkInterfaceNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateVpcDnsResolutionBinding(null).execute(); + vpcService.createBareMetalServerNetworkInterface(null).execute(); } - // Test the listVpcRoutes operation with a valid options model parameter + // Test the deleteBareMetalServer operation with a valid options model parameter @Test - public void testListVpcRoutesWOptions() throws Throwable { + public void testDeleteBareMetalServerWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"routes\": [{\"action\": \"delegate\", \"advertise\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"creator\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"id\": \"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"name\": \"my-vpn-gateway\", \"resource_type\": \"vpn_gateway\"}, \"destination\": \"192.168.3.0/24\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"lifecycle_state\": \"stable\", \"name\": \"my-vpc-routing-table-route\", \"next_hop\": {\"address\": \"192.168.3.4\"}, \"origin\": \"service\", \"priority\": 1, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"total_count\": 132}"; - String listVpcRoutesPath = "/vpcs/testString/routes"; + String mockResponseBody = ""; + String deleteBareMetalServerPath = "/bare_metal_servers/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the ListVpcRoutesOptions model - ListVpcRoutesOptions listVpcRoutesOptionsModel = new ListVpcRoutesOptions.Builder() - .vpcId("testString") - .zoneName("us-south-1") - .start("testString") - .limit(Long.valueOf("10")) + // Construct an instance of the DeleteBareMetalServerOptions model + DeleteBareMetalServerOptions deleteBareMetalServerOptionsModel = new DeleteBareMetalServerOptions.Builder() + .id("testString") .build(); - // Invoke listVpcRoutes() with a valid options model and verify the result - Response response = vpcService.listVpcRoutes(listVpcRoutesOptionsModel).execute(); + // Invoke deleteBareMetalServer() with a valid options model and verify the result + Response response = vpcService.deleteBareMetalServer(deleteBareMetalServerOptionsModel).execute(); assertNotNull(response); - RouteCollectionVPCContext responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listVpcRoutesPath); + assertEquals(parsedPath, deleteBareMetalServerPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("zone.name"), "us-south-1"); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the listVpcRoutes operation with and without retries enabled + // Test the deleteBareMetalServer operation with and without retries enabled @Test - public void testListVpcRoutesWRetries() throws Throwable { + public void testDeleteBareMetalServerWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListVpcRoutesWOptions(); + testDeleteBareMetalServerWOptions(); vpcService.disableRetries(); - testListVpcRoutesWOptions(); + testDeleteBareMetalServerWOptions(); } - // Test the listVpcRoutes operation with a null options model (negative test) + // Test the deleteBareMetalServer operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListVpcRoutesNoOptions() throws Throwable { + public void testDeleteBareMetalServerNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listVpcRoutes(null).execute(); + vpcService.deleteBareMetalServer(null).execute(); } - // Test the listVpcRoutes operation using the VpcRoutesPager.getNext() method + // Test the deleteBareMetalServerNetworkAttachment operation with a valid options model parameter @Test - public void testListVpcRoutesWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"routes\":[{\"action\":\"delegate\",\"advertise\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"creator\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"id\":\"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"name\":\"my-vpn-gateway\",\"resource_type\":\"vpn_gateway\"},\"destination\":\"192.168.3.0/24\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"id\":\"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"lifecycle_state\":\"stable\",\"name\":\"my-vpc-routing-table-route\",\"next_hop\":{\"address\":\"192.168.3.4\"},\"origin\":\"service\",\"priority\":1,\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"routes\":[{\"action\":\"delegate\",\"advertise\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"creator\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"id\":\"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"name\":\"my-vpn-gateway\",\"resource_type\":\"vpn_gateway\"},\"destination\":\"192.168.3.0/24\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"id\":\"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"lifecycle_state\":\"stable\",\"name\":\"my-vpc-routing-table-route\",\"next_hop\":{\"address\":\"192.168.3.4\"},\"origin\":\"service\",\"priority\":1,\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); + public void testDeleteBareMetalServerNetworkAttachmentWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = ""; + String deleteBareMetalServerNetworkAttachmentPath = "/bare_metal_servers/testString/network_attachments/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); + .setResponseCode(202) + .setBody(mockResponseBody)); - ListVpcRoutesOptions listVpcRoutesOptions = new ListVpcRoutesOptions.Builder() - .vpcId("testString") - .zoneName("us-south-1") - .limit(Long.valueOf("10")) + // Construct an instance of the DeleteBareMetalServerNetworkAttachmentOptions model + DeleteBareMetalServerNetworkAttachmentOptions deleteBareMetalServerNetworkAttachmentOptionsModel = new DeleteBareMetalServerNetworkAttachmentOptions.Builder() + .bareMetalServerId("testString") + .id("testString") .build(); - List allResults = new ArrayList<>(); - VpcRoutesPager pager = new VpcRoutesPager(vpcService, listVpcRoutesOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + // Invoke deleteBareMetalServerNetworkAttachment() with a valid options model and verify the result + Response response = vpcService.deleteBareMetalServerNetworkAttachment(deleteBareMetalServerNetworkAttachmentOptionsModel).execute(); + assertNotNull(response); + Void responseObj = response.getResult(); + assertNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "DELETE"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, deleteBareMetalServerNetworkAttachmentPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - - // Test the listVpcRoutes operation using the VpcRoutesPager.getAll() method + + // Test the deleteBareMetalServerNetworkAttachment operation with and without retries enabled @Test - public void testListVpcRoutesWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"routes\":[{\"action\":\"delegate\",\"advertise\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"creator\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"id\":\"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"name\":\"my-vpn-gateway\",\"resource_type\":\"vpn_gateway\"},\"destination\":\"192.168.3.0/24\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"id\":\"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"lifecycle_state\":\"stable\",\"name\":\"my-vpc-routing-table-route\",\"next_hop\":{\"address\":\"192.168.3.4\"},\"origin\":\"service\",\"priority\":1,\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"routes\":[{\"action\":\"delegate\",\"advertise\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"creator\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"id\":\"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"name\":\"my-vpn-gateway\",\"resource_type\":\"vpn_gateway\"},\"destination\":\"192.168.3.0/24\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"id\":\"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"lifecycle_state\":\"stable\",\"name\":\"my-vpc-routing-table-route\",\"next_hop\":{\"address\":\"192.168.3.4\"},\"origin\":\"service\",\"priority\":1,\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); + public void testDeleteBareMetalServerNetworkAttachmentWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testDeleteBareMetalServerNetworkAttachmentWOptions(); - ListVpcRoutesOptions listVpcRoutesOptions = new ListVpcRoutesOptions.Builder() - .vpcId("testString") - .zoneName("us-south-1") - .limit(Long.valueOf("10")) - .build(); + vpcService.disableRetries(); + testDeleteBareMetalServerNetworkAttachmentWOptions(); + } - VpcRoutesPager pager = new VpcRoutesPager(vpcService, listVpcRoutesOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); + // Test the deleteBareMetalServerNetworkAttachment operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testDeleteBareMetalServerNetworkAttachmentNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.deleteBareMetalServerNetworkAttachment(null).execute(); } - - // Test the createVpcRoute operation with a valid options model parameter + + // Test the deleteBareMetalServerNetworkInterface operation with a valid options model parameter @Test - public void testCreateVpcRouteWOptions() throws Throwable { + public void testDeleteBareMetalServerNetworkInterfaceWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"action\": \"delegate\", \"advertise\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"creator\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"id\": \"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"name\": \"my-vpn-gateway\", \"resource_type\": \"vpn_gateway\"}, \"destination\": \"192.168.3.0/24\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"lifecycle_state\": \"stable\", \"name\": \"my-vpc-routing-table-route\", \"next_hop\": {\"address\": \"192.168.3.4\"}, \"origin\": \"service\", \"priority\": 1, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String createVpcRoutePath = "/vpcs/testString/routes"; + String mockResponseBody = ""; + String deleteBareMetalServerNetworkInterfacePath = "/bare_metal_servers/testString/network_interfaces/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the ZoneIdentityByName model - ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() - .name("us-south-1") - .build(); - - // Construct an instance of the RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP model - RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP routeNextHopPrototypeModel = new RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP.Builder() - .address("0.0.0.0") - .build(); - - // Construct an instance of the CreateVpcRouteOptions model - CreateVpcRouteOptions createVpcRouteOptionsModel = new CreateVpcRouteOptions.Builder() - .vpcId("testString") - .destination("192.168.3.0/24") - .zone(zoneIdentityModel) - .action("deliver") - .advertise(false) - .name("my-vpc-routing-table-route") - .nextHop(routeNextHopPrototypeModel) - .priority(Long.valueOf("1")) + // Construct an instance of the DeleteBareMetalServerNetworkInterfaceOptions model + DeleteBareMetalServerNetworkInterfaceOptions deleteBareMetalServerNetworkInterfaceOptionsModel = new DeleteBareMetalServerNetworkInterfaceOptions.Builder() + .bareMetalServerId("testString") + .id("testString") .build(); - // Invoke createVpcRoute() with a valid options model and verify the result - Response response = vpcService.createVpcRoute(createVpcRouteOptionsModel).execute(); + // Invoke deleteBareMetalServerNetworkInterface() with a valid options model and verify the result + Response response = vpcService.deleteBareMetalServerNetworkInterface(deleteBareMetalServerNetworkInterfaceOptionsModel).execute(); assertNotNull(response); - Route responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createVpcRoutePath); + assertEquals(parsedPath, deleteBareMetalServerNetworkInterfacePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createVpcRoute operation with and without retries enabled + // Test the deleteBareMetalServerNetworkInterface operation with and without retries enabled @Test - public void testCreateVpcRouteWRetries() throws Throwable { + public void testDeleteBareMetalServerNetworkInterfaceWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateVpcRouteWOptions(); + testDeleteBareMetalServerNetworkInterfaceWOptions(); vpcService.disableRetries(); - testCreateVpcRouteWOptions(); + testDeleteBareMetalServerNetworkInterfaceWOptions(); } - // Test the createVpcRoute operation with a null options model (negative test) + // Test the deleteBareMetalServerNetworkInterface operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateVpcRouteNoOptions() throws Throwable { + public void testDeleteBareMetalServerNetworkInterfaceNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createVpcRoute(null).execute(); + vpcService.deleteBareMetalServerNetworkInterface(null).execute(); } - // Test the deleteVpcRoute operation with a valid options model parameter + // Test the getBareMetalServer operation with a valid options model parameter @Test - public void testDeleteVpcRouteWOptions() throws Throwable { + public void testGetBareMetalServerWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteVpcRoutePath = "/vpcs/testString/routes/testString"; + String mockResponseBody = "{\"bandwidth\": 20000, \"boot_target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"id\": \"0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"name\": \"my-bare-metal-server-disk\", \"resource_type\": \"bare_metal_server_disk\"}, \"cpu\": {\"architecture\": \"amd64\", \"core_count\": 80, \"socket_count\": 4, \"threads_per_core\": 2}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\", \"disks\": [{\"allowed_use\": {\"api_version\": \"2024-06-23\", \"bare_metal_server\": \"enable_secure_boot == true\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"id\": \"0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"interface_type\": \"fcp\", \"name\": \"my-bare-metal-server-disk\", \"resource_type\": \"bare_metal_server_disk\", \"size\": 100}], \"enable_secure_boot\": false, \"firmware\": {\"update\": \"none\"}, \"health_reasons\": [{\"code\": \"reservation_expired\", \"message\": \"The reservation cannot be used because it has expired.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\", \"id\": \"0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"memory\": 1536, \"metadata_service\": {\"enabled\": false, \"protocol\": \"http\"}, \"name\": \"my-bare-metal-server\", \"network_attachments\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"bare_metal_server_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}], \"network_interfaces\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}], \"primary_network_attachment\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"bare_metal_server_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}, \"primary_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\", \"name\": \"bx2-metal-192x768\", \"resource_type\": \"bare_metal_server_profile\"}, \"reservation\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}, \"reservation_affinity\": {\"policy\": \"automatic\", \"pool\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}]}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"bare_metal_server\", \"status\": \"deleting\", \"status_reasons\": [{\"code\": \"cannot_start_capacity\", \"message\": \"The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.\", \"more_info\": \"https://console.bluemix.net/docs/iaas/bare_metal_server.html\"}], \"trusted_platform_module\": {\"enabled\": true, \"mode\": \"disabled\", \"supported_modes\": [\"disabled\"]}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String getBareMetalServerPath = "/bare_metal_servers/testString"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteVpcRouteOptions model - DeleteVpcRouteOptions deleteVpcRouteOptionsModel = new DeleteVpcRouteOptions.Builder() - .vpcId("testString") + // Construct an instance of the GetBareMetalServerOptions model + GetBareMetalServerOptions getBareMetalServerOptionsModel = new GetBareMetalServerOptions.Builder() .id("testString") .build(); - // Invoke deleteVpcRoute() with a valid options model and verify the result - Response response = vpcService.deleteVpcRoute(deleteVpcRouteOptionsModel).execute(); + // Invoke getBareMetalServer() with a valid options model and verify the result + Response response = vpcService.getBareMetalServer(getBareMetalServerOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + BareMetalServer 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteVpcRoutePath); + assertEquals(parsedPath, getBareMetalServerPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteVpcRoute operation with and without retries enabled + // Test the getBareMetalServer operation with and without retries enabled @Test - public void testDeleteVpcRouteWRetries() throws Throwable { + public void testGetBareMetalServerWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteVpcRouteWOptions(); + testGetBareMetalServerWOptions(); vpcService.disableRetries(); - testDeleteVpcRouteWOptions(); + testGetBareMetalServerWOptions(); } - // Test the deleteVpcRoute operation with a null options model (negative test) + // Test the getBareMetalServer operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteVpcRouteNoOptions() throws Throwable { + public void testGetBareMetalServerNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteVpcRoute(null).execute(); + vpcService.getBareMetalServer(null).execute(); } - // Test the getVpcRoute operation with a valid options model parameter + // Test the getBareMetalServerDisk operation with a valid options model parameter @Test - public void testGetVpcRouteWOptions() throws Throwable { + public void testGetBareMetalServerDiskWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"action\": \"delegate\", \"advertise\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"creator\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"id\": \"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"name\": \"my-vpn-gateway\", \"resource_type\": \"vpn_gateway\"}, \"destination\": \"192.168.3.0/24\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"lifecycle_state\": \"stable\", \"name\": \"my-vpc-routing-table-route\", \"next_hop\": {\"address\": \"192.168.3.4\"}, \"origin\": \"service\", \"priority\": 1, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String getVpcRoutePath = "/vpcs/testString/routes/testString"; + String mockResponseBody = "{\"allowed_use\": {\"api_version\": \"2024-06-23\", \"bare_metal_server\": \"enable_secure_boot == true\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"id\": \"0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"interface_type\": \"fcp\", \"name\": \"my-bare-metal-server-disk\", \"resource_type\": \"bare_metal_server_disk\", \"size\": 100}"; + String getBareMetalServerDiskPath = "/bare_metal_servers/testString/disks/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetVpcRouteOptions model - GetVpcRouteOptions getVpcRouteOptionsModel = new GetVpcRouteOptions.Builder() - .vpcId("testString") + // Construct an instance of the GetBareMetalServerDiskOptions model + GetBareMetalServerDiskOptions getBareMetalServerDiskOptionsModel = new GetBareMetalServerDiskOptions.Builder() + .bareMetalServerId("testString") .id("testString") .build(); - // Invoke getVpcRoute() with a valid options model and verify the result - Response response = vpcService.getVpcRoute(getVpcRouteOptionsModel).execute(); + // Invoke getBareMetalServerDisk() with a valid options model and verify the result + Response response = vpcService.getBareMetalServerDisk(getBareMetalServerDiskOptionsModel).execute(); assertNotNull(response); - Route responseObj = response.getResult(); + BareMetalServerDisk responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -3503,123 +3741,105 @@ public void testGetVpcRouteWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getVpcRoutePath); + assertEquals(parsedPath, getBareMetalServerDiskPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getVpcRoute operation with and without retries enabled + // Test the getBareMetalServerDisk operation with and without retries enabled @Test - public void testGetVpcRouteWRetries() throws Throwable { + public void testGetBareMetalServerDiskWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetVpcRouteWOptions(); + testGetBareMetalServerDiskWOptions(); vpcService.disableRetries(); - testGetVpcRouteWOptions(); + testGetBareMetalServerDiskWOptions(); } - // Test the getVpcRoute operation with a null options model (negative test) + // Test the getBareMetalServerDisk operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetVpcRouteNoOptions() throws Throwable { + public void testGetBareMetalServerDiskNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getVpcRoute(null).execute(); + vpcService.getBareMetalServerDisk(null).execute(); } - // Test the updateVpcRoute operation with a valid options model parameter + // Test the getBareMetalServerInitialization operation with a valid options model parameter @Test - public void testUpdateVpcRouteWOptions() throws Throwable { + public void testGetBareMetalServerInitializationWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"action\": \"delegate\", \"advertise\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"creator\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"id\": \"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"name\": \"my-vpn-gateway\", \"resource_type\": \"vpn_gateway\"}, \"destination\": \"192.168.3.0/24\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"lifecycle_state\": \"stable\", \"name\": \"my-vpc-routing-table-route\", \"next_hop\": {\"address\": \"192.168.3.4\"}, \"origin\": \"service\", \"priority\": 1, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String updateVpcRoutePath = "/vpcs/testString/routes/testString"; + String mockResponseBody = "{\"default_trusted_profile\": {\"auto_link\": true, \"target\": {\"crn\": \"crn:v1:bluemix:public:iam-identity::a/aa2432b1fa4d4ace891e9b80fc104e34::profile:Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5\", \"id\": \"Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5\", \"resource_type\": \"trusted_profile\"}}, \"image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"keys\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"fingerprint\": \"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"name\": \"my-key-1\"}], \"user_accounts\": [{\"encrypted_password\": \"qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"fingerprint\": \"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"name\": \"my-key-1\"}, \"resource_type\": \"host_user_account\", \"username\": \"Administrator\"}]}"; + String getBareMetalServerInitializationPath = "/bare_metal_servers/testString/initialization"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP model - RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP routeNextHopPatchModel = new RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP.Builder() - .address("10.240.0.12") - .build(); - - // Construct an instance of the RoutePatch model - RoutePatch routePatchModel = new RoutePatch.Builder() - .advertise(true) - .name("my-vpc-routing-table-route") - .nextHop(routeNextHopPatchModel) - .priority(Long.valueOf("1")) - .build(); - Map routePatchModelAsPatch = routePatchModel.asPatch(); - - // Construct an instance of the UpdateVpcRouteOptions model - UpdateVpcRouteOptions updateVpcRouteOptionsModel = new UpdateVpcRouteOptions.Builder() - .vpcId("testString") + // Construct an instance of the GetBareMetalServerInitializationOptions model + GetBareMetalServerInitializationOptions getBareMetalServerInitializationOptionsModel = new GetBareMetalServerInitializationOptions.Builder() .id("testString") - .routePatch(routePatchModelAsPatch) .build(); - // Invoke updateVpcRoute() with a valid options model and verify the result - Response response = vpcService.updateVpcRoute(updateVpcRouteOptionsModel).execute(); + // Invoke getBareMetalServerInitialization() with a valid options model and verify the result + Response response = vpcService.getBareMetalServerInitialization(getBareMetalServerInitializationOptionsModel).execute(); assertNotNull(response); - Route responseObj = response.getResult(); + BareMetalServerInitialization responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateVpcRoutePath); + assertEquals(parsedPath, getBareMetalServerInitializationPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateVpcRoute operation with and without retries enabled + // Test the getBareMetalServerInitialization operation with and without retries enabled @Test - public void testUpdateVpcRouteWRetries() throws Throwable { + public void testGetBareMetalServerInitializationWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateVpcRouteWOptions(); + testGetBareMetalServerInitializationWOptions(); vpcService.disableRetries(); - testUpdateVpcRouteWOptions(); + testGetBareMetalServerInitializationWOptions(); } - // Test the updateVpcRoute operation with a null options model (negative test) + // Test the getBareMetalServerInitialization operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateVpcRouteNoOptions() throws Throwable { + public void testGetBareMetalServerInitializationNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateVpcRoute(null).execute(); + vpcService.getBareMetalServerInitialization(null).execute(); } - // Test the listVpcRoutingTables operation with a valid options model parameter + // Test the getBareMetalServerNetworkAttachment operation with a valid options model parameter @Test - public void testListVpcRoutingTablesWOptions() throws Throwable { + public void testGetBareMetalServerNetworkAttachmentWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"routing_tables\": [{\"accept_routes_from\": [{\"resource_type\": \"vpn_server\"}], \"advertise_routes_to\": [\"transit_gateway\"], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"is_default\": false, \"lifecycle_state\": \"stable\", \"name\": \"my-routing-table-1\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"routing_table\", \"route_direct_link_ingress\": true, \"route_internet_ingress\": true, \"route_transit_gateway_ingress\": true, \"route_vpc_zone_ingress\": false, \"routes\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"name\": \"my-vpc-routing-table-route\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}]}], \"total_count\": 132}"; - String listVpcRoutingTablesPath = "/vpcs/testString/routing_tables"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"lifecycle_state\": \"stable\", \"name\": \"my-bare-metal-server-network-attachment\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"bare_metal_server_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}, \"allowed_vlans\": [4], \"interface_type\": \"pci\"}"; + String getBareMetalServerNetworkAttachmentPath = "/bare_metal_servers/testString/network_attachments/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListVpcRoutingTablesOptions model - ListVpcRoutingTablesOptions listVpcRoutingTablesOptionsModel = new ListVpcRoutingTablesOptions.Builder() - .vpcId("testString") - .start("testString") - .limit(Long.valueOf("10")) - .isDefault(true) + // Construct an instance of the GetBareMetalServerNetworkAttachmentOptions model + GetBareMetalServerNetworkAttachmentOptions getBareMetalServerNetworkAttachmentOptionsModel = new GetBareMetalServerNetworkAttachmentOptions.Builder() + .bareMetalServerId("testString") + .id("testString") .build(); - // Invoke listVpcRoutingTables() with a valid options model and verify the result - Response response = vpcService.listVpcRoutingTables(listVpcRoutingTablesOptionsModel).execute(); + // Invoke getBareMetalServerNetworkAttachment() with a valid options model and verify the result + Response response = vpcService.getBareMetalServerNetworkAttachment(getBareMetalServerNetworkAttachmentOptionsModel).execute(); assertNotNull(response); - RoutingTableCollection responseObj = response.getResult(); + BareMetalServerNetworkAttachment responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -3628,262 +3848,215 @@ public void testListVpcRoutingTablesWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listVpcRoutingTablesPath); + assertEquals(parsedPath, getBareMetalServerNetworkAttachmentPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(Boolean.valueOf(query.get("is_default")), Boolean.valueOf(true)); } - // Test the listVpcRoutingTables operation with and without retries enabled + // Test the getBareMetalServerNetworkAttachment operation with and without retries enabled @Test - public void testListVpcRoutingTablesWRetries() throws Throwable { + public void testGetBareMetalServerNetworkAttachmentWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListVpcRoutingTablesWOptions(); + testGetBareMetalServerNetworkAttachmentWOptions(); vpcService.disableRetries(); - testListVpcRoutingTablesWOptions(); + testGetBareMetalServerNetworkAttachmentWOptions(); } - // Test the listVpcRoutingTables operation with a null options model (negative test) + // Test the getBareMetalServerNetworkAttachment operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListVpcRoutingTablesNoOptions() throws Throwable { + public void testGetBareMetalServerNetworkAttachmentNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listVpcRoutingTables(null).execute(); + vpcService.getBareMetalServerNetworkAttachment(null).execute(); } - // Test the listVpcRoutingTables operation using the VpcRoutingTablesPager.getNext() method + // Test the getBareMetalServerNetworkInterface operation with a valid options model parameter @Test - public void testListVpcRoutingTablesWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"routing_tables\":[{\"accept_routes_from\":[{\"resource_type\":\"vpn_server\"}],\"advertise_routes_to\":[\"transit_gateway\"],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"id\":\"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"is_default\":false,\"lifecycle_state\":\"stable\",\"name\":\"my-routing-table-1\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"routing_table\",\"route_direct_link_ingress\":true,\"route_internet_ingress\":true,\"route_transit_gateway_ingress\":true,\"route_vpc_zone_ingress\":false,\"routes\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"id\":\"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"name\":\"my-vpc-routing-table-route\"}],\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}]}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"routing_tables\":[{\"accept_routes_from\":[{\"resource_type\":\"vpn_server\"}],\"advertise_routes_to\":[\"transit_gateway\"],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"id\":\"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"is_default\":false,\"lifecycle_state\":\"stable\",\"name\":\"my-routing-table-1\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"routing_table\",\"route_direct_link_ingress\":true,\"route_internet_ingress\":true,\"route_transit_gateway_ingress\":true,\"route_vpc_zone_ingress\":false,\"routes\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"id\":\"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"name\":\"my-vpc-routing-table-route\"}],\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}]}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); + public void testGetBareMetalServerNetworkInterfaceWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"allow_ip_spoofing\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"enable_infrastructure_nat\": true, \"floating_ips\": [{\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}], \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"mac_address\": \"02:00:04:00:C4:6A\", \"name\": \"my-bare-metal-server-network-interface\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"status\": \"available\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\", \"interface_type\": \"hipersocket\"}"; + String getBareMetalServerNetworkInterfacePath = "/bare_metal_servers/testString/network_interfaces/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); + .setBody(mockResponseBody)); - ListVpcRoutingTablesOptions listVpcRoutingTablesOptions = new ListVpcRoutingTablesOptions.Builder() - .vpcId("testString") - .limit(Long.valueOf("10")) - .isDefault(true) + // Construct an instance of the GetBareMetalServerNetworkInterfaceOptions model + GetBareMetalServerNetworkInterfaceOptions getBareMetalServerNetworkInterfaceOptionsModel = new GetBareMetalServerNetworkInterfaceOptions.Builder() + .bareMetalServerId("testString") + .id("testString") .build(); - List allResults = new ArrayList<>(); - VpcRoutingTablesPager pager = new VpcRoutingTablesPager(vpcService, listVpcRoutingTablesOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + // Invoke getBareMetalServerNetworkInterface() with a valid options model and verify the result + Response response = vpcService.getBareMetalServerNetworkInterface(getBareMetalServerNetworkInterfaceOptionsModel).execute(); + assertNotNull(response); + BareMetalServerNetworkInterface responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "GET"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, getBareMetalServerNetworkInterfacePath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - - // Test the listVpcRoutingTables operation using the VpcRoutingTablesPager.getAll() method + + // Test the getBareMetalServerNetworkInterface operation with and without retries enabled @Test - public void testListVpcRoutingTablesWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"routing_tables\":[{\"accept_routes_from\":[{\"resource_type\":\"vpn_server\"}],\"advertise_routes_to\":[\"transit_gateway\"],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"id\":\"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"is_default\":false,\"lifecycle_state\":\"stable\",\"name\":\"my-routing-table-1\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"routing_table\",\"route_direct_link_ingress\":true,\"route_internet_ingress\":true,\"route_transit_gateway_ingress\":true,\"route_vpc_zone_ingress\":false,\"routes\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"id\":\"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"name\":\"my-vpc-routing-table-route\"}],\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}]}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"routing_tables\":[{\"accept_routes_from\":[{\"resource_type\":\"vpn_server\"}],\"advertise_routes_to\":[\"transit_gateway\"],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"id\":\"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"is_default\":false,\"lifecycle_state\":\"stable\",\"name\":\"my-routing-table-1\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"routing_table\",\"route_direct_link_ingress\":true,\"route_internet_ingress\":true,\"route_transit_gateway_ingress\":true,\"route_vpc_zone_ingress\":false,\"routes\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"id\":\"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"name\":\"my-vpc-routing-table-route\"}],\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}]}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); + public void testGetBareMetalServerNetworkInterfaceWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testGetBareMetalServerNetworkInterfaceWOptions(); - ListVpcRoutingTablesOptions listVpcRoutingTablesOptions = new ListVpcRoutingTablesOptions.Builder() - .vpcId("testString") - .limit(Long.valueOf("10")) - .isDefault(true) - .build(); + vpcService.disableRetries(); + testGetBareMetalServerNetworkInterfaceWOptions(); + } - VpcRoutingTablesPager pager = new VpcRoutingTablesPager(vpcService, listVpcRoutingTablesOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); + // Test the getBareMetalServerNetworkInterface operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testGetBareMetalServerNetworkInterfaceNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.getBareMetalServerNetworkInterface(null).execute(); } - - // Test the createVpcRoutingTable operation with a valid options model parameter + + // Test the getBareMetalServerNetworkInterfaceFloatingIp operation with a valid options model parameter @Test - public void testCreateVpcRoutingTableWOptions() throws Throwable { + public void testGetBareMetalServerNetworkInterfaceFloatingIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"accept_routes_from\": [{\"resource_type\": \"vpn_server\"}], \"advertise_routes_to\": [\"transit_gateway\"], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"is_default\": false, \"lifecycle_state\": \"stable\", \"name\": \"my-routing-table-1\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"routing_table\", \"route_direct_link_ingress\": true, \"route_internet_ingress\": true, \"route_transit_gateway_ingress\": true, \"route_vpc_zone_ingress\": false, \"routes\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"name\": \"my-vpc-routing-table-route\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}]}"; - String createVpcRoutingTablePath = "/vpcs/testString/routing_tables"; + String mockResponseBody = "{\"address\": \"203.0.113.1\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"available\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String getBareMetalServerNetworkInterfaceFloatingIpPath = "/bare_metal_servers/testString/network_interfaces/testString/floating_ips/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ResourceFilter model - ResourceFilter resourceFilterModel = new ResourceFilter.Builder() - .resourceType("vpn_server") - .build(); - - // Construct an instance of the RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP model - RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP routeNextHopPrototypeModel = new RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP.Builder() - .address("0.0.0.0") - .build(); - - // Construct an instance of the ZoneIdentityByName model - ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() - .name("us-south-1") - .build(); - - // Construct an instance of the RoutePrototype model - RoutePrototype routePrototypeModel = new RoutePrototype.Builder() - .action("deliver") - .advertise(false) - .destination("192.168.3.0/24") - .name("my-vpc-routing-table-route") - .nextHop(routeNextHopPrototypeModel) - .priority(Long.valueOf("1")) - .zone(zoneIdentityModel) - .build(); - - // Construct an instance of the CreateVpcRoutingTableOptions model - CreateVpcRoutingTableOptions createVpcRoutingTableOptionsModel = new CreateVpcRoutingTableOptions.Builder() - .vpcId("testString") - .acceptRoutesFrom(java.util.Arrays.asList(resourceFilterModel)) - .advertiseRoutesTo(java.util.Arrays.asList()) - .name("my-routing-table-1") - .routeDirectLinkIngress(false) - .routeInternetIngress(false) - .routeTransitGatewayIngress(false) - .routeVpcZoneIngress(false) - .routes(java.util.Arrays.asList(routePrototypeModel)) + // Construct an instance of the GetBareMetalServerNetworkInterfaceFloatingIpOptions model + GetBareMetalServerNetworkInterfaceFloatingIpOptions getBareMetalServerNetworkInterfaceFloatingIpOptionsModel = new GetBareMetalServerNetworkInterfaceFloatingIpOptions.Builder() + .bareMetalServerId("testString") + .networkInterfaceId("testString") + .id("testString") .build(); - // Invoke createVpcRoutingTable() with a valid options model and verify the result - Response response = vpcService.createVpcRoutingTable(createVpcRoutingTableOptionsModel).execute(); + // Invoke getBareMetalServerNetworkInterfaceFloatingIp() with a valid options model and verify the result + Response response = vpcService.getBareMetalServerNetworkInterfaceFloatingIp(getBareMetalServerNetworkInterfaceFloatingIpOptionsModel).execute(); assertNotNull(response); - RoutingTable responseObj = response.getResult(); + FloatingIP responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createVpcRoutingTablePath); + assertEquals(parsedPath, getBareMetalServerNetworkInterfaceFloatingIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createVpcRoutingTable operation with and without retries enabled + // Test the getBareMetalServerNetworkInterfaceFloatingIp operation with and without retries enabled @Test - public void testCreateVpcRoutingTableWRetries() throws Throwable { + public void testGetBareMetalServerNetworkInterfaceFloatingIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateVpcRoutingTableWOptions(); + testGetBareMetalServerNetworkInterfaceFloatingIpWOptions(); vpcService.disableRetries(); - testCreateVpcRoutingTableWOptions(); + testGetBareMetalServerNetworkInterfaceFloatingIpWOptions(); } - // Test the createVpcRoutingTable operation with a null options model (negative test) + // Test the getBareMetalServerNetworkInterfaceFloatingIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateVpcRoutingTableNoOptions() throws Throwable { + public void testGetBareMetalServerNetworkInterfaceFloatingIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createVpcRoutingTable(null).execute(); + vpcService.getBareMetalServerNetworkInterfaceFloatingIp(null).execute(); } - // Test the deleteVpcRoutingTable operation with a valid options model parameter + // Test the getBareMetalServerNetworkInterfaceIp operation with a valid options model parameter @Test - public void testDeleteVpcRoutingTableWOptions() throws Throwable { + public void testGetBareMetalServerNetworkInterfaceIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteVpcRoutingTablePath = "/vpcs/testString/routing_tables/testString"; + String mockResponseBody = "{\"address\": \"192.168.3.4\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"lifecycle_state\": \"stable\", \"name\": \"my-reserved-ip\", \"owner\": \"provider\", \"resource_type\": \"subnet_reserved_ip\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"resource_type\": \"endpoint_gateway\"}}"; + String getBareMetalServerNetworkInterfaceIpPath = "/bare_metal_servers/testString/network_interfaces/testString/ips/testString"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteVpcRoutingTableOptions model - DeleteVpcRoutingTableOptions deleteVpcRoutingTableOptionsModel = new DeleteVpcRoutingTableOptions.Builder() - .vpcId("testString") + // Construct an instance of the GetBareMetalServerNetworkInterfaceIpOptions model + GetBareMetalServerNetworkInterfaceIpOptions getBareMetalServerNetworkInterfaceIpOptionsModel = new GetBareMetalServerNetworkInterfaceIpOptions.Builder() + .bareMetalServerId("testString") + .networkInterfaceId("testString") .id("testString") - .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke deleteVpcRoutingTable() with a valid options model and verify the result - Response response = vpcService.deleteVpcRoutingTable(deleteVpcRoutingTableOptionsModel).execute(); + // Invoke getBareMetalServerNetworkInterfaceIp() with a valid options model and verify the result + Response response = vpcService.getBareMetalServerNetworkInterfaceIp(getBareMetalServerNetworkInterfaceIpOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + ReservedIP 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteVpcRoutingTablePath); + assertEquals(parsedPath, getBareMetalServerNetworkInterfaceIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteVpcRoutingTable operation with and without retries enabled + // Test the getBareMetalServerNetworkInterfaceIp operation with and without retries enabled @Test - public void testDeleteVpcRoutingTableWRetries() throws Throwable { + public void testGetBareMetalServerNetworkInterfaceIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteVpcRoutingTableWOptions(); + testGetBareMetalServerNetworkInterfaceIpWOptions(); vpcService.disableRetries(); - testDeleteVpcRoutingTableWOptions(); + testGetBareMetalServerNetworkInterfaceIpWOptions(); } - // Test the deleteVpcRoutingTable operation with a null options model (negative test) + // Test the getBareMetalServerNetworkInterfaceIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteVpcRoutingTableNoOptions() throws Throwable { + public void testGetBareMetalServerNetworkInterfaceIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteVpcRoutingTable(null).execute(); + vpcService.getBareMetalServerNetworkInterfaceIp(null).execute(); } - // Test the getVpcRoutingTable operation with a valid options model parameter + // Test the getBareMetalServerProfile operation with a valid options model parameter @Test - public void testGetVpcRoutingTableWOptions() throws Throwable { + public void testGetBareMetalServerProfileWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"accept_routes_from\": [{\"resource_type\": \"vpn_server\"}], \"advertise_routes_to\": [\"transit_gateway\"], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"is_default\": false, \"lifecycle_state\": \"stable\", \"name\": \"my-routing-table-1\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"routing_table\", \"route_direct_link_ingress\": true, \"route_internet_ingress\": true, \"route_transit_gateway_ingress\": true, \"route_vpc_zone_ingress\": false, \"routes\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"name\": \"my-vpc-routing-table-route\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}]}"; - String getVpcRoutingTablePath = "/vpcs/testString/routing_tables/testString"; + String mockResponseBody = "{\"bandwidth\": {\"type\": \"fixed\", \"value\": 20000}, \"console_types\": {\"type\": \"enum\", \"values\": [\"serial\"]}, \"cpu_architecture\": {\"type\": \"fixed\", \"value\": \"amd64\"}, \"cpu_core_count\": {\"type\": \"fixed\", \"value\": 80}, \"cpu_socket_count\": {\"type\": \"fixed\", \"value\": 4}, \"disks\": [{\"quantity\": {\"type\": \"fixed\", \"value\": 4}, \"size\": {\"type\": \"fixed\", \"value\": 100}, \"supported_interface_types\": {\"default\": \"fcp\", \"type\": \"enum\", \"values\": [\"fcp\"]}}], \"family\": \"balanced\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\", \"memory\": {\"type\": \"fixed\", \"value\": 16}, \"name\": \"bx2-metal-192x768\", \"network_attachment_count\": {\"max\": 128, \"min\": 1, \"type\": \"range\"}, \"network_interface_count\": {\"max\": 128, \"min\": 1, \"type\": \"range\"}, \"os_architecture\": {\"default\": \"amd64\", \"type\": \"enum\", \"values\": [\"amd64\"]}, \"reservation_terms\": {\"type\": \"enum\", \"values\": [\"one_year\"]}, \"resource_type\": \"bare_metal_server_profile\", \"supported_trusted_platform_module_modes\": {\"default\": \"disabled\", \"type\": \"enum\", \"values\": [\"disabled\"]}, \"virtual_network_interfaces_supported\": {\"type\": \"fixed\", \"value\": false}}"; + String getBareMetalServerProfilePath = "/bare_metal_server/profiles/bx2-metal-192x768"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetVpcRoutingTableOptions model - GetVpcRoutingTableOptions getVpcRoutingTableOptionsModel = new GetVpcRoutingTableOptions.Builder() - .vpcId("testString") - .id("testString") + // Construct an instance of the GetBareMetalServerProfileOptions model + GetBareMetalServerProfileOptions getBareMetalServerProfileOptionsModel = new GetBareMetalServerProfileOptions.Builder() + .name("bx2-metal-192x768") .build(); - // Invoke getVpcRoutingTable() with a valid options model and verify the result - Response response = vpcService.getVpcRoutingTable(getVpcRoutingTableOptionsModel).execute(); + // Invoke getBareMetalServerProfile() with a valid options model and verify the result + Response response = vpcService.getBareMetalServerProfile(getBareMetalServerProfileOptionsModel).execute(); assertNotNull(response); - RoutingTable responseObj = response.getResult(); + BareMetalServerProfile responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -3892,127 +4065,106 @@ public void testGetVpcRoutingTableWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getVpcRoutingTablePath); + assertEquals(parsedPath, getBareMetalServerProfilePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getVpcRoutingTable operation with and without retries enabled + // Test the getBareMetalServerProfile operation with and without retries enabled @Test - public void testGetVpcRoutingTableWRetries() throws Throwable { + public void testGetBareMetalServerProfileWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetVpcRoutingTableWOptions(); + testGetBareMetalServerProfileWOptions(); vpcService.disableRetries(); - testGetVpcRoutingTableWOptions(); + testGetBareMetalServerProfileWOptions(); } - // Test the getVpcRoutingTable operation with a null options model (negative test) + // Test the getBareMetalServerProfile operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetVpcRoutingTableNoOptions() throws Throwable { + public void testGetBareMetalServerProfileNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getVpcRoutingTable(null).execute(); + vpcService.getBareMetalServerProfile(null).execute(); } - // Test the updateVpcRoutingTable operation with a valid options model parameter + // Test the listBareMetalServerDisks operation with a valid options model parameter @Test - public void testUpdateVpcRoutingTableWOptions() throws Throwable { + public void testListBareMetalServerDisksWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"accept_routes_from\": [{\"resource_type\": \"vpn_server\"}], \"advertise_routes_to\": [\"transit_gateway\"], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"is_default\": false, \"lifecycle_state\": \"stable\", \"name\": \"my-routing-table-1\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"routing_table\", \"route_direct_link_ingress\": true, \"route_internet_ingress\": true, \"route_transit_gateway_ingress\": true, \"route_vpc_zone_ingress\": false, \"routes\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"name\": \"my-vpc-routing-table-route\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}]}"; - String updateVpcRoutingTablePath = "/vpcs/testString/routing_tables/testString"; + String mockResponseBody = "{\"disks\": [{\"allowed_use\": {\"api_version\": \"2024-06-23\", \"bare_metal_server\": \"enable_secure_boot == true\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"id\": \"0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"interface_type\": \"fcp\", \"name\": \"my-bare-metal-server-disk\", \"resource_type\": \"bare_metal_server_disk\", \"size\": 100}]}"; + String listBareMetalServerDisksPath = "/bare_metal_servers/testString/disks"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ResourceFilter model - ResourceFilter resourceFilterModel = new ResourceFilter.Builder() - .resourceType("vpn_server") - .build(); - - // Construct an instance of the RoutingTablePatch model - RoutingTablePatch routingTablePatchModel = new RoutingTablePatch.Builder() - .acceptRoutesFrom(java.util.Arrays.asList(resourceFilterModel)) - .advertiseRoutesTo(java.util.Arrays.asList("transit_gateway")) - .name("my-routing-table-2") - .routeDirectLinkIngress(true) - .routeInternetIngress(true) - .routeTransitGatewayIngress(true) - .routeVpcZoneIngress(true) - .build(); - Map routingTablePatchModelAsPatch = routingTablePatchModel.asPatch(); - - // Construct an instance of the UpdateVpcRoutingTableOptions model - UpdateVpcRoutingTableOptions updateVpcRoutingTableOptionsModel = new UpdateVpcRoutingTableOptions.Builder() - .vpcId("testString") - .id("testString") - .routingTablePatch(routingTablePatchModelAsPatch) - .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") + // Construct an instance of the ListBareMetalServerDisksOptions model + ListBareMetalServerDisksOptions listBareMetalServerDisksOptionsModel = new ListBareMetalServerDisksOptions.Builder() + .bareMetalServerId("testString") .build(); - // Invoke updateVpcRoutingTable() with a valid options model and verify the result - Response response = vpcService.updateVpcRoutingTable(updateVpcRoutingTableOptionsModel).execute(); + // Invoke listBareMetalServerDisks() with a valid options model and verify the result + Response response = vpcService.listBareMetalServerDisks(listBareMetalServerDisksOptionsModel).execute(); assertNotNull(response); - RoutingTable responseObj = response.getResult(); + BareMetalServerDiskCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateVpcRoutingTablePath); + assertEquals(parsedPath, listBareMetalServerDisksPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateVpcRoutingTable operation with and without retries enabled + // Test the listBareMetalServerDisks operation with and without retries enabled @Test - public void testUpdateVpcRoutingTableWRetries() throws Throwable { + public void testListBareMetalServerDisksWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateVpcRoutingTableWOptions(); + testListBareMetalServerDisksWOptions(); vpcService.disableRetries(); - testUpdateVpcRoutingTableWOptions(); + testListBareMetalServerDisksWOptions(); } - // Test the updateVpcRoutingTable operation with a null options model (negative test) + // Test the listBareMetalServerDisks operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateVpcRoutingTableNoOptions() throws Throwable { + public void testListBareMetalServerDisksNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateVpcRoutingTable(null).execute(); + vpcService.listBareMetalServerDisks(null).execute(); } - // Test the listVpcRoutingTableRoutes operation with a valid options model parameter + // Test the listBareMetalServerNetworkAttachments operation with a valid options model parameter @Test - public void testListVpcRoutingTableRoutesWOptions() throws Throwable { + public void testListBareMetalServerNetworkAttachmentsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"routes\": [{\"action\": \"delegate\", \"advertise\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"creator\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"id\": \"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"name\": \"my-vpn-gateway\", \"resource_type\": \"vpn_gateway\"}, \"destination\": \"192.168.3.0/24\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"lifecycle_state\": \"stable\", \"name\": \"my-vpc-routing-table-route\", \"next_hop\": {\"address\": \"192.168.3.4\"}, \"origin\": \"service\", \"priority\": 1, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"total_count\": 132}"; - String listVpcRoutingTableRoutesPath = "/vpcs/testString/routing_tables/testString/routes"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"network_attachments\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"lifecycle_state\": \"stable\", \"name\": \"my-bare-metal-server-network-attachment\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"bare_metal_server_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}, \"allowed_vlans\": [4], \"interface_type\": \"pci\"}], \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listBareMetalServerNetworkAttachmentsPath = "/bare_metal_servers/testString/network_attachments"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListVpcRoutingTableRoutesOptions model - ListVpcRoutingTableRoutesOptions listVpcRoutingTableRoutesOptionsModel = new ListVpcRoutingTableRoutesOptions.Builder() - .vpcId("testString") - .routingTableId("testString") + // Construct an instance of the ListBareMetalServerNetworkAttachmentsOptions model + ListBareMetalServerNetworkAttachmentsOptions listBareMetalServerNetworkAttachmentsOptionsModel = new ListBareMetalServerNetworkAttachmentsOptions.Builder() + .bareMetalServerId("testString") .start("testString") .limit(Long.valueOf("10")) .build(); - // Invoke listVpcRoutingTableRoutes() with a valid options model and verify the result - Response response = vpcService.listVpcRoutingTableRoutes(listVpcRoutingTableRoutesOptionsModel).execute(); + // Invoke listBareMetalServerNetworkAttachments() with a valid options model and verify the result + Response response = vpcService.listBareMetalServerNetworkAttachments(listBareMetalServerNetworkAttachmentsOptionsModel).execute(); assertNotNull(response); - RouteCollection responseObj = response.getResult(); + BareMetalServerNetworkAttachmentCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -4021,39 +4173,39 @@ public void testListVpcRoutingTableRoutesWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listVpcRoutingTableRoutesPath); + assertEquals(parsedPath, listBareMetalServerNetworkAttachmentsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the listVpcRoutingTableRoutes operation with and without retries enabled + // Test the listBareMetalServerNetworkAttachments operation with and without retries enabled @Test - public void testListVpcRoutingTableRoutesWRetries() throws Throwable { + public void testListBareMetalServerNetworkAttachmentsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListVpcRoutingTableRoutesWOptions(); + testListBareMetalServerNetworkAttachmentsWOptions(); vpcService.disableRetries(); - testListVpcRoutingTableRoutesWOptions(); + testListBareMetalServerNetworkAttachmentsWOptions(); } - // Test the listVpcRoutingTableRoutes operation with a null options model (negative test) + // Test the listBareMetalServerNetworkAttachments operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListVpcRoutingTableRoutesNoOptions() throws Throwable { + public void testListBareMetalServerNetworkAttachmentsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listVpcRoutingTableRoutes(null).execute(); + vpcService.listBareMetalServerNetworkAttachments(null).execute(); } - // Test the listVpcRoutingTableRoutes operation using the VpcRoutingTableRoutesPager.getNext() method + // Test the listBareMetalServerNetworkAttachments operation using the BareMetalServerNetworkAttachmentsPager.getNext() method @Test - public void testListVpcRoutingTableRoutesWithPagerGetNext() throws Throwable { + public void testListBareMetalServerNetworkAttachmentsWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"routes\":[{\"action\":\"delegate\",\"advertise\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"creator\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"id\":\"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"name\":\"my-vpn-gateway\",\"resource_type\":\"vpn_gateway\"},\"destination\":\"192.168.3.0/24\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"id\":\"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"lifecycle_state\":\"stable\",\"name\":\"my-vpc-routing-table-route\",\"next_hop\":{\"address\":\"192.168.3.4\"},\"origin\":\"service\",\"priority\":1,\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"routes\":[{\"action\":\"delegate\",\"advertise\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"creator\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"id\":\"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"name\":\"my-vpn-gateway\",\"resource_type\":\"vpn_gateway\"},\"destination\":\"192.168.3.0/24\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"id\":\"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"lifecycle_state\":\"stable\",\"name\":\"my-vpc-routing-table-route\",\"next_hop\":{\"address\":\"192.168.3.4\"},\"origin\":\"service\",\"priority\":1,\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"network_attachments\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"lifecycle_state\":\"stable\",\"name\":\"my-bare-metal-server-network-attachment\",\"port_speed\":1000,\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"bare_metal_server_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"type\":\"primary\",\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"},\"allowed_vlans\":[4],\"interface_type\":\"pci\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"network_attachments\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"lifecycle_state\":\"stable\",\"name\":\"my-bare-metal-server-network-attachment\",\"port_speed\":1000,\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"bare_metal_server_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"type\":\"primary\",\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"},\"allowed_vlans\":[4],\"interface_type\":\"pci\"}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -4067,28 +4219,27 @@ public void testListVpcRoutingTableRoutesWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListVpcRoutingTableRoutesOptions listVpcRoutingTableRoutesOptions = new ListVpcRoutingTableRoutesOptions.Builder() - .vpcId("testString") - .routingTableId("testString") + ListBareMetalServerNetworkAttachmentsOptions listBareMetalServerNetworkAttachmentsOptions = new ListBareMetalServerNetworkAttachmentsOptions.Builder() + .bareMetalServerId("testString") .limit(Long.valueOf("10")) .build(); - List allResults = new ArrayList<>(); - VpcRoutingTableRoutesPager pager = new VpcRoutingTableRoutesPager(vpcService, listVpcRoutingTableRoutesOptions); + List allResults = new ArrayList<>(); + BareMetalServerNetworkAttachmentsPager pager = new BareMetalServerNetworkAttachmentsPager(vpcService, listBareMetalServerNetworkAttachmentsOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listVpcRoutingTableRoutes operation using the VpcRoutingTableRoutesPager.getAll() method + // Test the listBareMetalServerNetworkAttachments operation using the BareMetalServerNetworkAttachmentsPager.getAll() method @Test - public void testListVpcRoutingTableRoutesWithPagerGetAll() throws Throwable { + public void testListBareMetalServerNetworkAttachmentsWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"routes\":[{\"action\":\"delegate\",\"advertise\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"creator\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"id\":\"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"name\":\"my-vpn-gateway\",\"resource_type\":\"vpn_gateway\"},\"destination\":\"192.168.3.0/24\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"id\":\"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"lifecycle_state\":\"stable\",\"name\":\"my-vpc-routing-table-route\",\"next_hop\":{\"address\":\"192.168.3.4\"},\"origin\":\"service\",\"priority\":1,\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"routes\":[{\"action\":\"delegate\",\"advertise\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"creator\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"id\":\"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"name\":\"my-vpn-gateway\",\"resource_type\":\"vpn_gateway\"},\"destination\":\"192.168.3.0/24\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"id\":\"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"lifecycle_state\":\"stable\",\"name\":\"my-vpc-routing-table-route\",\"next_hop\":{\"address\":\"192.168.3.4\"},\"origin\":\"service\",\"priority\":1,\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"network_attachments\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"lifecycle_state\":\"stable\",\"name\":\"my-bare-metal-server-network-attachment\",\"port_speed\":1000,\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"bare_metal_server_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"type\":\"primary\",\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"},\"allowed_vlans\":[4],\"interface_type\":\"pci\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"network_attachments\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"lifecycle_state\":\"stable\",\"name\":\"my-bare-metal-server-network-attachment\",\"port_speed\":1000,\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"bare_metal_server_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"type\":\"primary\",\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"},\"allowed_vlans\":[4],\"interface_type\":\"pci\"}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -4102,165 +4253,147 @@ public void testListVpcRoutingTableRoutesWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListVpcRoutingTableRoutesOptions listVpcRoutingTableRoutesOptions = new ListVpcRoutingTableRoutesOptions.Builder() - .vpcId("testString") - .routingTableId("testString") + ListBareMetalServerNetworkAttachmentsOptions listBareMetalServerNetworkAttachmentsOptions = new ListBareMetalServerNetworkAttachmentsOptions.Builder() + .bareMetalServerId("testString") .limit(Long.valueOf("10")) .build(); - VpcRoutingTableRoutesPager pager = new VpcRoutingTableRoutesPager(vpcService, listVpcRoutingTableRoutesOptions); - List allResults = pager.getAll(); + BareMetalServerNetworkAttachmentsPager pager = new BareMetalServerNetworkAttachmentsPager(vpcService, listBareMetalServerNetworkAttachmentsOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the createVpcRoutingTableRoute operation with a valid options model parameter + // Test the listBareMetalServerNetworkInterfaceFloatingIps operation with a valid options model parameter @Test - public void testCreateVpcRoutingTableRouteWOptions() throws Throwable { + public void testListBareMetalServerNetworkInterfaceFloatingIpsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"action\": \"delegate\", \"advertise\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"creator\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"id\": \"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"name\": \"my-vpn-gateway\", \"resource_type\": \"vpn_gateway\"}, \"destination\": \"192.168.3.0/24\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"lifecycle_state\": \"stable\", \"name\": \"my-vpc-routing-table-route\", \"next_hop\": {\"address\": \"192.168.3.4\"}, \"origin\": \"service\", \"priority\": 1, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String createVpcRoutingTableRoutePath = "/vpcs/testString/routing_tables/testString/routes"; + String mockResponseBody = "{\"floating_ips\": [{\"address\": \"203.0.113.1\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"available\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}]}"; + String listBareMetalServerNetworkInterfaceFloatingIpsPath = "/bare_metal_servers/testString/network_interfaces/testString/floating_ips"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ZoneIdentityByName model - ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() - .name("us-south-1") - .build(); - - // Construct an instance of the RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP model - RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP routeNextHopPrototypeModel = new RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP.Builder() - .address("0.0.0.0") - .build(); - - // Construct an instance of the CreateVpcRoutingTableRouteOptions model - CreateVpcRoutingTableRouteOptions createVpcRoutingTableRouteOptionsModel = new CreateVpcRoutingTableRouteOptions.Builder() - .vpcId("testString") - .routingTableId("testString") - .destination("192.168.3.0/24") - .zone(zoneIdentityModel) - .action("deliver") - .advertise(false) - .name("my-vpc-routing-table-route") - .nextHop(routeNextHopPrototypeModel) - .priority(Long.valueOf("1")) + // Construct an instance of the ListBareMetalServerNetworkInterfaceFloatingIpsOptions model + ListBareMetalServerNetworkInterfaceFloatingIpsOptions listBareMetalServerNetworkInterfaceFloatingIpsOptionsModel = new ListBareMetalServerNetworkInterfaceFloatingIpsOptions.Builder() + .bareMetalServerId("testString") + .networkInterfaceId("testString") .build(); - // Invoke createVpcRoutingTableRoute() with a valid options model and verify the result - Response response = vpcService.createVpcRoutingTableRoute(createVpcRoutingTableRouteOptionsModel).execute(); + // Invoke listBareMetalServerNetworkInterfaceFloatingIps() with a valid options model and verify the result + Response response = vpcService.listBareMetalServerNetworkInterfaceFloatingIps(listBareMetalServerNetworkInterfaceFloatingIpsOptionsModel).execute(); assertNotNull(response); - Route responseObj = response.getResult(); + FloatingIPUnpaginatedCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createVpcRoutingTableRoutePath); + assertEquals(parsedPath, listBareMetalServerNetworkInterfaceFloatingIpsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createVpcRoutingTableRoute operation with and without retries enabled + // Test the listBareMetalServerNetworkInterfaceFloatingIps operation with and without retries enabled @Test - public void testCreateVpcRoutingTableRouteWRetries() throws Throwable { + public void testListBareMetalServerNetworkInterfaceFloatingIpsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateVpcRoutingTableRouteWOptions(); + testListBareMetalServerNetworkInterfaceFloatingIpsWOptions(); vpcService.disableRetries(); - testCreateVpcRoutingTableRouteWOptions(); + testListBareMetalServerNetworkInterfaceFloatingIpsWOptions(); } - // Test the createVpcRoutingTableRoute operation with a null options model (negative test) + // Test the listBareMetalServerNetworkInterfaceFloatingIps operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateVpcRoutingTableRouteNoOptions() throws Throwable { + public void testListBareMetalServerNetworkInterfaceFloatingIpsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createVpcRoutingTableRoute(null).execute(); + vpcService.listBareMetalServerNetworkInterfaceFloatingIps(null).execute(); } - // Test the deleteVpcRoutingTableRoute operation with a valid options model parameter + // Test the listBareMetalServerNetworkInterfaceIps operation with a valid options model parameter @Test - public void testDeleteVpcRoutingTableRouteWOptions() throws Throwable { + public void testListBareMetalServerNetworkInterfaceIpsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteVpcRoutingTableRoutePath = "/vpcs/testString/routing_tables/testString/routes/testString"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"ips\": [{\"address\": \"192.168.3.4\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"lifecycle_state\": \"stable\", \"name\": \"my-reserved-ip\", \"owner\": \"provider\", \"resource_type\": \"subnet_reserved_ip\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"resource_type\": \"endpoint_gateway\"}}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listBareMetalServerNetworkInterfaceIpsPath = "/bare_metal_servers/testString/network_interfaces/testString/ips"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteVpcRoutingTableRouteOptions model - DeleteVpcRoutingTableRouteOptions deleteVpcRoutingTableRouteOptionsModel = new DeleteVpcRoutingTableRouteOptions.Builder() - .vpcId("testString") - .routingTableId("testString") - .id("testString") + // Construct an instance of the ListBareMetalServerNetworkInterfaceIpsOptions model + ListBareMetalServerNetworkInterfaceIpsOptions listBareMetalServerNetworkInterfaceIpsOptionsModel = new ListBareMetalServerNetworkInterfaceIpsOptions.Builder() + .bareMetalServerId("testString") + .networkInterfaceId("testString") .build(); - // Invoke deleteVpcRoutingTableRoute() with a valid options model and verify the result - Response response = vpcService.deleteVpcRoutingTableRoute(deleteVpcRoutingTableRouteOptionsModel).execute(); + // Invoke listBareMetalServerNetworkInterfaceIps() with a valid options model and verify the result + Response response = vpcService.listBareMetalServerNetworkInterfaceIps(listBareMetalServerNetworkInterfaceIpsOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + ReservedIPCollectionBareMetalServerNetworkInterfaceContext 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteVpcRoutingTableRoutePath); + assertEquals(parsedPath, listBareMetalServerNetworkInterfaceIpsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteVpcRoutingTableRoute operation with and without retries enabled + // Test the listBareMetalServerNetworkInterfaceIps operation with and without retries enabled @Test - public void testDeleteVpcRoutingTableRouteWRetries() throws Throwable { + public void testListBareMetalServerNetworkInterfaceIpsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteVpcRoutingTableRouteWOptions(); + testListBareMetalServerNetworkInterfaceIpsWOptions(); vpcService.disableRetries(); - testDeleteVpcRoutingTableRouteWOptions(); + testListBareMetalServerNetworkInterfaceIpsWOptions(); } - // Test the deleteVpcRoutingTableRoute operation with a null options model (negative test) + // Test the listBareMetalServerNetworkInterfaceIps operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteVpcRoutingTableRouteNoOptions() throws Throwable { + public void testListBareMetalServerNetworkInterfaceIpsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteVpcRoutingTableRoute(null).execute(); + vpcService.listBareMetalServerNetworkInterfaceIps(null).execute(); } - // Test the getVpcRoutingTableRoute operation with a valid options model parameter + // Test the listBareMetalServerNetworkInterfaces operation with a valid options model parameter @Test - public void testGetVpcRoutingTableRouteWOptions() throws Throwable { + public void testListBareMetalServerNetworkInterfacesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"action\": \"delegate\", \"advertise\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"creator\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"id\": \"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"name\": \"my-vpn-gateway\", \"resource_type\": \"vpn_gateway\"}, \"destination\": \"192.168.3.0/24\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"lifecycle_state\": \"stable\", \"name\": \"my-vpc-routing-table-route\", \"next_hop\": {\"address\": \"192.168.3.4\"}, \"origin\": \"service\", \"priority\": 1, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String getVpcRoutingTableRoutePath = "/vpcs/testString/routing_tables/testString/routes/testString"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"network_interfaces\": [{\"allow_ip_spoofing\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"enable_infrastructure_nat\": true, \"floating_ips\": [{\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}], \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"mac_address\": \"02:00:04:00:C4:6A\", \"name\": \"my-bare-metal-server-network-interface\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"status\": \"available\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\", \"interface_type\": \"hipersocket\"}], \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listBareMetalServerNetworkInterfacesPath = "/bare_metal_servers/testString/network_interfaces"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetVpcRoutingTableRouteOptions model - GetVpcRoutingTableRouteOptions getVpcRoutingTableRouteOptionsModel = new GetVpcRoutingTableRouteOptions.Builder() - .vpcId("testString") - .routingTableId("testString") - .id("testString") + // Construct an instance of the ListBareMetalServerNetworkInterfacesOptions model + ListBareMetalServerNetworkInterfacesOptions listBareMetalServerNetworkInterfacesOptionsModel = new ListBareMetalServerNetworkInterfacesOptions.Builder() + .bareMetalServerId("testString") + .start("testString") + .limit(Long.valueOf("10")) .build(); - // Invoke getVpcRoutingTableRoute() with a valid options model and verify the result - Response response = vpcService.getVpcRoutingTableRoute(getVpcRoutingTableRouteOptionsModel).execute(); + // Invoke listBareMetalServerNetworkInterfaces() with a valid options model and verify the result + Response response = vpcService.listBareMetalServerNetworkInterfaces(listBareMetalServerNetworkInterfacesOptionsModel).execute(); assertNotNull(response); - Route responseObj = response.getResult(); + BareMetalServerNetworkInterfaceCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -4269,129 +4402,118 @@ public void testGetVpcRoutingTableRouteWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getVpcRoutingTableRoutePath); + assertEquals(parsedPath, listBareMetalServerNetworkInterfacesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the getVpcRoutingTableRoute operation with and without retries enabled + // Test the listBareMetalServerNetworkInterfaces operation with and without retries enabled @Test - public void testGetVpcRoutingTableRouteWRetries() throws Throwable { + public void testListBareMetalServerNetworkInterfacesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetVpcRoutingTableRouteWOptions(); + testListBareMetalServerNetworkInterfacesWOptions(); vpcService.disableRetries(); - testGetVpcRoutingTableRouteWOptions(); + testListBareMetalServerNetworkInterfacesWOptions(); } - // Test the getVpcRoutingTableRoute operation with a null options model (negative test) + // Test the listBareMetalServerNetworkInterfaces operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetVpcRoutingTableRouteNoOptions() throws Throwable { + public void testListBareMetalServerNetworkInterfacesNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getVpcRoutingTableRoute(null).execute(); + vpcService.listBareMetalServerNetworkInterfaces(null).execute(); } - // Test the updateVpcRoutingTableRoute operation with a valid options model parameter + // Test the listBareMetalServerNetworkInterfaces operation using the BareMetalServerNetworkInterfacesPager.getNext() method @Test - public void testUpdateVpcRoutingTableRouteWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"action\": \"delegate\", \"advertise\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"creator\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"id\": \"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"name\": \"my-vpn-gateway\", \"resource_type\": \"vpn_gateway\"}, \"destination\": \"192.168.3.0/24\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"lifecycle_state\": \"stable\", \"name\": \"my-vpc-routing-table-route\", \"next_hop\": {\"address\": \"192.168.3.4\"}, \"origin\": \"service\", \"priority\": 1, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String updateVpcRoutingTableRoutePath = "/vpcs/testString/routing_tables/testString/routes/testString"; + public void testListBareMetalServerNetworkInterfacesWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"network_interfaces\":[{\"allow_ip_spoofing\":true,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"enable_infrastructure_nat\":true,\"floating_ips\":[{\"address\":\"203.0.113.1\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\"}],\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"mac_address\":\"02:00:04:00:C4:6A\",\"name\":\"my-bare-metal-server-network-interface\",\"port_speed\":1000,\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"status\":\"available\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"type\":\"primary\",\"interface_type\":\"hipersocket\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"network_interfaces\":[{\"allow_ip_spoofing\":true,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"enable_infrastructure_nat\":true,\"floating_ips\":[{\"address\":\"203.0.113.1\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\"}],\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"mac_address\":\"02:00:04:00:C4:6A\",\"name\":\"my-bare-metal-server-network-interface\",\"port_speed\":1000,\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"status\":\"available\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"type\":\"primary\",\"interface_type\":\"hipersocket\"}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP model - RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP routeNextHopPatchModel = new RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP.Builder() - .address("0.0.0.0") - .build(); - - // Construct an instance of the RoutePatch model - RoutePatch routePatchModel = new RoutePatch.Builder() - .advertise(false) - .name("my-vpc-routing-table-route") - .nextHop(routeNextHopPatchModel) - .priority(Long.valueOf("1")) - .build(); - Map routePatchModelAsPatch = routePatchModel.asPatch(); + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the UpdateVpcRoutingTableRouteOptions model - UpdateVpcRoutingTableRouteOptions updateVpcRoutingTableRouteOptionsModel = new UpdateVpcRoutingTableRouteOptions.Builder() - .vpcId("testString") - .routingTableId("testString") - .id("testString") - .routePatch(routePatchModelAsPatch) + ListBareMetalServerNetworkInterfacesOptions listBareMetalServerNetworkInterfacesOptions = new ListBareMetalServerNetworkInterfacesOptions.Builder() + .bareMetalServerId("testString") + .limit(Long.valueOf("10")) .build(); - // Invoke updateVpcRoutingTableRoute() with a valid options model and verify the result - Response response = vpcService.updateVpcRoutingTableRoute(updateVpcRoutingTableRouteOptionsModel).execute(); - assertNotNull(response); - Route responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateVpcRoutingTableRoutePath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + List allResults = new ArrayList<>(); + BareMetalServerNetworkInterfacesPager pager = new BareMetalServerNetworkInterfacesPager(vpcService, listBareMetalServerNetworkInterfacesOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } - - // Test the updateVpcRoutingTableRoute operation with and without retries enabled + + // Test the listBareMetalServerNetworkInterfaces operation using the BareMetalServerNetworkInterfacesPager.getAll() method @Test - public void testUpdateVpcRoutingTableRouteWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testUpdateVpcRoutingTableRouteWOptions(); + public void testListBareMetalServerNetworkInterfacesWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"network_interfaces\":[{\"allow_ip_spoofing\":true,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"enable_infrastructure_nat\":true,\"floating_ips\":[{\"address\":\"203.0.113.1\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\"}],\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"mac_address\":\"02:00:04:00:C4:6A\",\"name\":\"my-bare-metal-server-network-interface\",\"port_speed\":1000,\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"status\":\"available\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"type\":\"primary\",\"interface_type\":\"hipersocket\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"network_interfaces\":[{\"allow_ip_spoofing\":true,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"enable_infrastructure_nat\":true,\"floating_ips\":[{\"address\":\"203.0.113.1\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\"}],\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"mac_address\":\"02:00:04:00:C4:6A\",\"name\":\"my-bare-metal-server-network-interface\",\"port_speed\":1000,\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"status\":\"available\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"type\":\"primary\",\"interface_type\":\"hipersocket\"}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - vpcService.disableRetries(); - testUpdateVpcRoutingTableRouteWOptions(); - } + ListBareMetalServerNetworkInterfacesOptions listBareMetalServerNetworkInterfacesOptions = new ListBareMetalServerNetworkInterfacesOptions.Builder() + .bareMetalServerId("testString") + .limit(Long.valueOf("10")) + .build(); - // Test the updateVpcRoutingTableRoute operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateVpcRoutingTableRouteNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.updateVpcRoutingTableRoute(null).execute(); + BareMetalServerNetworkInterfacesPager pager = new BareMetalServerNetworkInterfacesPager(vpcService, listBareMetalServerNetworkInterfacesOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); } - - // Test the listSubnets operation with a valid options model parameter + + // Test the listBareMetalServerProfiles operation with a valid options model parameter @Test - public void testListSubnetsWOptions() throws Throwable { + public void testListBareMetalServerProfilesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"subnets\": [{\"available_ipv4_address_count\": 15, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"ip_version\": \"ipv4\", \"ipv4_cidr_block\": \"10.0.0.0/24\", \"name\": \"my-subnet\", \"network_acl\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\"}, \"public_gateway\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"id\": \"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"name\": \"my-public-gateway\", \"resource_type\": \"public_gateway\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"subnet\", \"routing_table\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"name\": \"my-routing-table-1\", \"resource_type\": \"routing_table\"}, \"status\": \"available\", \"total_ipv4_address_count\": 256, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"total_count\": 132}"; - String listSubnetsPath = "/subnets"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"profiles\": [{\"bandwidth\": {\"type\": \"fixed\", \"value\": 20000}, \"console_types\": {\"type\": \"enum\", \"values\": [\"serial\"]}, \"cpu_architecture\": {\"type\": \"fixed\", \"value\": \"amd64\"}, \"cpu_core_count\": {\"type\": \"fixed\", \"value\": 80}, \"cpu_socket_count\": {\"type\": \"fixed\", \"value\": 4}, \"disks\": [{\"quantity\": {\"type\": \"fixed\", \"value\": 4}, \"size\": {\"type\": \"fixed\", \"value\": 100}, \"supported_interface_types\": {\"default\": \"fcp\", \"type\": \"enum\", \"values\": [\"fcp\"]}}], \"family\": \"balanced\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\", \"memory\": {\"type\": \"fixed\", \"value\": 16}, \"name\": \"bx2-metal-192x768\", \"network_attachment_count\": {\"max\": 128, \"min\": 1, \"type\": \"range\"}, \"network_interface_count\": {\"max\": 128, \"min\": 1, \"type\": \"range\"}, \"os_architecture\": {\"default\": \"amd64\", \"type\": \"enum\", \"values\": [\"amd64\"]}, \"reservation_terms\": {\"type\": \"enum\", \"values\": [\"one_year\"]}, \"resource_type\": \"bare_metal_server_profile\", \"supported_trusted_platform_module_modes\": {\"default\": \"disabled\", \"type\": \"enum\", \"values\": [\"disabled\"]}, \"virtual_network_interfaces_supported\": {\"type\": \"fixed\", \"value\": false}}], \"total_count\": 132}"; + String listBareMetalServerProfilesPath = "/bare_metal_server/profiles"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListSubnetsOptions model - ListSubnetsOptions listSubnetsOptionsModel = new ListSubnetsOptions.Builder() + // Construct an instance of the ListBareMetalServerProfilesOptions model + ListBareMetalServerProfilesOptions listBareMetalServerProfilesOptionsModel = new ListBareMetalServerProfilesOptions.Builder() .start("testString") .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .zoneName("us-south-1") - .vpcId("testString") - .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .vpcName("my-vpc") - .routingTableId("testString") - .routingTableName("my-routing-table") .build(); - // Invoke listSubnets() with a valid options model and verify the result - Response response = vpcService.listSubnets(listSubnetsOptionsModel).execute(); + // Invoke listBareMetalServerProfiles() with a valid options model and verify the result + Response response = vpcService.listBareMetalServerProfiles(listBareMetalServerProfilesOptionsModel).execute(); assertNotNull(response); - SubnetCollection responseObj = response.getResult(); + BareMetalServerProfileCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -4400,39 +4522,32 @@ public void testListSubnetsWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listSubnetsPath); + assertEquals(parsedPath, listBareMetalServerProfilesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("resource_group.id"), "testString"); - assertEquals(query.get("zone.name"), "us-south-1"); - assertEquals(query.get("vpc.id"), "testString"); - assertEquals(query.get("vpc.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); - assertEquals(query.get("vpc.name"), "my-vpc"); - assertEquals(query.get("routing_table.id"), "testString"); - assertEquals(query.get("routing_table.name"), "my-routing-table"); } - // Test the listSubnets operation with and without retries enabled + // Test the listBareMetalServerProfiles operation with and without retries enabled @Test - public void testListSubnetsWRetries() throws Throwable { + public void testListBareMetalServerProfilesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListSubnetsWOptions(); + testListBareMetalServerProfilesWOptions(); vpcService.disableRetries(); - testListSubnetsWOptions(); + testListBareMetalServerProfilesWOptions(); } - // Test the listSubnets operation using the SubnetsPager.getNext() method + // Test the listBareMetalServerProfiles operation using the BareMetalServerProfilesPager.getNext() method @Test - public void testListSubnetsWithPagerGetNext() throws Throwable { + public void testListBareMetalServerProfilesWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"subnets\":[{\"available_ipv4_address_count\":15,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"ip_version\":\"ipv4\",\"ipv4_cidr_block\":\"10.0.0.0/24\",\"name\":\"my-subnet\",\"network_acl\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"id\":\"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"name\":\"my-network-acl\"},\"public_gateway\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"id\":\"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"name\":\"my-public-gateway\",\"resource_type\":\"public_gateway\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"subnet\",\"routing_table\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"id\":\"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"name\":\"my-routing-table-1\",\"resource_type\":\"routing_table\"},\"status\":\"available\",\"total_ipv4_address_count\":256,\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"subnets\":[{\"available_ipv4_address_count\":15,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"ip_version\":\"ipv4\",\"ipv4_cidr_block\":\"10.0.0.0/24\",\"name\":\"my-subnet\",\"network_acl\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"id\":\"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"name\":\"my-network-acl\"},\"public_gateway\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"id\":\"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"name\":\"my-public-gateway\",\"resource_type\":\"public_gateway\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"subnet\",\"routing_table\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"id\":\"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"name\":\"my-routing-table-1\",\"resource_type\":\"routing_table\"},\"status\":\"available\",\"total_ipv4_address_count\":256,\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"profiles\":[{\"bandwidth\":{\"type\":\"fixed\",\"value\":20000},\"console_types\":{\"type\":\"enum\",\"values\":[\"serial\"]},\"cpu_architecture\":{\"type\":\"fixed\",\"value\":\"amd64\"},\"cpu_core_count\":{\"type\":\"fixed\",\"value\":80},\"cpu_socket_count\":{\"type\":\"fixed\",\"value\":4},\"disks\":[{\"quantity\":{\"type\":\"fixed\",\"value\":4},\"size\":{\"type\":\"fixed\",\"value\":100},\"supported_interface_types\":{\"default\":\"fcp\",\"type\":\"enum\",\"values\":[\"fcp\"]}}],\"family\":\"balanced\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\",\"memory\":{\"type\":\"fixed\",\"value\":16},\"name\":\"bx2-metal-192x768\",\"network_attachment_count\":{\"max\":128,\"min\":1,\"type\":\"range\"},\"network_interface_count\":{\"max\":128,\"min\":1,\"type\":\"range\"},\"os_architecture\":{\"default\":\"amd64\",\"type\":\"enum\",\"values\":[\"amd64\"]},\"reservation_terms\":{\"type\":\"enum\",\"values\":[\"one_year\"]},\"resource_type\":\"bare_metal_server_profile\",\"supported_trusted_platform_module_modes\":{\"default\":\"disabled\",\"type\":\"enum\",\"values\":[\"disabled\"]},\"virtual_network_interfaces_supported\":{\"type\":\"fixed\",\"value\":false}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"profiles\":[{\"bandwidth\":{\"type\":\"fixed\",\"value\":20000},\"console_types\":{\"type\":\"enum\",\"values\":[\"serial\"]},\"cpu_architecture\":{\"type\":\"fixed\",\"value\":\"amd64\"},\"cpu_core_count\":{\"type\":\"fixed\",\"value\":80},\"cpu_socket_count\":{\"type\":\"fixed\",\"value\":4},\"disks\":[{\"quantity\":{\"type\":\"fixed\",\"value\":4},\"size\":{\"type\":\"fixed\",\"value\":100},\"supported_interface_types\":{\"default\":\"fcp\",\"type\":\"enum\",\"values\":[\"fcp\"]}}],\"family\":\"balanced\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\",\"memory\":{\"type\":\"fixed\",\"value\":16},\"name\":\"bx2-metal-192x768\",\"network_attachment_count\":{\"max\":128,\"min\":1,\"type\":\"range\"},\"network_interface_count\":{\"max\":128,\"min\":1,\"type\":\"range\"},\"os_architecture\":{\"default\":\"amd64\",\"type\":\"enum\",\"values\":[\"amd64\"]},\"reservation_terms\":{\"type\":\"enum\",\"values\":[\"one_year\"]},\"resource_type\":\"bare_metal_server_profile\",\"supported_trusted_platform_module_modes\":{\"default\":\"disabled\",\"type\":\"enum\",\"values\":[\"disabled\"]},\"virtual_network_interfaces_supported\":{\"type\":\"fixed\",\"value\":false}}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -4446,33 +4561,26 @@ public void testListSubnetsWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListSubnetsOptions listSubnetsOptions = new ListSubnetsOptions.Builder() + ListBareMetalServerProfilesOptions listBareMetalServerProfilesOptions = new ListBareMetalServerProfilesOptions.Builder() .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .zoneName("us-south-1") - .vpcId("testString") - .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .vpcName("my-vpc") - .routingTableId("testString") - .routingTableName("my-routing-table") .build(); - List allResults = new ArrayList<>(); - SubnetsPager pager = new SubnetsPager(vpcService, listSubnetsOptions); + List allResults = new ArrayList<>(); + BareMetalServerProfilesPager pager = new BareMetalServerProfilesPager(vpcService, listBareMetalServerProfilesOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listSubnets operation using the SubnetsPager.getAll() method + // Test the listBareMetalServerProfiles operation using the BareMetalServerProfilesPager.getAll() method @Test - public void testListSubnetsWithPagerGetAll() throws Throwable { + public void testListBareMetalServerProfilesWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"subnets\":[{\"available_ipv4_address_count\":15,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"ip_version\":\"ipv4\",\"ipv4_cidr_block\":\"10.0.0.0/24\",\"name\":\"my-subnet\",\"network_acl\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"id\":\"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"name\":\"my-network-acl\"},\"public_gateway\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"id\":\"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"name\":\"my-public-gateway\",\"resource_type\":\"public_gateway\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"subnet\",\"routing_table\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"id\":\"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"name\":\"my-routing-table-1\",\"resource_type\":\"routing_table\"},\"status\":\"available\",\"total_ipv4_address_count\":256,\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"subnets\":[{\"available_ipv4_address_count\":15,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"ip_version\":\"ipv4\",\"ipv4_cidr_block\":\"10.0.0.0/24\",\"name\":\"my-subnet\",\"network_acl\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"id\":\"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"name\":\"my-network-acl\"},\"public_gateway\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"id\":\"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"name\":\"my-public-gateway\",\"resource_type\":\"public_gateway\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"subnet\",\"routing_table\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"id\":\"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"name\":\"my-routing-table-1\",\"resource_type\":\"routing_table\"},\"status\":\"available\",\"total_ipv4_address_count\":256,\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"profiles\":[{\"bandwidth\":{\"type\":\"fixed\",\"value\":20000},\"console_types\":{\"type\":\"enum\",\"values\":[\"serial\"]},\"cpu_architecture\":{\"type\":\"fixed\",\"value\":\"amd64\"},\"cpu_core_count\":{\"type\":\"fixed\",\"value\":80},\"cpu_socket_count\":{\"type\":\"fixed\",\"value\":4},\"disks\":[{\"quantity\":{\"type\":\"fixed\",\"value\":4},\"size\":{\"type\":\"fixed\",\"value\":100},\"supported_interface_types\":{\"default\":\"fcp\",\"type\":\"enum\",\"values\":[\"fcp\"]}}],\"family\":\"balanced\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\",\"memory\":{\"type\":\"fixed\",\"value\":16},\"name\":\"bx2-metal-192x768\",\"network_attachment_count\":{\"max\":128,\"min\":1,\"type\":\"range\"},\"network_interface_count\":{\"max\":128,\"min\":1,\"type\":\"range\"},\"os_architecture\":{\"default\":\"amd64\",\"type\":\"enum\",\"values\":[\"amd64\"]},\"reservation_terms\":{\"type\":\"enum\",\"values\":[\"one_year\"]},\"resource_type\":\"bare_metal_server_profile\",\"supported_trusted_platform_module_modes\":{\"default\":\"disabled\",\"type\":\"enum\",\"values\":[\"disabled\"]},\"virtual_network_interfaces_supported\":{\"type\":\"fixed\",\"value\":false}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"profiles\":[{\"bandwidth\":{\"type\":\"fixed\",\"value\":20000},\"console_types\":{\"type\":\"enum\",\"values\":[\"serial\"]},\"cpu_architecture\":{\"type\":\"fixed\",\"value\":\"amd64\"},\"cpu_core_count\":{\"type\":\"fixed\",\"value\":80},\"cpu_socket_count\":{\"type\":\"fixed\",\"value\":4},\"disks\":[{\"quantity\":{\"type\":\"fixed\",\"value\":4},\"size\":{\"type\":\"fixed\",\"value\":100},\"supported_interface_types\":{\"default\":\"fcp\",\"type\":\"enum\",\"values\":[\"fcp\"]}}],\"family\":\"balanced\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\",\"memory\":{\"type\":\"fixed\",\"value\":16},\"name\":\"bx2-metal-192x768\",\"network_attachment_count\":{\"max\":128,\"min\":1,\"type\":\"range\"},\"network_interface_count\":{\"max\":128,\"min\":1,\"type\":\"range\"},\"os_architecture\":{\"default\":\"amd64\",\"type\":\"enum\",\"values\":[\"amd64\"]},\"reservation_terms\":{\"type\":\"enum\",\"values\":[\"one_year\"]},\"resource_type\":\"bare_metal_server_profile\",\"supported_trusted_platform_module_modes\":{\"default\":\"disabled\",\"type\":\"enum\",\"values\":[\"disabled\"]},\"virtual_network_interfaces_supported\":{\"type\":\"fixed\",\"value\":false}}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -4486,431 +4594,413 @@ public void testListSubnetsWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListSubnetsOptions listSubnetsOptions = new ListSubnetsOptions.Builder() + ListBareMetalServerProfilesOptions listBareMetalServerProfilesOptions = new ListBareMetalServerProfilesOptions.Builder() .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .zoneName("us-south-1") - .vpcId("testString") - .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .vpcName("my-vpc") - .routingTableId("testString") - .routingTableName("my-routing-table") .build(); - SubnetsPager pager = new SubnetsPager(vpcService, listSubnetsOptions); - List allResults = pager.getAll(); + BareMetalServerProfilesPager pager = new BareMetalServerProfilesPager(vpcService, listBareMetalServerProfilesOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the createSubnet operation with a valid options model parameter + // Test the listBareMetalServers operation with a valid options model parameter @Test - public void testCreateSubnetWOptions() throws Throwable { + public void testListBareMetalServersWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"available_ipv4_address_count\": 15, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"ip_version\": \"ipv4\", \"ipv4_cidr_block\": \"10.0.0.0/24\", \"name\": \"my-subnet\", \"network_acl\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\"}, \"public_gateway\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"id\": \"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"name\": \"my-public-gateway\", \"resource_type\": \"public_gateway\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"subnet\", \"routing_table\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"name\": \"my-routing-table-1\", \"resource_type\": \"routing_table\"}, \"status\": \"available\", \"total_ipv4_address_count\": 256, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String createSubnetPath = "/subnets"; + String mockResponseBody = "{\"bare_metal_servers\": [{\"bandwidth\": 20000, \"boot_target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"id\": \"0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"name\": \"my-bare-metal-server-disk\", \"resource_type\": \"bare_metal_server_disk\"}, \"cpu\": {\"architecture\": \"amd64\", \"core_count\": 80, \"socket_count\": 4, \"threads_per_core\": 2}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\", \"disks\": [{\"allowed_use\": {\"api_version\": \"2024-06-23\", \"bare_metal_server\": \"enable_secure_boot == true\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"id\": \"0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"interface_type\": \"fcp\", \"name\": \"my-bare-metal-server-disk\", \"resource_type\": \"bare_metal_server_disk\", \"size\": 100}], \"enable_secure_boot\": false, \"firmware\": {\"update\": \"none\"}, \"health_reasons\": [{\"code\": \"reservation_expired\", \"message\": \"The reservation cannot be used because it has expired.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\", \"id\": \"0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"memory\": 1536, \"metadata_service\": {\"enabled\": false, \"protocol\": \"http\"}, \"name\": \"my-bare-metal-server\", \"network_attachments\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"bare_metal_server_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}], \"network_interfaces\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}], \"primary_network_attachment\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"bare_metal_server_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}, \"primary_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\", \"name\": \"bx2-metal-192x768\", \"resource_type\": \"bare_metal_server_profile\"}, \"reservation\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}, \"reservation_affinity\": {\"policy\": \"automatic\", \"pool\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}]}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"bare_metal_server\", \"status\": \"deleting\", \"status_reasons\": [{\"code\": \"cannot_start_capacity\", \"message\": \"The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.\", \"more_info\": \"https://console.bluemix.net/docs/iaas/bare_metal_server.html\"}], \"trusted_platform_module\": {\"enabled\": true, \"mode\": \"disabled\", \"supported_modes\": [\"disabled\"]}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listBareMetalServersPath = "/bare_metal_servers"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the NetworkACLIdentityById model - NetworkACLIdentityById networkAclIdentityModel = new NetworkACLIdentityById.Builder() - .id("r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf") - .build(); - - // Construct an instance of the PublicGatewayIdentityPublicGatewayIdentityById model - PublicGatewayIdentityPublicGatewayIdentityById publicGatewayIdentityModel = new PublicGatewayIdentityPublicGatewayIdentityById.Builder() - .id("r006-dc5431ef-1fc6-4861-adc9-a59d077d1241") + // Construct an instance of the ListBareMetalServersOptions model + ListBareMetalServersOptions listBareMetalServersOptionsModel = new ListBareMetalServersOptions.Builder() + .start("testString") + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .name("my-name") + .reservationId("testString") + .reservationCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63") + .reservationName("my-reservation") + .vpcId("testString") + .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .vpcName("my-vpc") .build(); - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); - - // Construct an instance of the RoutingTableIdentityByCRN model - RoutingTableIdentityByCRN routingTableIdentityModel = new RoutingTableIdentityByCRN.Builder() - .crn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840") - .build(); - - // Construct an instance of the VPCIdentityById model - VPCIdentityById vpcIdentityModel = new VPCIdentityById.Builder() - .id("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .build(); - - // Construct an instance of the ZoneIdentityByName model - ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() - .name("us-south-1") - .build(); - - // Construct an instance of the SubnetPrototypeSubnetByTotalCount model - SubnetPrototypeSubnetByTotalCount subnetPrototypeModel = new SubnetPrototypeSubnetByTotalCount.Builder() - .ipVersion("ipv4") - .name("my-subnet") - .networkAcl(networkAclIdentityModel) - .publicGateway(publicGatewayIdentityModel) - .resourceGroup(resourceGroupIdentityModel) - .routingTable(routingTableIdentityModel) - .vpc(vpcIdentityModel) - .totalIpv4AddressCount(Long.valueOf("256")) - .zone(zoneIdentityModel) - .build(); - - // Construct an instance of the CreateSubnetOptions model - CreateSubnetOptions createSubnetOptionsModel = new CreateSubnetOptions.Builder() - .subnetPrototype(subnetPrototypeModel) - .build(); - - // Invoke createSubnet() with a valid options model and verify the result - Response response = vpcService.createSubnet(createSubnetOptionsModel).execute(); - assertNotNull(response); - Subnet responseObj = response.getResult(); - assertNotNull(responseObj); + // Invoke listBareMetalServers() with a valid options model and verify the result + Response response = vpcService.listBareMetalServers(listBareMetalServersOptionsModel).execute(); + assertNotNull(response); + BareMetalServerCollection responseObj = response.getResult(); + assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createSubnetPath); + assertEquals(parsedPath, listBareMetalServersPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("resource_group.id"), "testString"); + assertEquals(query.get("name"), "my-name"); + assertEquals(query.get("reservation.id"), "testString"); + assertEquals(query.get("reservation.crn"), "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63"); + assertEquals(query.get("reservation.name"), "my-reservation"); + assertEquals(query.get("vpc.id"), "testString"); + assertEquals(query.get("vpc.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); + assertEquals(query.get("vpc.name"), "my-vpc"); } - // Test the createSubnet operation with and without retries enabled + // Test the listBareMetalServers operation with and without retries enabled @Test - public void testCreateSubnetWRetries() throws Throwable { + public void testListBareMetalServersWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateSubnetWOptions(); + testListBareMetalServersWOptions(); vpcService.disableRetries(); - testCreateSubnetWOptions(); - } - - // Test the createSubnet operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateSubnetNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.createSubnet(null).execute(); + testListBareMetalServersWOptions(); } - // Test the deleteSubnet operation with a valid options model parameter + // Test the listBareMetalServers operation using the BareMetalServersPager.getNext() method @Test - public void testDeleteSubnetWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = ""; - String deleteSubnetPath = "/subnets/testString"; + public void testListBareMetalServersWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"bare_metal_servers\":[{\"bandwidth\":20000,\"boot_target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"id\":\"0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"name\":\"my-bare-metal-server-disk\",\"resource_type\":\"bare_metal_server_disk\"},\"cpu\":{\"architecture\":\"amd64\",\"core_count\":80,\"socket_count\":4,\"threads_per_core\":2},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\",\"disks\":[{\"allowed_use\":{\"api_version\":\"2024-06-23\",\"bare_metal_server\":\"enable_secure_boot == true\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"id\":\"0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"interface_type\":\"fcp\",\"name\":\"my-bare-metal-server-disk\",\"resource_type\":\"bare_metal_server_disk\",\"size\":100}],\"enable_secure_boot\":false,\"firmware\":{\"update\":\"none\"},\"health_reasons\":[{\"code\":\"reservation_expired\",\"message\":\"The reservation cannot be used because it has expired.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\",\"id\":\"0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"memory\":1536,\"metadata_service\":{\"enabled\":false,\"protocol\":\"http\"},\"name\":\"my-bare-metal-server\",\"network_attachments\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"bare_metal_server_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}}],\"network_interfaces\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}}],\"primary_network_attachment\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"bare_metal_server_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}},\"primary_network_interface\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\",\"name\":\"bx2-metal-192x768\",\"resource_type\":\"bare_metal_server_profile\"},\"reservation\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"},\"reservation_affinity\":{\"policy\":\"automatic\",\"pool\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"}]},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"bare_metal_server\",\"status\":\"deleting\",\"status_reasons\":[{\"code\":\"cannot_start_capacity\",\"message\":\"The bare metal server cannot start as there is no more capacity in this\\nzone for a bare metal server with the requested profile.\",\"more_info\":\"https://console.bluemix.net/docs/iaas/bare_metal_server.html\"}],\"trusted_platform_module\":{\"enabled\":true,\"mode\":\"disabled\",\"supported_modes\":[\"disabled\"]},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"bare_metal_servers\":[{\"bandwidth\":20000,\"boot_target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"id\":\"0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"name\":\"my-bare-metal-server-disk\",\"resource_type\":\"bare_metal_server_disk\"},\"cpu\":{\"architecture\":\"amd64\",\"core_count\":80,\"socket_count\":4,\"threads_per_core\":2},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\",\"disks\":[{\"allowed_use\":{\"api_version\":\"2024-06-23\",\"bare_metal_server\":\"enable_secure_boot == true\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"id\":\"0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"interface_type\":\"fcp\",\"name\":\"my-bare-metal-server-disk\",\"resource_type\":\"bare_metal_server_disk\",\"size\":100}],\"enable_secure_boot\":false,\"firmware\":{\"update\":\"none\"},\"health_reasons\":[{\"code\":\"reservation_expired\",\"message\":\"The reservation cannot be used because it has expired.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\",\"id\":\"0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"memory\":1536,\"metadata_service\":{\"enabled\":false,\"protocol\":\"http\"},\"name\":\"my-bare-metal-server\",\"network_attachments\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"bare_metal_server_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}}],\"network_interfaces\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}}],\"primary_network_attachment\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"bare_metal_server_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}},\"primary_network_interface\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\",\"name\":\"bx2-metal-192x768\",\"resource_type\":\"bare_metal_server_profile\"},\"reservation\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"},\"reservation_affinity\":{\"policy\":\"automatic\",\"pool\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"}]},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"bare_metal_server\",\"status\":\"deleting\",\"status_reasons\":[{\"code\":\"cannot_start_capacity\",\"message\":\"The bare metal server cannot start as there is no more capacity in this\\nzone for a bare metal server with the requested profile.\",\"more_info\":\"https://console.bluemix.net/docs/iaas/bare_metal_server.html\"}],\"trusted_platform_module\":{\"enabled\":true,\"mode\":\"disabled\",\"supported_modes\":[\"disabled\"]},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; server.enqueue(new MockResponse() - .setResponseCode(204) - .setBody(mockResponseBody)); + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the DeleteSubnetOptions model - DeleteSubnetOptions deleteSubnetOptionsModel = new DeleteSubnetOptions.Builder() - .id("testString") + ListBareMetalServersOptions listBareMetalServersOptions = new ListBareMetalServersOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .name("my-name") + .reservationId("testString") + .reservationCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63") + .reservationName("my-reservation") + .vpcId("testString") + .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .vpcName("my-vpc") .build(); - // Invoke deleteSubnet() with a valid options model and verify the result - Response response = vpcService.deleteSubnet(deleteSubnetOptionsModel).execute(); - assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteSubnetPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + List allResults = new ArrayList<>(); + BareMetalServersPager pager = new BareMetalServersPager(vpcService, listBareMetalServersOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } - - // Test the deleteSubnet operation with and without retries enabled + + // Test the listBareMetalServers operation using the BareMetalServersPager.getAll() method @Test - public void testDeleteSubnetWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testDeleteSubnetWOptions(); + public void testListBareMetalServersWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"bare_metal_servers\":[{\"bandwidth\":20000,\"boot_target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"id\":\"0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"name\":\"my-bare-metal-server-disk\",\"resource_type\":\"bare_metal_server_disk\"},\"cpu\":{\"architecture\":\"amd64\",\"core_count\":80,\"socket_count\":4,\"threads_per_core\":2},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\",\"disks\":[{\"allowed_use\":{\"api_version\":\"2024-06-23\",\"bare_metal_server\":\"enable_secure_boot == true\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"id\":\"0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"interface_type\":\"fcp\",\"name\":\"my-bare-metal-server-disk\",\"resource_type\":\"bare_metal_server_disk\",\"size\":100}],\"enable_secure_boot\":false,\"firmware\":{\"update\":\"none\"},\"health_reasons\":[{\"code\":\"reservation_expired\",\"message\":\"The reservation cannot be used because it has expired.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\",\"id\":\"0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"memory\":1536,\"metadata_service\":{\"enabled\":false,\"protocol\":\"http\"},\"name\":\"my-bare-metal-server\",\"network_attachments\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"bare_metal_server_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}}],\"network_interfaces\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}}],\"primary_network_attachment\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"bare_metal_server_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}},\"primary_network_interface\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\",\"name\":\"bx2-metal-192x768\",\"resource_type\":\"bare_metal_server_profile\"},\"reservation\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"},\"reservation_affinity\":{\"policy\":\"automatic\",\"pool\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"}]},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"bare_metal_server\",\"status\":\"deleting\",\"status_reasons\":[{\"code\":\"cannot_start_capacity\",\"message\":\"The bare metal server cannot start as there is no more capacity in this\\nzone for a bare metal server with the requested profile.\",\"more_info\":\"https://console.bluemix.net/docs/iaas/bare_metal_server.html\"}],\"trusted_platform_module\":{\"enabled\":true,\"mode\":\"disabled\",\"supported_modes\":[\"disabled\"]},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"bare_metal_servers\":[{\"bandwidth\":20000,\"boot_target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"id\":\"0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"name\":\"my-bare-metal-server-disk\",\"resource_type\":\"bare_metal_server_disk\"},\"cpu\":{\"architecture\":\"amd64\",\"core_count\":80,\"socket_count\":4,\"threads_per_core\":2},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\",\"disks\":[{\"allowed_use\":{\"api_version\":\"2024-06-23\",\"bare_metal_server\":\"enable_secure_boot == true\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"id\":\"0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"interface_type\":\"fcp\",\"name\":\"my-bare-metal-server-disk\",\"resource_type\":\"bare_metal_server_disk\",\"size\":100}],\"enable_secure_boot\":false,\"firmware\":{\"update\":\"none\"},\"health_reasons\":[{\"code\":\"reservation_expired\",\"message\":\"The reservation cannot be used because it has expired.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\",\"id\":\"0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"memory\":1536,\"metadata_service\":{\"enabled\":false,\"protocol\":\"http\"},\"name\":\"my-bare-metal-server\",\"network_attachments\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"bare_metal_server_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}}],\"network_interfaces\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}}],\"primary_network_attachment\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"bare_metal_server_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}},\"primary_network_interface\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\",\"name\":\"bx2-metal-192x768\",\"resource_type\":\"bare_metal_server_profile\"},\"reservation\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"},\"reservation_affinity\":{\"policy\":\"automatic\",\"pool\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"}]},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"bare_metal_server\",\"status\":\"deleting\",\"status_reasons\":[{\"code\":\"cannot_start_capacity\",\"message\":\"The bare metal server cannot start as there is no more capacity in this\\nzone for a bare metal server with the requested profile.\",\"more_info\":\"https://console.bluemix.net/docs/iaas/bare_metal_server.html\"}],\"trusted_platform_module\":{\"enabled\":true,\"mode\":\"disabled\",\"supported_modes\":[\"disabled\"]},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - vpcService.disableRetries(); - testDeleteSubnetWOptions(); - } + ListBareMetalServersOptions listBareMetalServersOptions = new ListBareMetalServersOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .name("my-name") + .reservationId("testString") + .reservationCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63") + .reservationName("my-reservation") + .vpcId("testString") + .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .vpcName("my-vpc") + .build(); - // Test the deleteSubnet operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteSubnetNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.deleteSubnet(null).execute(); + BareMetalServersPager pager = new BareMetalServersPager(vpcService, listBareMetalServersOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); } - - // Test the getSubnet operation with a valid options model parameter + + // Test the removeBareMetalServerNetworkInterfaceFloatingIp operation with a valid options model parameter @Test - public void testGetSubnetWOptions() throws Throwable { + public void testRemoveBareMetalServerNetworkInterfaceFloatingIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"available_ipv4_address_count\": 15, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"ip_version\": \"ipv4\", \"ipv4_cidr_block\": \"10.0.0.0/24\", \"name\": \"my-subnet\", \"network_acl\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\"}, \"public_gateway\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"id\": \"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"name\": \"my-public-gateway\", \"resource_type\": \"public_gateway\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"subnet\", \"routing_table\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"name\": \"my-routing-table-1\", \"resource_type\": \"routing_table\"}, \"status\": \"available\", \"total_ipv4_address_count\": 256, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String getSubnetPath = "/subnets/testString"; + String mockResponseBody = ""; + String removeBareMetalServerNetworkInterfaceFloatingIpPath = "/bare_metal_servers/testString/network_interfaces/testString/floating_ips/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the GetSubnetOptions model - GetSubnetOptions getSubnetOptionsModel = new GetSubnetOptions.Builder() + // Construct an instance of the RemoveBareMetalServerNetworkInterfaceFloatingIpOptions model + RemoveBareMetalServerNetworkInterfaceFloatingIpOptions removeBareMetalServerNetworkInterfaceFloatingIpOptionsModel = new RemoveBareMetalServerNetworkInterfaceFloatingIpOptions.Builder() + .bareMetalServerId("testString") + .networkInterfaceId("testString") .id("testString") .build(); - // Invoke getSubnet() with a valid options model and verify the result - Response response = vpcService.getSubnet(getSubnetOptionsModel).execute(); + // Invoke removeBareMetalServerNetworkInterfaceFloatingIp() with a valid options model and verify the result + Response response = vpcService.removeBareMetalServerNetworkInterfaceFloatingIp(removeBareMetalServerNetworkInterfaceFloatingIpOptionsModel).execute(); assertNotNull(response); - Subnet responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getSubnetPath); + assertEquals(parsedPath, removeBareMetalServerNetworkInterfaceFloatingIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getSubnet operation with and without retries enabled + // Test the removeBareMetalServerNetworkInterfaceFloatingIp operation with and without retries enabled @Test - public void testGetSubnetWRetries() throws Throwable { + public void testRemoveBareMetalServerNetworkInterfaceFloatingIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetSubnetWOptions(); + testRemoveBareMetalServerNetworkInterfaceFloatingIpWOptions(); vpcService.disableRetries(); - testGetSubnetWOptions(); + testRemoveBareMetalServerNetworkInterfaceFloatingIpWOptions(); } - // Test the getSubnet operation with a null options model (negative test) + // Test the removeBareMetalServerNetworkInterfaceFloatingIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetSubnetNoOptions() throws Throwable { + public void testRemoveBareMetalServerNetworkInterfaceFloatingIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getSubnet(null).execute(); + vpcService.removeBareMetalServerNetworkInterfaceFloatingIp(null).execute(); } - // Test the updateSubnet operation with a valid options model parameter + // Test the replaceBareMetalServerInitialization operation with a valid options model parameter @Test - public void testUpdateSubnetWOptions() throws Throwable { + public void testReplaceBareMetalServerInitializationWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"available_ipv4_address_count\": 15, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"ip_version\": \"ipv4\", \"ipv4_cidr_block\": \"10.0.0.0/24\", \"name\": \"my-subnet\", \"network_acl\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\"}, \"public_gateway\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"id\": \"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"name\": \"my-public-gateway\", \"resource_type\": \"public_gateway\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"subnet\", \"routing_table\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"name\": \"my-routing-table-1\", \"resource_type\": \"routing_table\"}, \"status\": \"available\", \"total_ipv4_address_count\": 256, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String updateSubnetPath = "/subnets/testString"; + String mockResponseBody = "{\"default_trusted_profile\": {\"auto_link\": true, \"target\": {\"crn\": \"crn:v1:bluemix:public:iam-identity::a/aa2432b1fa4d4ace891e9b80fc104e34::profile:Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5\", \"id\": \"Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5\", \"resource_type\": \"trusted_profile\"}}, \"image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"keys\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"fingerprint\": \"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"name\": \"my-key-1\"}], \"user_accounts\": [{\"encrypted_password\": \"qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"fingerprint\": \"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"name\": \"my-key-1\"}, \"resource_type\": \"host_user_account\", \"username\": \"Administrator\"}]}"; + String replaceBareMetalServerInitializationPath = "/bare_metal_servers/testString/initialization"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the NetworkACLIdentityById model - NetworkACLIdentityById networkAclIdentityModel = new NetworkACLIdentityById.Builder() - .id("r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf") + // Construct an instance of the ImageIdentityById model + ImageIdentityById imageIdentityModel = new ImageIdentityById.Builder() + .id("r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") .build(); - // Construct an instance of the SubnetPublicGatewayPatchPublicGatewayIdentityById model - SubnetPublicGatewayPatchPublicGatewayIdentityById subnetPublicGatewayPatchModel = new SubnetPublicGatewayPatchPublicGatewayIdentityById.Builder() - .id("r006-dc5431ef-1fc6-4861-adc9-a59d077d1241") + // Construct an instance of the KeyIdentityById model + KeyIdentityById keyIdentityModel = new KeyIdentityById.Builder() + .id("r006-82679077-ac3b-4c10-be16-63e9c21f0f45") .build(); - // Construct an instance of the RoutingTableIdentityByCRN model - RoutingTableIdentityByCRN routingTableIdentityModel = new RoutingTableIdentityByCRN.Builder() - .crn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840") + // Construct an instance of the TrustedProfileIdentityById model + TrustedProfileIdentityById trustedProfileIdentityModel = new TrustedProfileIdentityById.Builder() + .id("Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5") .build(); - // Construct an instance of the SubnetPatch model - SubnetPatch subnetPatchModel = new SubnetPatch.Builder() - .name("my-subnet") - .networkAcl(networkAclIdentityModel) - .publicGateway(subnetPublicGatewayPatchModel) - .routingTable(routingTableIdentityModel) + // Construct an instance of the BareMetalServerInitializationDefaultTrustedProfilePrototype model + BareMetalServerInitializationDefaultTrustedProfilePrototype bareMetalServerInitializationDefaultTrustedProfilePrototypeModel = new BareMetalServerInitializationDefaultTrustedProfilePrototype.Builder() + .autoLink(false) + .target(trustedProfileIdentityModel) .build(); - Map subnetPatchModelAsPatch = subnetPatchModel.asPatch(); - // Construct an instance of the UpdateSubnetOptions model - UpdateSubnetOptions updateSubnetOptionsModel = new UpdateSubnetOptions.Builder() + // Construct an instance of the ReplaceBareMetalServerInitializationOptions model + ReplaceBareMetalServerInitializationOptions replaceBareMetalServerInitializationOptionsModel = new ReplaceBareMetalServerInitializationOptions.Builder() .id("testString") - .subnetPatch(subnetPatchModelAsPatch) + .image(imageIdentityModel) + .keys(java.util.Arrays.asList(keyIdentityModel)) + .defaultTrustedProfile(bareMetalServerInitializationDefaultTrustedProfilePrototypeModel) + .userData("testString") .build(); - // Invoke updateSubnet() with a valid options model and verify the result - Response response = vpcService.updateSubnet(updateSubnetOptionsModel).execute(); + // Invoke replaceBareMetalServerInitialization() with a valid options model and verify the result + Response response = vpcService.replaceBareMetalServerInitialization(replaceBareMetalServerInitializationOptionsModel).execute(); assertNotNull(response); - Subnet responseObj = response.getResult(); + BareMetalServerInitialization responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "PUT"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateSubnetPath); + assertEquals(parsedPath, replaceBareMetalServerInitializationPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateSubnet operation with and without retries enabled + // Test the replaceBareMetalServerInitialization operation with and without retries enabled @Test - public void testUpdateSubnetWRetries() throws Throwable { + public void testReplaceBareMetalServerInitializationWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateSubnetWOptions(); + testReplaceBareMetalServerInitializationWOptions(); vpcService.disableRetries(); - testUpdateSubnetWOptions(); + testReplaceBareMetalServerInitializationWOptions(); } - // Test the updateSubnet operation with a null options model (negative test) + // Test the replaceBareMetalServerInitialization operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateSubnetNoOptions() throws Throwable { + public void testReplaceBareMetalServerInitializationNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateSubnet(null).execute(); + vpcService.replaceBareMetalServerInitialization(null).execute(); } - // Test the getSubnetNetworkAcl operation with a valid options model parameter + // Test the restartBareMetalServer operation with a valid options model parameter @Test - public void testGetSubnetNetworkAclWOptions() throws Throwable { + public void testRestartBareMetalServerWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"rules\": [{\"action\": \"allow\", \"before\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"name\": \"my-network-acl-rule\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"ip_version\": \"ipv4\", \"name\": \"my-network-acl-rule\", \"source\": \"192.168.3.0/24\", \"protocol\": \"all\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String getSubnetNetworkAclPath = "/subnets/testString/network_acl"; + String mockResponseBody = ""; + String restartBareMetalServerPath = "/bare_metal_servers/testString/restart"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the GetSubnetNetworkAclOptions model - GetSubnetNetworkAclOptions getSubnetNetworkAclOptionsModel = new GetSubnetNetworkAclOptions.Builder() + // Construct an instance of the RestartBareMetalServerOptions model + RestartBareMetalServerOptions restartBareMetalServerOptionsModel = new RestartBareMetalServerOptions.Builder() .id("testString") .build(); - // Invoke getSubnetNetworkAcl() with a valid options model and verify the result - Response response = vpcService.getSubnetNetworkAcl(getSubnetNetworkAclOptionsModel).execute(); + // Invoke restartBareMetalServer() with a valid options model and verify the result + Response response = vpcService.restartBareMetalServer(restartBareMetalServerOptionsModel).execute(); assertNotNull(response); - NetworkACL responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getSubnetNetworkAclPath); + assertEquals(parsedPath, restartBareMetalServerPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getSubnetNetworkAcl operation with and without retries enabled + // Test the restartBareMetalServer operation with and without retries enabled @Test - public void testGetSubnetNetworkAclWRetries() throws Throwable { + public void testRestartBareMetalServerWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetSubnetNetworkAclWOptions(); + testRestartBareMetalServerWOptions(); vpcService.disableRetries(); - testGetSubnetNetworkAclWOptions(); + testRestartBareMetalServerWOptions(); } - // Test the getSubnetNetworkAcl operation with a null options model (negative test) + // Test the restartBareMetalServer operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetSubnetNetworkAclNoOptions() throws Throwable { + public void testRestartBareMetalServerNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getSubnetNetworkAcl(null).execute(); + vpcService.restartBareMetalServer(null).execute(); } - // Test the replaceSubnetNetworkAcl operation with a valid options model parameter + // Test the startBareMetalServer operation with a valid options model parameter @Test - public void testReplaceSubnetNetworkAclWOptions() throws Throwable { + public void testStartBareMetalServerWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"rules\": [{\"action\": \"allow\", \"before\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"name\": \"my-network-acl-rule\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"ip_version\": \"ipv4\", \"name\": \"my-network-acl-rule\", \"source\": \"192.168.3.0/24\", \"protocol\": \"all\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String replaceSubnetNetworkAclPath = "/subnets/testString/network_acl"; + String mockResponseBody = ""; + String startBareMetalServerPath = "/bare_metal_servers/testString/start"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the NetworkACLIdentityById model - NetworkACLIdentityById networkAclIdentityModel = new NetworkACLIdentityById.Builder() - .id("r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf") - .build(); - - // Construct an instance of the ReplaceSubnetNetworkAclOptions model - ReplaceSubnetNetworkAclOptions replaceSubnetNetworkAclOptionsModel = new ReplaceSubnetNetworkAclOptions.Builder() + // Construct an instance of the StartBareMetalServerOptions model + StartBareMetalServerOptions startBareMetalServerOptionsModel = new StartBareMetalServerOptions.Builder() .id("testString") - .networkAclIdentity(networkAclIdentityModel) .build(); - // Invoke replaceSubnetNetworkAcl() with a valid options model and verify the result - Response response = vpcService.replaceSubnetNetworkAcl(replaceSubnetNetworkAclOptionsModel).execute(); + // Invoke startBareMetalServer() with a valid options model and verify the result + Response response = vpcService.startBareMetalServer(startBareMetalServerOptionsModel).execute(); assertNotNull(response); - NetworkACL responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PUT"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, replaceSubnetNetworkAclPath); + assertEquals(parsedPath, startBareMetalServerPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the replaceSubnetNetworkAcl operation with and without retries enabled + // Test the startBareMetalServer operation with and without retries enabled @Test - public void testReplaceSubnetNetworkAclWRetries() throws Throwable { + public void testStartBareMetalServerWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testReplaceSubnetNetworkAclWOptions(); + testStartBareMetalServerWOptions(); vpcService.disableRetries(); - testReplaceSubnetNetworkAclWOptions(); + testStartBareMetalServerWOptions(); } - // Test the replaceSubnetNetworkAcl operation with a null options model (negative test) + // Test the startBareMetalServer operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testReplaceSubnetNetworkAclNoOptions() throws Throwable { + public void testStartBareMetalServerNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.replaceSubnetNetworkAcl(null).execute(); + vpcService.startBareMetalServer(null).execute(); } - // Test the unsetSubnetPublicGateway operation with a valid options model parameter + // Test the stopBareMetalServer operation with a valid options model parameter @Test - public void testUnsetSubnetPublicGatewayWOptions() throws Throwable { + public void testStopBareMetalServerWOptions() throws Throwable { // Register a mock response String mockResponseBody = ""; - String unsetSubnetPublicGatewayPath = "/subnets/testString/public_gateway"; + String stopBareMetalServerPath = "/bare_metal_servers/testString/stop"; server.enqueue(new MockResponse() .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the UnsetSubnetPublicGatewayOptions model - UnsetSubnetPublicGatewayOptions unsetSubnetPublicGatewayOptionsModel = new UnsetSubnetPublicGatewayOptions.Builder() + // Construct an instance of the StopBareMetalServerOptions model + StopBareMetalServerOptions stopBareMetalServerOptionsModel = new StopBareMetalServerOptions.Builder() .id("testString") + .type("hard") .build(); - // Invoke unsetSubnetPublicGateway() with a valid options model and verify the result - Response response = vpcService.unsetSubnetPublicGateway(unsetSubnetPublicGatewayOptionsModel).execute(); + // Invoke stopBareMetalServer() with a valid options model and verify the result + Response response = vpcService.stopBareMetalServer(stopBareMetalServerOptionsModel).execute(); assertNotNull(response); Void responseObj = response.getResult(); assertNull(responseObj); @@ -4918,428 +5008,411 @@ public void testUnsetSubnetPublicGatewayWOptions() throws Throwable { // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, unsetSubnetPublicGatewayPath); + assertEquals(parsedPath, stopBareMetalServerPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the unsetSubnetPublicGateway operation with and without retries enabled + // Test the stopBareMetalServer operation with and without retries enabled @Test - public void testUnsetSubnetPublicGatewayWRetries() throws Throwable { + public void testStopBareMetalServerWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUnsetSubnetPublicGatewayWOptions(); + testStopBareMetalServerWOptions(); vpcService.disableRetries(); - testUnsetSubnetPublicGatewayWOptions(); + testStopBareMetalServerWOptions(); } - // Test the unsetSubnetPublicGateway operation with a null options model (negative test) + // Test the stopBareMetalServer operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUnsetSubnetPublicGatewayNoOptions() throws Throwable { + public void testStopBareMetalServerNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.unsetSubnetPublicGateway(null).execute(); + vpcService.stopBareMetalServer(null).execute(); } - // Test the getSubnetPublicGateway operation with a valid options model parameter + // Test the updateBareMetalServer operation with a valid options model parameter @Test - public void testGetSubnetPublicGatewayWOptions() throws Throwable { + public void testUpdateBareMetalServerWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"floating_ip\": {\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"id\": \"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"name\": \"my-public-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"public_gateway\", \"status\": \"available\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String getSubnetPublicGatewayPath = "/subnets/testString/public_gateway"; + String mockResponseBody = "{\"bandwidth\": 20000, \"boot_target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"id\": \"0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"name\": \"my-bare-metal-server-disk\", \"resource_type\": \"bare_metal_server_disk\"}, \"cpu\": {\"architecture\": \"amd64\", \"core_count\": 80, \"socket_count\": 4, \"threads_per_core\": 2}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\", \"disks\": [{\"allowed_use\": {\"api_version\": \"2024-06-23\", \"bare_metal_server\": \"enable_secure_boot == true\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"id\": \"0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"interface_type\": \"fcp\", \"name\": \"my-bare-metal-server-disk\", \"resource_type\": \"bare_metal_server_disk\", \"size\": 100}], \"enable_secure_boot\": false, \"firmware\": {\"update\": \"none\"}, \"health_reasons\": [{\"code\": \"reservation_expired\", \"message\": \"The reservation cannot be used because it has expired.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\", \"id\": \"0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"memory\": 1536, \"metadata_service\": {\"enabled\": false, \"protocol\": \"http\"}, \"name\": \"my-bare-metal-server\", \"network_attachments\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"bare_metal_server_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}], \"network_interfaces\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}], \"primary_network_attachment\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"bare_metal_server_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}, \"primary_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\", \"name\": \"bx2-metal-192x768\", \"resource_type\": \"bare_metal_server_profile\"}, \"reservation\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}, \"reservation_affinity\": {\"policy\": \"automatic\", \"pool\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}]}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"bare_metal_server\", \"status\": \"deleting\", \"status_reasons\": [{\"code\": \"cannot_start_capacity\", \"message\": \"The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.\", \"more_info\": \"https://console.bluemix.net/docs/iaas/bare_metal_server.html\"}], \"trusted_platform_module\": {\"enabled\": true, \"mode\": \"disabled\", \"supported_modes\": [\"disabled\"]}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String updateBareMetalServerPath = "/bare_metal_servers/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetSubnetPublicGatewayOptions model - GetSubnetPublicGatewayOptions getSubnetPublicGatewayOptionsModel = new GetSubnetPublicGatewayOptions.Builder() + // Construct an instance of the BareMetalServerMetadataServicePatch model + BareMetalServerMetadataServicePatch bareMetalServerMetadataServicePatchModel = new BareMetalServerMetadataServicePatch.Builder() + .enabled(true) + .protocol("http") + .build(); + + // Construct an instance of the ReservationIdentityById model + ReservationIdentityById reservationIdentityModel = new ReservationIdentityById.Builder() + .id("0717-ba49df72-37b8-43ac-98da-f8e029de0e63") + .build(); + + // Construct an instance of the BareMetalServerReservationAffinityPatch model + BareMetalServerReservationAffinityPatch bareMetalServerReservationAffinityPatchModel = new BareMetalServerReservationAffinityPatch.Builder() + .policy("automatic") + .pool(java.util.Arrays.asList(reservationIdentityModel)) + .build(); + + // Construct an instance of the BareMetalServerTrustedPlatformModulePatch model + BareMetalServerTrustedPlatformModulePatch bareMetalServerTrustedPlatformModulePatchModel = new BareMetalServerTrustedPlatformModulePatch.Builder() + .mode("disabled") + .build(); + + // Construct an instance of the BareMetalServerPatch model + BareMetalServerPatch bareMetalServerPatchModel = new BareMetalServerPatch.Builder() + .bandwidth(Long.valueOf("20000")) + .enableSecureBoot(false) + .metadataService(bareMetalServerMetadataServicePatchModel) + .name("my-bare-metal-server") + .reservationAffinity(bareMetalServerReservationAffinityPatchModel) + .trustedPlatformModule(bareMetalServerTrustedPlatformModulePatchModel) + .build(); + Map bareMetalServerPatchModelAsPatch = bareMetalServerPatchModel.asPatch(); + + // Construct an instance of the UpdateBareMetalServerOptions model + UpdateBareMetalServerOptions updateBareMetalServerOptionsModel = new UpdateBareMetalServerOptions.Builder() .id("testString") + .bareMetalServerPatch(bareMetalServerPatchModelAsPatch) .build(); - // Invoke getSubnetPublicGateway() with a valid options model and verify the result - Response response = vpcService.getSubnetPublicGateway(getSubnetPublicGatewayOptionsModel).execute(); + // Invoke updateBareMetalServer() with a valid options model and verify the result + Response response = vpcService.updateBareMetalServer(updateBareMetalServerOptionsModel).execute(); assertNotNull(response); - PublicGateway responseObj = response.getResult(); + BareMetalServer responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getSubnetPublicGatewayPath); + assertEquals(parsedPath, updateBareMetalServerPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getSubnetPublicGateway operation with and without retries enabled + // Test the updateBareMetalServer operation with and without retries enabled @Test - public void testGetSubnetPublicGatewayWRetries() throws Throwable { + public void testUpdateBareMetalServerWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetSubnetPublicGatewayWOptions(); + testUpdateBareMetalServerWOptions(); vpcService.disableRetries(); - testGetSubnetPublicGatewayWOptions(); + testUpdateBareMetalServerWOptions(); } - // Test the getSubnetPublicGateway operation with a null options model (negative test) + // Test the updateBareMetalServer operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetSubnetPublicGatewayNoOptions() throws Throwable { + public void testUpdateBareMetalServerNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getSubnetPublicGateway(null).execute(); + vpcService.updateBareMetalServer(null).execute(); } - // Test the setSubnetPublicGateway operation with a valid options model parameter + // Test the updateBareMetalServerDisk operation with a valid options model parameter @Test - public void testSetSubnetPublicGatewayWOptions() throws Throwable { + public void testUpdateBareMetalServerDiskWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"floating_ip\": {\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"id\": \"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"name\": \"my-public-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"public_gateway\", \"status\": \"available\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String setSubnetPublicGatewayPath = "/subnets/testString/public_gateway"; + String mockResponseBody = "{\"allowed_use\": {\"api_version\": \"2024-06-23\", \"bare_metal_server\": \"enable_secure_boot == true\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"id\": \"0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"interface_type\": \"fcp\", \"name\": \"my-bare-metal-server-disk\", \"resource_type\": \"bare_metal_server_disk\", \"size\": 100}"; + String updateBareMetalServerDiskPath = "/bare_metal_servers/testString/disks/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the PublicGatewayIdentityPublicGatewayIdentityById model - PublicGatewayIdentityPublicGatewayIdentityById publicGatewayIdentityModel = new PublicGatewayIdentityPublicGatewayIdentityById.Builder() - .id("r006-dc5431ef-1fc6-4861-adc9-a59d077d1241") + // Construct an instance of the BareMetalServerDiskPatch model + BareMetalServerDiskPatch bareMetalServerDiskPatchModel = new BareMetalServerDiskPatch.Builder() + .name("my-bare-metal-server-disk-updated") .build(); + Map bareMetalServerDiskPatchModelAsPatch = bareMetalServerDiskPatchModel.asPatch(); - // Construct an instance of the SetSubnetPublicGatewayOptions model - SetSubnetPublicGatewayOptions setSubnetPublicGatewayOptionsModel = new SetSubnetPublicGatewayOptions.Builder() + // Construct an instance of the UpdateBareMetalServerDiskOptions model + UpdateBareMetalServerDiskOptions updateBareMetalServerDiskOptionsModel = new UpdateBareMetalServerDiskOptions.Builder() + .bareMetalServerId("testString") .id("testString") - .publicGatewayIdentity(publicGatewayIdentityModel) + .bareMetalServerDiskPatch(bareMetalServerDiskPatchModelAsPatch) .build(); - // Invoke setSubnetPublicGateway() with a valid options model and verify the result - Response response = vpcService.setSubnetPublicGateway(setSubnetPublicGatewayOptionsModel).execute(); + // Invoke updateBareMetalServerDisk() with a valid options model and verify the result + Response response = vpcService.updateBareMetalServerDisk(updateBareMetalServerDiskOptionsModel).execute(); assertNotNull(response); - PublicGateway responseObj = response.getResult(); + BareMetalServerDisk 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"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, setSubnetPublicGatewayPath); + assertEquals(parsedPath, updateBareMetalServerDiskPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the setSubnetPublicGateway operation with and without retries enabled + // Test the updateBareMetalServerDisk operation with and without retries enabled @Test - public void testSetSubnetPublicGatewayWRetries() throws Throwable { + public void testUpdateBareMetalServerDiskWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testSetSubnetPublicGatewayWOptions(); + testUpdateBareMetalServerDiskWOptions(); vpcService.disableRetries(); - testSetSubnetPublicGatewayWOptions(); + testUpdateBareMetalServerDiskWOptions(); } - // Test the setSubnetPublicGateway operation with a null options model (negative test) + // Test the updateBareMetalServerDisk operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testSetSubnetPublicGatewayNoOptions() throws Throwable { + public void testUpdateBareMetalServerDiskNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.setSubnetPublicGateway(null).execute(); + vpcService.updateBareMetalServerDisk(null).execute(); } - // Test the getSubnetRoutingTable operation with a valid options model parameter + // Test the updateBareMetalServerNetworkAttachment operation with a valid options model parameter @Test - public void testGetSubnetRoutingTableWOptions() throws Throwable { + public void testUpdateBareMetalServerNetworkAttachmentWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"accept_routes_from\": [{\"resource_type\": \"vpn_server\"}], \"advertise_routes_to\": [\"transit_gateway\"], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"is_default\": false, \"lifecycle_state\": \"stable\", \"name\": \"my-routing-table-1\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"routing_table\", \"route_direct_link_ingress\": true, \"route_internet_ingress\": true, \"route_transit_gateway_ingress\": true, \"route_vpc_zone_ingress\": false, \"routes\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"name\": \"my-vpc-routing-table-route\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}]}"; - String getSubnetRoutingTablePath = "/subnets/testString/routing_table"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"lifecycle_state\": \"stable\", \"name\": \"my-bare-metal-server-network-attachment\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"bare_metal_server_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}, \"allowed_vlans\": [4], \"interface_type\": \"pci\"}"; + String updateBareMetalServerNetworkAttachmentPath = "/bare_metal_servers/testString/network_attachments/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetSubnetRoutingTableOptions model - GetSubnetRoutingTableOptions getSubnetRoutingTableOptionsModel = new GetSubnetRoutingTableOptions.Builder() + // Construct an instance of the BareMetalServerNetworkAttachmentPatch model + BareMetalServerNetworkAttachmentPatch bareMetalServerNetworkAttachmentPatchModel = new BareMetalServerNetworkAttachmentPatch.Builder() + .allowedVlans(java.util.Arrays.asList(Long.valueOf("4"))) + .name("my-bare-metal-server-network-attachment-updated") + .build(); + Map bareMetalServerNetworkAttachmentPatchModelAsPatch = bareMetalServerNetworkAttachmentPatchModel.asPatch(); + + // Construct an instance of the UpdateBareMetalServerNetworkAttachmentOptions model + UpdateBareMetalServerNetworkAttachmentOptions updateBareMetalServerNetworkAttachmentOptionsModel = new UpdateBareMetalServerNetworkAttachmentOptions.Builder() + .bareMetalServerId("testString") .id("testString") + .bareMetalServerNetworkAttachmentPatch(bareMetalServerNetworkAttachmentPatchModelAsPatch) .build(); - // Invoke getSubnetRoutingTable() with a valid options model and verify the result - Response response = vpcService.getSubnetRoutingTable(getSubnetRoutingTableOptionsModel).execute(); + // Invoke updateBareMetalServerNetworkAttachment() with a valid options model and verify the result + Response response = vpcService.updateBareMetalServerNetworkAttachment(updateBareMetalServerNetworkAttachmentOptionsModel).execute(); assertNotNull(response); - RoutingTable responseObj = response.getResult(); + BareMetalServerNetworkAttachment responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getSubnetRoutingTablePath); + assertEquals(parsedPath, updateBareMetalServerNetworkAttachmentPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getSubnetRoutingTable operation with and without retries enabled + // Test the updateBareMetalServerNetworkAttachment operation with and without retries enabled @Test - public void testGetSubnetRoutingTableWRetries() throws Throwable { + public void testUpdateBareMetalServerNetworkAttachmentWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetSubnetRoutingTableWOptions(); + testUpdateBareMetalServerNetworkAttachmentWOptions(); vpcService.disableRetries(); - testGetSubnetRoutingTableWOptions(); + testUpdateBareMetalServerNetworkAttachmentWOptions(); } - // Test the getSubnetRoutingTable operation with a null options model (negative test) + // Test the updateBareMetalServerNetworkAttachment operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetSubnetRoutingTableNoOptions() throws Throwable { + public void testUpdateBareMetalServerNetworkAttachmentNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getSubnetRoutingTable(null).execute(); + vpcService.updateBareMetalServerNetworkAttachment(null).execute(); } - // Test the replaceSubnetRoutingTable operation with a valid options model parameter + // Test the updateBareMetalServerNetworkInterface operation with a valid options model parameter @Test - public void testReplaceSubnetRoutingTableWOptions() throws Throwable { + public void testUpdateBareMetalServerNetworkInterfaceWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"accept_routes_from\": [{\"resource_type\": \"vpn_server\"}], \"advertise_routes_to\": [\"transit_gateway\"], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"is_default\": false, \"lifecycle_state\": \"stable\", \"name\": \"my-routing-table-1\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"routing_table\", \"route_direct_link_ingress\": true, \"route_internet_ingress\": true, \"route_transit_gateway_ingress\": true, \"route_vpc_zone_ingress\": false, \"routes\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"name\": \"my-vpc-routing-table-route\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}]}"; - String replaceSubnetRoutingTablePath = "/subnets/testString/routing_table"; + String mockResponseBody = "{\"allow_ip_spoofing\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"enable_infrastructure_nat\": true, \"floating_ips\": [{\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}], \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"mac_address\": \"02:00:04:00:C4:6A\", \"name\": \"my-bare-metal-server-network-interface\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"status\": \"available\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\", \"interface_type\": \"hipersocket\"}"; + String updateBareMetalServerNetworkInterfacePath = "/bare_metal_servers/testString/network_interfaces/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the RoutingTableIdentityByCRN model - RoutingTableIdentityByCRN routingTableIdentityModel = new RoutingTableIdentityByCRN.Builder() - .crn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840") + // Construct an instance of the BareMetalServerNetworkInterfacePatch model + BareMetalServerNetworkInterfacePatch bareMetalServerNetworkInterfacePatchModel = new BareMetalServerNetworkInterfacePatch.Builder() + .allowIpSpoofing(true) + .allowedVlans(java.util.Arrays.asList(Long.valueOf("4"))) + .enableInfrastructureNat(true) + .name("my-bare-metal-server-network-interface") .build(); + Map bareMetalServerNetworkInterfacePatchModelAsPatch = bareMetalServerNetworkInterfacePatchModel.asPatch(); - // Construct an instance of the ReplaceSubnetRoutingTableOptions model - ReplaceSubnetRoutingTableOptions replaceSubnetRoutingTableOptionsModel = new ReplaceSubnetRoutingTableOptions.Builder() + // Construct an instance of the UpdateBareMetalServerNetworkInterfaceOptions model + UpdateBareMetalServerNetworkInterfaceOptions updateBareMetalServerNetworkInterfaceOptionsModel = new UpdateBareMetalServerNetworkInterfaceOptions.Builder() + .bareMetalServerId("testString") .id("testString") - .routingTableIdentity(routingTableIdentityModel) + .bareMetalServerNetworkInterfacePatch(bareMetalServerNetworkInterfacePatchModelAsPatch) .build(); - // Invoke replaceSubnetRoutingTable() with a valid options model and verify the result - Response response = vpcService.replaceSubnetRoutingTable(replaceSubnetRoutingTableOptionsModel).execute(); + // Invoke updateBareMetalServerNetworkInterface() with a valid options model and verify the result + Response response = vpcService.updateBareMetalServerNetworkInterface(updateBareMetalServerNetworkInterfaceOptionsModel).execute(); assertNotNull(response); - RoutingTable responseObj = response.getResult(); + BareMetalServerNetworkInterface 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"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, replaceSubnetRoutingTablePath); + assertEquals(parsedPath, updateBareMetalServerNetworkInterfacePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the replaceSubnetRoutingTable operation with and without retries enabled + // Test the updateBareMetalServerNetworkInterface operation with and without retries enabled @Test - public void testReplaceSubnetRoutingTableWRetries() throws Throwable { + public void testUpdateBareMetalServerNetworkInterfaceWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testReplaceSubnetRoutingTableWOptions(); + testUpdateBareMetalServerNetworkInterfaceWOptions(); vpcService.disableRetries(); - testReplaceSubnetRoutingTableWOptions(); + testUpdateBareMetalServerNetworkInterfaceWOptions(); } - // Test the replaceSubnetRoutingTable operation with a null options model (negative test) + // Test the updateBareMetalServerNetworkInterface operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testReplaceSubnetRoutingTableNoOptions() throws Throwable { + public void testUpdateBareMetalServerNetworkInterfaceNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.replaceSubnetRoutingTable(null).execute(); + vpcService.updateBareMetalServerNetworkInterface(null).execute(); } - // Test the listSubnetReservedIps operation with a valid options model parameter + // Test the updateFirmwareForBareMetalServer operation with a valid options model parameter @Test - public void testListSubnetReservedIpsWOptions() throws Throwable { + public void testUpdateFirmwareForBareMetalServerWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"reserved_ips\": [{\"address\": \"192.168.3.4\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"lifecycle_state\": \"stable\", \"name\": \"my-reserved-ip\", \"owner\": \"provider\", \"resource_type\": \"subnet_reserved_ip\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"resource_type\": \"endpoint_gateway\"}}], \"total_count\": 132}"; - String listSubnetReservedIpsPath = "/subnets/testString/reserved_ips"; + String mockResponseBody = ""; + String updateFirmwareForBareMetalServerPath = "/bare_metal_servers/testString/firmware/update"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the ListSubnetReservedIpsOptions model - ListSubnetReservedIpsOptions listSubnetReservedIpsOptionsModel = new ListSubnetReservedIpsOptions.Builder() - .subnetId("testString") - .start("testString") - .limit(Long.valueOf("10")) - .sort("name") - .targetId("testString") - .targetCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727") - .targetName("my-resource") - .targetResourceType("testString") + // Construct an instance of the UpdateFirmwareForBareMetalServerOptions model + UpdateFirmwareForBareMetalServerOptions updateFirmwareForBareMetalServerOptionsModel = new UpdateFirmwareForBareMetalServerOptions.Builder() + .id("testString") + .autoStart(true) .build(); - // Invoke listSubnetReservedIps() with a valid options model and verify the result - Response response = vpcService.listSubnetReservedIps(listSubnetReservedIpsOptionsModel).execute(); + // Invoke updateFirmwareForBareMetalServer() with a valid options model and verify the result + Response response = vpcService.updateFirmwareForBareMetalServer(updateFirmwareForBareMetalServerOptionsModel).execute(); assertNotNull(response); - ReservedIPCollection responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listSubnetReservedIpsPath); + assertEquals(parsedPath, updateFirmwareForBareMetalServerPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("sort"), "name"); - assertEquals(query.get("target.id"), "testString"); - assertEquals(query.get("target.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727"); - assertEquals(query.get("target.name"), "my-resource"); - assertEquals(query.get("target.resource_type"), "testString"); } - // Test the listSubnetReservedIps operation with and without retries enabled + // Test the updateFirmwareForBareMetalServer operation with and without retries enabled @Test - public void testListSubnetReservedIpsWRetries() throws Throwable { + public void testUpdateFirmwareForBareMetalServerWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListSubnetReservedIpsWOptions(); + testUpdateFirmwareForBareMetalServerWOptions(); vpcService.disableRetries(); - testListSubnetReservedIpsWOptions(); + testUpdateFirmwareForBareMetalServerWOptions(); } - // Test the listSubnetReservedIps operation with a null options model (negative test) + // Test the updateFirmwareForBareMetalServer operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListSubnetReservedIpsNoOptions() throws Throwable { + public void testUpdateFirmwareForBareMetalServerNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listSubnetReservedIps(null).execute(); + vpcService.updateFirmwareForBareMetalServer(null).execute(); } - // Test the listSubnetReservedIps operation using the SubnetReservedIpsPager.getNext() method + // Test the createClusterNetwork operation with a valid options model parameter @Test - public void testListSubnetReservedIpsWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"reserved_ips\":[{\"address\":\"192.168.3.4\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"lifecycle_state\":\"stable\",\"name\":\"my-reserved-ip\",\"owner\":\"provider\",\"resource_type\":\"subnet_reserved_ip\",\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"resource_type\":\"endpoint_gateway\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"reserved_ips\":[{\"address\":\"192.168.3.4\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"lifecycle_state\":\"stable\",\"name\":\"my-reserved-ip\",\"owner\":\"provider\",\"resource_type\":\"subnet_reserved_ip\",\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"resource_type\":\"endpoint_gateway\"}}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); + public void testCreateClusterNetworkWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"id\": \"0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network\", \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\", \"name\": \"h100\", \"resource_type\": \"cluster_network_profile\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"cluster_network\", \"subnet_prefixes\": [{\"allocation_policy\": \"auto\", \"cidr\": \"10.0.0.0/24\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String createClusterNetworkPath = "/cluster_networks"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); + .setResponseCode(201) + .setBody(mockResponseBody)); - ListSubnetReservedIpsOptions listSubnetReservedIpsOptions = new ListSubnetReservedIpsOptions.Builder() - .subnetId("testString") - .limit(Long.valueOf("10")) - .sort("name") - .targetId("testString") - .targetCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727") - .targetName("my-resource") - .targetResourceType("testString") + // Construct an instance of the ClusterNetworkProfileIdentityByName model + ClusterNetworkProfileIdentityByName clusterNetworkProfileIdentityModel = new ClusterNetworkProfileIdentityByName.Builder() + .name("h100") .build(); - List allResults = new ArrayList<>(); - SubnetReservedIpsPager pager = new SubnetReservedIpsPager(vpcService, listSubnetReservedIpsOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); - } - - // Test the listSubnetReservedIps operation using the SubnetReservedIpsPager.getAll() method - @Test - public void testListSubnetReservedIpsWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"reserved_ips\":[{\"address\":\"192.168.3.4\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"lifecycle_state\":\"stable\",\"name\":\"my-reserved-ip\",\"owner\":\"provider\",\"resource_type\":\"subnet_reserved_ip\",\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"resource_type\":\"endpoint_gateway\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"reserved_ips\":[{\"address\":\"192.168.3.4\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"lifecycle_state\":\"stable\",\"name\":\"my-reserved-ip\",\"owner\":\"provider\",\"resource_type\":\"subnet_reserved_ip\",\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"resource_type\":\"endpoint_gateway\"}}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); + // Construct an instance of the VPCIdentityById model + VPCIdentityById vpcIdentityModel = new VPCIdentityById.Builder() + .id("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .build(); - ListSubnetReservedIpsOptions listSubnetReservedIpsOptions = new ListSubnetReservedIpsOptions.Builder() - .subnetId("testString") - .limit(Long.valueOf("10")) - .sort("name") - .targetId("testString") - .targetCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727") - .targetName("my-resource") - .targetResourceType("testString") + // Construct an instance of the ZoneIdentityByName model + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() + .name("us-south-1") .build(); - SubnetReservedIpsPager pager = new SubnetReservedIpsPager(vpcService, listSubnetReservedIpsOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the createSubnetReservedIp operation with a valid options model parameter - @Test - public void testCreateSubnetReservedIpWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"address\": \"192.168.3.4\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"lifecycle_state\": \"stable\", \"name\": \"my-reserved-ip\", \"owner\": \"provider\", \"resource_type\": \"subnet_reserved_ip\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"resource_type\": \"endpoint_gateway\"}}"; - String createSubnetReservedIpPath = "/subnets/testString/reserved_ips"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(201) - .setBody(mockResponseBody)); + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") + .build(); - // Construct an instance of the ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById model - ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById reservedIpTargetPrototypeModel = new ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById.Builder() - .id("r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0") + // Construct an instance of the ClusterNetworkSubnetPrefixPrototype model + ClusterNetworkSubnetPrefixPrototype clusterNetworkSubnetPrefixPrototypeModel = new ClusterNetworkSubnetPrefixPrototype.Builder() + .cidr("10.0.0.0/24") .build(); - // Construct an instance of the CreateSubnetReservedIpOptions model - CreateSubnetReservedIpOptions createSubnetReservedIpOptionsModel = new CreateSubnetReservedIpOptions.Builder() - .subnetId("testString") - .address("192.168.3.4") - .autoDelete(false) - .name("my-reserved-ip") - .target(reservedIpTargetPrototypeModel) + // Construct an instance of the CreateClusterNetworkOptions model + CreateClusterNetworkOptions createClusterNetworkOptionsModel = new CreateClusterNetworkOptions.Builder() + .profile(clusterNetworkProfileIdentityModel) + .vpc(vpcIdentityModel) + .zone(zoneIdentityModel) + .name("my-cluster-network") + .resourceGroup(resourceGroupIdentityModel) + .subnetPrefixes(java.util.Arrays.asList(clusterNetworkSubnetPrefixPrototypeModel)) .build(); - // Invoke createSubnetReservedIp() with a valid options model and verify the result - Response response = vpcService.createSubnetReservedIp(createSubnetReservedIpOptionsModel).execute(); + // Invoke createClusterNetwork() with a valid options model and verify the result + Response response = vpcService.createClusterNetwork(createClusterNetworkOptionsModel).execute(); assertNotNull(response); - ReservedIP responseObj = response.getResult(); + ClusterNetwork responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -5348,440 +5421,348 @@ public void testCreateSubnetReservedIpWOptions() throws Throwable { assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createSubnetReservedIpPath); + assertEquals(parsedPath, createClusterNetworkPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createSubnetReservedIp operation with and without retries enabled + // Test the createClusterNetwork operation with and without retries enabled @Test - public void testCreateSubnetReservedIpWRetries() throws Throwable { + public void testCreateClusterNetworkWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateSubnetReservedIpWOptions(); + testCreateClusterNetworkWOptions(); vpcService.disableRetries(); - testCreateSubnetReservedIpWOptions(); + testCreateClusterNetworkWOptions(); } - // Test the createSubnetReservedIp operation with a null options model (negative test) + // Test the createClusterNetwork operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateSubnetReservedIpNoOptions() throws Throwable { + public void testCreateClusterNetworkNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createSubnetReservedIp(null).execute(); + vpcService.createClusterNetwork(null).execute(); } - // Test the deleteSubnetReservedIp operation with a valid options model parameter + // Test the createClusterNetworkInterface operation with a valid options model parameter @Test - public void testDeleteSubnetReservedIpWOptions() throws Throwable { + public void testCreateClusterNetworkInterfaceWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteSubnetReservedIpPath = "/subnets/testString/reserved_ips/testString"; + String mockResponseBody = "{\"allow_ip_spoofing\": true, \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"enable_infrastructure_nat\": false, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"mac_address\": \"02:00:4D:45:45:4D\", \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"address\": \"10.1.0.6\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"resource_type\": \"cluster_network_subnet_reserved_ip\"}, \"resource_type\": \"cluster_network_interface\", \"subnet\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\"}, \"target\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String createClusterNetworkInterfacePath = "/cluster_networks/testString/interfaces"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the DeleteSubnetReservedIpOptions model - DeleteSubnetReservedIpOptions deleteSubnetReservedIpOptionsModel = new DeleteSubnetReservedIpOptions.Builder() - .subnetId("testString") - .id("testString") + // Construct an instance of the ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext model + ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext clusterNetworkInterfacePrimaryIpPrototypeModel = new ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext.Builder() + .address("10.0.0.5") + .autoDelete(false) + .name("my-cluster-network-subnet-reserved-ip") .build(); - // Invoke deleteSubnetReservedIp() with a valid options model and verify the result - Response response = vpcService.deleteSubnetReservedIp(deleteSubnetReservedIpOptionsModel).execute(); + // Construct an instance of the ClusterNetworkSubnetIdentityById model + ClusterNetworkSubnetIdentityById clusterNetworkSubnetIdentityModel = new ClusterNetworkSubnetIdentityById.Builder() + .id("0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930") + .build(); + + // Construct an instance of the CreateClusterNetworkInterfaceOptions model + CreateClusterNetworkInterfaceOptions createClusterNetworkInterfaceOptionsModel = new CreateClusterNetworkInterfaceOptions.Builder() + .clusterNetworkId("testString") + .name("my-cluster-network-interface") + .primaryIp(clusterNetworkInterfacePrimaryIpPrototypeModel) + .subnet(clusterNetworkSubnetIdentityModel) + .build(); + + // Invoke createClusterNetworkInterface() with a valid options model and verify the result + Response response = vpcService.createClusterNetworkInterface(createClusterNetworkInterfaceOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + ClusterNetworkInterface 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(), "DELETE"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteSubnetReservedIpPath); + assertEquals(parsedPath, createClusterNetworkInterfacePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteSubnetReservedIp operation with and without retries enabled + // Test the createClusterNetworkInterface operation with and without retries enabled @Test - public void testDeleteSubnetReservedIpWRetries() throws Throwable { + public void testCreateClusterNetworkInterfaceWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteSubnetReservedIpWOptions(); + testCreateClusterNetworkInterfaceWOptions(); vpcService.disableRetries(); - testDeleteSubnetReservedIpWOptions(); + testCreateClusterNetworkInterfaceWOptions(); } - // Test the deleteSubnetReservedIp operation with a null options model (negative test) + // Test the createClusterNetworkInterface operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteSubnetReservedIpNoOptions() throws Throwable { + public void testCreateClusterNetworkInterfaceNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteSubnetReservedIp(null).execute(); + vpcService.createClusterNetworkInterface(null).execute(); } - // Test the getSubnetReservedIp operation with a valid options model parameter + // Test the createClusterNetworkSubnet operation with a valid options model parameter @Test - public void testGetSubnetReservedIpWOptions() throws Throwable { + public void testCreateClusterNetworkSubnetWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"address\": \"192.168.3.4\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"lifecycle_state\": \"stable\", \"name\": \"my-reserved-ip\", \"owner\": \"provider\", \"resource_type\": \"subnet_reserved_ip\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"resource_type\": \"endpoint_gateway\"}}"; - String getSubnetReservedIpPath = "/subnets/testString/reserved_ips/testString"; + String mockResponseBody = "{\"available_ipv4_address_count\": 15, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"ip_version\": \"ipv4\", \"ipv4_cidr_block\": \"10.0.0.0/24\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\", \"total_ipv4_address_count\": 256}"; + String createClusterNetworkSubnetPath = "/cluster_networks/testString/subnets"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the GetSubnetReservedIpOptions model - GetSubnetReservedIpOptions getSubnetReservedIpOptionsModel = new GetSubnetReservedIpOptions.Builder() - .subnetId("testString") - .id("testString") + // Construct an instance of the ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype model + ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype clusterNetworkSubnetPrototypeModel = new ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype.Builder() + .ipVersion("ipv4") + .name("my-cluster-network-subnet") + .totalIpv4AddressCount(Long.valueOf("256")) .build(); - // Invoke getSubnetReservedIp() with a valid options model and verify the result - Response response = vpcService.getSubnetReservedIp(getSubnetReservedIpOptionsModel).execute(); + // Construct an instance of the CreateClusterNetworkSubnetOptions model + CreateClusterNetworkSubnetOptions createClusterNetworkSubnetOptionsModel = new CreateClusterNetworkSubnetOptions.Builder() + .clusterNetworkId("testString") + .clusterNetworkSubnetPrototype(clusterNetworkSubnetPrototypeModel) + .build(); + + // Invoke createClusterNetworkSubnet() with a valid options model and verify the result + Response response = vpcService.createClusterNetworkSubnet(createClusterNetworkSubnetOptionsModel).execute(); assertNotNull(response); - ReservedIP responseObj = response.getResult(); + ClusterNetworkSubnet responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getSubnetReservedIpPath); + assertEquals(parsedPath, createClusterNetworkSubnetPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getSubnetReservedIp operation with and without retries enabled + // Test the createClusterNetworkSubnet operation with and without retries enabled @Test - public void testGetSubnetReservedIpWRetries() throws Throwable { + public void testCreateClusterNetworkSubnetWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetSubnetReservedIpWOptions(); + testCreateClusterNetworkSubnetWOptions(); vpcService.disableRetries(); - testGetSubnetReservedIpWOptions(); + testCreateClusterNetworkSubnetWOptions(); } - // Test the getSubnetReservedIp operation with a null options model (negative test) + // Test the createClusterNetworkSubnet operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetSubnetReservedIpNoOptions() throws Throwable { + public void testCreateClusterNetworkSubnetNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getSubnetReservedIp(null).execute(); + vpcService.createClusterNetworkSubnet(null).execute(); } - // Test the updateSubnetReservedIp operation with a valid options model parameter + // Test the createClusterNetworkSubnetReservedIp operation with a valid options model parameter @Test - public void testUpdateSubnetReservedIpWOptions() throws Throwable { + public void testCreateClusterNetworkSubnetReservedIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"address\": \"192.168.3.4\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"lifecycle_state\": \"stable\", \"name\": \"my-reserved-ip\", \"owner\": \"provider\", \"resource_type\": \"subnet_reserved_ip\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"resource_type\": \"endpoint_gateway\"}}"; - String updateSubnetReservedIpPath = "/subnets/testString/reserved_ips/testString"; + String mockResponseBody = "{\"address\": \"10.1.0.6\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"owner\": \"user\", \"resource_type\": \"cluster_network_subnet_reserved_ip\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"name\": \"my-cluster-network-interface\", \"resource_type\": \"cluster_network_interface\"}}"; + String createClusterNetworkSubnetReservedIpPath = "/cluster_networks/testString/subnets/testString/reserved_ips"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the ReservedIPPatch model - ReservedIPPatch reservedIpPatchModel = new ReservedIPPatch.Builder() - .autoDelete(false) - .name("my-reserved-ip-updated") - .build(); - Map reservedIpPatchModelAsPatch = reservedIpPatchModel.asPatch(); - - // Construct an instance of the UpdateSubnetReservedIpOptions model - UpdateSubnetReservedIpOptions updateSubnetReservedIpOptionsModel = new UpdateSubnetReservedIpOptions.Builder() - .subnetId("testString") - .id("testString") - .reservedIpPatch(reservedIpPatchModelAsPatch) + // Construct an instance of the CreateClusterNetworkSubnetReservedIpOptions model + CreateClusterNetworkSubnetReservedIpOptions createClusterNetworkSubnetReservedIpOptionsModel = new CreateClusterNetworkSubnetReservedIpOptions.Builder() + .clusterNetworkId("testString") + .clusterNetworkSubnetId("testString") + .address("192.168.3.4") + .name("my-cluster-network-subnet-reserved-ip") .build(); - // Invoke updateSubnetReservedIp() with a valid options model and verify the result - Response response = vpcService.updateSubnetReservedIp(updateSubnetReservedIpOptionsModel).execute(); + // Invoke createClusterNetworkSubnetReservedIp() with a valid options model and verify the result + Response response = vpcService.createClusterNetworkSubnetReservedIp(createClusterNetworkSubnetReservedIpOptionsModel).execute(); assertNotNull(response); - ReservedIP responseObj = response.getResult(); + ClusterNetworkSubnetReservedIP responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateSubnetReservedIpPath); + assertEquals(parsedPath, createClusterNetworkSubnetReservedIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateSubnetReservedIp operation with and without retries enabled + // Test the createClusterNetworkSubnetReservedIp operation with and without retries enabled @Test - public void testUpdateSubnetReservedIpWRetries() throws Throwable { + public void testCreateClusterNetworkSubnetReservedIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateSubnetReservedIpWOptions(); + testCreateClusterNetworkSubnetReservedIpWOptions(); vpcService.disableRetries(); - testUpdateSubnetReservedIpWOptions(); + testCreateClusterNetworkSubnetReservedIpWOptions(); } - // Test the updateSubnetReservedIp operation with a null options model (negative test) + // Test the createClusterNetworkSubnetReservedIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateSubnetReservedIpNoOptions() throws Throwable { + public void testCreateClusterNetworkSubnetReservedIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateSubnetReservedIp(null).execute(); + vpcService.createClusterNetworkSubnetReservedIp(null).execute(); } - // Test the listImages operation with a valid options model parameter + // Test the deleteClusterNetwork operation with a valid options model parameter @Test - public void testListImagesWOptions() throws Throwable { + public void testDeleteClusterNetworkWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"images\": [{\"catalog_offering\": {\"managed\": false, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deprecation_at\": \"2019-01-01T12:00:00.000Z\", \"encryption\": \"user_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"file\": {\"checksums\": {\"sha256\": \"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15\"}, \"size\": 1}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"minimum_provisioned_size\": 22, \"name\": \"my-image\", \"obsolescence_at\": \"2019-01-01T12:00:00.000Z\", \"operating_system\": {\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}, \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"image\", \"source_volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"volume\"}, \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"user_data_format\": \"cloud_init\", \"visibility\": \"private\"}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listImagesPath = "/images"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"id\": \"0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network\", \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\", \"name\": \"h100\", \"resource_type\": \"cluster_network_profile\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"cluster_network\", \"subnet_prefixes\": [{\"allocation_policy\": \"auto\", \"cidr\": \"10.0.0.0/24\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String deleteClusterNetworkPath = "/cluster_networks/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the ListImagesOptions model - ListImagesOptions listImagesOptionsModel = new ListImagesOptions.Builder() - .start("testString") - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .name("my-name") - .status(java.util.Arrays.asList("available")) - .visibility("private") - .userDataFormat(java.util.Arrays.asList("cloud_init")) - .remoteAccountId("bb1b52262f7441a586f49068482f1e60") + // Construct an instance of the DeleteClusterNetworkOptions model + DeleteClusterNetworkOptions deleteClusterNetworkOptionsModel = new DeleteClusterNetworkOptions.Builder() + .id("testString") + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke listImages() with a valid options model and verify the result - Response response = vpcService.listImages(listImagesOptionsModel).execute(); + // Invoke deleteClusterNetwork() with a valid options model and verify the result + Response response = vpcService.deleteClusterNetwork(deleteClusterNetworkOptionsModel).execute(); assertNotNull(response); - ImageCollection responseObj = response.getResult(); + ClusterNetwork responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listImagesPath); + assertEquals(parsedPath, deleteClusterNetworkPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("resource_group.id"), "testString"); - assertEquals(query.get("name"), "my-name"); - assertEquals(query.get("status"), RequestUtils.join(java.util.Arrays.asList("available"), ",")); - assertEquals(query.get("visibility"), "private"); - assertEquals(query.get("user_data_format"), RequestUtils.join(java.util.Arrays.asList("cloud_init"), ",")); - assertEquals(query.get("remote.account.id"), "bb1b52262f7441a586f49068482f1e60"); } - // Test the listImages operation with and without retries enabled + // Test the deleteClusterNetwork operation with and without retries enabled @Test - public void testListImagesWRetries() throws Throwable { + public void testDeleteClusterNetworkWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListImagesWOptions(); + testDeleteClusterNetworkWOptions(); vpcService.disableRetries(); - testListImagesWOptions(); + testDeleteClusterNetworkWOptions(); } - // Test the listImages operation using the ImagesPager.getNext() method + // Test the deleteClusterNetwork operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testDeleteClusterNetworkNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.deleteClusterNetwork(null).execute(); + } + + // Test the deleteClusterNetworkInterface operation with a valid options model parameter @Test - public void testListImagesWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"images\":[{\"catalog_offering\":{\"managed\":false,\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deprecation_at\":\"2019-01-01T12:00:00.000Z\",\"encryption\":\"user_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"file\":{\"checksums\":{\"sha256\":\"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15\"},\"size\":1},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"minimum_provisioned_size\":22,\"name\":\"my-image\",\"obsolescence_at\":\"2019-01-01T12:00:00.000Z\",\"operating_system\":{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"},\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"}},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"image\",\"source_volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"volume\"},\"status\":\"available\",\"status_reasons\":[{\"code\":\"encryption_key_deleted\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"user_data_format\":\"cloud_init\",\"visibility\":\"private\"}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"images\":[{\"catalog_offering\":{\"managed\":false,\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deprecation_at\":\"2019-01-01T12:00:00.000Z\",\"encryption\":\"user_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"file\":{\"checksums\":{\"sha256\":\"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15\"},\"size\":1},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"minimum_provisioned_size\":22,\"name\":\"my-image\",\"obsolescence_at\":\"2019-01-01T12:00:00.000Z\",\"operating_system\":{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"},\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"}},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"image\",\"source_volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"volume\"},\"status\":\"available\",\"status_reasons\":[{\"code\":\"encryption_key_deleted\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"user_data_format\":\"cloud_init\",\"visibility\":\"private\"}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListImagesOptions listImagesOptions = new ListImagesOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .name("my-name") - .status(java.util.Arrays.asList("available")) - .visibility("private") - .userDataFormat(java.util.Arrays.asList("cloud_init")) - .remoteAccountId("bb1b52262f7441a586f49068482f1e60") - .build(); - - List allResults = new ArrayList<>(); - ImagesPager pager = new ImagesPager(vpcService, listImagesOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); - } - - // Test the listImages operation using the ImagesPager.getAll() method - @Test - public void testListImagesWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"images\":[{\"catalog_offering\":{\"managed\":false,\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deprecation_at\":\"2019-01-01T12:00:00.000Z\",\"encryption\":\"user_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"file\":{\"checksums\":{\"sha256\":\"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15\"},\"size\":1},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"minimum_provisioned_size\":22,\"name\":\"my-image\",\"obsolescence_at\":\"2019-01-01T12:00:00.000Z\",\"operating_system\":{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"},\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"}},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"image\",\"source_volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"volume\"},\"status\":\"available\",\"status_reasons\":[{\"code\":\"encryption_key_deleted\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"user_data_format\":\"cloud_init\",\"visibility\":\"private\"}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"images\":[{\"catalog_offering\":{\"managed\":false,\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deprecation_at\":\"2019-01-01T12:00:00.000Z\",\"encryption\":\"user_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"file\":{\"checksums\":{\"sha256\":\"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15\"},\"size\":1},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"minimum_provisioned_size\":22,\"name\":\"my-image\",\"obsolescence_at\":\"2019-01-01T12:00:00.000Z\",\"operating_system\":{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"},\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"}},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"image\",\"source_volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"volume\"},\"status\":\"available\",\"status_reasons\":[{\"code\":\"encryption_key_deleted\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"user_data_format\":\"cloud_init\",\"visibility\":\"private\"}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListImagesOptions listImagesOptions = new ListImagesOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .name("my-name") - .status(java.util.Arrays.asList("available")) - .visibility("private") - .userDataFormat(java.util.Arrays.asList("cloud_init")) - .remoteAccountId("bb1b52262f7441a586f49068482f1e60") - .build(); - - ImagesPager pager = new ImagesPager(vpcService, listImagesOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the createImage operation with a valid options model parameter - @Test - public void testCreateImageWOptions() throws Throwable { + public void testDeleteClusterNetworkInterfaceWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"catalog_offering\": {\"managed\": false, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deprecation_at\": \"2019-01-01T12:00:00.000Z\", \"encryption\": \"user_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"file\": {\"checksums\": {\"sha256\": \"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15\"}, \"size\": 1}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"minimum_provisioned_size\": 22, \"name\": \"my-image\", \"obsolescence_at\": \"2019-01-01T12:00:00.000Z\", \"operating_system\": {\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}, \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"image\", \"source_volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"volume\"}, \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"user_data_format\": \"cloud_init\", \"visibility\": \"private\"}"; - String createImagePath = "/images"; + String mockResponseBody = "{\"allow_ip_spoofing\": true, \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"enable_infrastructure_nat\": false, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"mac_address\": \"02:00:4D:45:45:4D\", \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"address\": \"10.1.0.6\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"resource_type\": \"cluster_network_subnet_reserved_ip\"}, \"resource_type\": \"cluster_network_interface\", \"subnet\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\"}, \"target\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String deleteClusterNetworkInterfacePath = "/cluster_networks/testString/interfaces/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); - - // Construct an instance of the EncryptionKeyIdentityByCRN model - EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() - .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") - .build(); - - // Construct an instance of the ImageFilePrototype model - ImageFilePrototype imageFilePrototypeModel = new ImageFilePrototype.Builder() - .href("cos://us-south/my-bucket/my-image.qcow2") - .build(); - - // Construct an instance of the OperatingSystemIdentityByName model - OperatingSystemIdentityByName operatingSystemIdentityModel = new OperatingSystemIdentityByName.Builder() - .name("debian-9-amd64") - .build(); - - // Construct an instance of the ImagePrototypeImageByFile model - ImagePrototypeImageByFile imagePrototypeModel = new ImagePrototypeImageByFile.Builder() - .deprecationAt(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) - .name("my-image") - .obsolescenceAt(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) - .resourceGroup(resourceGroupIdentityModel) - .encryptedDataKey("testString") - .encryptionKey(encryptionKeyIdentityModel) - .file(imageFilePrototypeModel) - .operatingSystem(operatingSystemIdentityModel) - .build(); - - // Construct an instance of the CreateImageOptions model - CreateImageOptions createImageOptionsModel = new CreateImageOptions.Builder() - .imagePrototype(imagePrototypeModel) + // Construct an instance of the DeleteClusterNetworkInterfaceOptions model + DeleteClusterNetworkInterfaceOptions deleteClusterNetworkInterfaceOptionsModel = new DeleteClusterNetworkInterfaceOptions.Builder() + .clusterNetworkId("testString") + .id("testString") + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke createImage() with a valid options model and verify the result - Response response = vpcService.createImage(createImageOptionsModel).execute(); + // Invoke deleteClusterNetworkInterface() with a valid options model and verify the result + Response response = vpcService.deleteClusterNetworkInterface(deleteClusterNetworkInterfaceOptionsModel).execute(); assertNotNull(response); - Image responseObj = response.getResult(); + ClusterNetworkInterface responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createImagePath); + assertEquals(parsedPath, deleteClusterNetworkInterfacePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createImage operation with and without retries enabled + // Test the deleteClusterNetworkInterface operation with and without retries enabled @Test - public void testCreateImageWRetries() throws Throwable { + public void testDeleteClusterNetworkInterfaceWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateImageWOptions(); + testDeleteClusterNetworkInterfaceWOptions(); vpcService.disableRetries(); - testCreateImageWOptions(); + testDeleteClusterNetworkInterfaceWOptions(); } - // Test the createImage operation with a null options model (negative test) + // Test the deleteClusterNetworkInterface operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateImageNoOptions() throws Throwable { + public void testDeleteClusterNetworkInterfaceNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createImage(null).execute(); + vpcService.deleteClusterNetworkInterface(null).execute(); } - // Test the deleteImage operation with a valid options model parameter + // Test the deleteClusterNetworkSubnet operation with a valid options model parameter @Test - public void testDeleteImageWOptions() throws Throwable { + public void testDeleteClusterNetworkSubnetWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteImagePath = "/images/testString"; + String mockResponseBody = "{\"available_ipv4_address_count\": 15, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"ip_version\": \"ipv4\", \"ipv4_cidr_block\": \"10.0.0.0/24\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\", \"total_ipv4_address_count\": 256}"; + String deleteClusterNetworkSubnetPath = "/cluster_networks/testString/subnets/testString"; server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the DeleteImageOptions model - DeleteImageOptions deleteImageOptionsModel = new DeleteImageOptions.Builder() + // Construct an instance of the DeleteClusterNetworkSubnetOptions model + DeleteClusterNetworkSubnetOptions deleteClusterNetworkSubnetOptionsModel = new DeleteClusterNetworkSubnetOptions.Builder() + .clusterNetworkId("testString") .id("testString") + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke deleteImage() with a valid options model and verify the result - Response response = vpcService.deleteImage(deleteImageOptionsModel).execute(); + // Invoke deleteClusterNetworkSubnet() with a valid options model and verify the result + Response response = vpcService.deleteClusterNetworkSubnet(deleteClusterNetworkSubnetOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + ClusterNetworkSubnet responseObj = response.getResult(); + assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); @@ -5789,271 +5770,268 @@ public void testDeleteImageWOptions() throws Throwable { assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteImagePath); + assertEquals(parsedPath, deleteClusterNetworkSubnetPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteImage operation with and without retries enabled + // Test the deleteClusterNetworkSubnet operation with and without retries enabled @Test - public void testDeleteImageWRetries() throws Throwable { + public void testDeleteClusterNetworkSubnetWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteImageWOptions(); + testDeleteClusterNetworkSubnetWOptions(); vpcService.disableRetries(); - testDeleteImageWOptions(); + testDeleteClusterNetworkSubnetWOptions(); } - // Test the deleteImage operation with a null options model (negative test) + // Test the deleteClusterNetworkSubnet operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteImageNoOptions() throws Throwable { + public void testDeleteClusterNetworkSubnetNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteImage(null).execute(); + vpcService.deleteClusterNetworkSubnet(null).execute(); } - // Test the getImage operation with a valid options model parameter + // Test the deleteClusterNetworkSubnetReservedIp operation with a valid options model parameter @Test - public void testGetImageWOptions() throws Throwable { + public void testDeleteClusterNetworkSubnetReservedIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"catalog_offering\": {\"managed\": false, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deprecation_at\": \"2019-01-01T12:00:00.000Z\", \"encryption\": \"user_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"file\": {\"checksums\": {\"sha256\": \"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15\"}, \"size\": 1}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"minimum_provisioned_size\": 22, \"name\": \"my-image\", \"obsolescence_at\": \"2019-01-01T12:00:00.000Z\", \"operating_system\": {\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}, \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"image\", \"source_volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"volume\"}, \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"user_data_format\": \"cloud_init\", \"visibility\": \"private\"}"; - String getImagePath = "/images/testString"; + String mockResponseBody = "{\"address\": \"10.1.0.6\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"owner\": \"user\", \"resource_type\": \"cluster_network_subnet_reserved_ip\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"name\": \"my-cluster-network-interface\", \"resource_type\": \"cluster_network_interface\"}}"; + String deleteClusterNetworkSubnetReservedIpPath = "/cluster_networks/testString/subnets/testString/reserved_ips/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the GetImageOptions model - GetImageOptions getImageOptionsModel = new GetImageOptions.Builder() + // Construct an instance of the DeleteClusterNetworkSubnetReservedIpOptions model + DeleteClusterNetworkSubnetReservedIpOptions deleteClusterNetworkSubnetReservedIpOptionsModel = new DeleteClusterNetworkSubnetReservedIpOptions.Builder() + .clusterNetworkId("testString") + .clusterNetworkSubnetId("testString") .id("testString") + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke getImage() with a valid options model and verify the result - Response response = vpcService.getImage(getImageOptionsModel).execute(); + // Invoke deleteClusterNetworkSubnetReservedIp() with a valid options model and verify the result + Response response = vpcService.deleteClusterNetworkSubnetReservedIp(deleteClusterNetworkSubnetReservedIpOptionsModel).execute(); assertNotNull(response); - Image responseObj = response.getResult(); + ClusterNetworkSubnetReservedIP responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getImagePath); + assertEquals(parsedPath, deleteClusterNetworkSubnetReservedIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getImage operation with and without retries enabled + // Test the deleteClusterNetworkSubnetReservedIp operation with and without retries enabled @Test - public void testGetImageWRetries() throws Throwable { + public void testDeleteClusterNetworkSubnetReservedIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetImageWOptions(); + testDeleteClusterNetworkSubnetReservedIpWOptions(); vpcService.disableRetries(); - testGetImageWOptions(); + testDeleteClusterNetworkSubnetReservedIpWOptions(); } - // Test the getImage operation with a null options model (negative test) + // Test the deleteClusterNetworkSubnetReservedIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetImageNoOptions() throws Throwable { + public void testDeleteClusterNetworkSubnetReservedIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getImage(null).execute(); + vpcService.deleteClusterNetworkSubnetReservedIp(null).execute(); } - // Test the updateImage operation with a valid options model parameter + // Test the getClusterNetwork operation with a valid options model parameter @Test - public void testUpdateImageWOptions() throws Throwable { + public void testGetClusterNetworkWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"catalog_offering\": {\"managed\": false, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deprecation_at\": \"2019-01-01T12:00:00.000Z\", \"encryption\": \"user_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"file\": {\"checksums\": {\"sha256\": \"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15\"}, \"size\": 1}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"minimum_provisioned_size\": 22, \"name\": \"my-image\", \"obsolescence_at\": \"2019-01-01T12:00:00.000Z\", \"operating_system\": {\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}, \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"image\", \"source_volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"volume\"}, \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"user_data_format\": \"cloud_init\", \"visibility\": \"private\"}"; - String updateImagePath = "/images/testString"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"id\": \"0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network\", \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\", \"name\": \"h100\", \"resource_type\": \"cluster_network_profile\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"cluster_network\", \"subnet_prefixes\": [{\"allocation_policy\": \"auto\", \"cidr\": \"10.0.0.0/24\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String getClusterNetworkPath = "/cluster_networks/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ImagePatch model - ImagePatch imagePatchModel = new ImagePatch.Builder() - .deprecationAt(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) - .name("my-image") - .obsolescenceAt(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) - .build(); - Map imagePatchModelAsPatch = imagePatchModel.asPatch(); - - // Construct an instance of the UpdateImageOptions model - UpdateImageOptions updateImageOptionsModel = new UpdateImageOptions.Builder() + // Construct an instance of the GetClusterNetworkOptions model + GetClusterNetworkOptions getClusterNetworkOptionsModel = new GetClusterNetworkOptions.Builder() .id("testString") - .imagePatch(imagePatchModelAsPatch) .build(); - // Invoke updateImage() with a valid options model and verify the result - Response response = vpcService.updateImage(updateImageOptionsModel).execute(); + // Invoke getClusterNetwork() with a valid options model and verify the result + Response response = vpcService.getClusterNetwork(getClusterNetworkOptionsModel).execute(); assertNotNull(response); - Image responseObj = response.getResult(); + ClusterNetwork responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateImagePath); + assertEquals(parsedPath, getClusterNetworkPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateImage operation with and without retries enabled + // Test the getClusterNetwork operation with and without retries enabled @Test - public void testUpdateImageWRetries() throws Throwable { + public void testGetClusterNetworkWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateImageWOptions(); + testGetClusterNetworkWOptions(); vpcService.disableRetries(); - testUpdateImageWOptions(); + testGetClusterNetworkWOptions(); } - // Test the updateImage operation with a null options model (negative test) + // Test the getClusterNetwork operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateImageNoOptions() throws Throwable { + public void testGetClusterNetworkNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateImage(null).execute(); + vpcService.getClusterNetwork(null).execute(); } - // Test the deprecateImage operation with a valid options model parameter + // Test the getClusterNetworkInterface operation with a valid options model parameter @Test - public void testDeprecateImageWOptions() throws Throwable { + public void testGetClusterNetworkInterfaceWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deprecateImagePath = "/images/testString/deprecate"; + String mockResponseBody = "{\"allow_ip_spoofing\": true, \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"enable_infrastructure_nat\": false, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"mac_address\": \"02:00:4D:45:45:4D\", \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"address\": \"10.1.0.6\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"resource_type\": \"cluster_network_subnet_reserved_ip\"}, \"resource_type\": \"cluster_network_interface\", \"subnet\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\"}, \"target\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String getClusterNetworkInterfacePath = "/cluster_networks/testString/interfaces/testString"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeprecateImageOptions model - DeprecateImageOptions deprecateImageOptionsModel = new DeprecateImageOptions.Builder() + // Construct an instance of the GetClusterNetworkInterfaceOptions model + GetClusterNetworkInterfaceOptions getClusterNetworkInterfaceOptionsModel = new GetClusterNetworkInterfaceOptions.Builder() + .clusterNetworkId("testString") .id("testString") .build(); - // Invoke deprecateImage() with a valid options model and verify the result - Response response = vpcService.deprecateImage(deprecateImageOptionsModel).execute(); + // Invoke getClusterNetworkInterface() with a valid options model and verify the result + Response response = vpcService.getClusterNetworkInterface(getClusterNetworkInterfaceOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + ClusterNetworkInterface responseObj = response.getResult(); + assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deprecateImagePath); + assertEquals(parsedPath, getClusterNetworkInterfacePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deprecateImage operation with and without retries enabled + // Test the getClusterNetworkInterface operation with and without retries enabled @Test - public void testDeprecateImageWRetries() throws Throwable { + public void testGetClusterNetworkInterfaceWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeprecateImageWOptions(); + testGetClusterNetworkInterfaceWOptions(); vpcService.disableRetries(); - testDeprecateImageWOptions(); + testGetClusterNetworkInterfaceWOptions(); } - // Test the deprecateImage operation with a null options model (negative test) + // Test the getClusterNetworkInterface operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeprecateImageNoOptions() throws Throwable { + public void testGetClusterNetworkInterfaceNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deprecateImage(null).execute(); + vpcService.getClusterNetworkInterface(null).execute(); } - // Test the obsoleteImage operation with a valid options model parameter + // Test the getClusterNetworkProfile operation with a valid options model parameter @Test - public void testObsoleteImageWOptions() throws Throwable { + public void testGetClusterNetworkProfileWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String obsoleteImagePath = "/images/testString/obsolete"; + String mockResponseBody = "{\"family\": \"vela\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\", \"name\": \"h100\", \"resource_type\": \"cluster_network_profile\", \"supported_instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"zones\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}]}"; + String getClusterNetworkProfilePath = "/cluster_network/profiles/h100"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ObsoleteImageOptions model - ObsoleteImageOptions obsoleteImageOptionsModel = new ObsoleteImageOptions.Builder() - .id("testString") + // Construct an instance of the GetClusterNetworkProfileOptions model + GetClusterNetworkProfileOptions getClusterNetworkProfileOptionsModel = new GetClusterNetworkProfileOptions.Builder() + .name("h100") .build(); - // Invoke obsoleteImage() with a valid options model and verify the result - Response response = vpcService.obsoleteImage(obsoleteImageOptionsModel).execute(); + // Invoke getClusterNetworkProfile() with a valid options model and verify the result + Response response = vpcService.getClusterNetworkProfile(getClusterNetworkProfileOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + ClusterNetworkProfile responseObj = response.getResult(); + assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, obsoleteImagePath); + assertEquals(parsedPath, getClusterNetworkProfilePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the obsoleteImage operation with and without retries enabled + // Test the getClusterNetworkProfile operation with and without retries enabled @Test - public void testObsoleteImageWRetries() throws Throwable { + public void testGetClusterNetworkProfileWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testObsoleteImageWOptions(); + testGetClusterNetworkProfileWOptions(); vpcService.disableRetries(); - testObsoleteImageWOptions(); + testGetClusterNetworkProfileWOptions(); } - // Test the obsoleteImage operation with a null options model (negative test) + // Test the getClusterNetworkProfile operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testObsoleteImageNoOptions() throws Throwable { + public void testGetClusterNetworkProfileNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.obsoleteImage(null).execute(); + vpcService.getClusterNetworkProfile(null).execute(); } - // Test the listImageExportJobs operation with a valid options model parameter + // Test the getClusterNetworkSubnet operation with a valid options model parameter @Test - public void testListImageExportJobsWOptions() throws Throwable { + public void testGetClusterNetworkSubnetWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"export_jobs\": [{\"completed_at\": \"2019-01-01T12:00:00.000Z\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"encrypted_data_key\": \"VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=\", \"format\": \"qcow2\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r006-095e9baf-01d4-4e29-986e-20d26606b82a\", \"id\": \"r006-095e9baf-01d4-4e29-986e-20d26606b82a\", \"name\": \"my-image-export-job\", \"resource_type\": \"image_export_job\", \"started_at\": \"2019-01-01T12:00:00.000Z\", \"status\": \"deleting\", \"status_reasons\": [{\"code\": \"cannot_access_storage_bucket\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq\"}], \"storage_bucket\": {\"crn\": \"crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:bucket-27200-lwx4cfvcue\", \"name\": \"bucket-27200-lwx4cfvcue\"}, \"storage_href\": \"cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2\", \"storage_object\": {\"name\": \"my-object\"}}]}"; - String listImageExportJobsPath = "/images/testString/export_jobs"; + String mockResponseBody = "{\"available_ipv4_address_count\": 15, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"ip_version\": \"ipv4\", \"ipv4_cidr_block\": \"10.0.0.0/24\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\", \"total_ipv4_address_count\": 256}"; + String getClusterNetworkSubnetPath = "/cluster_networks/testString/subnets/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListImageExportJobsOptions model - ListImageExportJobsOptions listImageExportJobsOptionsModel = new ListImageExportJobsOptions.Builder() - .imageId("testString") - .name("my-name") + // Construct an instance of the GetClusterNetworkSubnetOptions model + GetClusterNetworkSubnetOptions getClusterNetworkSubnetOptionsModel = new GetClusterNetworkSubnetOptions.Builder() + .clusterNetworkId("testString") + .id("testString") .build(); - // Invoke listImageExportJobs() with a valid options model and verify the result - Response response = vpcService.listImageExportJobs(listImageExportJobsOptionsModel).execute(); + // Invoke getClusterNetworkSubnet() with a valid options model and verify the result + Response response = vpcService.getClusterNetworkSubnet(getClusterNetworkSubnetOptionsModel).execute(); assertNotNull(response); - ImageExportJobUnpaginatedCollection responseObj = response.getResult(); + ClusterNetworkSubnet responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -6062,282 +6040,351 @@ public void testListImageExportJobsWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listImageExportJobsPath); + assertEquals(parsedPath, getClusterNetworkSubnetPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("name"), "my-name"); } - // Test the listImageExportJobs operation with and without retries enabled + // Test the getClusterNetworkSubnet operation with and without retries enabled @Test - public void testListImageExportJobsWRetries() throws Throwable { + public void testGetClusterNetworkSubnetWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListImageExportJobsWOptions(); + testGetClusterNetworkSubnetWOptions(); vpcService.disableRetries(); - testListImageExportJobsWOptions(); + testGetClusterNetworkSubnetWOptions(); } - // Test the listImageExportJobs operation with a null options model (negative test) + // Test the getClusterNetworkSubnet operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListImageExportJobsNoOptions() throws Throwable { + public void testGetClusterNetworkSubnetNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listImageExportJobs(null).execute(); + vpcService.getClusterNetworkSubnet(null).execute(); } - // Test the createImageExportJob operation with a valid options model parameter + // Test the getClusterNetworkSubnetReservedIp operation with a valid options model parameter @Test - public void testCreateImageExportJobWOptions() throws Throwable { + public void testGetClusterNetworkSubnetReservedIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"completed_at\": \"2019-01-01T12:00:00.000Z\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"encrypted_data_key\": \"VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=\", \"format\": \"qcow2\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r006-095e9baf-01d4-4e29-986e-20d26606b82a\", \"id\": \"r006-095e9baf-01d4-4e29-986e-20d26606b82a\", \"name\": \"my-image-export-job\", \"resource_type\": \"image_export_job\", \"started_at\": \"2019-01-01T12:00:00.000Z\", \"status\": \"deleting\", \"status_reasons\": [{\"code\": \"cannot_access_storage_bucket\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq\"}], \"storage_bucket\": {\"crn\": \"crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:bucket-27200-lwx4cfvcue\", \"name\": \"bucket-27200-lwx4cfvcue\"}, \"storage_href\": \"cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2\", \"storage_object\": {\"name\": \"my-object\"}}"; - String createImageExportJobPath = "/images/testString/export_jobs"; + String mockResponseBody = "{\"address\": \"10.1.0.6\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"owner\": \"user\", \"resource_type\": \"cluster_network_subnet_reserved_ip\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"name\": \"my-cluster-network-interface\", \"resource_type\": \"cluster_network_interface\"}}"; + String getClusterNetworkSubnetReservedIpPath = "/cluster_networks/testString/subnets/testString/reserved_ips/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName model - CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName cloudObjectStorageBucketIdentityModel = new CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName.Builder() - .name("bucket-27200-lwx4cfvcue") - .build(); - - // Construct an instance of the CreateImageExportJobOptions model - CreateImageExportJobOptions createImageExportJobOptionsModel = new CreateImageExportJobOptions.Builder() - .imageId("testString") - .storageBucket(cloudObjectStorageBucketIdentityModel) - .format("qcow2") - .name("my-image-export") + // Construct an instance of the GetClusterNetworkSubnetReservedIpOptions model + GetClusterNetworkSubnetReservedIpOptions getClusterNetworkSubnetReservedIpOptionsModel = new GetClusterNetworkSubnetReservedIpOptions.Builder() + .clusterNetworkId("testString") + .clusterNetworkSubnetId("testString") + .id("testString") .build(); - // Invoke createImageExportJob() with a valid options model and verify the result - Response response = vpcService.createImageExportJob(createImageExportJobOptionsModel).execute(); + // Invoke getClusterNetworkSubnetReservedIp() with a valid options model and verify the result + Response response = vpcService.getClusterNetworkSubnetReservedIp(getClusterNetworkSubnetReservedIpOptionsModel).execute(); assertNotNull(response); - ImageExportJob responseObj = response.getResult(); + ClusterNetworkSubnetReservedIP responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createImageExportJobPath); + assertEquals(parsedPath, getClusterNetworkSubnetReservedIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createImageExportJob operation with and without retries enabled + // Test the getClusterNetworkSubnetReservedIp operation with and without retries enabled @Test - public void testCreateImageExportJobWRetries() throws Throwable { + public void testGetClusterNetworkSubnetReservedIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateImageExportJobWOptions(); + testGetClusterNetworkSubnetReservedIpWOptions(); vpcService.disableRetries(); - testCreateImageExportJobWOptions(); + testGetClusterNetworkSubnetReservedIpWOptions(); } - // Test the createImageExportJob operation with a null options model (negative test) + // Test the getClusterNetworkSubnetReservedIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateImageExportJobNoOptions() throws Throwable { + public void testGetClusterNetworkSubnetReservedIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createImageExportJob(null).execute(); + vpcService.getClusterNetworkSubnetReservedIp(null).execute(); } - // Test the deleteImageExportJob operation with a valid options model parameter + // Test the listClusterNetworkInterfaces operation with a valid options model parameter @Test - public void testDeleteImageExportJobWOptions() throws Throwable { + public void testListClusterNetworkInterfacesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteImageExportJobPath = "/images/testString/export_jobs/testString"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"interfaces\": [{\"allow_ip_spoofing\": true, \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"enable_infrastructure_nat\": false, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"mac_address\": \"02:00:4D:45:45:4D\", \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"address\": \"10.1.0.6\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"resource_type\": \"cluster_network_subnet_reserved_ip\"}, \"resource_type\": \"cluster_network_interface\", \"subnet\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\"}, \"target\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listClusterNetworkInterfacesPath = "/cluster_networks/testString/interfaces"; server.enqueue(new MockResponse() - .setResponseCode(202) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteImageExportJobOptions model - DeleteImageExportJobOptions deleteImageExportJobOptionsModel = new DeleteImageExportJobOptions.Builder() - .imageId("testString") - .id("testString") + // Construct an instance of the ListClusterNetworkInterfacesOptions model + ListClusterNetworkInterfacesOptions listClusterNetworkInterfacesOptionsModel = new ListClusterNetworkInterfacesOptions.Builder() + .clusterNetworkId("testString") + .start("testString") + .limit(Long.valueOf("10")) + .name("my-name") + .sort("name") .build(); - // Invoke deleteImageExportJob() with a valid options model and verify the result - Response response = vpcService.deleteImageExportJob(deleteImageExportJobOptionsModel).execute(); + // Invoke listClusterNetworkInterfaces() with a valid options model and verify the result + Response response = vpcService.listClusterNetworkInterfaces(listClusterNetworkInterfacesOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + ClusterNetworkInterfaceCollection 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteImageExportJobPath); + assertEquals(parsedPath, listClusterNetworkInterfacesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("name"), "my-name"); + assertEquals(query.get("sort"), "name"); } - // Test the deleteImageExportJob operation with and without retries enabled + // Test the listClusterNetworkInterfaces operation with and without retries enabled @Test - public void testDeleteImageExportJobWRetries() throws Throwable { + public void testListClusterNetworkInterfacesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteImageExportJobWOptions(); + testListClusterNetworkInterfacesWOptions(); vpcService.disableRetries(); - testDeleteImageExportJobWOptions(); + testListClusterNetworkInterfacesWOptions(); } - // Test the deleteImageExportJob operation with a null options model (negative test) + // Test the listClusterNetworkInterfaces operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteImageExportJobNoOptions() throws Throwable { + public void testListClusterNetworkInterfacesNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteImageExportJob(null).execute(); + vpcService.listClusterNetworkInterfaces(null).execute(); } - // Test the getImageExportJob operation with a valid options model parameter + // Test the listClusterNetworkInterfaces operation using the ClusterNetworkInterfacesPager.getNext() method @Test - public void testGetImageExportJobWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"completed_at\": \"2019-01-01T12:00:00.000Z\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"encrypted_data_key\": \"VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=\", \"format\": \"qcow2\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r006-095e9baf-01d4-4e29-986e-20d26606b82a\", \"id\": \"r006-095e9baf-01d4-4e29-986e-20d26606b82a\", \"name\": \"my-image-export-job\", \"resource_type\": \"image_export_job\", \"started_at\": \"2019-01-01T12:00:00.000Z\", \"status\": \"deleting\", \"status_reasons\": [{\"code\": \"cannot_access_storage_bucket\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq\"}], \"storage_bucket\": {\"crn\": \"crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:bucket-27200-lwx4cfvcue\", \"name\": \"bucket-27200-lwx4cfvcue\"}, \"storage_href\": \"cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2\", \"storage_object\": {\"name\": \"my-object\"}}"; - String getImageExportJobPath = "/images/testString/export_jobs/testString"; + public void testListClusterNetworkInterfacesWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"interfaces\":[{\"allow_ip_spoofing\":true,\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"enable_infrastructure_nat\":false,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"id\":\"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"mac_address\":\"02:00:4D:45:45:4D\",\"name\":\"my-cluster-network-interface\",\"primary_ip\":{\"address\":\"10.1.0.6\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"id\":\"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"name\":\"my-cluster-network-subnet-reserved-ip\",\"resource_type\":\"cluster_network_subnet_reserved_ip\"},\"resource_type\":\"cluster_network_interface\",\"subnet\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"id\":\"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"name\":\"my-cluster-network-subnet\",\"resource_type\":\"cluster_network_subnet\"},\"target\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"interfaces\":[{\"allow_ip_spoofing\":true,\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"enable_infrastructure_nat\":false,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"id\":\"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"mac_address\":\"02:00:4D:45:45:4D\",\"name\":\"my-cluster-network-interface\",\"primary_ip\":{\"address\":\"10.1.0.6\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"id\":\"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"name\":\"my-cluster-network-subnet-reserved-ip\",\"resource_type\":\"cluster_network_subnet_reserved_ip\"},\"resource_type\":\"cluster_network_interface\",\"subnet\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"id\":\"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"name\":\"my-cluster-network-subnet\",\"resource_type\":\"cluster_network_subnet\"},\"target\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) - .setBody(mockResponseBody)); + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the GetImageExportJobOptions model - GetImageExportJobOptions getImageExportJobOptionsModel = new GetImageExportJobOptions.Builder() - .imageId("testString") - .id("testString") + ListClusterNetworkInterfacesOptions listClusterNetworkInterfacesOptions = new ListClusterNetworkInterfacesOptions.Builder() + .clusterNetworkId("testString") + .limit(Long.valueOf("10")) + .name("my-name") + .sort("name") .build(); - // Invoke getImageExportJob() with a valid options model and verify the result - Response response = vpcService.getImageExportJob(getImageExportJobOptionsModel).execute(); - assertNotNull(response); - ImageExportJob responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getImageExportJobPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + List allResults = new ArrayList<>(); + ClusterNetworkInterfacesPager pager = new ClusterNetworkInterfacesPager(vpcService, listClusterNetworkInterfacesOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } - - // Test the getImageExportJob operation with and without retries enabled + + // Test the listClusterNetworkInterfaces operation using the ClusterNetworkInterfacesPager.getAll() method @Test - public void testGetImageExportJobWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testGetImageExportJobWOptions(); + public void testListClusterNetworkInterfacesWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"interfaces\":[{\"allow_ip_spoofing\":true,\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"enable_infrastructure_nat\":false,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"id\":\"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"mac_address\":\"02:00:4D:45:45:4D\",\"name\":\"my-cluster-network-interface\",\"primary_ip\":{\"address\":\"10.1.0.6\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"id\":\"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"name\":\"my-cluster-network-subnet-reserved-ip\",\"resource_type\":\"cluster_network_subnet_reserved_ip\"},\"resource_type\":\"cluster_network_interface\",\"subnet\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"id\":\"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"name\":\"my-cluster-network-subnet\",\"resource_type\":\"cluster_network_subnet\"},\"target\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"interfaces\":[{\"allow_ip_spoofing\":true,\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"enable_infrastructure_nat\":false,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"id\":\"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"mac_address\":\"02:00:4D:45:45:4D\",\"name\":\"my-cluster-network-interface\",\"primary_ip\":{\"address\":\"10.1.0.6\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"id\":\"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"name\":\"my-cluster-network-subnet-reserved-ip\",\"resource_type\":\"cluster_network_subnet_reserved_ip\"},\"resource_type\":\"cluster_network_interface\",\"subnet\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"id\":\"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"name\":\"my-cluster-network-subnet\",\"resource_type\":\"cluster_network_subnet\"},\"target\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - vpcService.disableRetries(); - testGetImageExportJobWOptions(); - } + ListClusterNetworkInterfacesOptions listClusterNetworkInterfacesOptions = new ListClusterNetworkInterfacesOptions.Builder() + .clusterNetworkId("testString") + .limit(Long.valueOf("10")) + .name("my-name") + .sort("name") + .build(); - // Test the getImageExportJob operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetImageExportJobNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.getImageExportJob(null).execute(); + ClusterNetworkInterfacesPager pager = new ClusterNetworkInterfacesPager(vpcService, listClusterNetworkInterfacesOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); } - - // Test the updateImageExportJob operation with a valid options model parameter + + // Test the listClusterNetworkProfiles operation with a valid options model parameter @Test - public void testUpdateImageExportJobWOptions() throws Throwable { + public void testListClusterNetworkProfilesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"completed_at\": \"2019-01-01T12:00:00.000Z\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"encrypted_data_key\": \"VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=\", \"format\": \"qcow2\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r006-095e9baf-01d4-4e29-986e-20d26606b82a\", \"id\": \"r006-095e9baf-01d4-4e29-986e-20d26606b82a\", \"name\": \"my-image-export-job\", \"resource_type\": \"image_export_job\", \"started_at\": \"2019-01-01T12:00:00.000Z\", \"status\": \"deleting\", \"status_reasons\": [{\"code\": \"cannot_access_storage_bucket\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq\"}], \"storage_bucket\": {\"crn\": \"crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:bucket-27200-lwx4cfvcue\", \"name\": \"bucket-27200-lwx4cfvcue\"}, \"storage_href\": \"cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2\", \"storage_object\": {\"name\": \"my-object\"}}"; - String updateImageExportJobPath = "/images/testString/export_jobs/testString"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"profiles\": [{\"family\": \"vela\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\", \"name\": \"h100\", \"resource_type\": \"cluster_network_profile\", \"supported_instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"zones\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}]}], \"total_count\": 132}"; + String listClusterNetworkProfilesPath = "/cluster_network/profiles"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ImageExportJobPatch model - ImageExportJobPatch imageExportJobPatchModel = new ImageExportJobPatch.Builder() - .name("my-image-export-job-updated") - .build(); - Map imageExportJobPatchModelAsPatch = imageExportJobPatchModel.asPatch(); - - // Construct an instance of the UpdateImageExportJobOptions model - UpdateImageExportJobOptions updateImageExportJobOptionsModel = new UpdateImageExportJobOptions.Builder() - .imageId("testString") - .id("testString") - .imageExportJobPatch(imageExportJobPatchModelAsPatch) + // Construct an instance of the ListClusterNetworkProfilesOptions model + ListClusterNetworkProfilesOptions listClusterNetworkProfilesOptionsModel = new ListClusterNetworkProfilesOptions.Builder() + .start("testString") + .limit(Long.valueOf("10")) .build(); - // Invoke updateImageExportJob() with a valid options model and verify the result - Response response = vpcService.updateImageExportJob(updateImageExportJobOptionsModel).execute(); + // Invoke listClusterNetworkProfiles() with a valid options model and verify the result + Response response = vpcService.listClusterNetworkProfiles(listClusterNetworkProfilesOptionsModel).execute(); assertNotNull(response); - ImageExportJob responseObj = response.getResult(); + ClusterNetworkProfileCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateImageExportJobPath); + assertEquals(parsedPath, listClusterNetworkProfilesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the updateImageExportJob operation with and without retries enabled + // Test the listClusterNetworkProfiles operation with and without retries enabled @Test - public void testUpdateImageExportJobWRetries() throws Throwable { + public void testListClusterNetworkProfilesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateImageExportJobWOptions(); + testListClusterNetworkProfilesWOptions(); vpcService.disableRetries(); - testUpdateImageExportJobWOptions(); + testListClusterNetworkProfilesWOptions(); } - // Test the updateImageExportJob operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateImageExportJobNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.updateImageExportJob(null).execute(); + // Test the listClusterNetworkProfiles operation using the ClusterNetworkProfilesPager.getNext() method + @Test + public void testListClusterNetworkProfilesWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"profiles\":[{\"family\":\"vela\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\",\"name\":\"h100\",\"resource_type\":\"cluster_network_profile\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"zones\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}]}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"profiles\":[{\"family\":\"vela\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\",\"name\":\"h100\",\"resource_type\":\"cluster_network_profile\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"zones\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}]}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListClusterNetworkProfilesOptions listClusterNetworkProfilesOptions = new ListClusterNetworkProfilesOptions.Builder() + .limit(Long.valueOf("10")) + .build(); + + List allResults = new ArrayList<>(); + ClusterNetworkProfilesPager pager = new ClusterNetworkProfilesPager(vpcService, listClusterNetworkProfilesOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } + + // Test the listClusterNetworkProfiles operation using the ClusterNetworkProfilesPager.getAll() method + @Test + public void testListClusterNetworkProfilesWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"profiles\":[{\"family\":\"vela\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\",\"name\":\"h100\",\"resource_type\":\"cluster_network_profile\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"zones\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}]}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"profiles\":[{\"family\":\"vela\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\",\"name\":\"h100\",\"resource_type\":\"cluster_network_profile\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"zones\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}]}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Test the listOperatingSystems operation with a valid options model parameter + ListClusterNetworkProfilesOptions listClusterNetworkProfilesOptions = new ListClusterNetworkProfilesOptions.Builder() + .limit(Long.valueOf("10")) + .build(); + + ClusterNetworkProfilesPager pager = new ClusterNetworkProfilesPager(vpcService, listClusterNetworkProfilesOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); + } + + // Test the listClusterNetworkSubnetReservedIps operation with a valid options model parameter @Test - public void testListOperatingSystemsWOptions() throws Throwable { + public void testListClusterNetworkSubnetReservedIpsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"operating_systems\": [{\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}], \"total_count\": 132}"; - String listOperatingSystemsPath = "/operating_systems"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"reserved_ips\": [{\"address\": \"10.1.0.6\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"owner\": \"user\", \"resource_type\": \"cluster_network_subnet_reserved_ip\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"name\": \"my-cluster-network-interface\", \"resource_type\": \"cluster_network_interface\"}}], \"total_count\": 132}"; + String listClusterNetworkSubnetReservedIpsPath = "/cluster_networks/testString/subnets/testString/reserved_ips"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListOperatingSystemsOptions model - ListOperatingSystemsOptions listOperatingSystemsOptionsModel = new ListOperatingSystemsOptions.Builder() + // Construct an instance of the ListClusterNetworkSubnetReservedIpsOptions model + ListClusterNetworkSubnetReservedIpsOptions listClusterNetworkSubnetReservedIpsOptionsModel = new ListClusterNetworkSubnetReservedIpsOptions.Builder() + .clusterNetworkId("testString") + .clusterNetworkSubnetId("testString") .start("testString") .limit(Long.valueOf("10")) + .name("my-name") + .sort("name") .build(); - // Invoke listOperatingSystems() with a valid options model and verify the result - Response response = vpcService.listOperatingSystems(listOperatingSystemsOptionsModel).execute(); + // Invoke listClusterNetworkSubnetReservedIps() with a valid options model and verify the result + Response response = vpcService.listClusterNetworkSubnetReservedIps(listClusterNetworkSubnetReservedIpsOptionsModel).execute(); assertNotNull(response); - OperatingSystemCollection responseObj = response.getResult(); + ClusterNetworkSubnetReservedIPCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -6346,32 +6393,41 @@ public void testListOperatingSystemsWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listOperatingSystemsPath); + assertEquals(parsedPath, listClusterNetworkSubnetReservedIpsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("name"), "my-name"); + assertEquals(query.get("sort"), "name"); } - // Test the listOperatingSystems operation with and without retries enabled + // Test the listClusterNetworkSubnetReservedIps operation with and without retries enabled @Test - public void testListOperatingSystemsWRetries() throws Throwable { + public void testListClusterNetworkSubnetReservedIpsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListOperatingSystemsWOptions(); + testListClusterNetworkSubnetReservedIpsWOptions(); vpcService.disableRetries(); - testListOperatingSystemsWOptions(); + testListClusterNetworkSubnetReservedIpsWOptions(); } - // Test the listOperatingSystems operation using the OperatingSystemsPager.getNext() method + // Test the listClusterNetworkSubnetReservedIps operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testListClusterNetworkSubnetReservedIpsNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.listClusterNetworkSubnetReservedIps(null).execute(); + } + + // Test the listClusterNetworkSubnetReservedIps operation using the ClusterNetworkSubnetReservedIpsPager.getNext() method @Test - public void testListOperatingSystemsWithPagerGetNext() throws Throwable { + public void testListClusterNetworkSubnetReservedIpsWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"operating_systems\":[{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"operating_systems\":[{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"reserved_ips\":[{\"address\":\"10.1.0.6\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"id\":\"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-cluster-network-subnet-reserved-ip\",\"owner\":\"user\",\"resource_type\":\"cluster_network_subnet_reserved_ip\",\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"id\":\"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"name\":\"my-cluster-network-interface\",\"resource_type\":\"cluster_network_interface\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"reserved_ips\":[{\"address\":\"10.1.0.6\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"id\":\"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-cluster-network-subnet-reserved-ip\",\"owner\":\"user\",\"resource_type\":\"cluster_network_subnet_reserved_ip\",\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"id\":\"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"name\":\"my-cluster-network-interface\",\"resource_type\":\"cluster_network_interface\"}}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -6385,26 +6441,30 @@ public void testListOperatingSystemsWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListOperatingSystemsOptions listOperatingSystemsOptions = new ListOperatingSystemsOptions.Builder() + ListClusterNetworkSubnetReservedIpsOptions listClusterNetworkSubnetReservedIpsOptions = new ListClusterNetworkSubnetReservedIpsOptions.Builder() + .clusterNetworkId("testString") + .clusterNetworkSubnetId("testString") .limit(Long.valueOf("10")) + .name("my-name") + .sort("name") .build(); - List allResults = new ArrayList<>(); - OperatingSystemsPager pager = new OperatingSystemsPager(vpcService, listOperatingSystemsOptions); + List allResults = new ArrayList<>(); + ClusterNetworkSubnetReservedIpsPager pager = new ClusterNetworkSubnetReservedIpsPager(vpcService, listClusterNetworkSubnetReservedIpsOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listOperatingSystems operation using the OperatingSystemsPager.getAll() method + // Test the listClusterNetworkSubnetReservedIps operation using the ClusterNetworkSubnetReservedIpsPager.getAll() method @Test - public void testListOperatingSystemsWithPagerGetAll() throws Throwable { + public void testListClusterNetworkSubnetReservedIpsWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"operating_systems\":[{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"operating_systems\":[{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"reserved_ips\":[{\"address\":\"10.1.0.6\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"id\":\"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-cluster-network-subnet-reserved-ip\",\"owner\":\"user\",\"resource_type\":\"cluster_network_subnet_reserved_ip\",\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"id\":\"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"name\":\"my-cluster-network-interface\",\"resource_type\":\"cluster_network_interface\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"reserved_ips\":[{\"address\":\"10.1.0.6\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"id\":\"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-cluster-network-subnet-reserved-ip\",\"owner\":\"user\",\"resource_type\":\"cluster_network_subnet_reserved_ip\",\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"id\":\"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"name\":\"my-cluster-network-interface\",\"resource_type\":\"cluster_network_interface\"}}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -6418,36 +6478,44 @@ public void testListOperatingSystemsWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListOperatingSystemsOptions listOperatingSystemsOptions = new ListOperatingSystemsOptions.Builder() + ListClusterNetworkSubnetReservedIpsOptions listClusterNetworkSubnetReservedIpsOptions = new ListClusterNetworkSubnetReservedIpsOptions.Builder() + .clusterNetworkId("testString") + .clusterNetworkSubnetId("testString") .limit(Long.valueOf("10")) + .name("my-name") + .sort("name") .build(); - OperatingSystemsPager pager = new OperatingSystemsPager(vpcService, listOperatingSystemsOptions); - List allResults = pager.getAll(); + ClusterNetworkSubnetReservedIpsPager pager = new ClusterNetworkSubnetReservedIpsPager(vpcService, listClusterNetworkSubnetReservedIpsOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the getOperatingSystem operation with a valid options model parameter + // Test the listClusterNetworkSubnets operation with a valid options model parameter @Test - public void testGetOperatingSystemWOptions() throws Throwable { + public void testListClusterNetworkSubnetsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}"; - String getOperatingSystemPath = "/operating_systems/red-7-amd64"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"subnets\": [{\"available_ipv4_address_count\": 15, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"ip_version\": \"ipv4\", \"ipv4_cidr_block\": \"10.0.0.0/24\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\", \"total_ipv4_address_count\": 256}], \"total_count\": 132}"; + String listClusterNetworkSubnetsPath = "/cluster_networks/testString/subnets"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetOperatingSystemOptions model - GetOperatingSystemOptions getOperatingSystemOptionsModel = new GetOperatingSystemOptions.Builder() - .name("red-7-amd64") + // Construct an instance of the ListClusterNetworkSubnetsOptions model + ListClusterNetworkSubnetsOptions listClusterNetworkSubnetsOptionsModel = new ListClusterNetworkSubnetsOptions.Builder() + .clusterNetworkId("testString") + .start("testString") + .limit(Long.valueOf("10")) + .name("my-name") + .sort("name") .build(); - // Invoke getOperatingSystem() with a valid options model and verify the result - Response response = vpcService.getOperatingSystem(getOperatingSystemOptionsModel).execute(); + // Invoke listClusterNetworkSubnets() with a valid options model and verify the result + Response response = vpcService.listClusterNetworkSubnets(listClusterNetworkSubnetsOptionsModel).execute(); assertNotNull(response); - OperatingSystem responseObj = response.getResult(); + ClusterNetworkSubnetCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -6456,53 +6524,130 @@ public void testGetOperatingSystemWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getOperatingSystemPath); + assertEquals(parsedPath, listClusterNetworkSubnetsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("name"), "my-name"); + assertEquals(query.get("sort"), "name"); } - // Test the getOperatingSystem operation with and without retries enabled + // Test the listClusterNetworkSubnets operation with and without retries enabled @Test - public void testGetOperatingSystemWRetries() throws Throwable { + public void testListClusterNetworkSubnetsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetOperatingSystemWOptions(); + testListClusterNetworkSubnetsWOptions(); vpcService.disableRetries(); - testGetOperatingSystemWOptions(); + testListClusterNetworkSubnetsWOptions(); } - // Test the getOperatingSystem operation with a null options model (negative test) + // Test the listClusterNetworkSubnets operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetOperatingSystemNoOptions() throws Throwable { + public void testListClusterNetworkSubnetsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getOperatingSystem(null).execute(); + vpcService.listClusterNetworkSubnets(null).execute(); } - // Test the listKeys operation with a valid options model parameter + // Test the listClusterNetworkSubnets operation using the ClusterNetworkSubnetsPager.getNext() method @Test - public void testListKeysWOptions() throws Throwable { + public void testListClusterNetworkSubnetsWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"subnets\":[{\"available_ipv4_address_count\":15,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"id\":\"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"ip_version\":\"ipv4\",\"ipv4_cidr_block\":\"10.0.0.0/24\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-cluster-network-subnet\",\"resource_type\":\"cluster_network_subnet\",\"total_ipv4_address_count\":256}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"subnets\":[{\"available_ipv4_address_count\":15,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"id\":\"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"ip_version\":\"ipv4\",\"ipv4_cidr_block\":\"10.0.0.0/24\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-cluster-network-subnet\",\"resource_type\":\"cluster_network_subnet\",\"total_ipv4_address_count\":256}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListClusterNetworkSubnetsOptions listClusterNetworkSubnetsOptions = new ListClusterNetworkSubnetsOptions.Builder() + .clusterNetworkId("testString") + .limit(Long.valueOf("10")) + .name("my-name") + .sort("name") + .build(); + + List allResults = new ArrayList<>(); + ClusterNetworkSubnetsPager pager = new ClusterNetworkSubnetsPager(vpcService, listClusterNetworkSubnetsOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); + } + + // Test the listClusterNetworkSubnets operation using the ClusterNetworkSubnetsPager.getAll() method + @Test + public void testListClusterNetworkSubnetsWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"subnets\":[{\"available_ipv4_address_count\":15,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"id\":\"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"ip_version\":\"ipv4\",\"ipv4_cidr_block\":\"10.0.0.0/24\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-cluster-network-subnet\",\"resource_type\":\"cluster_network_subnet\",\"total_ipv4_address_count\":256}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"subnets\":[{\"available_ipv4_address_count\":15,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"id\":\"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"ip_version\":\"ipv4\",\"ipv4_cidr_block\":\"10.0.0.0/24\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-cluster-network-subnet\",\"resource_type\":\"cluster_network_subnet\",\"total_ipv4_address_count\":256}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListClusterNetworkSubnetsOptions listClusterNetworkSubnetsOptions = new ListClusterNetworkSubnetsOptions.Builder() + .clusterNetworkId("testString") + .limit(Long.valueOf("10")) + .name("my-name") + .sort("name") + .build(); + + ClusterNetworkSubnetsPager pager = new ClusterNetworkSubnetsPager(vpcService, listClusterNetworkSubnetsOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); + } + + // Test the listClusterNetworks operation with a valid options model parameter + @Test + public void testListClusterNetworksWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"keys\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"fingerprint\": \"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"length\": 2048, \"name\": \"my-key-1\", \"public_key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"type\": \"ed25519\"}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listKeysPath = "/keys"; + String mockResponseBody = "{\"cluster_networks\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"id\": \"0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network\", \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\", \"name\": \"h100\", \"resource_type\": \"cluster_network_profile\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"cluster_network\", \"subnet_prefixes\": [{\"allocation_policy\": \"auto\", \"cidr\": \"10.0.0.0/24\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listClusterNetworksPath = "/cluster_networks"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListKeysOptions model - ListKeysOptions listKeysOptionsModel = new ListKeysOptions.Builder() + // Construct an instance of the ListClusterNetworksOptions model + ListClusterNetworksOptions listClusterNetworksOptionsModel = new ListClusterNetworksOptions.Builder() .start("testString") .limit(Long.valueOf("10")) .resourceGroupId("testString") + .name("my-name") + .sort("name") + .vpcId("testString") + .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .vpcName("my-vpc") .build(); - // Invoke listKeys() with a valid options model and verify the result - Response response = vpcService.listKeys(listKeysOptionsModel).execute(); + // Invoke listClusterNetworks() with a valid options model and verify the result + Response response = vpcService.listClusterNetworks(listClusterNetworksOptionsModel).execute(); assertNotNull(response); - KeyCollection responseObj = response.getResult(); + ClusterNetworkCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -6511,33 +6656,38 @@ public void testListKeysWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listKeysPath); + assertEquals(parsedPath, listClusterNetworksPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); assertEquals(query.get("resource_group.id"), "testString"); + assertEquals(query.get("name"), "my-name"); + assertEquals(query.get("sort"), "name"); + assertEquals(query.get("vpc.id"), "testString"); + assertEquals(query.get("vpc.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); + assertEquals(query.get("vpc.name"), "my-vpc"); } - // Test the listKeys operation with and without retries enabled + // Test the listClusterNetworks operation with and without retries enabled @Test - public void testListKeysWRetries() throws Throwable { + public void testListClusterNetworksWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListKeysWOptions(); + testListClusterNetworksWOptions(); vpcService.disableRetries(); - testListKeysWOptions(); + testListClusterNetworksWOptions(); } - // Test the listKeys operation using the KeysPager.getNext() method + // Test the listClusterNetworks operation using the ClusterNetworksPager.getNext() method @Test - public void testListKeysWithPagerGetNext() throws Throwable { + public void testListClusterNetworksWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"keys\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\",\"fingerprint\":\"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\",\"id\":\"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\",\"length\":2048,\"name\":\"my-key-1\",\"public_key\":\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"type\":\"ed25519\"}],\"limit\":1}"; - String mockResponsePage2 = "{\"total_count\":2,\"keys\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\",\"fingerprint\":\"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\",\"id\":\"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\",\"length\":2048,\"name\":\"my-key-1\",\"public_key\":\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"type\":\"ed25519\"}],\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"cluster_networks\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"id\":\"0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-cluster-network\",\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\",\"name\":\"h100\",\"resource_type\":\"cluster_network_profile\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"cluster_network\",\"subnet_prefixes\":[{\"allocation_policy\":\"auto\",\"cidr\":\"10.0.0.0/24\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"cluster_networks\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"id\":\"0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-cluster-network\",\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\",\"name\":\"h100\",\"resource_type\":\"cluster_network_profile\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"cluster_network\",\"subnet_prefixes\":[{\"allocation_policy\":\"auto\",\"cidr\":\"10.0.0.0/24\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -6551,27 +6701,32 @@ public void testListKeysWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListKeysOptions listKeysOptions = new ListKeysOptions.Builder() + ListClusterNetworksOptions listClusterNetworksOptions = new ListClusterNetworksOptions.Builder() .limit(Long.valueOf("10")) .resourceGroupId("testString") + .name("my-name") + .sort("name") + .vpcId("testString") + .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .vpcName("my-vpc") .build(); - List allResults = new ArrayList<>(); - KeysPager pager = new KeysPager(vpcService, listKeysOptions); + List allResults = new ArrayList<>(); + ClusterNetworksPager pager = new ClusterNetworksPager(vpcService, listClusterNetworksOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listKeys operation using the KeysPager.getAll() method + // Test the listClusterNetworks operation using the ClusterNetworksPager.getAll() method @Test - public void testListKeysWithPagerGetAll() throws Throwable { + public void testListClusterNetworksWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"keys\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\",\"fingerprint\":\"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\",\"id\":\"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\",\"length\":2048,\"name\":\"my-key-1\",\"public_key\":\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"type\":\"ed25519\"}],\"limit\":1}"; - String mockResponsePage2 = "{\"total_count\":2,\"keys\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\",\"fingerprint\":\"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\",\"id\":\"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\",\"length\":2048,\"name\":\"my-key-1\",\"public_key\":\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"type\":\"ed25519\"}],\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"cluster_networks\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"id\":\"0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-cluster-network\",\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\",\"name\":\"h100\",\"resource_type\":\"cluster_network_profile\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"cluster_network\",\"subnet_prefixes\":[{\"allocation_policy\":\"auto\",\"cidr\":\"10.0.0.0/24\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"cluster_networks\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"id\":\"0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-cluster-network\",\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\",\"name\":\"h100\",\"resource_type\":\"cluster_network_profile\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"cluster_network\",\"subnet_prefixes\":[{\"allocation_policy\":\"auto\",\"cidr\":\"10.0.0.0/24\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -6585,210 +6740,239 @@ public void testListKeysWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListKeysOptions listKeysOptions = new ListKeysOptions.Builder() + ListClusterNetworksOptions listClusterNetworksOptions = new ListClusterNetworksOptions.Builder() .limit(Long.valueOf("10")) .resourceGroupId("testString") + .name("my-name") + .sort("name") + .vpcId("testString") + .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .vpcName("my-vpc") .build(); - KeysPager pager = new KeysPager(vpcService, listKeysOptions); - List allResults = pager.getAll(); + ClusterNetworksPager pager = new ClusterNetworksPager(vpcService, listClusterNetworksOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the createKey operation with a valid options model parameter + // Test the updateClusterNetwork operation with a valid options model parameter @Test - public void testCreateKeyWOptions() throws Throwable { + public void testUpdateClusterNetworkWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"fingerprint\": \"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"length\": 2048, \"name\": \"my-key-1\", \"public_key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"type\": \"ed25519\"}"; - String createKeyPath = "/keys"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"id\": \"0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network\", \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\", \"name\": \"h100\", \"resource_type\": \"cluster_network_profile\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"cluster_network\", \"subnet_prefixes\": [{\"allocation_policy\": \"auto\", \"cidr\": \"10.0.0.0/24\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String updateClusterNetworkPath = "/cluster_networks/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") + // Construct an instance of the ClusterNetworkPatch model + ClusterNetworkPatch clusterNetworkPatchModel = new ClusterNetworkPatch.Builder() + .name("my-cluster-network") .build(); + Map clusterNetworkPatchModelAsPatch = clusterNetworkPatchModel.asPatch(); - // Construct an instance of the CreateKeyOptions model - CreateKeyOptions createKeyOptionsModel = new CreateKeyOptions.Builder() - .publicKey("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En") - .name("my-key-1") - .resourceGroup(resourceGroupIdentityModel) - .type("rsa") + // Construct an instance of the UpdateClusterNetworkOptions model + UpdateClusterNetworkOptions updateClusterNetworkOptionsModel = new UpdateClusterNetworkOptions.Builder() + .id("testString") + .clusterNetworkPatch(clusterNetworkPatchModelAsPatch) + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke createKey() with a valid options model and verify the result - Response response = vpcService.createKey(createKeyOptionsModel).execute(); + // Invoke updateClusterNetwork() with a valid options model and verify the result + Response response = vpcService.updateClusterNetwork(updateClusterNetworkOptionsModel).execute(); assertNotNull(response); - Key responseObj = response.getResult(); + ClusterNetwork responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createKeyPath); + assertEquals(parsedPath, updateClusterNetworkPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createKey operation with and without retries enabled + // Test the updateClusterNetwork operation with and without retries enabled @Test - public void testCreateKeyWRetries() throws Throwable { + public void testUpdateClusterNetworkWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateKeyWOptions(); + testUpdateClusterNetworkWOptions(); vpcService.disableRetries(); - testCreateKeyWOptions(); + testUpdateClusterNetworkWOptions(); } - // Test the createKey operation with a null options model (negative test) + // Test the updateClusterNetwork operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateKeyNoOptions() throws Throwable { + public void testUpdateClusterNetworkNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createKey(null).execute(); + vpcService.updateClusterNetwork(null).execute(); } - // Test the deleteKey operation with a valid options model parameter + // Test the updateClusterNetworkInterface operation with a valid options model parameter @Test - public void testDeleteKeyWOptions() throws Throwable { + public void testUpdateClusterNetworkInterfaceWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteKeyPath = "/keys/testString"; + String mockResponseBody = "{\"allow_ip_spoofing\": true, \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"enable_infrastructure_nat\": false, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"mac_address\": \"02:00:4D:45:45:4D\", \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"address\": \"10.1.0.6\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"resource_type\": \"cluster_network_subnet_reserved_ip\"}, \"resource_type\": \"cluster_network_interface\", \"subnet\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\"}, \"target\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String updateClusterNetworkInterfacePath = "/cluster_networks/testString/interfaces/testString"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteKeyOptions model - DeleteKeyOptions deleteKeyOptionsModel = new DeleteKeyOptions.Builder() + // Construct an instance of the ClusterNetworkInterfacePatch model + ClusterNetworkInterfacePatch clusterNetworkInterfacePatchModel = new ClusterNetworkInterfacePatch.Builder() + .autoDelete(false) + .name("my-cluster-network-interface") + .build(); + Map clusterNetworkInterfacePatchModelAsPatch = clusterNetworkInterfacePatchModel.asPatch(); + + // Construct an instance of the UpdateClusterNetworkInterfaceOptions model + UpdateClusterNetworkInterfaceOptions updateClusterNetworkInterfaceOptionsModel = new UpdateClusterNetworkInterfaceOptions.Builder() + .clusterNetworkId("testString") .id("testString") + .clusterNetworkInterfacePatch(clusterNetworkInterfacePatchModelAsPatch) + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke deleteKey() with a valid options model and verify the result - Response response = vpcService.deleteKey(deleteKeyOptionsModel).execute(); + // Invoke updateClusterNetworkInterface() with a valid options model and verify the result + Response response = vpcService.updateClusterNetworkInterface(updateClusterNetworkInterfaceOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + ClusterNetworkInterface 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(), "DELETE"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteKeyPath); + assertEquals(parsedPath, updateClusterNetworkInterfacePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteKey operation with and without retries enabled + // Test the updateClusterNetworkInterface operation with and without retries enabled @Test - public void testDeleteKeyWRetries() throws Throwable { + public void testUpdateClusterNetworkInterfaceWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteKeyWOptions(); + testUpdateClusterNetworkInterfaceWOptions(); vpcService.disableRetries(); - testDeleteKeyWOptions(); + testUpdateClusterNetworkInterfaceWOptions(); } - // Test the deleteKey operation with a null options model (negative test) + // Test the updateClusterNetworkInterface operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteKeyNoOptions() throws Throwable { + public void testUpdateClusterNetworkInterfaceNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteKey(null).execute(); + vpcService.updateClusterNetworkInterface(null).execute(); } - // Test the getKey operation with a valid options model parameter + // Test the updateClusterNetworkSubnet operation with a valid options model parameter @Test - public void testGetKeyWOptions() throws Throwable { + public void testUpdateClusterNetworkSubnetWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"fingerprint\": \"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"length\": 2048, \"name\": \"my-key-1\", \"public_key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"type\": \"ed25519\"}"; - String getKeyPath = "/keys/testString"; + String mockResponseBody = "{\"available_ipv4_address_count\": 15, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"ip_version\": \"ipv4\", \"ipv4_cidr_block\": \"10.0.0.0/24\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\", \"total_ipv4_address_count\": 256}"; + String updateClusterNetworkSubnetPath = "/cluster_networks/testString/subnets/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetKeyOptions model - GetKeyOptions getKeyOptionsModel = new GetKeyOptions.Builder() + // Construct an instance of the ClusterNetworkSubnetPatch model + ClusterNetworkSubnetPatch clusterNetworkSubnetPatchModel = new ClusterNetworkSubnetPatch.Builder() + .name("my-cluster-network-subnet") + .build(); + Map clusterNetworkSubnetPatchModelAsPatch = clusterNetworkSubnetPatchModel.asPatch(); + + // Construct an instance of the UpdateClusterNetworkSubnetOptions model + UpdateClusterNetworkSubnetOptions updateClusterNetworkSubnetOptionsModel = new UpdateClusterNetworkSubnetOptions.Builder() + .clusterNetworkId("testString") .id("testString") + .clusterNetworkSubnetPatch(clusterNetworkSubnetPatchModelAsPatch) + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke getKey() with a valid options model and verify the result - Response response = vpcService.getKey(getKeyOptionsModel).execute(); + // Invoke updateClusterNetworkSubnet() with a valid options model and verify the result + Response response = vpcService.updateClusterNetworkSubnet(updateClusterNetworkSubnetOptionsModel).execute(); assertNotNull(response); - Key responseObj = response.getResult(); + ClusterNetworkSubnet responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getKeyPath); + assertEquals(parsedPath, updateClusterNetworkSubnetPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getKey operation with and without retries enabled + // Test the updateClusterNetworkSubnet operation with and without retries enabled @Test - public void testGetKeyWRetries() throws Throwable { + public void testUpdateClusterNetworkSubnetWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetKeyWOptions(); + testUpdateClusterNetworkSubnetWOptions(); vpcService.disableRetries(); - testGetKeyWOptions(); + testUpdateClusterNetworkSubnetWOptions(); } - // Test the getKey operation with a null options model (negative test) + // Test the updateClusterNetworkSubnet operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetKeyNoOptions() throws Throwable { + public void testUpdateClusterNetworkSubnetNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getKey(null).execute(); + vpcService.updateClusterNetworkSubnet(null).execute(); } - // Test the updateKey operation with a valid options model parameter + // Test the updateClusterNetworkSubnetReservedIp operation with a valid options model parameter @Test - public void testUpdateKeyWOptions() throws Throwable { + public void testUpdateClusterNetworkSubnetReservedIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"fingerprint\": \"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"length\": 2048, \"name\": \"my-key-1\", \"public_key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"type\": \"ed25519\"}"; - String updateKeyPath = "/keys/testString"; + String mockResponseBody = "{\"address\": \"10.1.0.6\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"owner\": \"user\", \"resource_type\": \"cluster_network_subnet_reserved_ip\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"name\": \"my-cluster-network-interface\", \"resource_type\": \"cluster_network_interface\"}}"; + String updateClusterNetworkSubnetReservedIpPath = "/cluster_networks/testString/subnets/testString/reserved_ips/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the KeyPatch model - KeyPatch keyPatchModel = new KeyPatch.Builder() - .name("my-key-1") + // Construct an instance of the ClusterNetworkSubnetReservedIPPatch model + ClusterNetworkSubnetReservedIPPatch clusterNetworkSubnetReservedIpPatchModel = new ClusterNetworkSubnetReservedIPPatch.Builder() + .autoDelete(false) + .name("my-cluster-network-subnet-reserved-ip") .build(); - Map keyPatchModelAsPatch = keyPatchModel.asPatch(); + Map clusterNetworkSubnetReservedIpPatchModelAsPatch = clusterNetworkSubnetReservedIpPatchModel.asPatch(); - // Construct an instance of the UpdateKeyOptions model - UpdateKeyOptions updateKeyOptionsModel = new UpdateKeyOptions.Builder() + // Construct an instance of the UpdateClusterNetworkSubnetReservedIpOptions model + UpdateClusterNetworkSubnetReservedIpOptions updateClusterNetworkSubnetReservedIpOptionsModel = new UpdateClusterNetworkSubnetReservedIpOptions.Builder() + .clusterNetworkId("testString") + .clusterNetworkSubnetId("testString") .id("testString") - .keyPatch(keyPatchModelAsPatch) + .clusterNetworkSubnetReservedIpPatch(clusterNetworkSubnetReservedIpPatchModelAsPatch) + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke updateKey() with a valid options model and verify the result - Response response = vpcService.updateKey(updateKeyOptionsModel).execute(); + // Invoke updateClusterNetworkSubnetReservedIp() with a valid options model and verify the result + Response response = vpcService.updateClusterNetworkSubnetReservedIp(updateClusterNetworkSubnetReservedIpOptionsModel).execute(); assertNotNull(response); - Key responseObj = response.getResult(); + ClusterNetworkSubnetReservedIP responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -6797,502 +6981,512 @@ public void testUpdateKeyWOptions() throws Throwable { assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateKeyPath); + assertEquals(parsedPath, updateClusterNetworkSubnetReservedIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateKey operation with and without retries enabled + // Test the updateClusterNetworkSubnetReservedIp operation with and without retries enabled @Test - public void testUpdateKeyWRetries() throws Throwable { + public void testUpdateClusterNetworkSubnetReservedIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateKeyWOptions(); + testUpdateClusterNetworkSubnetReservedIpWOptions(); vpcService.disableRetries(); - testUpdateKeyWOptions(); + testUpdateClusterNetworkSubnetReservedIpWOptions(); } - // Test the updateKey operation with a null options model (negative test) + // Test the updateClusterNetworkSubnetReservedIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateKeyNoOptions() throws Throwable { + public void testUpdateClusterNetworkSubnetReservedIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateKey(null).execute(); + vpcService.updateClusterNetworkSubnetReservedIp(null).execute(); } - // Test the listInstanceProfiles operation with a valid options model parameter + // Test the createDedicatedHost operation with a valid options model parameter @Test - public void testListInstanceProfilesWOptions() throws Throwable { + public void testCreateDedicatedHostWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"profiles\": [{\"bandwidth\": {\"type\": \"fixed\", \"value\": 20000}, \"cluster_network_attachment_count\": {\"type\": \"dependent\"}, \"confidential_compute_modes\": {\"default\": \"disabled\", \"type\": \"enum\", \"values\": [\"disabled\"]}, \"disks\": [{\"quantity\": {\"type\": \"fixed\", \"value\": 4}, \"size\": {\"type\": \"fixed\", \"value\": 100}, \"supported_interface_types\": {\"default\": \"nvme\", \"type\": \"enum\", \"values\": [\"nvme\"]}}], \"family\": \"balanced\", \"gpu_count\": {\"type\": \"fixed\", \"value\": 2}, \"gpu_manufacturer\": {\"type\": \"enum\", \"values\": [\"amd\"]}, \"gpu_memory\": {\"type\": \"fixed\", \"value\": 16}, \"gpu_model\": {\"type\": \"enum\", \"values\": [\"Tesla V100\"]}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"memory\": {\"type\": \"fixed\", \"value\": 16}, \"name\": \"bx2-4x16\", \"network_attachment_count\": {\"max\": 5, \"min\": 1, \"type\": \"range\"}, \"network_interface_count\": {\"max\": 5, \"min\": 1, \"type\": \"range\"}, \"numa_count\": {\"type\": \"fixed\", \"value\": 2}, \"os_architecture\": {\"default\": \"amd64\", \"type\": \"enum\", \"values\": [\"amd64\"]}, \"port_speed\": {\"type\": \"fixed\", \"value\": 1000}, \"reservation_terms\": {\"type\": \"enum\", \"values\": [\"one_year\"]}, \"resource_type\": \"instance_profile\", \"secure_boot_modes\": {\"default\": true, \"type\": \"enum\", \"values\": [true]}, \"status\": \"current\", \"supported_cluster_network_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\", \"name\": \"h100\", \"resource_type\": \"cluster_network_profile\"}], \"total_volume_bandwidth\": {\"type\": \"fixed\", \"value\": 20000}, \"vcpu_architecture\": {\"type\": \"fixed\", \"value\": \"amd64\"}, \"vcpu_count\": {\"type\": \"fixed\", \"value\": 16}, \"vcpu_manufacturer\": {\"type\": \"fixed\", \"value\": \"intel\"}}]}"; - String listInstanceProfilesPath = "/instance/profiles"; + String mockResponseBody = "{\"available_memory\": 128, \"available_vcpu\": {\"architecture\": \"amd64\", \"count\": 4, \"manufacturer\": \"intel\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"disks\": [{\"available\": 9, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"id\": \"0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"instance_disks\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\"}], \"interface_type\": \"nvme\", \"lifecycle_state\": \"stable\", \"name\": \"my-dedicated-host-disk\", \"provisionable\": false, \"resource_type\": \"dedicated_host_disk\", \"size\": 4, \"supported_instance_interface_types\": [\"nvme\"]}], \"group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"id\": \"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"name\": \"my-dedicated-host-group\", \"resource_type\": \"dedicated_host_group\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"instance_placement_enabled\": true, \"instances\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}], \"lifecycle_state\": \"stable\", \"memory\": 128, \"name\": \"my-host\", \"numa\": {\"count\": 2, \"nodes\": [{\"available_vcpu\": 24, \"vcpu\": 56}]}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"name\": \"mx2-host-152x1216\"}, \"provisionable\": false, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"dedicated_host\", \"socket_count\": 4, \"state\": \"available\", \"supported_instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"vcpu\": {\"architecture\": \"amd64\", \"count\": 4, \"manufacturer\": \"intel\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String createDedicatedHostPath = "/dedicated_hosts"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the ListInstanceProfilesOptions model - ListInstanceProfilesOptions listInstanceProfilesOptionsModel = new ListInstanceProfilesOptions(); + // Construct an instance of the DedicatedHostProfileIdentityByName model + DedicatedHostProfileIdentityByName dedicatedHostProfileIdentityModel = new DedicatedHostProfileIdentityByName.Builder() + .name("mx2-host-152x1216") + .build(); - // Invoke listInstanceProfiles() with a valid options model and verify the result - Response response = vpcService.listInstanceProfiles(listInstanceProfilesOptionsModel).execute(); + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") + .build(); + + // Construct an instance of the DedicatedHostGroupIdentityById model + DedicatedHostGroupIdentityById dedicatedHostGroupIdentityModel = new DedicatedHostGroupIdentityById.Builder() + .id("0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0") + .build(); + + // Construct an instance of the DedicatedHostPrototypeDedicatedHostByGroup model + DedicatedHostPrototypeDedicatedHostByGroup dedicatedHostPrototypeModel = new DedicatedHostPrototypeDedicatedHostByGroup.Builder() + .instancePlacementEnabled(true) + .name("my-host") + .profile(dedicatedHostProfileIdentityModel) + .resourceGroup(resourceGroupIdentityModel) + .group(dedicatedHostGroupIdentityModel) + .build(); + + // Construct an instance of the CreateDedicatedHostOptions model + CreateDedicatedHostOptions createDedicatedHostOptionsModel = new CreateDedicatedHostOptions.Builder() + .dedicatedHostPrototype(dedicatedHostPrototypeModel) + .build(); + + // Invoke createDedicatedHost() with a valid options model and verify the result + Response response = vpcService.createDedicatedHost(createDedicatedHostOptionsModel).execute(); assertNotNull(response); - InstanceProfileCollection responseObj = response.getResult(); + DedicatedHost responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listInstanceProfilesPath); + assertEquals(parsedPath, createDedicatedHostPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the listInstanceProfiles operation with and without retries enabled + // Test the createDedicatedHost operation with and without retries enabled @Test - public void testListInstanceProfilesWRetries() throws Throwable { + public void testCreateDedicatedHostWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListInstanceProfilesWOptions(); + testCreateDedicatedHostWOptions(); vpcService.disableRetries(); - testListInstanceProfilesWOptions(); + testCreateDedicatedHostWOptions(); } - // Test the getInstanceProfile operation with a valid options model parameter + // Test the createDedicatedHost operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testCreateDedicatedHostNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.createDedicatedHost(null).execute(); + } + + // Test the createDedicatedHostGroup operation with a valid options model parameter @Test - public void testGetInstanceProfileWOptions() throws Throwable { + public void testCreateDedicatedHostGroupWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"bandwidth\": {\"type\": \"fixed\", \"value\": 20000}, \"cluster_network_attachment_count\": {\"type\": \"dependent\"}, \"confidential_compute_modes\": {\"default\": \"disabled\", \"type\": \"enum\", \"values\": [\"disabled\"]}, \"disks\": [{\"quantity\": {\"type\": \"fixed\", \"value\": 4}, \"size\": {\"type\": \"fixed\", \"value\": 100}, \"supported_interface_types\": {\"default\": \"nvme\", \"type\": \"enum\", \"values\": [\"nvme\"]}}], \"family\": \"balanced\", \"gpu_count\": {\"type\": \"fixed\", \"value\": 2}, \"gpu_manufacturer\": {\"type\": \"enum\", \"values\": [\"amd\"]}, \"gpu_memory\": {\"type\": \"fixed\", \"value\": 16}, \"gpu_model\": {\"type\": \"enum\", \"values\": [\"Tesla V100\"]}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"memory\": {\"type\": \"fixed\", \"value\": 16}, \"name\": \"bx2-4x16\", \"network_attachment_count\": {\"max\": 5, \"min\": 1, \"type\": \"range\"}, \"network_interface_count\": {\"max\": 5, \"min\": 1, \"type\": \"range\"}, \"numa_count\": {\"type\": \"fixed\", \"value\": 2}, \"os_architecture\": {\"default\": \"amd64\", \"type\": \"enum\", \"values\": [\"amd64\"]}, \"port_speed\": {\"type\": \"fixed\", \"value\": 1000}, \"reservation_terms\": {\"type\": \"enum\", \"values\": [\"one_year\"]}, \"resource_type\": \"instance_profile\", \"secure_boot_modes\": {\"default\": true, \"type\": \"enum\", \"values\": [true]}, \"status\": \"current\", \"supported_cluster_network_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\", \"name\": \"h100\", \"resource_type\": \"cluster_network_profile\"}], \"total_volume_bandwidth\": {\"type\": \"fixed\", \"value\": 20000}, \"vcpu_architecture\": {\"type\": \"fixed\", \"value\": \"amd64\"}, \"vcpu_count\": {\"type\": \"fixed\", \"value\": 16}, \"vcpu_manufacturer\": {\"type\": \"fixed\", \"value\": \"intel\"}}"; - String getInstanceProfilePath = "/instance/profiles/mx2-host-152x1216"; + String mockResponseBody = "{\"class\": \"bx2\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"dedicated_hosts\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"name\": \"my-host\", \"resource_type\": \"dedicated_host\"}], \"family\": \"balanced\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"id\": \"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"name\": \"my-dedicated-host-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"dedicated_host_group\", \"supported_instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String createDedicatedHostGroupPath = "/dedicated_host/groups"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the GetInstanceProfileOptions model - GetInstanceProfileOptions getInstanceProfileOptionsModel = new GetInstanceProfileOptions.Builder() - .name("mx2-host-152x1216") + // Construct an instance of the ZoneIdentityByName model + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() + .name("us-south-1") .build(); - // Invoke getInstanceProfile() with a valid options model and verify the result - Response response = vpcService.getInstanceProfile(getInstanceProfileOptionsModel).execute(); + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") + .build(); + + // Construct an instance of the CreateDedicatedHostGroupOptions model + CreateDedicatedHostGroupOptions createDedicatedHostGroupOptionsModel = new CreateDedicatedHostGroupOptions.Builder() + .xClass("mx2") + .family("balanced") + .zone(zoneIdentityModel) + .name("testString") + .resourceGroup(resourceGroupIdentityModel) + .build(); + + // Invoke createDedicatedHostGroup() with a valid options model and verify the result + Response response = vpcService.createDedicatedHostGroup(createDedicatedHostGroupOptionsModel).execute(); assertNotNull(response); - InstanceProfile responseObj = response.getResult(); + DedicatedHostGroup responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getInstanceProfilePath); + assertEquals(parsedPath, createDedicatedHostGroupPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getInstanceProfile operation with and without retries enabled + // Test the createDedicatedHostGroup operation with and without retries enabled @Test - public void testGetInstanceProfileWRetries() throws Throwable { + public void testCreateDedicatedHostGroupWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetInstanceProfileWOptions(); + testCreateDedicatedHostGroupWOptions(); vpcService.disableRetries(); - testGetInstanceProfileWOptions(); + testCreateDedicatedHostGroupWOptions(); } - // Test the getInstanceProfile operation with a null options model (negative test) + // Test the createDedicatedHostGroup operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetInstanceProfileNoOptions() throws Throwable { + public void testCreateDedicatedHostGroupNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getInstanceProfile(null).execute(); + vpcService.createDedicatedHostGroup(null).execute(); } - // Test the listInstanceTemplates operation with a valid options model parameter + // Test the deleteDedicatedHost operation with a valid options model parameter @Test - public void testListInstanceTemplatesWOptions() throws Throwable { + public void testDeleteDedicatedHostWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"templates\": [{\"availability_policy\": {\"host_failure\": \"restart\"}, \"cluster_network_attachments\": [{\"cluster_network_interface\": {\"auto_delete\": false, \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\"}, \"subnet\": {\"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\"}}, \"name\": \"my-instance-network-attachment\"}], \"confidential_compute_mode\": \"disabled\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"default_trusted_profile\": {\"auto_link\": false, \"target\": {\"id\": \"Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5\"}}, \"enable_secure_boot\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"id\": \"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"keys\": [{\"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\"}], \"metadata_service\": {\"enabled\": false, \"protocol\": \"https\", \"response_hop_limit\": 2}, \"name\": \"my-instance-template\", \"placement_target\": {\"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\"}, \"profile\": {\"name\": \"bx2-4x16\"}, \"reservation_affinity\": {\"policy\": \"automatic\", \"pool\": [{\"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\"}]}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"total_volume_bandwidth\": 500, \"user_data\": \"userData\", \"volume_attachments\": [{\"delete_volume_on_instance_delete\": false, \"name\": \"my-volume-attachment\", \"volume\": {\"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\"}}], \"vpc\": {\"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\"}, \"boot_volume_attachment\": {\"delete_volume_on_instance_delete\": true, \"name\": \"my-volume-attachment\", \"volume\": {\"bandwidth\": 1000, \"capacity\": 100, \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"iops\": 10000, \"name\": \"my-volume\", \"profile\": {\"name\": \"general-purpose\"}, \"resource_group\": {\"id\": \"fee82deba12e4c0fb69c3b09d1f12345\"}, \"user_tags\": [\"userTags\"]}}, \"image\": {\"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\"}, \"zone\": {\"name\": \"us-south-1\"}, \"network_attachments\": [{\"name\": \"my-instance-network-attachment\", \"virtual_network_interface\": {\"allow_ip_spoofing\": true, \"auto_delete\": false, \"enable_infrastructure_nat\": true, \"ips\": [{\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}], \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"id\": \"fee82deba12e4c0fb69c3b09d1f12345\"}, \"security_groups\": [{\"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\"}], \"subnet\": {\"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\"}}}], \"primary_network_attachment\": {\"name\": \"my-instance-network-attachment\", \"virtual_network_interface\": {\"allow_ip_spoofing\": true, \"auto_delete\": false, \"enable_infrastructure_nat\": true, \"ips\": [{\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}], \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"id\": \"fee82deba12e4c0fb69c3b09d1f12345\"}, \"security_groups\": [{\"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\"}], \"subnet\": {\"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\"}}}}], \"total_count\": 132}"; - String listInstanceTemplatesPath = "/instance/templates"; + String mockResponseBody = ""; + String deleteDedicatedHostPath = "/dedicated_hosts/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the ListInstanceTemplatesOptions model - ListInstanceTemplatesOptions listInstanceTemplatesOptionsModel = new ListInstanceTemplatesOptions(); + // Construct an instance of the DeleteDedicatedHostOptions model + DeleteDedicatedHostOptions deleteDedicatedHostOptionsModel = new DeleteDedicatedHostOptions.Builder() + .id("testString") + .build(); - // Invoke listInstanceTemplates() with a valid options model and verify the result - Response response = vpcService.listInstanceTemplates(listInstanceTemplatesOptionsModel).execute(); + // Invoke deleteDedicatedHost() with a valid options model and verify the result + Response response = vpcService.deleteDedicatedHost(deleteDedicatedHostOptionsModel).execute(); assertNotNull(response); - InstanceTemplateCollection responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listInstanceTemplatesPath); + assertEquals(parsedPath, deleteDedicatedHostPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the listInstanceTemplates operation with and without retries enabled + // Test the deleteDedicatedHost operation with and without retries enabled @Test - public void testListInstanceTemplatesWRetries() throws Throwable { + public void testDeleteDedicatedHostWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListInstanceTemplatesWOptions(); + testDeleteDedicatedHostWOptions(); vpcService.disableRetries(); - testListInstanceTemplatesWOptions(); + testDeleteDedicatedHostWOptions(); } - // Test the createInstanceTemplate operation with a valid options model parameter + // Test the deleteDedicatedHost operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testDeleteDedicatedHostNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.deleteDedicatedHost(null).execute(); + } + + // Test the deleteDedicatedHostGroup operation with a valid options model parameter @Test - public void testCreateInstanceTemplateWOptions() throws Throwable { + public void testDeleteDedicatedHostGroupWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"availability_policy\": {\"host_failure\": \"restart\"}, \"cluster_network_attachments\": [{\"cluster_network_interface\": {\"auto_delete\": false, \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\"}, \"subnet\": {\"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\"}}, \"name\": \"my-instance-network-attachment\"}], \"confidential_compute_mode\": \"disabled\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"default_trusted_profile\": {\"auto_link\": false, \"target\": {\"id\": \"Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5\"}}, \"enable_secure_boot\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"id\": \"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"keys\": [{\"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\"}], \"metadata_service\": {\"enabled\": false, \"protocol\": \"https\", \"response_hop_limit\": 2}, \"name\": \"my-instance-template\", \"placement_target\": {\"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\"}, \"profile\": {\"name\": \"bx2-4x16\"}, \"reservation_affinity\": {\"policy\": \"automatic\", \"pool\": [{\"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\"}]}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"total_volume_bandwidth\": 500, \"user_data\": \"userData\", \"volume_attachments\": [{\"delete_volume_on_instance_delete\": false, \"name\": \"my-volume-attachment\", \"volume\": {\"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\"}}], \"vpc\": {\"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\"}, \"boot_volume_attachment\": {\"delete_volume_on_instance_delete\": true, \"name\": \"my-volume-attachment\", \"volume\": {\"bandwidth\": 1000, \"capacity\": 100, \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"iops\": 10000, \"name\": \"my-volume\", \"profile\": {\"name\": \"general-purpose\"}, \"resource_group\": {\"id\": \"fee82deba12e4c0fb69c3b09d1f12345\"}, \"user_tags\": [\"userTags\"]}}, \"image\": {\"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\"}, \"zone\": {\"name\": \"us-south-1\"}, \"network_attachments\": [{\"name\": \"my-instance-network-attachment\", \"virtual_network_interface\": {\"allow_ip_spoofing\": true, \"auto_delete\": false, \"enable_infrastructure_nat\": true, \"ips\": [{\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}], \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"id\": \"fee82deba12e4c0fb69c3b09d1f12345\"}, \"security_groups\": [{\"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\"}], \"subnet\": {\"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\"}}}], \"primary_network_attachment\": {\"name\": \"my-instance-network-attachment\", \"virtual_network_interface\": {\"allow_ip_spoofing\": true, \"auto_delete\": false, \"enable_infrastructure_nat\": true, \"ips\": [{\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}], \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"id\": \"fee82deba12e4c0fb69c3b09d1f12345\"}, \"security_groups\": [{\"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\"}], \"subnet\": {\"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\"}}}}"; - String createInstanceTemplatePath = "/instance/templates"; + String mockResponseBody = ""; + String deleteDedicatedHostGroupPath = "/dedicated_host/groups/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the InstanceAvailabilityPolicyPrototype model - InstanceAvailabilityPolicyPrototype instanceAvailabilityPolicyPrototypeModel = new InstanceAvailabilityPolicyPrototype.Builder() - .hostFailure("restart") + // Construct an instance of the DeleteDedicatedHostGroupOptions model + DeleteDedicatedHostGroupOptions deleteDedicatedHostGroupOptionsModel = new DeleteDedicatedHostGroupOptions.Builder() + .id("testString") .build(); - // Construct an instance of the ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext model - ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext clusterNetworkInterfacePrimaryIpPrototypeModel = new ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext.Builder() - .address("10.0.0.5") - .autoDelete(false) - .name("my-cluster-network-subnet-reserved-ip") - .build(); + // Invoke deleteDedicatedHostGroup() with a valid options model and verify the result + Response response = vpcService.deleteDedicatedHostGroup(deleteDedicatedHostGroupOptionsModel).execute(); + assertNotNull(response); + Void responseObj = response.getResult(); + assertNull(responseObj); - // Construct an instance of the ClusterNetworkSubnetIdentityById model - ClusterNetworkSubnetIdentityById clusterNetworkSubnetIdentityModel = new ClusterNetworkSubnetIdentityById.Builder() - .id("0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930") - .build(); + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "DELETE"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, deleteDedicatedHostGroupPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } - // Construct an instance of the InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment model - InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceModel = new InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment.Builder() - .autoDelete(false) - .name("my-cluster-network-interface") - .primaryIp(clusterNetworkInterfacePrimaryIpPrototypeModel) - .subnet(clusterNetworkSubnetIdentityModel) - .build(); + // Test the deleteDedicatedHostGroup operation with and without retries enabled + @Test + public void testDeleteDedicatedHostGroupWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testDeleteDedicatedHostGroupWOptions(); - // Construct an instance of the InstanceClusterNetworkAttachmentPrototypeInstanceContext model - InstanceClusterNetworkAttachmentPrototypeInstanceContext instanceClusterNetworkAttachmentPrototypeInstanceContextModel = new InstanceClusterNetworkAttachmentPrototypeInstanceContext.Builder() - .clusterNetworkInterface(instanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceModel) - .name("my-instance-network-attachment") - .build(); + vpcService.disableRetries(); + testDeleteDedicatedHostGroupWOptions(); + } - // Construct an instance of the TrustedProfileIdentityById model - TrustedProfileIdentityById trustedProfileIdentityModel = new TrustedProfileIdentityById.Builder() - .id("Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5") - .build(); + // Test the deleteDedicatedHostGroup operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testDeleteDedicatedHostGroupNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.deleteDedicatedHostGroup(null).execute(); + } - // Construct an instance of the InstanceDefaultTrustedProfilePrototype model - InstanceDefaultTrustedProfilePrototype instanceDefaultTrustedProfilePrototypeModel = new InstanceDefaultTrustedProfilePrototype.Builder() - .autoLink(false) - .target(trustedProfileIdentityModel) - .build(); + // Test the getDedicatedHost operation with a valid options model parameter + @Test + public void testGetDedicatedHostWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"available_memory\": 128, \"available_vcpu\": {\"architecture\": \"amd64\", \"count\": 4, \"manufacturer\": \"intel\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"disks\": [{\"available\": 9, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"id\": \"0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"instance_disks\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\"}], \"interface_type\": \"nvme\", \"lifecycle_state\": \"stable\", \"name\": \"my-dedicated-host-disk\", \"provisionable\": false, \"resource_type\": \"dedicated_host_disk\", \"size\": 4, \"supported_instance_interface_types\": [\"nvme\"]}], \"group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"id\": \"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"name\": \"my-dedicated-host-group\", \"resource_type\": \"dedicated_host_group\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"instance_placement_enabled\": true, \"instances\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}], \"lifecycle_state\": \"stable\", \"memory\": 128, \"name\": \"my-host\", \"numa\": {\"count\": 2, \"nodes\": [{\"available_vcpu\": 24, \"vcpu\": 56}]}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"name\": \"mx2-host-152x1216\"}, \"provisionable\": false, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"dedicated_host\", \"socket_count\": 4, \"state\": \"available\", \"supported_instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"vcpu\": {\"architecture\": \"amd64\", \"count\": 4, \"manufacturer\": \"intel\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String getDedicatedHostPath = "/dedicated_hosts/testString"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); - // Construct an instance of the KeyIdentityById model - KeyIdentityById keyIdentityModel = new KeyIdentityById.Builder() - .id("r006-82679077-ac3b-4c10-be16-63e9c21f0f45") + // Construct an instance of the GetDedicatedHostOptions model + GetDedicatedHostOptions getDedicatedHostOptionsModel = new GetDedicatedHostOptions.Builder() + .id("testString") .build(); - // Construct an instance of the InstanceMetadataServicePrototype model - InstanceMetadataServicePrototype instanceMetadataServicePrototypeModel = new InstanceMetadataServicePrototype.Builder() - .enabled(false) - .protocol("https") - .responseHopLimit(Long.valueOf("2")) - .build(); + // Invoke getDedicatedHost() with a valid options model and verify the result + Response response = vpcService.getDedicatedHost(getDedicatedHostOptionsModel).execute(); + assertNotNull(response); + DedicatedHost responseObj = response.getResult(); + assertNotNull(responseObj); - // Construct an instance of the InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById model - InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instancePlacementTargetPrototypeModel = new InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById.Builder() - .id("0717-1e09281b-f177-46fb-baf1-bc152b2e391a") - .build(); + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "GET"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, getDedicatedHostPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } - // Construct an instance of the InstanceProfileIdentityByName model - InstanceProfileIdentityByName instanceProfileIdentityModel = new InstanceProfileIdentityByName.Builder() - .name("bx2-4x16") - .build(); + // Test the getDedicatedHost operation with and without retries enabled + @Test + public void testGetDedicatedHostWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testGetDedicatedHostWOptions(); - // Construct an instance of the ReservationIdentityById model - ReservationIdentityById reservationIdentityModel = new ReservationIdentityById.Builder() - .id("0717-ba49df72-37b8-43ac-98da-f8e029de0e63") - .build(); + vpcService.disableRetries(); + testGetDedicatedHostWOptions(); + } - // Construct an instance of the InstanceReservationAffinityPrototype model - InstanceReservationAffinityPrototype instanceReservationAffinityPrototypeModel = new InstanceReservationAffinityPrototype.Builder() - .policy("automatic") - .pool(java.util.Arrays.asList(reservationIdentityModel)) - .build(); + // Test the getDedicatedHost operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testGetDedicatedHostNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.getDedicatedHost(null).execute(); + } - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); + // Test the getDedicatedHostDisk operation with a valid options model parameter + @Test + public void testGetDedicatedHostDiskWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"available\": 9, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"id\": \"0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"instance_disks\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\"}], \"interface_type\": \"nvme\", \"lifecycle_state\": \"stable\", \"name\": \"my-dedicated-host-disk\", \"provisionable\": false, \"resource_type\": \"dedicated_host_disk\", \"size\": 4, \"supported_instance_interface_types\": [\"nvme\"]}"; + String getDedicatedHostDiskPath = "/dedicated_hosts/testString/disks/testString"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); - // Construct an instance of the VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById model - VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById volumeAttachmentPrototypeVolumeModel = new VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById.Builder() - .id("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + // Construct an instance of the GetDedicatedHostDiskOptions model + GetDedicatedHostDiskOptions getDedicatedHostDiskOptionsModel = new GetDedicatedHostDiskOptions.Builder() + .dedicatedHostId("testString") + .id("testString") .build(); - // Construct an instance of the VolumeAttachmentPrototype model - VolumeAttachmentPrototype volumeAttachmentPrototypeModel = new VolumeAttachmentPrototype.Builder() - .deleteVolumeOnInstanceDelete(false) - .name("my-volume-attachment") - .volume(volumeAttachmentPrototypeVolumeModel) - .build(); + // Invoke getDedicatedHostDisk() with a valid options model and verify the result + Response response = vpcService.getDedicatedHostDisk(getDedicatedHostDiskOptionsModel).execute(); + assertNotNull(response); + DedicatedHostDisk responseObj = response.getResult(); + assertNotNull(responseObj); - // Construct an instance of the VPCIdentityById model - VPCIdentityById vpcIdentityModel = new VPCIdentityById.Builder() - .id("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .build(); + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "GET"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, getDedicatedHostDiskPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } - // Construct an instance of the EncryptionKeyIdentityByCRN model - EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() - .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") - .build(); + // Test the getDedicatedHostDisk operation with and without retries enabled + @Test + public void testGetDedicatedHostDiskWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testGetDedicatedHostDiskWOptions(); - // Construct an instance of the VolumeProfileIdentityByName model - VolumeProfileIdentityByName volumeProfileIdentityModel = new VolumeProfileIdentityByName.Builder() - .name("general-purpose") - .build(); + vpcService.disableRetries(); + testGetDedicatedHostDiskWOptions(); + } - // Construct an instance of the VolumePrototypeInstanceByImageContext model - VolumePrototypeInstanceByImageContext volumePrototypeInstanceByImageContextModel = new VolumePrototypeInstanceByImageContext.Builder() - .bandwidth(Long.valueOf("1000")) - .capacity(Long.valueOf("100")) - .encryptionKey(encryptionKeyIdentityModel) - .iops(Long.valueOf("10000")) - .name("my-boot-volume") - .profile(volumeProfileIdentityModel) - .resourceGroup(resourceGroupIdentityModel) - .userTags(java.util.Arrays.asList()) - .build(); - - // Construct an instance of the VolumeAttachmentPrototypeInstanceByImageContext model - VolumeAttachmentPrototypeInstanceByImageContext volumeAttachmentPrototypeInstanceByImageContextModel = new VolumeAttachmentPrototypeInstanceByImageContext.Builder() - .deleteVolumeOnInstanceDelete(true) - .name("my-volume-attachment") - .volume(volumePrototypeInstanceByImageContextModel) - .build(); - - // Construct an instance of the ImageIdentityById model - ImageIdentityById imageIdentityModel = new ImageIdentityById.Builder() - .id("r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") - .build(); - - // Construct an instance of the ZoneIdentityByName model - ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() - .name("us-south-1") - .build(); - - // Construct an instance of the VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext model - VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtualNetworkInterfaceIpPrototypeModel = new VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext.Builder() - .address("10.0.0.5") - .autoDelete(false) - .name("my-reserved-ip") - .build(); - - // Construct an instance of the VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model - VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext virtualNetworkInterfacePrimaryIpPrototypeModel = new VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext.Builder() - .address("10.0.0.5") - .autoDelete(false) - .name("my-reserved-ip") - .build(); - - // Construct an instance of the SecurityGroupIdentityById model - SecurityGroupIdentityById securityGroupIdentityModel = new SecurityGroupIdentityById.Builder() - .id("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") - .build(); - - // Construct an instance of the SubnetIdentityById model - SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() - .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") - .build(); - - // Construct an instance of the InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext model - InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext instanceNetworkAttachmentPrototypeVirtualNetworkInterfaceModel = new InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext.Builder() - .allowIpSpoofing(true) - .autoDelete(false) - .enableInfrastructureNat(true) - .ips(java.util.Arrays.asList(virtualNetworkInterfaceIpPrototypeModel)) - .name("my-virtual-network-interface") - .primaryIp(virtualNetworkInterfacePrimaryIpPrototypeModel) - .protocolStateFilteringMode("auto") - .resourceGroup(resourceGroupIdentityModel) - .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) - .subnet(subnetIdentityModel) - .build(); - - // Construct an instance of the InstanceNetworkAttachmentPrototype model - InstanceNetworkAttachmentPrototype instanceNetworkAttachmentPrototypeModel = new InstanceNetworkAttachmentPrototype.Builder() - .name("my-instance-network-attachment") - .virtualNetworkInterface(instanceNetworkAttachmentPrototypeVirtualNetworkInterfaceModel) - .build(); + // Test the getDedicatedHostDisk operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testGetDedicatedHostDiskNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.getDedicatedHostDisk(null).execute(); + } - // Construct an instance of the InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment model - InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment instanceTemplatePrototypeModel = new InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment.Builder() - .availabilityPolicy(instanceAvailabilityPolicyPrototypeModel) - .clusterNetworkAttachments(java.util.Arrays.asList(instanceClusterNetworkAttachmentPrototypeInstanceContextModel)) - .confidentialComputeMode("disabled") - .defaultTrustedProfile(instanceDefaultTrustedProfilePrototypeModel) - .enableSecureBoot(true) - .keys(java.util.Arrays.asList(keyIdentityModel)) - .metadataService(instanceMetadataServicePrototypeModel) - .name("my-instance") - .placementTarget(instancePlacementTargetPrototypeModel) - .profile(instanceProfileIdentityModel) - .reservationAffinity(instanceReservationAffinityPrototypeModel) - .resourceGroup(resourceGroupIdentityModel) - .totalVolumeBandwidth(Long.valueOf("500")) - .userData("testString") - .volumeAttachments(java.util.Arrays.asList(volumeAttachmentPrototypeModel)) - .vpc(vpcIdentityModel) - .bootVolumeAttachment(volumeAttachmentPrototypeInstanceByImageContextModel) - .image(imageIdentityModel) - .zone(zoneIdentityModel) - .networkAttachments(java.util.Arrays.asList(instanceNetworkAttachmentPrototypeModel)) - .primaryNetworkAttachment(instanceNetworkAttachmentPrototypeModel) - .build(); + // Test the getDedicatedHostGroup operation with a valid options model parameter + @Test + public void testGetDedicatedHostGroupWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"class\": \"bx2\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"dedicated_hosts\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"name\": \"my-host\", \"resource_type\": \"dedicated_host\"}], \"family\": \"balanced\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"id\": \"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"name\": \"my-dedicated-host-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"dedicated_host_group\", \"supported_instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String getDedicatedHostGroupPath = "/dedicated_host/groups/testString"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); - // Construct an instance of the CreateInstanceTemplateOptions model - CreateInstanceTemplateOptions createInstanceTemplateOptionsModel = new CreateInstanceTemplateOptions.Builder() - .instanceTemplatePrototype(instanceTemplatePrototypeModel) + // Construct an instance of the GetDedicatedHostGroupOptions model + GetDedicatedHostGroupOptions getDedicatedHostGroupOptionsModel = new GetDedicatedHostGroupOptions.Builder() + .id("testString") .build(); - // Invoke createInstanceTemplate() with a valid options model and verify the result - Response response = vpcService.createInstanceTemplate(createInstanceTemplateOptionsModel).execute(); + // Invoke getDedicatedHostGroup() with a valid options model and verify the result + Response response = vpcService.getDedicatedHostGroup(getDedicatedHostGroupOptionsModel).execute(); assertNotNull(response); - InstanceTemplate responseObj = response.getResult(); + DedicatedHostGroup responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createInstanceTemplatePath); + assertEquals(parsedPath, getDedicatedHostGroupPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createInstanceTemplate operation with and without retries enabled + // Test the getDedicatedHostGroup operation with and without retries enabled @Test - public void testCreateInstanceTemplateWRetries() throws Throwable { + public void testGetDedicatedHostGroupWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateInstanceTemplateWOptions(); + testGetDedicatedHostGroupWOptions(); vpcService.disableRetries(); - testCreateInstanceTemplateWOptions(); + testGetDedicatedHostGroupWOptions(); } - // Test the createInstanceTemplate operation with a null options model (negative test) + // Test the getDedicatedHostGroup operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateInstanceTemplateNoOptions() throws Throwable { + public void testGetDedicatedHostGroupNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createInstanceTemplate(null).execute(); + vpcService.getDedicatedHostGroup(null).execute(); } - // Test the deleteInstanceTemplate operation with a valid options model parameter + // Test the getDedicatedHostProfile operation with a valid options model parameter @Test - public void testDeleteInstanceTemplateWOptions() throws Throwable { + public void testGetDedicatedHostProfileWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteInstanceTemplatePath = "/instance/templates/testString"; + String mockResponseBody = "{\"class\": \"bx2\", \"disks\": [{\"interface_type\": {\"type\": \"fixed\", \"value\": \"nvme\"}, \"quantity\": {\"type\": \"fixed\", \"value\": 4}, \"size\": {\"type\": \"fixed\", \"value\": 3200}, \"supported_instance_interface_types\": {\"type\": \"fixed\", \"value\": [\"nvme\"]}}], \"family\": \"balanced\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"memory\": {\"type\": \"fixed\", \"value\": 16}, \"name\": \"mx2-host-152x1216\", \"socket_count\": {\"type\": \"fixed\", \"value\": 2}, \"status\": \"current\", \"supported_instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"vcpu_architecture\": {\"type\": \"fixed\", \"value\": \"amd64\"}, \"vcpu_count\": {\"type\": \"fixed\", \"value\": 16}, \"vcpu_manufacturer\": {\"type\": \"fixed\", \"value\": \"intel\"}}"; + String getDedicatedHostProfilePath = "/dedicated_host/profiles/mx2-host-152x1216"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteInstanceTemplateOptions model - DeleteInstanceTemplateOptions deleteInstanceTemplateOptionsModel = new DeleteInstanceTemplateOptions.Builder() - .id("testString") + // Construct an instance of the GetDedicatedHostProfileOptions model + GetDedicatedHostProfileOptions getDedicatedHostProfileOptionsModel = new GetDedicatedHostProfileOptions.Builder() + .name("mx2-host-152x1216") .build(); - // Invoke deleteInstanceTemplate() with a valid options model and verify the result - Response response = vpcService.deleteInstanceTemplate(deleteInstanceTemplateOptionsModel).execute(); + // Invoke getDedicatedHostProfile() with a valid options model and verify the result + Response response = vpcService.getDedicatedHostProfile(getDedicatedHostProfileOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + DedicatedHostProfile 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteInstanceTemplatePath); + assertEquals(parsedPath, getDedicatedHostProfilePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteInstanceTemplate operation with and without retries enabled + // Test the getDedicatedHostProfile operation with and without retries enabled @Test - public void testDeleteInstanceTemplateWRetries() throws Throwable { + public void testGetDedicatedHostProfileWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteInstanceTemplateWOptions(); + testGetDedicatedHostProfileWOptions(); vpcService.disableRetries(); - testDeleteInstanceTemplateWOptions(); + testGetDedicatedHostProfileWOptions(); } - // Test the deleteInstanceTemplate operation with a null options model (negative test) + // Test the getDedicatedHostProfile operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteInstanceTemplateNoOptions() throws Throwable { + public void testGetDedicatedHostProfileNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteInstanceTemplate(null).execute(); + vpcService.getDedicatedHostProfile(null).execute(); } - // Test the getInstanceTemplate operation with a valid options model parameter + // Test the listDedicatedHostDisks operation with a valid options model parameter @Test - public void testGetInstanceTemplateWOptions() throws Throwable { + public void testListDedicatedHostDisksWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"availability_policy\": {\"host_failure\": \"restart\"}, \"cluster_network_attachments\": [{\"cluster_network_interface\": {\"auto_delete\": false, \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\"}, \"subnet\": {\"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\"}}, \"name\": \"my-instance-network-attachment\"}], \"confidential_compute_mode\": \"disabled\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"default_trusted_profile\": {\"auto_link\": false, \"target\": {\"id\": \"Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5\"}}, \"enable_secure_boot\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"id\": \"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"keys\": [{\"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\"}], \"metadata_service\": {\"enabled\": false, \"protocol\": \"https\", \"response_hop_limit\": 2}, \"name\": \"my-instance-template\", \"placement_target\": {\"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\"}, \"profile\": {\"name\": \"bx2-4x16\"}, \"reservation_affinity\": {\"policy\": \"automatic\", \"pool\": [{\"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\"}]}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"total_volume_bandwidth\": 500, \"user_data\": \"userData\", \"volume_attachments\": [{\"delete_volume_on_instance_delete\": false, \"name\": \"my-volume-attachment\", \"volume\": {\"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\"}}], \"vpc\": {\"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\"}, \"boot_volume_attachment\": {\"delete_volume_on_instance_delete\": true, \"name\": \"my-volume-attachment\", \"volume\": {\"bandwidth\": 1000, \"capacity\": 100, \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"iops\": 10000, \"name\": \"my-volume\", \"profile\": {\"name\": \"general-purpose\"}, \"resource_group\": {\"id\": \"fee82deba12e4c0fb69c3b09d1f12345\"}, \"user_tags\": [\"userTags\"]}}, \"image\": {\"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\"}, \"zone\": {\"name\": \"us-south-1\"}, \"network_attachments\": [{\"name\": \"my-instance-network-attachment\", \"virtual_network_interface\": {\"allow_ip_spoofing\": true, \"auto_delete\": false, \"enable_infrastructure_nat\": true, \"ips\": [{\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}], \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"id\": \"fee82deba12e4c0fb69c3b09d1f12345\"}, \"security_groups\": [{\"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\"}], \"subnet\": {\"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\"}}}], \"primary_network_attachment\": {\"name\": \"my-instance-network-attachment\", \"virtual_network_interface\": {\"allow_ip_spoofing\": true, \"auto_delete\": false, \"enable_infrastructure_nat\": true, \"ips\": [{\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}], \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"id\": \"fee82deba12e4c0fb69c3b09d1f12345\"}, \"security_groups\": [{\"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\"}], \"subnet\": {\"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\"}}}}"; - String getInstanceTemplatePath = "/instance/templates/testString"; + String mockResponseBody = "{\"disks\": [{\"available\": 9, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"id\": \"0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"instance_disks\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\"}], \"interface_type\": \"nvme\", \"lifecycle_state\": \"stable\", \"name\": \"my-dedicated-host-disk\", \"provisionable\": false, \"resource_type\": \"dedicated_host_disk\", \"size\": 4, \"supported_instance_interface_types\": [\"nvme\"]}]}"; + String listDedicatedHostDisksPath = "/dedicated_hosts/testString/disks"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetInstanceTemplateOptions model - GetInstanceTemplateOptions getInstanceTemplateOptionsModel = new GetInstanceTemplateOptions.Builder() - .id("testString") + // Construct an instance of the ListDedicatedHostDisksOptions model + ListDedicatedHostDisksOptions listDedicatedHostDisksOptionsModel = new ListDedicatedHostDisksOptions.Builder() + .dedicatedHostId("testString") .build(); - // Invoke getInstanceTemplate() with a valid options model and verify the result - Response response = vpcService.getInstanceTemplate(getInstanceTemplateOptionsModel).execute(); + // Invoke listDedicatedHostDisks() with a valid options model and verify the result + Response response = vpcService.listDedicatedHostDisks(listDedicatedHostDisksOptionsModel).execute(); assertNotNull(response); - InstanceTemplate responseObj = response.getResult(); + DedicatedHostDiskCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -7301,130 +7495,175 @@ public void testGetInstanceTemplateWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getInstanceTemplatePath); + assertEquals(parsedPath, listDedicatedHostDisksPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getInstanceTemplate operation with and without retries enabled + // Test the listDedicatedHostDisks operation with and without retries enabled @Test - public void testGetInstanceTemplateWRetries() throws Throwable { + public void testListDedicatedHostDisksWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetInstanceTemplateWOptions(); + testListDedicatedHostDisksWOptions(); vpcService.disableRetries(); - testGetInstanceTemplateWOptions(); + testListDedicatedHostDisksWOptions(); } - // Test the getInstanceTemplate operation with a null options model (negative test) + // Test the listDedicatedHostDisks operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetInstanceTemplateNoOptions() throws Throwable { + public void testListDedicatedHostDisksNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getInstanceTemplate(null).execute(); + vpcService.listDedicatedHostDisks(null).execute(); } - // Test the updateInstanceTemplate operation with a valid options model parameter + // Test the listDedicatedHostGroups operation with a valid options model parameter @Test - public void testUpdateInstanceTemplateWOptions() throws Throwable { + public void testListDedicatedHostGroupsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"availability_policy\": {\"host_failure\": \"restart\"}, \"cluster_network_attachments\": [{\"cluster_network_interface\": {\"auto_delete\": false, \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\"}, \"subnet\": {\"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\"}}, \"name\": \"my-instance-network-attachment\"}], \"confidential_compute_mode\": \"disabled\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"default_trusted_profile\": {\"auto_link\": false, \"target\": {\"id\": \"Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5\"}}, \"enable_secure_boot\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"id\": \"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"keys\": [{\"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\"}], \"metadata_service\": {\"enabled\": false, \"protocol\": \"https\", \"response_hop_limit\": 2}, \"name\": \"my-instance-template\", \"placement_target\": {\"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\"}, \"profile\": {\"name\": \"bx2-4x16\"}, \"reservation_affinity\": {\"policy\": \"automatic\", \"pool\": [{\"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\"}]}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"total_volume_bandwidth\": 500, \"user_data\": \"userData\", \"volume_attachments\": [{\"delete_volume_on_instance_delete\": false, \"name\": \"my-volume-attachment\", \"volume\": {\"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\"}}], \"vpc\": {\"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\"}, \"boot_volume_attachment\": {\"delete_volume_on_instance_delete\": true, \"name\": \"my-volume-attachment\", \"volume\": {\"bandwidth\": 1000, \"capacity\": 100, \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"iops\": 10000, \"name\": \"my-volume\", \"profile\": {\"name\": \"general-purpose\"}, \"resource_group\": {\"id\": \"fee82deba12e4c0fb69c3b09d1f12345\"}, \"user_tags\": [\"userTags\"]}}, \"image\": {\"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\"}, \"zone\": {\"name\": \"us-south-1\"}, \"network_attachments\": [{\"name\": \"my-instance-network-attachment\", \"virtual_network_interface\": {\"allow_ip_spoofing\": true, \"auto_delete\": false, \"enable_infrastructure_nat\": true, \"ips\": [{\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}], \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"id\": \"fee82deba12e4c0fb69c3b09d1f12345\"}, \"security_groups\": [{\"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\"}], \"subnet\": {\"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\"}}}], \"primary_network_attachment\": {\"name\": \"my-instance-network-attachment\", \"virtual_network_interface\": {\"allow_ip_spoofing\": true, \"auto_delete\": false, \"enable_infrastructure_nat\": true, \"ips\": [{\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}], \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"id\": \"fee82deba12e4c0fb69c3b09d1f12345\"}, \"security_groups\": [{\"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\"}], \"subnet\": {\"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\"}}}}"; - String updateInstanceTemplatePath = "/instance/templates/testString"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"groups\": [{\"class\": \"bx2\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"dedicated_hosts\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"name\": \"my-host\", \"resource_type\": \"dedicated_host\"}], \"family\": \"balanced\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"id\": \"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"name\": \"my-dedicated-host-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"dedicated_host_group\", \"supported_instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listDedicatedHostGroupsPath = "/dedicated_host/groups"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the InstanceTemplatePatch model - InstanceTemplatePatch instanceTemplatePatchModel = new InstanceTemplatePatch.Builder() - .name("my-instance-template-updated") - .build(); - Map instanceTemplatePatchModelAsPatch = instanceTemplatePatchModel.asPatch(); - - // Construct an instance of the UpdateInstanceTemplateOptions model - UpdateInstanceTemplateOptions updateInstanceTemplateOptionsModel = new UpdateInstanceTemplateOptions.Builder() - .id("testString") - .instanceTemplatePatch(instanceTemplatePatchModelAsPatch) + // Construct an instance of the ListDedicatedHostGroupsOptions model + ListDedicatedHostGroupsOptions listDedicatedHostGroupsOptionsModel = new ListDedicatedHostGroupsOptions.Builder() + .start("testString") + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .zoneName("us-south-1") + .name("my-name") .build(); - // Invoke updateInstanceTemplate() with a valid options model and verify the result - Response response = vpcService.updateInstanceTemplate(updateInstanceTemplateOptionsModel).execute(); + // Invoke listDedicatedHostGroups() with a valid options model and verify the result + Response response = vpcService.listDedicatedHostGroups(listDedicatedHostGroupsOptionsModel).execute(); assertNotNull(response); - InstanceTemplate responseObj = response.getResult(); + DedicatedHostGroupCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateInstanceTemplatePath); + assertEquals(parsedPath, listDedicatedHostGroupsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("resource_group.id"), "testString"); + assertEquals(query.get("zone.name"), "us-south-1"); + assertEquals(query.get("name"), "my-name"); } - // Test the updateInstanceTemplate operation with and without retries enabled + // Test the listDedicatedHostGroups operation with and without retries enabled @Test - public void testUpdateInstanceTemplateWRetries() throws Throwable { + public void testListDedicatedHostGroupsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateInstanceTemplateWOptions(); + testListDedicatedHostGroupsWOptions(); vpcService.disableRetries(); - testUpdateInstanceTemplateWOptions(); + testListDedicatedHostGroupsWOptions(); } - // Test the updateInstanceTemplate operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateInstanceTemplateNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.updateInstanceTemplate(null).execute(); + // Test the listDedicatedHostGroups operation using the DedicatedHostGroupsPager.getNext() method + @Test + public void testListDedicatedHostGroupsWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"groups\":[{\"class\":\"bx2\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"dedicated_hosts\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"id\":\"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"name\":\"my-host\",\"resource_type\":\"dedicated_host\"}],\"family\":\"balanced\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"id\":\"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"name\":\"my-dedicated-host-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"dedicated_host_group\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"groups\":[{\"class\":\"bx2\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"dedicated_hosts\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"id\":\"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"name\":\"my-host\",\"resource_type\":\"dedicated_host\"}],\"family\":\"balanced\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"id\":\"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"name\":\"my-dedicated-host-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"dedicated_host_group\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListDedicatedHostGroupsOptions listDedicatedHostGroupsOptions = new ListDedicatedHostGroupsOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .zoneName("us-south-1") + .name("my-name") + .build(); + + List allResults = new ArrayList<>(); + DedicatedHostGroupsPager pager = new DedicatedHostGroupsPager(vpcService, listDedicatedHostGroupsOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } + + // Test the listDedicatedHostGroups operation using the DedicatedHostGroupsPager.getAll() method + @Test + public void testListDedicatedHostGroupsWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"groups\":[{\"class\":\"bx2\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"dedicated_hosts\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"id\":\"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"name\":\"my-host\",\"resource_type\":\"dedicated_host\"}],\"family\":\"balanced\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"id\":\"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"name\":\"my-dedicated-host-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"dedicated_host_group\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"groups\":[{\"class\":\"bx2\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"dedicated_hosts\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"id\":\"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"name\":\"my-host\",\"resource_type\":\"dedicated_host\"}],\"family\":\"balanced\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"id\":\"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"name\":\"my-dedicated-host-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"dedicated_host_group\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Test the listInstances operation with a valid options model parameter + ListDedicatedHostGroupsOptions listDedicatedHostGroupsOptions = new ListDedicatedHostGroupsOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .zoneName("us-south-1") + .name("my-name") + .build(); + + DedicatedHostGroupsPager pager = new DedicatedHostGroupsPager(vpcService, listDedicatedHostGroupsOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); + } + + // Test the listDedicatedHostProfiles operation with a valid options model parameter @Test - public void testListInstancesWOptions() throws Throwable { + public void testListDedicatedHostProfilesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"instances\": [{\"availability_policy\": {\"host_failure\": \"restart\"}, \"bandwidth\": 1000, \"boot_volume_attachment\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"name\": \"my-volume-attachment\", \"volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"resource_type\": \"volume\"}}, \"catalog_offering\": {\"plan\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}}, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"cluster_network\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"id\": \"0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"name\": \"my-cluster-network\", \"resource_type\": \"cluster_network\"}, \"cluster_network_attachments\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}], \"confidential_compute_mode\": \"disabled\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"dedicated_host\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"name\": \"my-host\", \"resource_type\": \"dedicated_host\"}, \"disks\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"interface_type\": \"nvme\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\", \"size\": 100}], \"enable_secure_boot\": true, \"gpu\": {\"count\": 1, \"manufacturer\": \"amd\", \"memory\": 1, \"model\": \"Tesla V100\"}, \"health_reasons\": [{\"code\": \"reservation_expired\", \"message\": \"The reservation cannot be used because it has expired.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"memory\": 64, \"metadata_service\": {\"enabled\": false, \"protocol\": \"http\", \"response_hop_limit\": 1}, \"name\": \"my-instance\", \"network_attachments\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"instance_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}], \"network_interfaces\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}], \"numa_count\": 2, \"placement_target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"id\": \"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"name\": \"my-dedicated-host-group\", \"resource_type\": \"dedicated_host_group\"}, \"primary_network_attachment\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"instance_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}, \"primary_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}, \"reservation\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}, \"reservation_affinity\": {\"policy\": \"automatic\", \"pool\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}]}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"instance\", \"startable\": false, \"status\": \"deleting\", \"status_reasons\": [{\"code\": \"cannot_start_storage\", \"message\": \"The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"total_network_bandwidth\": 500, \"total_volume_bandwidth\": 500, \"vcpu\": {\"architecture\": \"amd64\", \"count\": 4, \"manufacturer\": \"intel\"}, \"volume_attachments\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"name\": \"my-volume-attachment\", \"volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"resource_type\": \"volume\"}}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listInstancesPath = "/instances"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"profiles\": [{\"class\": \"bx2\", \"disks\": [{\"interface_type\": {\"type\": \"fixed\", \"value\": \"nvme\"}, \"quantity\": {\"type\": \"fixed\", \"value\": 4}, \"size\": {\"type\": \"fixed\", \"value\": 3200}, \"supported_instance_interface_types\": {\"type\": \"fixed\", \"value\": [\"nvme\"]}}], \"family\": \"balanced\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"memory\": {\"type\": \"fixed\", \"value\": 16}, \"name\": \"mx2-host-152x1216\", \"socket_count\": {\"type\": \"fixed\", \"value\": 2}, \"status\": \"current\", \"supported_instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"vcpu_architecture\": {\"type\": \"fixed\", \"value\": \"amd64\"}, \"vcpu_count\": {\"type\": \"fixed\", \"value\": 16}, \"vcpu_manufacturer\": {\"type\": \"fixed\", \"value\": \"intel\"}}], \"total_count\": 132}"; + String listDedicatedHostProfilesPath = "/dedicated_host/profiles"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListInstancesOptions model - ListInstancesOptions listInstancesOptionsModel = new ListInstancesOptions.Builder() + // Construct an instance of the ListDedicatedHostProfilesOptions model + ListDedicatedHostProfilesOptions listDedicatedHostProfilesOptionsModel = new ListDedicatedHostProfilesOptions.Builder() .start("testString") .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .name("my-name") - .clusterNetworkId("testString") - .clusterNetworkCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573") - .clusterNetworkName("my-cluster-network") - .dedicatedHostId("testString") - .dedicatedHostCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a") - .dedicatedHostName("my-dedicated-host") - .placementGroupId("testString") - .placementGroupCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871") - .placementGroupName("my-placement-group") - .reservationAffinityPolicy("automatic") - .reservationId("testString") - .reservationCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63") - .reservationName("my-reservation") - .vpcId("testString") - .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .vpcName("my-vpc") .build(); - // Invoke listInstances() with a valid options model and verify the result - Response response = vpcService.listInstances(listInstancesOptionsModel).execute(); + // Invoke listDedicatedHostProfiles() with a valid options model and verify the result + Response response = vpcService.listDedicatedHostProfiles(listDedicatedHostProfilesOptionsModel).execute(); assertNotNull(response); - InstanceCollection responseObj = response.getResult(); + DedicatedHostProfileCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -7433,50 +7672,32 @@ public void testListInstancesWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listInstancesPath); + assertEquals(parsedPath, listDedicatedHostProfilesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("resource_group.id"), "testString"); - assertEquals(query.get("name"), "my-name"); - assertEquals(query.get("cluster_network.id"), "testString"); - assertEquals(query.get("cluster_network.crn"), "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573"); - assertEquals(query.get("cluster_network.name"), "my-cluster-network"); - assertEquals(query.get("dedicated_host.id"), "testString"); - assertEquals(query.get("dedicated_host.crn"), "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a"); - assertEquals(query.get("dedicated_host.name"), "my-dedicated-host"); - assertEquals(query.get("placement_group.id"), "testString"); - assertEquals(query.get("placement_group.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871"); - assertEquals(query.get("placement_group.name"), "my-placement-group"); - assertEquals(query.get("reservation_affinity.policy"), "automatic"); - assertEquals(query.get("reservation.id"), "testString"); - assertEquals(query.get("reservation.crn"), "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63"); - assertEquals(query.get("reservation.name"), "my-reservation"); - assertEquals(query.get("vpc.id"), "testString"); - assertEquals(query.get("vpc.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); - assertEquals(query.get("vpc.name"), "my-vpc"); } - // Test the listInstances operation with and without retries enabled + // Test the listDedicatedHostProfiles operation with and without retries enabled @Test - public void testListInstancesWRetries() throws Throwable { + public void testListDedicatedHostProfilesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListInstancesWOptions(); + testListDedicatedHostProfilesWOptions(); vpcService.disableRetries(); - testListInstancesWOptions(); + testListDedicatedHostProfilesWOptions(); } - // Test the listInstances operation using the InstancesPager.getNext() method + // Test the listDedicatedHostProfiles operation using the DedicatedHostProfilesPager.getNext() method @Test - public void testListInstancesWithPagerGetNext() throws Throwable { + public void testListDedicatedHostProfilesWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"instances\":[{\"availability_policy\":{\"host_failure\":\"restart\"},\"bandwidth\":1000,\"boot_volume_attachment\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"device\":{\"id\":\"id\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"id\":\"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"name\":\"my-volume-attachment\",\"volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"resource_type\":\"volume\"}},\"catalog_offering\":{\"plan\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}},\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"cluster_network\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"id\":\"0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"name\":\"my-cluster-network\",\"resource_type\":\"cluster_network\"},\"cluster_network_attachments\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"}],\"confidential_compute_mode\":\"disabled\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"dedicated_host\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"id\":\"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"name\":\"my-host\",\"resource_type\":\"dedicated_host\"},\"disks\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\",\"id\":\"10c02d81-0ecb-4dc5-897d-28392913b81e\",\"interface_type\":\"nvme\",\"name\":\"my-instance-disk\",\"resource_type\":\"instance_disk\",\"size\":100}],\"enable_secure_boot\":true,\"gpu\":{\"count\":1,\"manufacturer\":\"amd\",\"memory\":1,\"model\":\"Tesla V100\"},\"health_reasons\":[{\"code\":\"reservation_expired\",\"message\":\"The reservation cannot be used because it has expired.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"image\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"name\":\"my-image\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"image\"},\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"memory\":64,\"metadata_service\":{\"enabled\":false,\"protocol\":\"http\",\"response_hop_limit\":1},\"name\":\"my-instance\",\"network_attachments\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"instance_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}}],\"network_interfaces\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}}],\"numa_count\":2,\"placement_target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"id\":\"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"name\":\"my-dedicated-host-group\",\"resource_type\":\"dedicated_host_group\"},\"primary_network_attachment\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"instance_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}},\"primary_network_interface\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"},\"reservation\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"},\"reservation_affinity\":{\"policy\":\"automatic\",\"pool\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"}]},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"instance\",\"startable\":false,\"status\":\"deleting\",\"status_reasons\":[{\"code\":\"cannot_start_storage\",\"message\":\"The virtual server instance is unusable because the encryption key for the boot volume\\nhas been deleted\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"total_network_bandwidth\":500,\"total_volume_bandwidth\":500,\"vcpu\":{\"architecture\":\"amd64\",\"count\":4,\"manufacturer\":\"intel\"},\"volume_attachments\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"device\":{\"id\":\"id\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"id\":\"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"name\":\"my-volume-attachment\",\"volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"resource_type\":\"volume\"}}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"instances\":[{\"availability_policy\":{\"host_failure\":\"restart\"},\"bandwidth\":1000,\"boot_volume_attachment\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"device\":{\"id\":\"id\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"id\":\"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"name\":\"my-volume-attachment\",\"volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"resource_type\":\"volume\"}},\"catalog_offering\":{\"plan\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}},\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"cluster_network\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"id\":\"0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"name\":\"my-cluster-network\",\"resource_type\":\"cluster_network\"},\"cluster_network_attachments\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"}],\"confidential_compute_mode\":\"disabled\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"dedicated_host\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"id\":\"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"name\":\"my-host\",\"resource_type\":\"dedicated_host\"},\"disks\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\",\"id\":\"10c02d81-0ecb-4dc5-897d-28392913b81e\",\"interface_type\":\"nvme\",\"name\":\"my-instance-disk\",\"resource_type\":\"instance_disk\",\"size\":100}],\"enable_secure_boot\":true,\"gpu\":{\"count\":1,\"manufacturer\":\"amd\",\"memory\":1,\"model\":\"Tesla V100\"},\"health_reasons\":[{\"code\":\"reservation_expired\",\"message\":\"The reservation cannot be used because it has expired.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"image\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"name\":\"my-image\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"image\"},\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"memory\":64,\"metadata_service\":{\"enabled\":false,\"protocol\":\"http\",\"response_hop_limit\":1},\"name\":\"my-instance\",\"network_attachments\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"instance_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}}],\"network_interfaces\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}}],\"numa_count\":2,\"placement_target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"id\":\"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"name\":\"my-dedicated-host-group\",\"resource_type\":\"dedicated_host_group\"},\"primary_network_attachment\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"instance_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}},\"primary_network_interface\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"},\"reservation\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"},\"reservation_affinity\":{\"policy\":\"automatic\",\"pool\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"}]},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"instance\",\"startable\":false,\"status\":\"deleting\",\"status_reasons\":[{\"code\":\"cannot_start_storage\",\"message\":\"The virtual server instance is unusable because the encryption key for the boot volume\\nhas been deleted\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"total_network_bandwidth\":500,\"total_volume_bandwidth\":500,\"vcpu\":{\"architecture\":\"amd64\",\"count\":4,\"manufacturer\":\"intel\"},\"volume_attachments\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"device\":{\"id\":\"id\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"id\":\"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"name\":\"my-volume-attachment\",\"volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"resource_type\":\"volume\"}}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"profiles\":[{\"class\":\"bx2\",\"disks\":[{\"interface_type\":{\"type\":\"fixed\",\"value\":\"nvme\"},\"quantity\":{\"type\":\"fixed\",\"value\":4},\"size\":{\"type\":\"fixed\",\"value\":3200},\"supported_instance_interface_types\":{\"type\":\"fixed\",\"value\":[\"nvme\"]}}],\"family\":\"balanced\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"memory\":{\"type\":\"fixed\",\"value\":16},\"name\":\"mx2-host-152x1216\",\"socket_count\":{\"type\":\"fixed\",\"value\":2},\"status\":\"current\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"vcpu_architecture\":{\"type\":\"fixed\",\"value\":\"amd64\"},\"vcpu_count\":{\"type\":\"fixed\",\"value\":16},\"vcpu_manufacturer\":{\"type\":\"fixed\",\"value\":\"intel\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"profiles\":[{\"class\":\"bx2\",\"disks\":[{\"interface_type\":{\"type\":\"fixed\",\"value\":\"nvme\"},\"quantity\":{\"type\":\"fixed\",\"value\":4},\"size\":{\"type\":\"fixed\",\"value\":3200},\"supported_instance_interface_types\":{\"type\":\"fixed\",\"value\":[\"nvme\"]}}],\"family\":\"balanced\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"memory\":{\"type\":\"fixed\",\"value\":16},\"name\":\"mx2-host-152x1216\",\"socket_count\":{\"type\":\"fixed\",\"value\":2},\"status\":\"current\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"vcpu_architecture\":{\"type\":\"fixed\",\"value\":\"amd64\"},\"vcpu_count\":{\"type\":\"fixed\",\"value\":16},\"vcpu_manufacturer\":{\"type\":\"fixed\",\"value\":\"intel\"}}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -7490,44 +7711,26 @@ public void testListInstancesWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListInstancesOptions listInstancesOptions = new ListInstancesOptions.Builder() + ListDedicatedHostProfilesOptions listDedicatedHostProfilesOptions = new ListDedicatedHostProfilesOptions.Builder() .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .name("my-name") - .clusterNetworkId("testString") - .clusterNetworkCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573") - .clusterNetworkName("my-cluster-network") - .dedicatedHostId("testString") - .dedicatedHostCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a") - .dedicatedHostName("my-dedicated-host") - .placementGroupId("testString") - .placementGroupCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871") - .placementGroupName("my-placement-group") - .reservationAffinityPolicy("automatic") - .reservationId("testString") - .reservationCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63") - .reservationName("my-reservation") - .vpcId("testString") - .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .vpcName("my-vpc") .build(); - List allResults = new ArrayList<>(); - InstancesPager pager = new InstancesPager(vpcService, listInstancesOptions); + List allResults = new ArrayList<>(); + DedicatedHostProfilesPager pager = new DedicatedHostProfilesPager(vpcService, listDedicatedHostProfilesOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listInstances operation using the InstancesPager.getAll() method + // Test the listDedicatedHostProfiles operation using the DedicatedHostProfilesPager.getAll() method @Test - public void testListInstancesWithPagerGetAll() throws Throwable { + public void testListDedicatedHostProfilesWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"instances\":[{\"availability_policy\":{\"host_failure\":\"restart\"},\"bandwidth\":1000,\"boot_volume_attachment\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"device\":{\"id\":\"id\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"id\":\"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"name\":\"my-volume-attachment\",\"volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"resource_type\":\"volume\"}},\"catalog_offering\":{\"plan\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}},\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"cluster_network\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"id\":\"0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"name\":\"my-cluster-network\",\"resource_type\":\"cluster_network\"},\"cluster_network_attachments\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"}],\"confidential_compute_mode\":\"disabled\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"dedicated_host\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"id\":\"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"name\":\"my-host\",\"resource_type\":\"dedicated_host\"},\"disks\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\",\"id\":\"10c02d81-0ecb-4dc5-897d-28392913b81e\",\"interface_type\":\"nvme\",\"name\":\"my-instance-disk\",\"resource_type\":\"instance_disk\",\"size\":100}],\"enable_secure_boot\":true,\"gpu\":{\"count\":1,\"manufacturer\":\"amd\",\"memory\":1,\"model\":\"Tesla V100\"},\"health_reasons\":[{\"code\":\"reservation_expired\",\"message\":\"The reservation cannot be used because it has expired.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"image\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"name\":\"my-image\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"image\"},\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"memory\":64,\"metadata_service\":{\"enabled\":false,\"protocol\":\"http\",\"response_hop_limit\":1},\"name\":\"my-instance\",\"network_attachments\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"instance_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}}],\"network_interfaces\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}}],\"numa_count\":2,\"placement_target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"id\":\"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"name\":\"my-dedicated-host-group\",\"resource_type\":\"dedicated_host_group\"},\"primary_network_attachment\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"instance_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}},\"primary_network_interface\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"},\"reservation\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"},\"reservation_affinity\":{\"policy\":\"automatic\",\"pool\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"}]},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"instance\",\"startable\":false,\"status\":\"deleting\",\"status_reasons\":[{\"code\":\"cannot_start_storage\",\"message\":\"The virtual server instance is unusable because the encryption key for the boot volume\\nhas been deleted\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"total_network_bandwidth\":500,\"total_volume_bandwidth\":500,\"vcpu\":{\"architecture\":\"amd64\",\"count\":4,\"manufacturer\":\"intel\"},\"volume_attachments\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"device\":{\"id\":\"id\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"id\":\"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"name\":\"my-volume-attachment\",\"volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"resource_type\":\"volume\"}}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"instances\":[{\"availability_policy\":{\"host_failure\":\"restart\"},\"bandwidth\":1000,\"boot_volume_attachment\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"device\":{\"id\":\"id\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"id\":\"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"name\":\"my-volume-attachment\",\"volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"resource_type\":\"volume\"}},\"catalog_offering\":{\"plan\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}},\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"cluster_network\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"id\":\"0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"name\":\"my-cluster-network\",\"resource_type\":\"cluster_network\"},\"cluster_network_attachments\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"}],\"confidential_compute_mode\":\"disabled\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"dedicated_host\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"id\":\"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"name\":\"my-host\",\"resource_type\":\"dedicated_host\"},\"disks\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\",\"id\":\"10c02d81-0ecb-4dc5-897d-28392913b81e\",\"interface_type\":\"nvme\",\"name\":\"my-instance-disk\",\"resource_type\":\"instance_disk\",\"size\":100}],\"enable_secure_boot\":true,\"gpu\":{\"count\":1,\"manufacturer\":\"amd\",\"memory\":1,\"model\":\"Tesla V100\"},\"health_reasons\":[{\"code\":\"reservation_expired\",\"message\":\"The reservation cannot be used because it has expired.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"image\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"name\":\"my-image\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"image\"},\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"memory\":64,\"metadata_service\":{\"enabled\":false,\"protocol\":\"http\",\"response_hop_limit\":1},\"name\":\"my-instance\",\"network_attachments\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"instance_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}}],\"network_interfaces\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}}],\"numa_count\":2,\"placement_target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"id\":\"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"name\":\"my-dedicated-host-group\",\"resource_type\":\"dedicated_host_group\"},\"primary_network_attachment\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"instance_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}},\"primary_network_interface\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"},\"reservation\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"},\"reservation_affinity\":{\"policy\":\"automatic\",\"pool\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"}]},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"instance\",\"startable\":false,\"status\":\"deleting\",\"status_reasons\":[{\"code\":\"cannot_start_storage\",\"message\":\"The virtual server instance is unusable because the encryption key for the boot volume\\nhas been deleted\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"total_network_bandwidth\":500,\"total_volume_bandwidth\":500,\"vcpu\":{\"architecture\":\"amd64\",\"count\":4,\"manufacturer\":\"intel\"},\"volume_attachments\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"device\":{\"id\":\"id\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"id\":\"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"name\":\"my-volume-attachment\",\"volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"resource_type\":\"volume\"}}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"profiles\":[{\"class\":\"bx2\",\"disks\":[{\"interface_type\":{\"type\":\"fixed\",\"value\":\"nvme\"},\"quantity\":{\"type\":\"fixed\",\"value\":4},\"size\":{\"type\":\"fixed\",\"value\":3200},\"supported_instance_interface_types\":{\"type\":\"fixed\",\"value\":[\"nvme\"]}}],\"family\":\"balanced\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"memory\":{\"type\":\"fixed\",\"value\":16},\"name\":\"mx2-host-152x1216\",\"socket_count\":{\"type\":\"fixed\",\"value\":2},\"status\":\"current\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"vcpu_architecture\":{\"type\":\"fixed\",\"value\":\"amd64\"},\"vcpu_count\":{\"type\":\"fixed\",\"value\":16},\"vcpu_manufacturer\":{\"type\":\"fixed\",\"value\":\"intel\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"profiles\":[{\"class\":\"bx2\",\"disks\":[{\"interface_type\":{\"type\":\"fixed\",\"value\":\"nvme\"},\"quantity\":{\"type\":\"fixed\",\"value\":4},\"size\":{\"type\":\"fixed\",\"value\":3200},\"supported_instance_interface_types\":{\"type\":\"fixed\",\"value\":[\"nvme\"]}}],\"family\":\"balanced\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"memory\":{\"type\":\"fixed\",\"value\":16},\"name\":\"mx2-host-152x1216\",\"socket_count\":{\"type\":\"fixed\",\"value\":2},\"status\":\"current\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"vcpu_architecture\":{\"type\":\"fixed\",\"value\":\"amd64\"},\"vcpu_count\":{\"type\":\"fixed\",\"value\":16},\"vcpu_manufacturer\":{\"type\":\"fixed\",\"value\":\"intel\"}}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -7541,456 +7744,292 @@ public void testListInstancesWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListInstancesOptions listInstancesOptions = new ListInstancesOptions.Builder() + ListDedicatedHostProfilesOptions listDedicatedHostProfilesOptions = new ListDedicatedHostProfilesOptions.Builder() .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .name("my-name") - .clusterNetworkId("testString") - .clusterNetworkCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573") - .clusterNetworkName("my-cluster-network") - .dedicatedHostId("testString") - .dedicatedHostCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a") - .dedicatedHostName("my-dedicated-host") - .placementGroupId("testString") - .placementGroupCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871") - .placementGroupName("my-placement-group") - .reservationAffinityPolicy("automatic") - .reservationId("testString") - .reservationCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63") - .reservationName("my-reservation") - .vpcId("testString") - .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .vpcName("my-vpc") .build(); - InstancesPager pager = new InstancesPager(vpcService, listInstancesOptions); - List allResults = pager.getAll(); + DedicatedHostProfilesPager pager = new DedicatedHostProfilesPager(vpcService, listDedicatedHostProfilesOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the createInstance operation with a valid options model parameter + // Test the listDedicatedHosts operation with a valid options model parameter @Test - public void testCreateInstanceWOptions() throws Throwable { + public void testListDedicatedHostsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"availability_policy\": {\"host_failure\": \"restart\"}, \"bandwidth\": 1000, \"boot_volume_attachment\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"name\": \"my-volume-attachment\", \"volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"resource_type\": \"volume\"}}, \"catalog_offering\": {\"plan\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}}, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"cluster_network\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"id\": \"0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"name\": \"my-cluster-network\", \"resource_type\": \"cluster_network\"}, \"cluster_network_attachments\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}], \"confidential_compute_mode\": \"disabled\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"dedicated_host\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"name\": \"my-host\", \"resource_type\": \"dedicated_host\"}, \"disks\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"interface_type\": \"nvme\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\", \"size\": 100}], \"enable_secure_boot\": true, \"gpu\": {\"count\": 1, \"manufacturer\": \"amd\", \"memory\": 1, \"model\": \"Tesla V100\"}, \"health_reasons\": [{\"code\": \"reservation_expired\", \"message\": \"The reservation cannot be used because it has expired.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"memory\": 64, \"metadata_service\": {\"enabled\": false, \"protocol\": \"http\", \"response_hop_limit\": 1}, \"name\": \"my-instance\", \"network_attachments\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"instance_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}], \"network_interfaces\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}], \"numa_count\": 2, \"placement_target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"id\": \"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"name\": \"my-dedicated-host-group\", \"resource_type\": \"dedicated_host_group\"}, \"primary_network_attachment\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"instance_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}, \"primary_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}, \"reservation\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}, \"reservation_affinity\": {\"policy\": \"automatic\", \"pool\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}]}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"instance\", \"startable\": false, \"status\": \"deleting\", \"status_reasons\": [{\"code\": \"cannot_start_storage\", \"message\": \"The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"total_network_bandwidth\": 500, \"total_volume_bandwidth\": 500, \"vcpu\": {\"architecture\": \"amd64\", \"count\": 4, \"manufacturer\": \"intel\"}, \"volume_attachments\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"name\": \"my-volume-attachment\", \"volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"resource_type\": \"volume\"}}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String createInstancePath = "/instances"; + String mockResponseBody = "{\"dedicated_hosts\": [{\"available_memory\": 128, \"available_vcpu\": {\"architecture\": \"amd64\", \"count\": 4, \"manufacturer\": \"intel\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"disks\": [{\"available\": 9, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"id\": \"0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"instance_disks\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\"}], \"interface_type\": \"nvme\", \"lifecycle_state\": \"stable\", \"name\": \"my-dedicated-host-disk\", \"provisionable\": false, \"resource_type\": \"dedicated_host_disk\", \"size\": 4, \"supported_instance_interface_types\": [\"nvme\"]}], \"group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"id\": \"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"name\": \"my-dedicated-host-group\", \"resource_type\": \"dedicated_host_group\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"instance_placement_enabled\": true, \"instances\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}], \"lifecycle_state\": \"stable\", \"memory\": 128, \"name\": \"my-host\", \"numa\": {\"count\": 2, \"nodes\": [{\"available_vcpu\": 24, \"vcpu\": 56}]}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"name\": \"mx2-host-152x1216\"}, \"provisionable\": false, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"dedicated_host\", \"socket_count\": 4, \"state\": \"available\", \"supported_instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"vcpu\": {\"architecture\": \"amd64\", \"count\": 4, \"manufacturer\": \"intel\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listDedicatedHostsPath = "/dedicated_hosts"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the InstanceAvailabilityPolicyPrototype model - InstanceAvailabilityPolicyPrototype instanceAvailabilityPolicyPrototypeModel = new InstanceAvailabilityPolicyPrototype.Builder() - .hostFailure("restart") + // Construct an instance of the ListDedicatedHostsOptions model + ListDedicatedHostsOptions listDedicatedHostsOptionsModel = new ListDedicatedHostsOptions.Builder() + .dedicatedHostGroupId("testString") + .start("testString") + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .zoneName("us-south-1") + .name("my-name") .build(); - // Construct an instance of the ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext model - ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext clusterNetworkInterfacePrimaryIpPrototypeModel = new ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext.Builder() - .address("10.0.0.5") - .autoDelete(false) - .name("my-cluster-network-subnet-reserved-ip") - .build(); + // Invoke listDedicatedHosts() with a valid options model and verify the result + Response response = vpcService.listDedicatedHosts(listDedicatedHostsOptionsModel).execute(); + assertNotNull(response); + DedicatedHostCollection responseObj = response.getResult(); + assertNotNull(responseObj); - // Construct an instance of the ClusterNetworkSubnetIdentityById model - ClusterNetworkSubnetIdentityById clusterNetworkSubnetIdentityModel = new ClusterNetworkSubnetIdentityById.Builder() - .id("0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930") - .build(); + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "GET"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, listDedicatedHostsPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("dedicated_host_group.id"), "testString"); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("resource_group.id"), "testString"); + assertEquals(query.get("zone.name"), "us-south-1"); + assertEquals(query.get("name"), "my-name"); + } - // Construct an instance of the InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment model - InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceModel = new InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment.Builder() - .autoDelete(false) - .name("my-cluster-network-interface") - .primaryIp(clusterNetworkInterfacePrimaryIpPrototypeModel) - .subnet(clusterNetworkSubnetIdentityModel) - .build(); - - // Construct an instance of the InstanceClusterNetworkAttachmentPrototypeInstanceContext model - InstanceClusterNetworkAttachmentPrototypeInstanceContext instanceClusterNetworkAttachmentPrototypeInstanceContextModel = new InstanceClusterNetworkAttachmentPrototypeInstanceContext.Builder() - .clusterNetworkInterface(instanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceModel) - .name("my-instance-network-attachment") - .build(); - - // Construct an instance of the TrustedProfileIdentityById model - TrustedProfileIdentityById trustedProfileIdentityModel = new TrustedProfileIdentityById.Builder() - .id("Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5") - .build(); - - // Construct an instance of the InstanceDefaultTrustedProfilePrototype model - InstanceDefaultTrustedProfilePrototype instanceDefaultTrustedProfilePrototypeModel = new InstanceDefaultTrustedProfilePrototype.Builder() - .autoLink(false) - .target(trustedProfileIdentityModel) - .build(); - - // Construct an instance of the KeyIdentityById model - KeyIdentityById keyIdentityModel = new KeyIdentityById.Builder() - .id("r006-82679077-ac3b-4c10-be16-63e9c21f0f45") - .build(); - - // Construct an instance of the InstanceMetadataServicePrototype model - InstanceMetadataServicePrototype instanceMetadataServicePrototypeModel = new InstanceMetadataServicePrototype.Builder() - .enabled(false) - .protocol("https") - .responseHopLimit(Long.valueOf("2")) - .build(); - - // Construct an instance of the InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById model - InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instancePlacementTargetPrototypeModel = new InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById.Builder() - .id("r006-418fe842-a3e9-47b9-a938-1aa5bd632871") - .build(); - - // Construct an instance of the InstanceProfileIdentityByName model - InstanceProfileIdentityByName instanceProfileIdentityModel = new InstanceProfileIdentityByName.Builder() - .name("bx2-2x8") - .build(); - - // Construct an instance of the ReservationIdentityById model - ReservationIdentityById reservationIdentityModel = new ReservationIdentityById.Builder() - .id("0717-ba49df72-37b8-43ac-98da-f8e029de0e63") - .build(); - - // Construct an instance of the InstanceReservationAffinityPrototype model - InstanceReservationAffinityPrototype instanceReservationAffinityPrototypeModel = new InstanceReservationAffinityPrototype.Builder() - .policy("automatic") - .pool(java.util.Arrays.asList(reservationIdentityModel)) - .build(); - - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); - - // Construct an instance of the VolumeProfileIdentityByName model - VolumeProfileIdentityByName volumeProfileIdentityModel = new VolumeProfileIdentityByName.Builder() - .name("5iops-tier") - .build(); - - // Construct an instance of the EncryptionKeyIdentityByCRN model - EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() - .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") - .build(); - - // Construct an instance of the VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity model - VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity volumeAttachmentPrototypeVolumeModel = new VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity.Builder() - .bandwidth(Long.valueOf("1000")) - .iops(Long.valueOf("10000")) - .name("my-data-volume") - .profile(volumeProfileIdentityModel) - .resourceGroup(resourceGroupIdentityModel) - .userTags(java.util.Arrays.asList()) - .capacity(Long.valueOf("1000")) - .encryptionKey(encryptionKeyIdentityModel) - .build(); - - // Construct an instance of the VolumeAttachmentPrototype model - VolumeAttachmentPrototype volumeAttachmentPrototypeModel = new VolumeAttachmentPrototype.Builder() - .deleteVolumeOnInstanceDelete(false) - .name("my-volume-attachment") - .volume(volumeAttachmentPrototypeVolumeModel) - .build(); - - // Construct an instance of the VPCIdentityById model - VPCIdentityById vpcIdentityModel = new VPCIdentityById.Builder() - .id("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .build(); - - // Construct an instance of the VolumePrototypeInstanceByImageContext model - VolumePrototypeInstanceByImageContext volumePrototypeInstanceByImageContextModel = new VolumePrototypeInstanceByImageContext.Builder() - .bandwidth(Long.valueOf("1000")) - .capacity(Long.valueOf("100")) - .encryptionKey(encryptionKeyIdentityModel) - .iops(Long.valueOf("10000")) - .name("my-boot-volume") - .profile(volumeProfileIdentityModel) - .resourceGroup(resourceGroupIdentityModel) - .userTags(java.util.Arrays.asList()) - .build(); - - // Construct an instance of the VolumeAttachmentPrototypeInstanceByImageContext model - VolumeAttachmentPrototypeInstanceByImageContext volumeAttachmentPrototypeInstanceByImageContextModel = new VolumeAttachmentPrototypeInstanceByImageContext.Builder() - .deleteVolumeOnInstanceDelete(true) - .name("my-volume-attachment") - .volume(volumePrototypeInstanceByImageContextModel) - .build(); - - // Construct an instance of the ImageIdentityById model - ImageIdentityById imageIdentityModel = new ImageIdentityById.Builder() - .id("r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") - .build(); - - // Construct an instance of the ZoneIdentityByName model - ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() - .name("us-south-1") - .build(); - - // Construct an instance of the NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext model - NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext networkInterfaceIpPrototypeModel = new NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext.Builder() - .address("10.0.0.5") - .autoDelete(false) - .name("my-reserved-ip") - .build(); - - // Construct an instance of the SecurityGroupIdentityById model - SecurityGroupIdentityById securityGroupIdentityModel = new SecurityGroupIdentityById.Builder() - .id("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") - .build(); - - // Construct an instance of the SubnetIdentityById model - SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() - .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") - .build(); + // Test the listDedicatedHosts operation with and without retries enabled + @Test + public void testListDedicatedHostsWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testListDedicatedHostsWOptions(); - // Construct an instance of the NetworkInterfacePrototype model - NetworkInterfacePrototype networkInterfacePrototypeModel = new NetworkInterfacePrototype.Builder() - .allowIpSpoofing(true) - .name("my-instance-network-interface") - .primaryIp(networkInterfaceIpPrototypeModel) - .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) - .subnet(subnetIdentityModel) - .build(); + vpcService.disableRetries(); + testListDedicatedHostsWOptions(); + } - // Construct an instance of the InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface model - InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface instancePrototypeModel = new InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface.Builder() - .availabilityPolicy(instanceAvailabilityPolicyPrototypeModel) - .clusterNetworkAttachments(java.util.Arrays.asList(instanceClusterNetworkAttachmentPrototypeInstanceContextModel)) - .confidentialComputeMode("disabled") - .defaultTrustedProfile(instanceDefaultTrustedProfilePrototypeModel) - .enableSecureBoot(true) - .keys(java.util.Arrays.asList(keyIdentityModel)) - .metadataService(instanceMetadataServicePrototypeModel) - .name("my-instance") - .placementTarget(instancePlacementTargetPrototypeModel) - .profile(instanceProfileIdentityModel) - .reservationAffinity(instanceReservationAffinityPrototypeModel) - .resourceGroup(resourceGroupIdentityModel) - .totalVolumeBandwidth(Long.valueOf("500")) - .userData("testString") - .volumeAttachments(java.util.Arrays.asList(volumeAttachmentPrototypeModel)) - .vpc(vpcIdentityModel) - .bootVolumeAttachment(volumeAttachmentPrototypeInstanceByImageContextModel) - .image(imageIdentityModel) - .zone(zoneIdentityModel) - .networkInterfaces(java.util.Arrays.asList(networkInterfacePrototypeModel)) - .primaryNetworkInterface(networkInterfacePrototypeModel) - .build(); + // Test the listDedicatedHosts operation using the DedicatedHostsPager.getNext() method + @Test + public void testListDedicatedHostsWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"dedicated_hosts\":[{\"available_memory\":128,\"available_vcpu\":{\"architecture\":\"amd64\",\"count\":4,\"manufacturer\":\"intel\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"disks\":[{\"available\":9,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e\",\"id\":\"0717-bd091a9e-b036-4c65-a79b-56d164911f6e\",\"instance_disks\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\",\"id\":\"10c02d81-0ecb-4dc5-897d-28392913b81e\",\"name\":\"my-instance-disk\",\"resource_type\":\"instance_disk\"}],\"interface_type\":\"nvme\",\"lifecycle_state\":\"stable\",\"name\":\"my-dedicated-host-disk\",\"provisionable\":false,\"resource_type\":\"dedicated_host_disk\",\"size\":4,\"supported_instance_interface_types\":[\"nvme\"]}],\"group\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"id\":\"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"name\":\"my-dedicated-host-group\",\"resource_type\":\"dedicated_host_group\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"id\":\"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"instance_placement_enabled\":true,\"instances\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"name\":\"my-instance\"}],\"lifecycle_state\":\"stable\",\"memory\":128,\"name\":\"my-host\",\"numa\":{\"count\":2,\"nodes\":[{\"available_vcpu\":24,\"vcpu\":56}]},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"name\":\"mx2-host-152x1216\"},\"provisionable\":false,\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"dedicated_host\",\"socket_count\":4,\"state\":\"available\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"vcpu\":{\"architecture\":\"amd64\",\"count\":4,\"manufacturer\":\"intel\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"dedicated_hosts\":[{\"available_memory\":128,\"available_vcpu\":{\"architecture\":\"amd64\",\"count\":4,\"manufacturer\":\"intel\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"disks\":[{\"available\":9,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e\",\"id\":\"0717-bd091a9e-b036-4c65-a79b-56d164911f6e\",\"instance_disks\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\",\"id\":\"10c02d81-0ecb-4dc5-897d-28392913b81e\",\"name\":\"my-instance-disk\",\"resource_type\":\"instance_disk\"}],\"interface_type\":\"nvme\",\"lifecycle_state\":\"stable\",\"name\":\"my-dedicated-host-disk\",\"provisionable\":false,\"resource_type\":\"dedicated_host_disk\",\"size\":4,\"supported_instance_interface_types\":[\"nvme\"]}],\"group\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"id\":\"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"name\":\"my-dedicated-host-group\",\"resource_type\":\"dedicated_host_group\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"id\":\"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"instance_placement_enabled\":true,\"instances\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"name\":\"my-instance\"}],\"lifecycle_state\":\"stable\",\"memory\":128,\"name\":\"my-host\",\"numa\":{\"count\":2,\"nodes\":[{\"available_vcpu\":24,\"vcpu\":56}]},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"name\":\"mx2-host-152x1216\"},\"provisionable\":false,\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"dedicated_host\",\"socket_count\":4,\"state\":\"available\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"vcpu\":{\"architecture\":\"amd64\",\"count\":4,\"manufacturer\":\"intel\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the CreateInstanceOptions model - CreateInstanceOptions createInstanceOptionsModel = new CreateInstanceOptions.Builder() - .instancePrototype(instancePrototypeModel) + ListDedicatedHostsOptions listDedicatedHostsOptions = new ListDedicatedHostsOptions.Builder() + .dedicatedHostGroupId("testString") + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .zoneName("us-south-1") + .name("my-name") .build(); - // Invoke createInstance() with a valid options model and verify the result - Response response = vpcService.createInstance(createInstanceOptionsModel).execute(); - assertNotNull(response); - Instance responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createInstancePath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + List allResults = new ArrayList<>(); + DedicatedHostsPager pager = new DedicatedHostsPager(vpcService, listDedicatedHostsOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } - - // Test the createInstance operation with and without retries enabled + + // Test the listDedicatedHosts operation using the DedicatedHostsPager.getAll() method @Test - public void testCreateInstanceWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testCreateInstanceWOptions(); + public void testListDedicatedHostsWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"dedicated_hosts\":[{\"available_memory\":128,\"available_vcpu\":{\"architecture\":\"amd64\",\"count\":4,\"manufacturer\":\"intel\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"disks\":[{\"available\":9,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e\",\"id\":\"0717-bd091a9e-b036-4c65-a79b-56d164911f6e\",\"instance_disks\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\",\"id\":\"10c02d81-0ecb-4dc5-897d-28392913b81e\",\"name\":\"my-instance-disk\",\"resource_type\":\"instance_disk\"}],\"interface_type\":\"nvme\",\"lifecycle_state\":\"stable\",\"name\":\"my-dedicated-host-disk\",\"provisionable\":false,\"resource_type\":\"dedicated_host_disk\",\"size\":4,\"supported_instance_interface_types\":[\"nvme\"]}],\"group\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"id\":\"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"name\":\"my-dedicated-host-group\",\"resource_type\":\"dedicated_host_group\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"id\":\"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"instance_placement_enabled\":true,\"instances\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"name\":\"my-instance\"}],\"lifecycle_state\":\"stable\",\"memory\":128,\"name\":\"my-host\",\"numa\":{\"count\":2,\"nodes\":[{\"available_vcpu\":24,\"vcpu\":56}]},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"name\":\"mx2-host-152x1216\"},\"provisionable\":false,\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"dedicated_host\",\"socket_count\":4,\"state\":\"available\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"vcpu\":{\"architecture\":\"amd64\",\"count\":4,\"manufacturer\":\"intel\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"dedicated_hosts\":[{\"available_memory\":128,\"available_vcpu\":{\"architecture\":\"amd64\",\"count\":4,\"manufacturer\":\"intel\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"disks\":[{\"available\":9,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e\",\"id\":\"0717-bd091a9e-b036-4c65-a79b-56d164911f6e\",\"instance_disks\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\",\"id\":\"10c02d81-0ecb-4dc5-897d-28392913b81e\",\"name\":\"my-instance-disk\",\"resource_type\":\"instance_disk\"}],\"interface_type\":\"nvme\",\"lifecycle_state\":\"stable\",\"name\":\"my-dedicated-host-disk\",\"provisionable\":false,\"resource_type\":\"dedicated_host_disk\",\"size\":4,\"supported_instance_interface_types\":[\"nvme\"]}],\"group\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"id\":\"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"name\":\"my-dedicated-host-group\",\"resource_type\":\"dedicated_host_group\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"id\":\"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"instance_placement_enabled\":true,\"instances\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"name\":\"my-instance\"}],\"lifecycle_state\":\"stable\",\"memory\":128,\"name\":\"my-host\",\"numa\":{\"count\":2,\"nodes\":[{\"available_vcpu\":24,\"vcpu\":56}]},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"name\":\"mx2-host-152x1216\"},\"provisionable\":false,\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"dedicated_host\",\"socket_count\":4,\"state\":\"available\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"vcpu\":{\"architecture\":\"amd64\",\"count\":4,\"manufacturer\":\"intel\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - vpcService.disableRetries(); - testCreateInstanceWOptions(); - } + ListDedicatedHostsOptions listDedicatedHostsOptions = new ListDedicatedHostsOptions.Builder() + .dedicatedHostGroupId("testString") + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .zoneName("us-south-1") + .name("my-name") + .build(); - // Test the createInstance operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateInstanceNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.createInstance(null).execute(); + DedicatedHostsPager pager = new DedicatedHostsPager(vpcService, listDedicatedHostsOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); } - - // Test the deleteInstance operation with a valid options model parameter + + // Test the updateDedicatedHost operation with a valid options model parameter @Test - public void testDeleteInstanceWOptions() throws Throwable { + public void testUpdateDedicatedHostWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteInstancePath = "/instances/testString"; + String mockResponseBody = "{\"available_memory\": 128, \"available_vcpu\": {\"architecture\": \"amd64\", \"count\": 4, \"manufacturer\": \"intel\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"disks\": [{\"available\": 9, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"id\": \"0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"instance_disks\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\"}], \"interface_type\": \"nvme\", \"lifecycle_state\": \"stable\", \"name\": \"my-dedicated-host-disk\", \"provisionable\": false, \"resource_type\": \"dedicated_host_disk\", \"size\": 4, \"supported_instance_interface_types\": [\"nvme\"]}], \"group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"id\": \"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"name\": \"my-dedicated-host-group\", \"resource_type\": \"dedicated_host_group\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"instance_placement_enabled\": true, \"instances\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}], \"lifecycle_state\": \"stable\", \"memory\": 128, \"name\": \"my-host\", \"numa\": {\"count\": 2, \"nodes\": [{\"available_vcpu\": 24, \"vcpu\": 56}]}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"name\": \"mx2-host-152x1216\"}, \"provisionable\": false, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"dedicated_host\", \"socket_count\": 4, \"state\": \"available\", \"supported_instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"vcpu\": {\"architecture\": \"amd64\", \"count\": 4, \"manufacturer\": \"intel\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String updateDedicatedHostPath = "/dedicated_hosts/testString"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteInstanceOptions model - DeleteInstanceOptions deleteInstanceOptionsModel = new DeleteInstanceOptions.Builder() + // Construct an instance of the DedicatedHostPatch model + DedicatedHostPatch dedicatedHostPatchModel = new DedicatedHostPatch.Builder() + .instancePlacementEnabled(false) + .name("my-host") + .build(); + Map dedicatedHostPatchModelAsPatch = dedicatedHostPatchModel.asPatch(); + + // Construct an instance of the UpdateDedicatedHostOptions model + UpdateDedicatedHostOptions updateDedicatedHostOptionsModel = new UpdateDedicatedHostOptions.Builder() .id("testString") - .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") + .dedicatedHostPatch(dedicatedHostPatchModelAsPatch) .build(); - // Invoke deleteInstance() with a valid options model and verify the result - Response response = vpcService.deleteInstance(deleteInstanceOptionsModel).execute(); + // Invoke updateDedicatedHost() with a valid options model and verify the result + Response response = vpcService.updateDedicatedHost(updateDedicatedHostOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + DedicatedHost 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(), "DELETE"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteInstancePath); + assertEquals(parsedPath, updateDedicatedHostPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteInstance operation with and without retries enabled + // Test the updateDedicatedHost operation with and without retries enabled @Test - public void testDeleteInstanceWRetries() throws Throwable { + public void testUpdateDedicatedHostWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteInstanceWOptions(); + testUpdateDedicatedHostWOptions(); vpcService.disableRetries(); - testDeleteInstanceWOptions(); + testUpdateDedicatedHostWOptions(); } - // Test the deleteInstance operation with a null options model (negative test) + // Test the updateDedicatedHost operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteInstanceNoOptions() throws Throwable { + public void testUpdateDedicatedHostNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteInstance(null).execute(); + vpcService.updateDedicatedHost(null).execute(); } - // Test the getInstance operation with a valid options model parameter + // Test the updateDedicatedHostDisk operation with a valid options model parameter @Test - public void testGetInstanceWOptions() throws Throwable { + public void testUpdateDedicatedHostDiskWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"availability_policy\": {\"host_failure\": \"restart\"}, \"bandwidth\": 1000, \"boot_volume_attachment\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"name\": \"my-volume-attachment\", \"volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"resource_type\": \"volume\"}}, \"catalog_offering\": {\"plan\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}}, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"cluster_network\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"id\": \"0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"name\": \"my-cluster-network\", \"resource_type\": \"cluster_network\"}, \"cluster_network_attachments\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}], \"confidential_compute_mode\": \"disabled\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"dedicated_host\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"name\": \"my-host\", \"resource_type\": \"dedicated_host\"}, \"disks\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"interface_type\": \"nvme\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\", \"size\": 100}], \"enable_secure_boot\": true, \"gpu\": {\"count\": 1, \"manufacturer\": \"amd\", \"memory\": 1, \"model\": \"Tesla V100\"}, \"health_reasons\": [{\"code\": \"reservation_expired\", \"message\": \"The reservation cannot be used because it has expired.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"memory\": 64, \"metadata_service\": {\"enabled\": false, \"protocol\": \"http\", \"response_hop_limit\": 1}, \"name\": \"my-instance\", \"network_attachments\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"instance_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}], \"network_interfaces\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}], \"numa_count\": 2, \"placement_target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"id\": \"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"name\": \"my-dedicated-host-group\", \"resource_type\": \"dedicated_host_group\"}, \"primary_network_attachment\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"instance_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}, \"primary_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}, \"reservation\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}, \"reservation_affinity\": {\"policy\": \"automatic\", \"pool\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}]}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"instance\", \"startable\": false, \"status\": \"deleting\", \"status_reasons\": [{\"code\": \"cannot_start_storage\", \"message\": \"The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"total_network_bandwidth\": 500, \"total_volume_bandwidth\": 500, \"vcpu\": {\"architecture\": \"amd64\", \"count\": 4, \"manufacturer\": \"intel\"}, \"volume_attachments\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"name\": \"my-volume-attachment\", \"volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"resource_type\": \"volume\"}}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String getInstancePath = "/instances/testString"; + String mockResponseBody = "{\"available\": 9, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"id\": \"0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"instance_disks\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\"}], \"interface_type\": \"nvme\", \"lifecycle_state\": \"stable\", \"name\": \"my-dedicated-host-disk\", \"provisionable\": false, \"resource_type\": \"dedicated_host_disk\", \"size\": 4, \"supported_instance_interface_types\": [\"nvme\"]}"; + String updateDedicatedHostDiskPath = "/dedicated_hosts/testString/disks/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetInstanceOptions model - GetInstanceOptions getInstanceOptionsModel = new GetInstanceOptions.Builder() + // Construct an instance of the DedicatedHostDiskPatch model + DedicatedHostDiskPatch dedicatedHostDiskPatchModel = new DedicatedHostDiskPatch.Builder() + .name("my-dedicated-host-disk-updated") + .build(); + Map dedicatedHostDiskPatchModelAsPatch = dedicatedHostDiskPatchModel.asPatch(); + + // Construct an instance of the UpdateDedicatedHostDiskOptions model + UpdateDedicatedHostDiskOptions updateDedicatedHostDiskOptionsModel = new UpdateDedicatedHostDiskOptions.Builder() + .dedicatedHostId("testString") .id("testString") + .dedicatedHostDiskPatch(dedicatedHostDiskPatchModelAsPatch) .build(); - // Invoke getInstance() with a valid options model and verify the result - Response response = vpcService.getInstance(getInstanceOptionsModel).execute(); + // Invoke updateDedicatedHostDisk() with a valid options model and verify the result + Response response = vpcService.updateDedicatedHostDisk(updateDedicatedHostDiskOptionsModel).execute(); assertNotNull(response); - Instance responseObj = response.getResult(); + DedicatedHostDisk responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getInstancePath); + assertEquals(parsedPath, updateDedicatedHostDiskPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getInstance operation with and without retries enabled + // Test the updateDedicatedHostDisk operation with and without retries enabled @Test - public void testGetInstanceWRetries() throws Throwable { + public void testUpdateDedicatedHostDiskWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetInstanceWOptions(); + testUpdateDedicatedHostDiskWOptions(); vpcService.disableRetries(); - testGetInstanceWOptions(); + testUpdateDedicatedHostDiskWOptions(); } - // Test the getInstance operation with a null options model (negative test) + // Test the updateDedicatedHostDisk operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetInstanceNoOptions() throws Throwable { + public void testUpdateDedicatedHostDiskNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getInstance(null).execute(); + vpcService.updateDedicatedHostDisk(null).execute(); } - // Test the updateInstance operation with a valid options model parameter + // Test the updateDedicatedHostGroup operation with a valid options model parameter @Test - public void testUpdateInstanceWOptions() throws Throwable { + public void testUpdateDedicatedHostGroupWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"availability_policy\": {\"host_failure\": \"restart\"}, \"bandwidth\": 1000, \"boot_volume_attachment\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"name\": \"my-volume-attachment\", \"volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"resource_type\": \"volume\"}}, \"catalog_offering\": {\"plan\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}}, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"cluster_network\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"id\": \"0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"name\": \"my-cluster-network\", \"resource_type\": \"cluster_network\"}, \"cluster_network_attachments\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}], \"confidential_compute_mode\": \"disabled\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"dedicated_host\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"name\": \"my-host\", \"resource_type\": \"dedicated_host\"}, \"disks\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"interface_type\": \"nvme\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\", \"size\": 100}], \"enable_secure_boot\": true, \"gpu\": {\"count\": 1, \"manufacturer\": \"amd\", \"memory\": 1, \"model\": \"Tesla V100\"}, \"health_reasons\": [{\"code\": \"reservation_expired\", \"message\": \"The reservation cannot be used because it has expired.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"memory\": 64, \"metadata_service\": {\"enabled\": false, \"protocol\": \"http\", \"response_hop_limit\": 1}, \"name\": \"my-instance\", \"network_attachments\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"instance_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}], \"network_interfaces\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}], \"numa_count\": 2, \"placement_target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"id\": \"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"name\": \"my-dedicated-host-group\", \"resource_type\": \"dedicated_host_group\"}, \"primary_network_attachment\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"instance_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}, \"primary_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}, \"reservation\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}, \"reservation_affinity\": {\"policy\": \"automatic\", \"pool\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}]}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"instance\", \"startable\": false, \"status\": \"deleting\", \"status_reasons\": [{\"code\": \"cannot_start_storage\", \"message\": \"The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"total_network_bandwidth\": 500, \"total_volume_bandwidth\": 500, \"vcpu\": {\"architecture\": \"amd64\", \"count\": 4, \"manufacturer\": \"intel\"}, \"volume_attachments\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"name\": \"my-volume-attachment\", \"volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"resource_type\": \"volume\"}}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String updateInstancePath = "/instances/testString"; + String mockResponseBody = "{\"class\": \"bx2\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"dedicated_hosts\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"name\": \"my-host\", \"resource_type\": \"dedicated_host\"}], \"family\": \"balanced\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"id\": \"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"name\": \"my-dedicated-host-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"dedicated_host_group\", \"supported_instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String updateDedicatedHostGroupPath = "/dedicated_host/groups/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the InstanceAvailabilityPolicyPatch model - InstanceAvailabilityPolicyPatch instanceAvailabilityPolicyPatchModel = new InstanceAvailabilityPolicyPatch.Builder() - .hostFailure("restart") - .build(); - - // Construct an instance of the InstanceMetadataServicePatch model - InstanceMetadataServicePatch instanceMetadataServicePatchModel = new InstanceMetadataServicePatch.Builder() - .enabled(true) - .protocol("http") - .responseHopLimit(Long.valueOf("1")) - .build(); - - // Construct an instance of the InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById model - InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById instancePlacementTargetPatchModel = new InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById.Builder() - .id("0717-1e09281b-f177-46fb-baf1-bc152b2e391a") - .build(); - - // Construct an instance of the InstancePatchProfileInstanceProfileIdentityByName model - InstancePatchProfileInstanceProfileIdentityByName instancePatchProfileModel = new InstancePatchProfileInstanceProfileIdentityByName.Builder() - .name("bx2-4x16") - .build(); - - // Construct an instance of the ReservationIdentityById model - ReservationIdentityById reservationIdentityModel = new ReservationIdentityById.Builder() - .id("0717-ba49df72-37b8-43ac-98da-f8e029de0e63") - .build(); - - // Construct an instance of the InstanceReservationAffinityPatch model - InstanceReservationAffinityPatch instanceReservationAffinityPatchModel = new InstanceReservationAffinityPatch.Builder() - .policy("automatic") - .pool(java.util.Arrays.asList(reservationIdentityModel)) - .build(); - - // Construct an instance of the InstancePatch model - InstancePatch instancePatchModel = new InstancePatch.Builder() - .availabilityPolicy(instanceAvailabilityPolicyPatchModel) - .confidentialComputeMode("disabled") - .enableSecureBoot(true) - .metadataService(instanceMetadataServicePatchModel) - .name("my-instance") - .placementTarget(instancePlacementTargetPatchModel) - .profile(instancePatchProfileModel) - .reservationAffinity(instanceReservationAffinityPatchModel) - .totalVolumeBandwidth(Long.valueOf("500")) + // Construct an instance of the DedicatedHostGroupPatch model + DedicatedHostGroupPatch dedicatedHostGroupPatchModel = new DedicatedHostGroupPatch.Builder() + .name("my-dedicated-host-group-updated") .build(); - Map instancePatchModelAsPatch = instancePatchModel.asPatch(); + Map dedicatedHostGroupPatchModelAsPatch = dedicatedHostGroupPatchModel.asPatch(); - // Construct an instance of the UpdateInstanceOptions model - UpdateInstanceOptions updateInstanceOptionsModel = new UpdateInstanceOptions.Builder() + // Construct an instance of the UpdateDedicatedHostGroupOptions model + UpdateDedicatedHostGroupOptions updateDedicatedHostGroupOptionsModel = new UpdateDedicatedHostGroupOptions.Builder() .id("testString") - .instancePatch(instancePatchModelAsPatch) - .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") + .dedicatedHostGroupPatch(dedicatedHostGroupPatchModelAsPatch) .build(); - // Invoke updateInstance() with a valid options model and verify the result - Response response = vpcService.updateInstance(updateInstanceOptionsModel).execute(); + // Invoke updateDedicatedHostGroup() with a valid options model and verify the result + Response response = vpcService.updateDedicatedHostGroup(updateDedicatedHostGroupOptionsModel).execute(); assertNotNull(response); - Instance responseObj = response.getResult(); + DedicatedHostGroup responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -7999,416 +8038,296 @@ public void testUpdateInstanceWOptions() throws Throwable { assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateInstancePath); + assertEquals(parsedPath, updateDedicatedHostGroupPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateInstance operation with and without retries enabled + // Test the updateDedicatedHostGroup operation with and without retries enabled @Test - public void testUpdateInstanceWRetries() throws Throwable { + public void testUpdateDedicatedHostGroupWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateInstanceWOptions(); + testUpdateDedicatedHostGroupWOptions(); vpcService.disableRetries(); - testUpdateInstanceWOptions(); + testUpdateDedicatedHostGroupWOptions(); } - // Test the updateInstance operation with a null options model (negative test) + // Test the updateDedicatedHostGroup operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateInstanceNoOptions() throws Throwable { + public void testUpdateDedicatedHostGroupNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateInstance(null).execute(); + vpcService.updateDedicatedHostGroup(null).execute(); } - // Test the getInstanceInitialization operation with a valid options model parameter + // Test the addEndpointGatewayIp operation with a valid options model parameter @Test - public void testGetInstanceInitializationWOptions() throws Throwable { + public void testAddEndpointGatewayIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"default_trusted_profile\": {\"auto_link\": true, \"target\": {\"crn\": \"crn:v1:bluemix:public:iam-identity::a/aa2432b1fa4d4ace891e9b80fc104e34::profile:Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5\", \"id\": \"Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5\", \"resource_type\": \"trusted_profile\"}}, \"keys\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"fingerprint\": \"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"name\": \"my-key-1\"}], \"password\": {\"encrypted_password\": \"qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==\", \"encryption_key\": {\"fingerprint\": \"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\"}}}"; - String getInstanceInitializationPath = "/instances/testString/initialization"; + String mockResponseBody = "{\"address\": \"192.168.3.4\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"lifecycle_state\": \"stable\", \"name\": \"my-reserved-ip\", \"owner\": \"provider\", \"resource_type\": \"subnet_reserved_ip\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"resource_type\": \"endpoint_gateway\"}}"; + String addEndpointGatewayIpPath = "/endpoint_gateways/testString/ips/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the GetInstanceInitializationOptions model - GetInstanceInitializationOptions getInstanceInitializationOptionsModel = new GetInstanceInitializationOptions.Builder() + // Construct an instance of the AddEndpointGatewayIpOptions model + AddEndpointGatewayIpOptions addEndpointGatewayIpOptionsModel = new AddEndpointGatewayIpOptions.Builder() + .endpointGatewayId("testString") .id("testString") .build(); - // Invoke getInstanceInitialization() with a valid options model and verify the result - Response response = vpcService.getInstanceInitialization(getInstanceInitializationOptionsModel).execute(); + // Invoke addEndpointGatewayIp() with a valid options model and verify the result + Response response = vpcService.addEndpointGatewayIp(addEndpointGatewayIpOptionsModel).execute(); assertNotNull(response); - InstanceInitialization responseObj = response.getResult(); + ReservedIP responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PUT"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getInstanceInitializationPath); + assertEquals(parsedPath, addEndpointGatewayIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getInstanceInitialization operation with and without retries enabled + // Test the addEndpointGatewayIp operation with and without retries enabled @Test - public void testGetInstanceInitializationWRetries() throws Throwable { + public void testAddEndpointGatewayIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetInstanceInitializationWOptions(); + testAddEndpointGatewayIpWOptions(); vpcService.disableRetries(); - testGetInstanceInitializationWOptions(); + testAddEndpointGatewayIpWOptions(); } - // Test the getInstanceInitialization operation with a null options model (negative test) + // Test the addEndpointGatewayIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetInstanceInitializationNoOptions() throws Throwable { + public void testAddEndpointGatewayIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getInstanceInitialization(null).execute(); + vpcService.addEndpointGatewayIp(null).execute(); } - // Test the createInstanceAction operation with a valid options model parameter + // Test the createEndpointGateway operation with a valid options model parameter @Test - public void testCreateInstanceActionWOptions() throws Throwable { + public void testCreateEndpointGatewayWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"completed_at\": \"2019-01-01T12:00:00.000Z\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"force\": false, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/actions/109a1b6e-1242-4de1-be44-38705e9474ed\", \"id\": \"109a1b6e-1242-4de1-be44-38705e9474ed\", \"started_at\": \"2019-01-01T12:00:00.000Z\", \"status\": \"completed\", \"type\": \"reboot\"}"; - String createInstanceActionPath = "/instances/testString/actions"; + String mockResponseBody = "{\"allow_dns_resolution_binding\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"lifecycle_reasons\": [{\"code\": \"dns_resolution_binding_pending\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-endpoint-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"endpoint_gateway\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"service_endpoint\": \"my-cloudant-instance.appdomain.cloud\", \"service_endpoints\": [\"my-cloudant-instance.appdomain.cloud\"], \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"id\": \"r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"name\": \"my-private-path-service-gateway\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"private_path_service_gateway\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String createEndpointGatewayPath = "/endpoint_gateways"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the CreateInstanceActionOptions model - CreateInstanceActionOptions createInstanceActionOptionsModel = new CreateInstanceActionOptions.Builder() - .instanceId("testString") - .type("reboot") - .force(true) + // Construct an instance of the EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype model + EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype endpointGatewayTargetPrototypeModel = new EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype.Builder() + .name("ibm-ntp-server") + .resourceType("provider_infrastructure_service") .build(); - // Invoke createInstanceAction() with a valid options model and verify the result - Response response = vpcService.createInstanceAction(createInstanceActionOptionsModel).execute(); - assertNotNull(response); - InstanceAction responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createInstanceActionPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - } - - // Test the createInstanceAction operation with and without retries enabled - @Test - public void testCreateInstanceActionWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testCreateInstanceActionWOptions(); + // Construct an instance of the VPCIdentityById model + VPCIdentityById vpcIdentityModel = new VPCIdentityById.Builder() + .id("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .build(); - vpcService.disableRetries(); - testCreateInstanceActionWOptions(); - } + // Construct an instance of the EndpointGatewayReservedIPReservedIPIdentityById model + EndpointGatewayReservedIPReservedIPIdentityById endpointGatewayReservedIpModel = new EndpointGatewayReservedIPReservedIPIdentityById.Builder() + .id("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + .build(); - // Test the createInstanceAction operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateInstanceActionNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.createInstanceAction(null).execute(); - } + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") + .build(); - // Test the listInstanceClusterNetworkAttachments operation with a valid options model parameter - @Test - public void testListInstanceClusterNetworkAttachmentsWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"cluster_network_attachments\": [{\"before\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}, \"cluster_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"address\": \"10.1.0.6\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"resource_type\": \"cluster_network_subnet_reserved_ip\"}, \"resource_type\": \"cluster_network_interface\", \"subnet\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\"}}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listInstanceClusterNetworkAttachmentsPath = "/instances/testString/cluster_network_attachments"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); + // Construct an instance of the SecurityGroupIdentityById model + SecurityGroupIdentityById securityGroupIdentityModel = new SecurityGroupIdentityById.Builder() + .id("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + .build(); - // Construct an instance of the ListInstanceClusterNetworkAttachmentsOptions model - ListInstanceClusterNetworkAttachmentsOptions listInstanceClusterNetworkAttachmentsOptionsModel = new ListInstanceClusterNetworkAttachmentsOptions.Builder() - .instanceId("testString") - .start("testString") - .limit(Long.valueOf("10")) + // Construct an instance of the CreateEndpointGatewayOptions model + CreateEndpointGatewayOptions createEndpointGatewayOptionsModel = new CreateEndpointGatewayOptions.Builder() + .target(endpointGatewayTargetPrototypeModel) + .vpc(vpcIdentityModel) + .allowDnsResolutionBinding(true) + .ips(java.util.Arrays.asList(endpointGatewayReservedIpModel)) + .name("testString") + .resourceGroup(resourceGroupIdentityModel) + .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) .build(); - // Invoke listInstanceClusterNetworkAttachments() with a valid options model and verify the result - Response response = vpcService.listInstanceClusterNetworkAttachments(listInstanceClusterNetworkAttachmentsOptionsModel).execute(); + // Invoke createEndpointGateway() with a valid options model and verify the result + Response response = vpcService.createEndpointGateway(createEndpointGatewayOptionsModel).execute(); assertNotNull(response); - InstanceClusterNetworkAttachmentCollection responseObj = response.getResult(); + EndpointGateway responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listInstanceClusterNetworkAttachmentsPath); + assertEquals(parsedPath, createEndpointGatewayPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the listInstanceClusterNetworkAttachments operation with and without retries enabled + // Test the createEndpointGateway operation with and without retries enabled @Test - public void testListInstanceClusterNetworkAttachmentsWRetries() throws Throwable { + public void testCreateEndpointGatewayWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListInstanceClusterNetworkAttachmentsWOptions(); + testCreateEndpointGatewayWOptions(); vpcService.disableRetries(); - testListInstanceClusterNetworkAttachmentsWOptions(); + testCreateEndpointGatewayWOptions(); } - // Test the listInstanceClusterNetworkAttachments operation with a null options model (negative test) + // Test the createEndpointGateway operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListInstanceClusterNetworkAttachmentsNoOptions() throws Throwable { + public void testCreateEndpointGatewayNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listInstanceClusterNetworkAttachments(null).execute(); - } - - // Test the listInstanceClusterNetworkAttachments operation using the InstanceClusterNetworkAttachmentsPager.getNext() method - @Test - public void testListInstanceClusterNetworkAttachmentsWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"cluster_network_attachments\":[{\"before\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"},\"cluster_network_interface\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"id\":\"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"name\":\"my-cluster-network-interface\",\"primary_ip\":{\"address\":\"10.1.0.6\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"id\":\"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"name\":\"my-cluster-network-subnet-reserved-ip\",\"resource_type\":\"cluster_network_subnet_reserved_ip\"},\"resource_type\":\"cluster_network_interface\",\"subnet\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"id\":\"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"name\":\"my-cluster-network-subnet\",\"resource_type\":\"cluster_network_subnet\"}},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"}],\"limit\":1}"; - String mockResponsePage2 = "{\"total_count\":2,\"cluster_network_attachments\":[{\"before\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"},\"cluster_network_interface\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"id\":\"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"name\":\"my-cluster-network-interface\",\"primary_ip\":{\"address\":\"10.1.0.6\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"id\":\"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"name\":\"my-cluster-network-subnet-reserved-ip\",\"resource_type\":\"cluster_network_subnet_reserved_ip\"},\"resource_type\":\"cluster_network_interface\",\"subnet\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"id\":\"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"name\":\"my-cluster-network-subnet\",\"resource_type\":\"cluster_network_subnet\"}},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"}],\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListInstanceClusterNetworkAttachmentsOptions listInstanceClusterNetworkAttachmentsOptions = new ListInstanceClusterNetworkAttachmentsOptions.Builder() - .instanceId("testString") - .limit(Long.valueOf("10")) - .build(); - - List allResults = new ArrayList<>(); - InstanceClusterNetworkAttachmentsPager pager = new InstanceClusterNetworkAttachmentsPager(vpcService, listInstanceClusterNetworkAttachmentsOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + vpcService.createEndpointGateway(null).execute(); } - - // Test the listInstanceClusterNetworkAttachments operation using the InstanceClusterNetworkAttachmentsPager.getAll() method - @Test - public void testListInstanceClusterNetworkAttachmentsWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"cluster_network_attachments\":[{\"before\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"},\"cluster_network_interface\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"id\":\"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"name\":\"my-cluster-network-interface\",\"primary_ip\":{\"address\":\"10.1.0.6\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"id\":\"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"name\":\"my-cluster-network-subnet-reserved-ip\",\"resource_type\":\"cluster_network_subnet_reserved_ip\"},\"resource_type\":\"cluster_network_interface\",\"subnet\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"id\":\"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"name\":\"my-cluster-network-subnet\",\"resource_type\":\"cluster_network_subnet\"}},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"}],\"limit\":1}"; - String mockResponsePage2 = "{\"total_count\":2,\"cluster_network_attachments\":[{\"before\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"},\"cluster_network_interface\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"id\":\"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"name\":\"my-cluster-network-interface\",\"primary_ip\":{\"address\":\"10.1.0.6\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"id\":\"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"name\":\"my-cluster-network-subnet-reserved-ip\",\"resource_type\":\"cluster_network_subnet_reserved_ip\"},\"resource_type\":\"cluster_network_interface\",\"subnet\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"id\":\"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"name\":\"my-cluster-network-subnet\",\"resource_type\":\"cluster_network_subnet\"}},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"}],\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListInstanceClusterNetworkAttachmentsOptions listInstanceClusterNetworkAttachmentsOptions = new ListInstanceClusterNetworkAttachmentsOptions.Builder() - .instanceId("testString") - .limit(Long.valueOf("10")) - .build(); - InstanceClusterNetworkAttachmentsPager pager = new InstanceClusterNetworkAttachmentsPager(vpcService, listInstanceClusterNetworkAttachmentsOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the createClusterNetworkAttachment operation with a valid options model parameter + // Test the deleteEndpointGateway operation with a valid options model parameter @Test - public void testCreateClusterNetworkAttachmentWOptions() throws Throwable { + public void testDeleteEndpointGatewayWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"before\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}, \"cluster_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"address\": \"10.1.0.6\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"resource_type\": \"cluster_network_subnet_reserved_ip\"}, \"resource_type\": \"cluster_network_interface\", \"subnet\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\"}}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}"; - String createClusterNetworkAttachmentPath = "/instances/testString/cluster_network_attachments"; + String mockResponseBody = ""; + String deleteEndpointGatewayPath = "/endpoint_gateways/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext model - ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext clusterNetworkInterfacePrimaryIpPrototypeModel = new ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext.Builder() - .address("10.0.0.5") - .autoDelete(false) - .name("my-cluster-network-subnet-reserved-ip") - .build(); - - // Construct an instance of the ClusterNetworkSubnetIdentityById model - ClusterNetworkSubnetIdentityById clusterNetworkSubnetIdentityModel = new ClusterNetworkSubnetIdentityById.Builder() - .id("0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930") - .build(); - - // Construct an instance of the InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment model - InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceModel = new InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment.Builder() - .autoDelete(false) - .name("my-cluster-network-interface") - .primaryIp(clusterNetworkInterfacePrimaryIpPrototypeModel) - .subnet(clusterNetworkSubnetIdentityModel) - .build(); - - // Construct an instance of the InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById model - InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById instanceClusterNetworkAttachmentBeforePrototypeModel = new InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById.Builder() - .id("0717-fb880975-db45-4459-8548-64e3995ac213") - .build(); - - // Construct an instance of the CreateClusterNetworkAttachmentOptions model - CreateClusterNetworkAttachmentOptions createClusterNetworkAttachmentOptionsModel = new CreateClusterNetworkAttachmentOptions.Builder() - .instanceId("testString") - .clusterNetworkInterface(instanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceModel) - .before(instanceClusterNetworkAttachmentBeforePrototypeModel) - .name("my-instance-network-attachment") + // Construct an instance of the DeleteEndpointGatewayOptions model + DeleteEndpointGatewayOptions deleteEndpointGatewayOptionsModel = new DeleteEndpointGatewayOptions.Builder() + .id("testString") .build(); - // Invoke createClusterNetworkAttachment() with a valid options model and verify the result - Response response = vpcService.createClusterNetworkAttachment(createClusterNetworkAttachmentOptionsModel).execute(); + // Invoke deleteEndpointGateway() with a valid options model and verify the result + Response response = vpcService.deleteEndpointGateway(deleteEndpointGatewayOptionsModel).execute(); assertNotNull(response); - InstanceClusterNetworkAttachment responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createClusterNetworkAttachmentPath); + assertEquals(parsedPath, deleteEndpointGatewayPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createClusterNetworkAttachment operation with and without retries enabled + // Test the deleteEndpointGateway operation with and without retries enabled @Test - public void testCreateClusterNetworkAttachmentWRetries() throws Throwable { + public void testDeleteEndpointGatewayWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateClusterNetworkAttachmentWOptions(); + testDeleteEndpointGatewayWOptions(); vpcService.disableRetries(); - testCreateClusterNetworkAttachmentWOptions(); + testDeleteEndpointGatewayWOptions(); } - // Test the createClusterNetworkAttachment operation with a null options model (negative test) + // Test the deleteEndpointGateway operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateClusterNetworkAttachmentNoOptions() throws Throwable { + public void testDeleteEndpointGatewayNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createClusterNetworkAttachment(null).execute(); + vpcService.deleteEndpointGateway(null).execute(); } - // Test the deleteInstanceClusterNetworkAttachment operation with a valid options model parameter + // Test the getEndpointGateway operation with a valid options model parameter @Test - public void testDeleteInstanceClusterNetworkAttachmentWOptions() throws Throwable { + public void testGetEndpointGatewayWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"before\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}, \"cluster_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"address\": \"10.1.0.6\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"resource_type\": \"cluster_network_subnet_reserved_ip\"}, \"resource_type\": \"cluster_network_interface\", \"subnet\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\"}}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}"; - String deleteInstanceClusterNetworkAttachmentPath = "/instances/testString/cluster_network_attachments/testString"; + String mockResponseBody = "{\"allow_dns_resolution_binding\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"lifecycle_reasons\": [{\"code\": \"dns_resolution_binding_pending\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-endpoint-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"endpoint_gateway\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"service_endpoint\": \"my-cloudant-instance.appdomain.cloud\", \"service_endpoints\": [\"my-cloudant-instance.appdomain.cloud\"], \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"id\": \"r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"name\": \"my-private-path-service-gateway\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"private_path_service_gateway\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String getEndpointGatewayPath = "/endpoint_gateways/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(202) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteInstanceClusterNetworkAttachmentOptions model - DeleteInstanceClusterNetworkAttachmentOptions deleteInstanceClusterNetworkAttachmentOptionsModel = new DeleteInstanceClusterNetworkAttachmentOptions.Builder() - .instanceId("testString") + // Construct an instance of the GetEndpointGatewayOptions model + GetEndpointGatewayOptions getEndpointGatewayOptionsModel = new GetEndpointGatewayOptions.Builder() .id("testString") .build(); - // Invoke deleteInstanceClusterNetworkAttachment() with a valid options model and verify the result - Response response = vpcService.deleteInstanceClusterNetworkAttachment(deleteInstanceClusterNetworkAttachmentOptionsModel).execute(); + // Invoke getEndpointGateway() with a valid options model and verify the result + Response response = vpcService.getEndpointGateway(getEndpointGatewayOptionsModel).execute(); assertNotNull(response); - InstanceClusterNetworkAttachment responseObj = response.getResult(); + EndpointGateway 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteInstanceClusterNetworkAttachmentPath); + assertEquals(parsedPath, getEndpointGatewayPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteInstanceClusterNetworkAttachment operation with and without retries enabled + // Test the getEndpointGateway operation with and without retries enabled @Test - public void testDeleteInstanceClusterNetworkAttachmentWRetries() throws Throwable { + public void testGetEndpointGatewayWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteInstanceClusterNetworkAttachmentWOptions(); + testGetEndpointGatewayWOptions(); vpcService.disableRetries(); - testDeleteInstanceClusterNetworkAttachmentWOptions(); + testGetEndpointGatewayWOptions(); } - // Test the deleteInstanceClusterNetworkAttachment operation with a null options model (negative test) + // Test the getEndpointGateway operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteInstanceClusterNetworkAttachmentNoOptions() throws Throwable { + public void testGetEndpointGatewayNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteInstanceClusterNetworkAttachment(null).execute(); + vpcService.getEndpointGateway(null).execute(); } - // Test the getInstanceClusterNetworkAttachment operation with a valid options model parameter + // Test the getEndpointGatewayIp operation with a valid options model parameter @Test - public void testGetInstanceClusterNetworkAttachmentWOptions() throws Throwable { + public void testGetEndpointGatewayIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"before\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}, \"cluster_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"address\": \"10.1.0.6\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"resource_type\": \"cluster_network_subnet_reserved_ip\"}, \"resource_type\": \"cluster_network_interface\", \"subnet\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\"}}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}"; - String getInstanceClusterNetworkAttachmentPath = "/instances/testString/cluster_network_attachments/testString"; + String mockResponseBody = "{\"address\": \"192.168.3.4\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"lifecycle_state\": \"stable\", \"name\": \"my-reserved-ip\", \"owner\": \"provider\", \"resource_type\": \"subnet_reserved_ip\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"resource_type\": \"endpoint_gateway\"}}"; + String getEndpointGatewayIpPath = "/endpoint_gateways/testString/ips/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetInstanceClusterNetworkAttachmentOptions model - GetInstanceClusterNetworkAttachmentOptions getInstanceClusterNetworkAttachmentOptionsModel = new GetInstanceClusterNetworkAttachmentOptions.Builder() - .instanceId("testString") + // Construct an instance of the GetEndpointGatewayIpOptions model + GetEndpointGatewayIpOptions getEndpointGatewayIpOptionsModel = new GetEndpointGatewayIpOptions.Builder() + .endpointGatewayId("testString") .id("testString") .build(); - // Invoke getInstanceClusterNetworkAttachment() with a valid options model and verify the result - Response response = vpcService.getInstanceClusterNetworkAttachment(getInstanceClusterNetworkAttachmentOptionsModel).execute(); + // Invoke getEndpointGatewayIp() with a valid options model and verify the result + Response response = vpcService.getEndpointGatewayIp(getEndpointGatewayIpOptionsModel).execute(); assertNotNull(response); - InstanceClusterNetworkAttachment responseObj = response.getResult(); + ReservedIP responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -8417,167 +8336,184 @@ public void testGetInstanceClusterNetworkAttachmentWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getInstanceClusterNetworkAttachmentPath); + assertEquals(parsedPath, getEndpointGatewayIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getInstanceClusterNetworkAttachment operation with and without retries enabled + // Test the getEndpointGatewayIp operation with and without retries enabled @Test - public void testGetInstanceClusterNetworkAttachmentWRetries() throws Throwable { + public void testGetEndpointGatewayIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetInstanceClusterNetworkAttachmentWOptions(); + testGetEndpointGatewayIpWOptions(); vpcService.disableRetries(); - testGetInstanceClusterNetworkAttachmentWOptions(); + testGetEndpointGatewayIpWOptions(); } - // Test the getInstanceClusterNetworkAttachment operation with a null options model (negative test) + // Test the getEndpointGatewayIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetInstanceClusterNetworkAttachmentNoOptions() throws Throwable { + public void testGetEndpointGatewayIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getInstanceClusterNetworkAttachment(null).execute(); + vpcService.getEndpointGatewayIp(null).execute(); } - // Test the updateInstanceClusterNetworkAttachment operation with a valid options model parameter + // Test the listEndpointGatewayIps operation with a valid options model parameter @Test - public void testUpdateInstanceClusterNetworkAttachmentWOptions() throws Throwable { + public void testListEndpointGatewayIpsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"before\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}, \"cluster_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"address\": \"10.1.0.6\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"resource_type\": \"cluster_network_subnet_reserved_ip\"}, \"resource_type\": \"cluster_network_interface\", \"subnet\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\"}}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}"; - String updateInstanceClusterNetworkAttachmentPath = "/instances/testString/cluster_network_attachments/testString"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"ips\": [{\"address\": \"192.168.3.4\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"lifecycle_state\": \"stable\", \"name\": \"my-reserved-ip\", \"owner\": \"provider\", \"resource_type\": \"subnet_reserved_ip\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"resource_type\": \"endpoint_gateway\"}}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listEndpointGatewayIpsPath = "/endpoint_gateways/testString/ips"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the InstanceClusterNetworkAttachmentPatch model - InstanceClusterNetworkAttachmentPatch instanceClusterNetworkAttachmentPatchModel = new InstanceClusterNetworkAttachmentPatch.Builder() - .name("my-instance-network-attachment-updated") - .build(); - Map instanceClusterNetworkAttachmentPatchModelAsPatch = instanceClusterNetworkAttachmentPatchModel.asPatch(); - - // Construct an instance of the UpdateInstanceClusterNetworkAttachmentOptions model - UpdateInstanceClusterNetworkAttachmentOptions updateInstanceClusterNetworkAttachmentOptionsModel = new UpdateInstanceClusterNetworkAttachmentOptions.Builder() - .instanceId("testString") - .id("testString") - .instanceClusterNetworkAttachmentPatch(instanceClusterNetworkAttachmentPatchModelAsPatch) + // Construct an instance of the ListEndpointGatewayIpsOptions model + ListEndpointGatewayIpsOptions listEndpointGatewayIpsOptionsModel = new ListEndpointGatewayIpsOptions.Builder() + .endpointGatewayId("testString") + .start("testString") + .limit(Long.valueOf("10")) + .sort("name") .build(); - // Invoke updateInstanceClusterNetworkAttachment() with a valid options model and verify the result - Response response = vpcService.updateInstanceClusterNetworkAttachment(updateInstanceClusterNetworkAttachmentOptionsModel).execute(); + // Invoke listEndpointGatewayIps() with a valid options model and verify the result + Response response = vpcService.listEndpointGatewayIps(listEndpointGatewayIpsOptionsModel).execute(); assertNotNull(response); - InstanceClusterNetworkAttachment responseObj = response.getResult(); + ReservedIPCollectionEndpointGatewayContext responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateInstanceClusterNetworkAttachmentPath); + assertEquals(parsedPath, listEndpointGatewayIpsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("sort"), "name"); } - // Test the updateInstanceClusterNetworkAttachment operation with and without retries enabled + // Test the listEndpointGatewayIps operation with and without retries enabled @Test - public void testUpdateInstanceClusterNetworkAttachmentWRetries() throws Throwable { + public void testListEndpointGatewayIpsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateInstanceClusterNetworkAttachmentWOptions(); + testListEndpointGatewayIpsWOptions(); vpcService.disableRetries(); - testUpdateInstanceClusterNetworkAttachmentWOptions(); + testListEndpointGatewayIpsWOptions(); } - // Test the updateInstanceClusterNetworkAttachment operation with a null options model (negative test) + // Test the listEndpointGatewayIps operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateInstanceClusterNetworkAttachmentNoOptions() throws Throwable { + public void testListEndpointGatewayIpsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateInstanceClusterNetworkAttachment(null).execute(); + vpcService.listEndpointGatewayIps(null).execute(); } - // Test the createInstanceConsoleAccessToken operation with a valid options model parameter + // Test the listEndpointGatewayIps operation using the EndpointGatewayIpsPager.getNext() method @Test - public void testCreateInstanceConsoleAccessTokenWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjoiYWEyNDMyYjFmYTRkNGFjZTg5MWU5YjgwZmMxMDRlMzQiLCJzZWNyZXQiOiJRVzRnWlhoaGJYQnNaU0J6WldOeVpYUUsiLCJleHAiOjE3MjYwNzU1OTR9.UFDVzzGJ54Go9Z4jgyPSLG49zNx-AjHTQrJA6ee8KLI\", \"console_type\": \"serial\", \"created_at\": \"2020-07-27T21:50:14.000Z\", \"expires_at\": \"2020-07-27T21:51:14.000Z\", \"force\": false, \"href\": \"wss://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/console?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjoiYWEyNDMyYjFmYTRkNGFjZTg5MWU5YjgwZmMxMDRlMzQiLCJzZWNyZXQiOiJRVzRnWlhoaGJYQnNaU0J6WldOeVpYUUsiLCJleHAiOjE3MjYwNzU1OTR9.UFDVzzGJ54Go9Z4jgyPSLG49zNx-AjHTQrJA6ee8KLI\"}"; - String createInstanceConsoleAccessTokenPath = "/instances/testString/console_access_token"; + public void testListEndpointGatewayIpsWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"ips\":[{\"address\":\"192.168.3.4\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"lifecycle_state\":\"stable\",\"name\":\"my-reserved-ip\",\"owner\":\"provider\",\"resource_type\":\"subnet_reserved_ip\",\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"resource_type\":\"endpoint_gateway\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"ips\":[{\"address\":\"192.168.3.4\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"lifecycle_state\":\"stable\",\"name\":\"my-reserved-ip\",\"owner\":\"provider\",\"resource_type\":\"subnet_reserved_ip\",\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"resource_type\":\"endpoint_gateway\"}}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) - .setBody(mockResponseBody)); + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the CreateInstanceConsoleAccessTokenOptions model - CreateInstanceConsoleAccessTokenOptions createInstanceConsoleAccessTokenOptionsModel = new CreateInstanceConsoleAccessTokenOptions.Builder() - .instanceId("testString") - .consoleType("serial") - .force(false) + ListEndpointGatewayIpsOptions listEndpointGatewayIpsOptions = new ListEndpointGatewayIpsOptions.Builder() + .endpointGatewayId("testString") + .limit(Long.valueOf("10")) + .sort("name") .build(); - // Invoke createInstanceConsoleAccessToken() with a valid options model and verify the result - Response response = vpcService.createInstanceConsoleAccessToken(createInstanceConsoleAccessTokenOptionsModel).execute(); - assertNotNull(response); - InstanceConsoleAccessToken responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createInstanceConsoleAccessTokenPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + List allResults = new ArrayList<>(); + EndpointGatewayIpsPager pager = new EndpointGatewayIpsPager(vpcService, listEndpointGatewayIpsOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } - - // Test the createInstanceConsoleAccessToken operation with and without retries enabled + + // Test the listEndpointGatewayIps operation using the EndpointGatewayIpsPager.getAll() method @Test - public void testCreateInstanceConsoleAccessTokenWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testCreateInstanceConsoleAccessTokenWOptions(); + public void testListEndpointGatewayIpsWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"ips\":[{\"address\":\"192.168.3.4\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"lifecycle_state\":\"stable\",\"name\":\"my-reserved-ip\",\"owner\":\"provider\",\"resource_type\":\"subnet_reserved_ip\",\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"resource_type\":\"endpoint_gateway\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"ips\":[{\"address\":\"192.168.3.4\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"lifecycle_state\":\"stable\",\"name\":\"my-reserved-ip\",\"owner\":\"provider\",\"resource_type\":\"subnet_reserved_ip\",\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"resource_type\":\"endpoint_gateway\"}}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - vpcService.disableRetries(); - testCreateInstanceConsoleAccessTokenWOptions(); - } + ListEndpointGatewayIpsOptions listEndpointGatewayIpsOptions = new ListEndpointGatewayIpsOptions.Builder() + .endpointGatewayId("testString") + .limit(Long.valueOf("10")) + .sort("name") + .build(); - // Test the createInstanceConsoleAccessToken operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateInstanceConsoleAccessTokenNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.createInstanceConsoleAccessToken(null).execute(); + EndpointGatewayIpsPager pager = new EndpointGatewayIpsPager(vpcService, listEndpointGatewayIpsOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); } - - // Test the listInstanceDisks operation with a valid options model parameter + + // Test the listEndpointGateways operation with a valid options model parameter @Test - public void testListInstanceDisksWOptions() throws Throwable { + public void testListEndpointGatewaysWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"disks\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"interface_type\": \"nvme\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\", \"size\": 100}]}"; - String listInstanceDisksPath = "/instances/testString/disks"; + String mockResponseBody = "{\"endpoint_gateways\": [{\"allow_dns_resolution_binding\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"lifecycle_reasons\": [{\"code\": \"dns_resolution_binding_pending\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-endpoint-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"endpoint_gateway\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"service_endpoint\": \"my-cloudant-instance.appdomain.cloud\", \"service_endpoints\": [\"my-cloudant-instance.appdomain.cloud\"], \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"id\": \"r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"name\": \"my-private-path-service-gateway\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"private_path_service_gateway\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listEndpointGatewaysPath = "/endpoint_gateways"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListInstanceDisksOptions model - ListInstanceDisksOptions listInstanceDisksOptionsModel = new ListInstanceDisksOptions.Builder() - .instanceId("testString") + // Construct an instance of the ListEndpointGatewaysOptions model + ListEndpointGatewaysOptions listEndpointGatewaysOptionsModel = new ListEndpointGatewaysOptions.Builder() + .name("my-name") + .start("testString") + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .lifecycleState(java.util.Arrays.asList("stable")) + .vpcId("testString") + .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .vpcName("my-vpc") + .allowDnsResolutionBinding(true) .build(); - // Invoke listInstanceDisks() with a valid options model and verify the result - Response response = vpcService.listInstanceDisks(listInstanceDisksOptionsModel).execute(); + // Invoke listEndpointGateways() with a valid options model and verify the result + Response response = vpcService.listEndpointGateways(listEndpointGatewaysOptionsModel).execute(); assertNotNull(response); - InstanceDiskCollection responseObj = response.getResult(); + EndpointGatewayCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -8586,264 +8522,260 @@ public void testListInstanceDisksWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listInstanceDisksPath); + assertEquals(parsedPath, listEndpointGatewaysPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("name"), "my-name"); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("resource_group.id"), "testString"); + assertEquals(query.get("lifecycle_state"), RequestUtils.join(java.util.Arrays.asList("stable"), ",")); + assertEquals(query.get("vpc.id"), "testString"); + assertEquals(query.get("vpc.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); + assertEquals(query.get("vpc.name"), "my-vpc"); + assertEquals(Boolean.valueOf(query.get("allow_dns_resolution_binding")), Boolean.valueOf(true)); } - // Test the listInstanceDisks operation with and without retries enabled + // Test the listEndpointGateways operation with and without retries enabled @Test - public void testListInstanceDisksWRetries() throws Throwable { + public void testListEndpointGatewaysWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListInstanceDisksWOptions(); + testListEndpointGatewaysWOptions(); vpcService.disableRetries(); - testListInstanceDisksWOptions(); - } - - // Test the listInstanceDisks operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListInstanceDisksNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.listInstanceDisks(null).execute(); + testListEndpointGatewaysWOptions(); } - // Test the getInstanceDisk operation with a valid options model parameter + // Test the listEndpointGateways operation using the EndpointGatewaysPager.getNext() method @Test - public void testGetInstanceDiskWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"interface_type\": \"nvme\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\", \"size\": 100}"; - String getInstanceDiskPath = "/instances/testString/disks/testString"; + public void testListEndpointGatewaysWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"endpoint_gateways\":[{\"allow_dns_resolution_binding\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"lifecycle_reasons\":[{\"code\":\"dns_resolution_binding_pending\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-endpoint-gateway\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"endpoint_gateway\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"service_endpoint\":\"my-cloudant-instance.appdomain.cloud\",\"service_endpoints\":[\"my-cloudant-instance.appdomain.cloud\"],\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"id\":\"r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"name\":\"my-private-path-service-gateway\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"private_path_service_gateway\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"endpoint_gateways\":[{\"allow_dns_resolution_binding\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"lifecycle_reasons\":[{\"code\":\"dns_resolution_binding_pending\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-endpoint-gateway\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"endpoint_gateway\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"service_endpoint\":\"my-cloudant-instance.appdomain.cloud\",\"service_endpoints\":[\"my-cloudant-instance.appdomain.cloud\"],\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"id\":\"r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"name\":\"my-private-path-service-gateway\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"private_path_service_gateway\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) - .setBody(mockResponseBody)); + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the GetInstanceDiskOptions model - GetInstanceDiskOptions getInstanceDiskOptionsModel = new GetInstanceDiskOptions.Builder() - .instanceId("testString") - .id("testString") + ListEndpointGatewaysOptions listEndpointGatewaysOptions = new ListEndpointGatewaysOptions.Builder() + .name("my-name") + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .lifecycleState(java.util.Arrays.asList("stable")) + .vpcId("testString") + .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .vpcName("my-vpc") + .allowDnsResolutionBinding(true) .build(); - // Invoke getInstanceDisk() with a valid options model and verify the result - Response response = vpcService.getInstanceDisk(getInstanceDiskOptionsModel).execute(); - assertNotNull(response); - InstanceDisk responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getInstanceDiskPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + List allResults = new ArrayList<>(); + EndpointGatewaysPager pager = new EndpointGatewaysPager(vpcService, listEndpointGatewaysOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } - - // Test the getInstanceDisk operation with and without retries enabled + + // Test the listEndpointGateways operation using the EndpointGatewaysPager.getAll() method @Test - public void testGetInstanceDiskWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testGetInstanceDiskWOptions(); + public void testListEndpointGatewaysWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"endpoint_gateways\":[{\"allow_dns_resolution_binding\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"lifecycle_reasons\":[{\"code\":\"dns_resolution_binding_pending\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-endpoint-gateway\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"endpoint_gateway\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"service_endpoint\":\"my-cloudant-instance.appdomain.cloud\",\"service_endpoints\":[\"my-cloudant-instance.appdomain.cloud\"],\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"id\":\"r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"name\":\"my-private-path-service-gateway\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"private_path_service_gateway\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"endpoint_gateways\":[{\"allow_dns_resolution_binding\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"lifecycle_reasons\":[{\"code\":\"dns_resolution_binding_pending\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-endpoint-gateway\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"endpoint_gateway\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"service_endpoint\":\"my-cloudant-instance.appdomain.cloud\",\"service_endpoints\":[\"my-cloudant-instance.appdomain.cloud\"],\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"id\":\"r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"name\":\"my-private-path-service-gateway\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"private_path_service_gateway\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - vpcService.disableRetries(); - testGetInstanceDiskWOptions(); - } + ListEndpointGatewaysOptions listEndpointGatewaysOptions = new ListEndpointGatewaysOptions.Builder() + .name("my-name") + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .lifecycleState(java.util.Arrays.asList("stable")) + .vpcId("testString") + .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .vpcName("my-vpc") + .allowDnsResolutionBinding(true) + .build(); - // Test the getInstanceDisk operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetInstanceDiskNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.getInstanceDisk(null).execute(); + EndpointGatewaysPager pager = new EndpointGatewaysPager(vpcService, listEndpointGatewaysOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); } - - // Test the updateInstanceDisk operation with a valid options model parameter + + // Test the removeEndpointGatewayIp operation with a valid options model parameter @Test - public void testUpdateInstanceDiskWOptions() throws Throwable { + public void testRemoveEndpointGatewayIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"interface_type\": \"nvme\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\", \"size\": 100}"; - String updateInstanceDiskPath = "/instances/testString/disks/testString"; + String mockResponseBody = ""; + String removeEndpointGatewayIpPath = "/endpoint_gateways/testString/ips/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the InstanceDiskPatch model - InstanceDiskPatch instanceDiskPatchModel = new InstanceDiskPatch.Builder() - .name("my-instance-disk-updated") - .build(); - Map instanceDiskPatchModelAsPatch = instanceDiskPatchModel.asPatch(); - - // Construct an instance of the UpdateInstanceDiskOptions model - UpdateInstanceDiskOptions updateInstanceDiskOptionsModel = new UpdateInstanceDiskOptions.Builder() - .instanceId("testString") + // Construct an instance of the RemoveEndpointGatewayIpOptions model + RemoveEndpointGatewayIpOptions removeEndpointGatewayIpOptionsModel = new RemoveEndpointGatewayIpOptions.Builder() + .endpointGatewayId("testString") .id("testString") - .instanceDiskPatch(instanceDiskPatchModelAsPatch) .build(); - // Invoke updateInstanceDisk() with a valid options model and verify the result - Response response = vpcService.updateInstanceDisk(updateInstanceDiskOptionsModel).execute(); + // Invoke removeEndpointGatewayIp() with a valid options model and verify the result + Response response = vpcService.removeEndpointGatewayIp(removeEndpointGatewayIpOptionsModel).execute(); assertNotNull(response); - InstanceDisk responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateInstanceDiskPath); + assertEquals(parsedPath, removeEndpointGatewayIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateInstanceDisk operation with and without retries enabled + // Test the removeEndpointGatewayIp operation with and without retries enabled @Test - public void testUpdateInstanceDiskWRetries() throws Throwable { + public void testRemoveEndpointGatewayIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateInstanceDiskWOptions(); + testRemoveEndpointGatewayIpWOptions(); vpcService.disableRetries(); - testUpdateInstanceDiskWOptions(); + testRemoveEndpointGatewayIpWOptions(); } - // Test the updateInstanceDisk operation with a null options model (negative test) + // Test the removeEndpointGatewayIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateInstanceDiskNoOptions() throws Throwable { + public void testRemoveEndpointGatewayIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateInstanceDisk(null).execute(); + vpcService.removeEndpointGatewayIp(null).execute(); } - // Test the listInstanceNetworkAttachments operation with a valid options model parameter + // Test the updateEndpointGateway operation with a valid options model parameter @Test - public void testListInstanceNetworkAttachmentsWOptions() throws Throwable { + public void testUpdateEndpointGatewayWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"network_attachments\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"lifecycle_state\": \"stable\", \"name\": \"my-instance-network-attachment\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"instance_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}]}"; - String listInstanceNetworkAttachmentsPath = "/instances/testString/network_attachments"; + String mockResponseBody = "{\"allow_dns_resolution_binding\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"lifecycle_reasons\": [{\"code\": \"dns_resolution_binding_pending\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-endpoint-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"endpoint_gateway\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"service_endpoint\": \"my-cloudant-instance.appdomain.cloud\", \"service_endpoints\": [\"my-cloudant-instance.appdomain.cloud\"], \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"id\": \"r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"name\": \"my-private-path-service-gateway\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"private_path_service_gateway\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String updateEndpointGatewayPath = "/endpoint_gateways/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListInstanceNetworkAttachmentsOptions model - ListInstanceNetworkAttachmentsOptions listInstanceNetworkAttachmentsOptionsModel = new ListInstanceNetworkAttachmentsOptions.Builder() - .instanceId("testString") + // Construct an instance of the EndpointGatewayPatch model + EndpointGatewayPatch endpointGatewayPatchModel = new EndpointGatewayPatch.Builder() + .allowDnsResolutionBinding(false) + .name("my-endpoint-gateway") .build(); + Map endpointGatewayPatchModelAsPatch = endpointGatewayPatchModel.asPatch(); - // Invoke listInstanceNetworkAttachments() with a valid options model and verify the result - Response response = vpcService.listInstanceNetworkAttachments(listInstanceNetworkAttachmentsOptionsModel).execute(); + // Construct an instance of the UpdateEndpointGatewayOptions model + UpdateEndpointGatewayOptions updateEndpointGatewayOptionsModel = new UpdateEndpointGatewayOptions.Builder() + .id("testString") + .endpointGatewayPatch(endpointGatewayPatchModelAsPatch) + .build(); + + // Invoke updateEndpointGateway() with a valid options model and verify the result + Response response = vpcService.updateEndpointGateway(updateEndpointGatewayOptionsModel).execute(); assertNotNull(response); - InstanceNetworkAttachmentCollection responseObj = response.getResult(); + EndpointGateway responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listInstanceNetworkAttachmentsPath); + assertEquals(parsedPath, updateEndpointGatewayPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the listInstanceNetworkAttachments operation with and without retries enabled + // Test the updateEndpointGateway operation with and without retries enabled @Test - public void testListInstanceNetworkAttachmentsWRetries() throws Throwable { + public void testUpdateEndpointGatewayWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListInstanceNetworkAttachmentsWOptions(); + testUpdateEndpointGatewayWOptions(); vpcService.disableRetries(); - testListInstanceNetworkAttachmentsWOptions(); + testUpdateEndpointGatewayWOptions(); } - // Test the listInstanceNetworkAttachments operation with a null options model (negative test) + // Test the updateEndpointGateway operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListInstanceNetworkAttachmentsNoOptions() throws Throwable { + public void testUpdateEndpointGatewayNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listInstanceNetworkAttachments(null).execute(); + vpcService.updateEndpointGateway(null).execute(); } - // Test the createInstanceNetworkAttachment operation with a valid options model parameter + // Test the createFloatingIp operation with a valid options model parameter @Test - public void testCreateInstanceNetworkAttachmentWOptions() throws Throwable { + public void testCreateFloatingIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"lifecycle_state\": \"stable\", \"name\": \"my-instance-network-attachment\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"instance_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}"; - String createInstanceNetworkAttachmentPath = "/instances/testString/network_attachments"; + String mockResponseBody = "{\"address\": \"203.0.113.1\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"available\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String createFloatingIpPath = "/floating_ips"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext model - VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtualNetworkInterfaceIpPrototypeModel = new VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext.Builder() - .address("10.0.0.5") - .autoDelete(false) - .name("my-reserved-ip") - .build(); - - // Construct an instance of the VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model - VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext virtualNetworkInterfacePrimaryIpPrototypeModel = new VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext.Builder() - .address("10.0.0.7") - .autoDelete(false) - .name("my-reserved-ip") - .build(); - // Construct an instance of the ResourceGroupIdentityById model ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() .id("fee82deba12e4c0fb69c3b09d1f12345") .build(); - // Construct an instance of the SecurityGroupIdentityById model - SecurityGroupIdentityById securityGroupIdentityModel = new SecurityGroupIdentityById.Builder() - .id("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") - .build(); - - // Construct an instance of the SubnetIdentityById model - SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() - .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + // Construct an instance of the FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById model + FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById floatingIpTargetPrototypeModel = new FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById.Builder() + .id("0717-54eb57ee-86f2-4796-90bb-d7874e0831ef") .build(); - // Construct an instance of the InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext model - InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext instanceNetworkAttachmentPrototypeVirtualNetworkInterfaceModel = new InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext.Builder() - .allowIpSpoofing(true) - .autoDelete(false) - .enableInfrastructureNat(true) - .ips(java.util.Arrays.asList(virtualNetworkInterfaceIpPrototypeModel)) - .name("my-virtual-network-interface") - .primaryIp(virtualNetworkInterfacePrimaryIpPrototypeModel) - .protocolStateFilteringMode("auto") + // Construct an instance of the FloatingIPPrototypeFloatingIPByTarget model + FloatingIPPrototypeFloatingIPByTarget floatingIpPrototypeModel = new FloatingIPPrototypeFloatingIPByTarget.Builder() + .name("my-floating-ip") .resourceGroup(resourceGroupIdentityModel) - .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) - .subnet(subnetIdentityModel) + .target(floatingIpTargetPrototypeModel) .build(); - // Construct an instance of the CreateInstanceNetworkAttachmentOptions model - CreateInstanceNetworkAttachmentOptions createInstanceNetworkAttachmentOptionsModel = new CreateInstanceNetworkAttachmentOptions.Builder() - .instanceId("testString") - .virtualNetworkInterface(instanceNetworkAttachmentPrototypeVirtualNetworkInterfaceModel) - .name("testString") + // Construct an instance of the CreateFloatingIpOptions model + CreateFloatingIpOptions createFloatingIpOptionsModel = new CreateFloatingIpOptions.Builder() + .floatingIpPrototype(floatingIpPrototypeModel) .build(); - // Invoke createInstanceNetworkAttachment() with a valid options model and verify the result - Response response = vpcService.createInstanceNetworkAttachment(createInstanceNetworkAttachmentOptionsModel).execute(); + // Invoke createFloatingIp() with a valid options model and verify the result + Response response = vpcService.createFloatingIp(createFloatingIpOptionsModel).execute(); assertNotNull(response); - InstanceNetworkAttachment responseObj = response.getResult(); + FloatingIP responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -8852,49 +8784,48 @@ public void testCreateInstanceNetworkAttachmentWOptions() throws Throwable { assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createInstanceNetworkAttachmentPath); + assertEquals(parsedPath, createFloatingIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createInstanceNetworkAttachment operation with and without retries enabled + // Test the createFloatingIp operation with and without retries enabled @Test - public void testCreateInstanceNetworkAttachmentWRetries() throws Throwable { + public void testCreateFloatingIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateInstanceNetworkAttachmentWOptions(); + testCreateFloatingIpWOptions(); vpcService.disableRetries(); - testCreateInstanceNetworkAttachmentWOptions(); + testCreateFloatingIpWOptions(); } - // Test the createInstanceNetworkAttachment operation with a null options model (negative test) + // Test the createFloatingIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateInstanceNetworkAttachmentNoOptions() throws Throwable { + public void testCreateFloatingIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createInstanceNetworkAttachment(null).execute(); + vpcService.createFloatingIp(null).execute(); } - // Test the deleteInstanceNetworkAttachment operation with a valid options model parameter + // Test the deleteFloatingIp operation with a valid options model parameter @Test - public void testDeleteInstanceNetworkAttachmentWOptions() throws Throwable { + public void testDeleteFloatingIpWOptions() throws Throwable { // Register a mock response String mockResponseBody = ""; - String deleteInstanceNetworkAttachmentPath = "/instances/testString/network_attachments/testString"; + String deleteFloatingIpPath = "/floating_ips/testString"; server.enqueue(new MockResponse() - .setResponseCode(202) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the DeleteInstanceNetworkAttachmentOptions model - DeleteInstanceNetworkAttachmentOptions deleteInstanceNetworkAttachmentOptionsModel = new DeleteInstanceNetworkAttachmentOptions.Builder() - .instanceId("testString") + // Construct an instance of the DeleteFloatingIpOptions model + DeleteFloatingIpOptions deleteFloatingIpOptionsModel = new DeleteFloatingIpOptions.Builder() .id("testString") .build(); - // Invoke deleteInstanceNetworkAttachment() with a valid options model and verify the result - Response response = vpcService.deleteInstanceNetworkAttachment(deleteInstanceNetworkAttachmentOptionsModel).execute(); + // Invoke deleteFloatingIp() with a valid options model and verify the result + Response response = vpcService.deleteFloatingIp(deleteFloatingIpOptionsModel).execute(); assertNotNull(response); Void responseObj = response.getResult(); assertNull(responseObj); @@ -8905,52 +8836,51 @@ public void testDeleteInstanceNetworkAttachmentWOptions() throws Throwable { assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteInstanceNetworkAttachmentPath); + assertEquals(parsedPath, deleteFloatingIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteInstanceNetworkAttachment operation with and without retries enabled + // Test the deleteFloatingIp operation with and without retries enabled @Test - public void testDeleteInstanceNetworkAttachmentWRetries() throws Throwable { + public void testDeleteFloatingIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteInstanceNetworkAttachmentWOptions(); + testDeleteFloatingIpWOptions(); vpcService.disableRetries(); - testDeleteInstanceNetworkAttachmentWOptions(); + testDeleteFloatingIpWOptions(); } - // Test the deleteInstanceNetworkAttachment operation with a null options model (negative test) + // Test the deleteFloatingIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteInstanceNetworkAttachmentNoOptions() throws Throwable { + public void testDeleteFloatingIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteInstanceNetworkAttachment(null).execute(); + vpcService.deleteFloatingIp(null).execute(); } - // Test the getInstanceNetworkAttachment operation with a valid options model parameter + // Test the getFloatingIp operation with a valid options model parameter @Test - public void testGetInstanceNetworkAttachmentWOptions() throws Throwable { + public void testGetFloatingIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"lifecycle_state\": \"stable\", \"name\": \"my-instance-network-attachment\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"instance_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}"; - String getInstanceNetworkAttachmentPath = "/instances/testString/network_attachments/testString"; + String mockResponseBody = "{\"address\": \"203.0.113.1\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"available\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String getFloatingIpPath = "/floating_ips/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetInstanceNetworkAttachmentOptions model - GetInstanceNetworkAttachmentOptions getInstanceNetworkAttachmentOptionsModel = new GetInstanceNetworkAttachmentOptions.Builder() - .instanceId("testString") + // Construct an instance of the GetFloatingIpOptions model + GetFloatingIpOptions getFloatingIpOptionsModel = new GetFloatingIpOptions.Builder() .id("testString") .build(); - // Invoke getInstanceNetworkAttachment() with a valid options model and verify the result - Response response = vpcService.getInstanceNetworkAttachment(getInstanceNetworkAttachmentOptionsModel).execute(); + // Invoke getFloatingIp() with a valid options model and verify the result + Response response = vpcService.getFloatingIp(getFloatingIpOptionsModel).execute(); assertNotNull(response); - InstanceNetworkAttachment responseObj = response.getResult(); + FloatingIP responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -8959,187 +8889,271 @@ public void testGetInstanceNetworkAttachmentWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getInstanceNetworkAttachmentPath); + assertEquals(parsedPath, getFloatingIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getInstanceNetworkAttachment operation with and without retries enabled + // Test the getFloatingIp operation with and without retries enabled @Test - public void testGetInstanceNetworkAttachmentWRetries() throws Throwable { + public void testGetFloatingIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetInstanceNetworkAttachmentWOptions(); + testGetFloatingIpWOptions(); vpcService.disableRetries(); - testGetInstanceNetworkAttachmentWOptions(); + testGetFloatingIpWOptions(); } - // Test the getInstanceNetworkAttachment operation with a null options model (negative test) + // Test the getFloatingIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetInstanceNetworkAttachmentNoOptions() throws Throwable { + public void testGetFloatingIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getInstanceNetworkAttachment(null).execute(); + vpcService.getFloatingIp(null).execute(); } - // Test the updateInstanceNetworkAttachment operation with a valid options model parameter + // Test the listFloatingIps operation with a valid options model parameter @Test - public void testUpdateInstanceNetworkAttachmentWOptions() throws Throwable { + public void testListFloatingIpsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"lifecycle_state\": \"stable\", \"name\": \"my-instance-network-attachment\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"instance_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}"; - String updateInstanceNetworkAttachmentPath = "/instances/testString/network_attachments/testString"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"floating_ips\": [{\"address\": \"203.0.113.1\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"available\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listFloatingIpsPath = "/floating_ips"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the InstanceNetworkAttachmentPatch model - InstanceNetworkAttachmentPatch instanceNetworkAttachmentPatchModel = new InstanceNetworkAttachmentPatch.Builder() - .name("my-instance-network-attachment-updated") - .build(); - Map instanceNetworkAttachmentPatchModelAsPatch = instanceNetworkAttachmentPatchModel.asPatch(); - - // Construct an instance of the UpdateInstanceNetworkAttachmentOptions model - UpdateInstanceNetworkAttachmentOptions updateInstanceNetworkAttachmentOptionsModel = new UpdateInstanceNetworkAttachmentOptions.Builder() - .instanceId("testString") - .id("testString") - .instanceNetworkAttachmentPatch(instanceNetworkAttachmentPatchModelAsPatch) + // Construct an instance of the ListFloatingIpsOptions model + ListFloatingIpsOptions listFloatingIpsOptionsModel = new ListFloatingIpsOptions.Builder() + .start("testString") + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .sort("name") + .targetId("testString") + .targetCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + .targetName("my-resource") + .targetResourceType("testString") .build(); - // Invoke updateInstanceNetworkAttachment() with a valid options model and verify the result - Response response = vpcService.updateInstanceNetworkAttachment(updateInstanceNetworkAttachmentOptionsModel).execute(); + // Invoke listFloatingIps() with a valid options model and verify the result + Response response = vpcService.listFloatingIps(listFloatingIpsOptionsModel).execute(); assertNotNull(response); - InstanceNetworkAttachment responseObj = response.getResult(); + FloatingIPCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateInstanceNetworkAttachmentPath); + assertEquals(parsedPath, listFloatingIpsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("resource_group.id"), "testString"); + assertEquals(query.get("sort"), "name"); + assertEquals(query.get("target.id"), "testString"); + assertEquals(query.get("target.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727"); + assertEquals(query.get("target.name"), "my-resource"); + assertEquals(query.get("target.resource_type"), "testString"); } - // Test the updateInstanceNetworkAttachment operation with and without retries enabled + // Test the listFloatingIps operation with and without retries enabled @Test - public void testUpdateInstanceNetworkAttachmentWRetries() throws Throwable { + public void testListFloatingIpsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateInstanceNetworkAttachmentWOptions(); + testListFloatingIpsWOptions(); vpcService.disableRetries(); - testUpdateInstanceNetworkAttachmentWOptions(); + testListFloatingIpsWOptions(); } - // Test the updateInstanceNetworkAttachment operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateInstanceNetworkAttachmentNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.updateInstanceNetworkAttachment(null).execute(); + // Test the listFloatingIps operation using the FloatingIpsPager.getNext() method + @Test + public void testListFloatingIpsWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"floating_ips\":[{\"address\":\"203.0.113.1\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"status\":\"available\",\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"floating_ips\":[{\"address\":\"203.0.113.1\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"status\":\"available\",\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListFloatingIpsOptions listFloatingIpsOptions = new ListFloatingIpsOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .sort("name") + .targetId("testString") + .targetCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + .targetName("my-resource") + .targetResourceType("testString") + .build(); + + List allResults = new ArrayList<>(); + FloatingIpsPager pager = new FloatingIpsPager(vpcService, listFloatingIpsOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } + + // Test the listFloatingIps operation using the FloatingIpsPager.getAll() method + @Test + public void testListFloatingIpsWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"floating_ips\":[{\"address\":\"203.0.113.1\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"status\":\"available\",\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"floating_ips\":[{\"address\":\"203.0.113.1\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"status\":\"available\",\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Test the listInstanceNetworkInterfaces operation with a valid options model parameter + ListFloatingIpsOptions listFloatingIpsOptions = new ListFloatingIpsOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .sort("name") + .targetId("testString") + .targetCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + .targetName("my-resource") + .targetResourceType("testString") + .build(); + + FloatingIpsPager pager = new FloatingIpsPager(vpcService, listFloatingIpsOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); + } + + // Test the updateFloatingIp operation with a valid options model parameter @Test - public void testListInstanceNetworkInterfacesWOptions() throws Throwable { + public void testUpdateFloatingIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"network_interfaces\": [{\"allow_ip_spoofing\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"floating_ips\": [{\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}], \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"status\": \"available\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\"}]}"; - String listInstanceNetworkInterfacesPath = "/instances/testString/network_interfaces"; + String mockResponseBody = "{\"address\": \"203.0.113.1\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"available\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String updateFloatingIpPath = "/floating_ips/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListInstanceNetworkInterfacesOptions model - ListInstanceNetworkInterfacesOptions listInstanceNetworkInterfacesOptionsModel = new ListInstanceNetworkInterfacesOptions.Builder() - .instanceId("testString") + // Construct an instance of the FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById model + FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById floatingIpTargetPatchModel = new FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById.Builder() + .id("0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6") .build(); - // Invoke listInstanceNetworkInterfaces() with a valid options model and verify the result - Response response = vpcService.listInstanceNetworkInterfaces(listInstanceNetworkInterfacesOptionsModel).execute(); + // Construct an instance of the FloatingIPPatch model + FloatingIPPatch floatingIpPatchModel = new FloatingIPPatch.Builder() + .name("my-floating-ip") + .target(floatingIpTargetPatchModel) + .build(); + Map floatingIpPatchModelAsPatch = floatingIpPatchModel.asPatch(); + + // Construct an instance of the UpdateFloatingIpOptions model + UpdateFloatingIpOptions updateFloatingIpOptionsModel = new UpdateFloatingIpOptions.Builder() + .id("testString") + .floatingIpPatch(floatingIpPatchModelAsPatch) + .build(); + + // Invoke updateFloatingIp() with a valid options model and verify the result + Response response = vpcService.updateFloatingIp(updateFloatingIpOptionsModel).execute(); assertNotNull(response); - NetworkInterfaceUnpaginatedCollection responseObj = response.getResult(); + FloatingIP responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listInstanceNetworkInterfacesPath); + assertEquals(parsedPath, updateFloatingIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the listInstanceNetworkInterfaces operation with and without retries enabled + // Test the updateFloatingIp operation with and without retries enabled @Test - public void testListInstanceNetworkInterfacesWRetries() throws Throwable { + public void testUpdateFloatingIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListInstanceNetworkInterfacesWOptions(); + testUpdateFloatingIpWOptions(); vpcService.disableRetries(); - testListInstanceNetworkInterfacesWOptions(); + testUpdateFloatingIpWOptions(); } - // Test the listInstanceNetworkInterfaces operation with a null options model (negative test) + // Test the updateFloatingIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListInstanceNetworkInterfacesNoOptions() throws Throwable { + public void testUpdateFloatingIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listInstanceNetworkInterfaces(null).execute(); + vpcService.updateFloatingIp(null).execute(); } - // Test the createInstanceNetworkInterface operation with a valid options model parameter + // Test the createFlowLogCollector operation with a valid options model parameter @Test - public void testCreateInstanceNetworkInterfaceWOptions() throws Throwable { + public void testCreateFlowLogCollectorWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"allow_ip_spoofing\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"floating_ips\": [{\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}], \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"status\": \"available\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\"}"; - String createInstanceNetworkInterfacePath = "/instances/testString/network_interfaces"; + String mockResponseBody = "{\"active\": true, \"auto_delete\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\", \"id\": \"r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\", \"lifecycle_state\": \"stable\", \"name\": \"my-flow-log-collector\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"storage_bucket\": {\"name\": \"bucket-27200-lwx4cfvcue\"}, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"resource_type\": \"network_interface\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String createFlowLogCollectorPath = "/flow_log_collectors"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the SubnetIdentityById model - SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() - .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + // Construct an instance of the LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName model + LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName legacyCloudObjectStorageBucketIdentityModel = new LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName.Builder() + .name("bucket-27200-lwx4cfvcue") .build(); - // Construct an instance of the NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext model - NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext networkInterfaceIpPrototypeModel = new NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext.Builder() - .address("10.0.0.5") - .autoDelete(false) - .name("my-reserved-ip") + // Construct an instance of the FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById model + FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById flowLogCollectorTargetPrototypeModel = new FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById.Builder() + .id("0717-d54eb633-98ea-459d-aa00-6a8e780175a7") .build(); - // Construct an instance of the SecurityGroupIdentityById model - SecurityGroupIdentityById securityGroupIdentityModel = new SecurityGroupIdentityById.Builder() - .id("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") .build(); - // Construct an instance of the CreateInstanceNetworkInterfaceOptions model - CreateInstanceNetworkInterfaceOptions createInstanceNetworkInterfaceOptionsModel = new CreateInstanceNetworkInterfaceOptions.Builder() - .instanceId("testString") - .subnet(subnetIdentityModel) - .allowIpSpoofing(true) - .name("my-instance-network-interface") - .primaryIp(networkInterfaceIpPrototypeModel) - .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) + // Construct an instance of the CreateFlowLogCollectorOptions model + CreateFlowLogCollectorOptions createFlowLogCollectorOptionsModel = new CreateFlowLogCollectorOptions.Builder() + .storageBucket(legacyCloudObjectStorageBucketIdentityModel) + .target(flowLogCollectorTargetPrototypeModel) + .active(false) + .name("my-flow-log-collector") + .resourceGroup(resourceGroupIdentityModel) .build(); - // Invoke createInstanceNetworkInterface() with a valid options model and verify the result - Response response = vpcService.createInstanceNetworkInterface(createInstanceNetworkInterfaceOptionsModel).execute(); + // Invoke createFlowLogCollector() with a valid options model and verify the result + Response response = vpcService.createFlowLogCollector(createFlowLogCollectorOptionsModel).execute(); assertNotNull(response); - NetworkInterface responseObj = response.getResult(); + FlowLogCollector responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -9148,49 +9162,48 @@ public void testCreateInstanceNetworkInterfaceWOptions() throws Throwable { assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createInstanceNetworkInterfacePath); + assertEquals(parsedPath, createFlowLogCollectorPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createInstanceNetworkInterface operation with and without retries enabled + // Test the createFlowLogCollector operation with and without retries enabled @Test - public void testCreateInstanceNetworkInterfaceWRetries() throws Throwable { + public void testCreateFlowLogCollectorWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateInstanceNetworkInterfaceWOptions(); + testCreateFlowLogCollectorWOptions(); vpcService.disableRetries(); - testCreateInstanceNetworkInterfaceWOptions(); + testCreateFlowLogCollectorWOptions(); } - // Test the createInstanceNetworkInterface operation with a null options model (negative test) + // Test the createFlowLogCollector operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateInstanceNetworkInterfaceNoOptions() throws Throwable { + public void testCreateFlowLogCollectorNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createInstanceNetworkInterface(null).execute(); + vpcService.createFlowLogCollector(null).execute(); } - // Test the deleteInstanceNetworkInterface operation with a valid options model parameter + // Test the deleteFlowLogCollector operation with a valid options model parameter @Test - public void testDeleteInstanceNetworkInterfaceWOptions() throws Throwable { + public void testDeleteFlowLogCollectorWOptions() throws Throwable { // Register a mock response String mockResponseBody = ""; - String deleteInstanceNetworkInterfacePath = "/instances/testString/network_interfaces/testString"; + String deleteFlowLogCollectorPath = "/flow_log_collectors/testString"; server.enqueue(new MockResponse() .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the DeleteInstanceNetworkInterfaceOptions model - DeleteInstanceNetworkInterfaceOptions deleteInstanceNetworkInterfaceOptionsModel = new DeleteInstanceNetworkInterfaceOptions.Builder() - .instanceId("testString") + // Construct an instance of the DeleteFlowLogCollectorOptions model + DeleteFlowLogCollectorOptions deleteFlowLogCollectorOptionsModel = new DeleteFlowLogCollectorOptions.Builder() .id("testString") .build(); - // Invoke deleteInstanceNetworkInterface() with a valid options model and verify the result - Response response = vpcService.deleteInstanceNetworkInterface(deleteInstanceNetworkInterfaceOptionsModel).execute(); + // Invoke deleteFlowLogCollector() with a valid options model and verify the result + Response response = vpcService.deleteFlowLogCollector(deleteFlowLogCollectorOptionsModel).execute(); assertNotNull(response); Void responseObj = response.getResult(); assertNull(responseObj); @@ -9201,52 +9214,51 @@ public void testDeleteInstanceNetworkInterfaceWOptions() throws Throwable { assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteInstanceNetworkInterfacePath); + assertEquals(parsedPath, deleteFlowLogCollectorPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteInstanceNetworkInterface operation with and without retries enabled + // Test the deleteFlowLogCollector operation with and without retries enabled @Test - public void testDeleteInstanceNetworkInterfaceWRetries() throws Throwable { + public void testDeleteFlowLogCollectorWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteInstanceNetworkInterfaceWOptions(); + testDeleteFlowLogCollectorWOptions(); vpcService.disableRetries(); - testDeleteInstanceNetworkInterfaceWOptions(); + testDeleteFlowLogCollectorWOptions(); } - // Test the deleteInstanceNetworkInterface operation with a null options model (negative test) + // Test the deleteFlowLogCollector operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteInstanceNetworkInterfaceNoOptions() throws Throwable { + public void testDeleteFlowLogCollectorNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteInstanceNetworkInterface(null).execute(); + vpcService.deleteFlowLogCollector(null).execute(); } - // Test the getInstanceNetworkInterface operation with a valid options model parameter + // Test the getFlowLogCollector operation with a valid options model parameter @Test - public void testGetInstanceNetworkInterfaceWOptions() throws Throwable { + public void testGetFlowLogCollectorWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"allow_ip_spoofing\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"floating_ips\": [{\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}], \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"status\": \"available\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\"}"; - String getInstanceNetworkInterfacePath = "/instances/testString/network_interfaces/testString"; + String mockResponseBody = "{\"active\": true, \"auto_delete\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\", \"id\": \"r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\", \"lifecycle_state\": \"stable\", \"name\": \"my-flow-log-collector\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"storage_bucket\": {\"name\": \"bucket-27200-lwx4cfvcue\"}, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"resource_type\": \"network_interface\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String getFlowLogCollectorPath = "/flow_log_collectors/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetInstanceNetworkInterfaceOptions model - GetInstanceNetworkInterfaceOptions getInstanceNetworkInterfaceOptionsModel = new GetInstanceNetworkInterfaceOptions.Builder() - .instanceId("testString") + // Construct an instance of the GetFlowLogCollectorOptions model + GetFlowLogCollectorOptions getFlowLogCollectorOptionsModel = new GetFlowLogCollectorOptions.Builder() .id("testString") .build(); - // Invoke getInstanceNetworkInterface() with a valid options model and verify the result - Response response = vpcService.getInstanceNetworkInterface(getInstanceNetworkInterfaceOptionsModel).execute(); + // Invoke getFlowLogCollector() with a valid options model and verify the result + Response response = vpcService.getFlowLogCollector(getFlowLogCollectorOptionsModel).execute(); assertNotNull(response); - NetworkInterface responseObj = response.getResult(); + FlowLogCollector responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -9255,223 +9267,305 @@ public void testGetInstanceNetworkInterfaceWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getInstanceNetworkInterfacePath); + assertEquals(parsedPath, getFlowLogCollectorPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getInstanceNetworkInterface operation with and without retries enabled + // Test the getFlowLogCollector operation with and without retries enabled @Test - public void testGetInstanceNetworkInterfaceWRetries() throws Throwable { + public void testGetFlowLogCollectorWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetInstanceNetworkInterfaceWOptions(); + testGetFlowLogCollectorWOptions(); vpcService.disableRetries(); - testGetInstanceNetworkInterfaceWOptions(); + testGetFlowLogCollectorWOptions(); } - // Test the getInstanceNetworkInterface operation with a null options model (negative test) + // Test the getFlowLogCollector operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetInstanceNetworkInterfaceNoOptions() throws Throwable { + public void testGetFlowLogCollectorNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getInstanceNetworkInterface(null).execute(); + vpcService.getFlowLogCollector(null).execute(); } - // Test the updateInstanceNetworkInterface operation with a valid options model parameter + // Test the listFlowLogCollectors operation with a valid options model parameter @Test - public void testUpdateInstanceNetworkInterfaceWOptions() throws Throwable { + public void testListFlowLogCollectorsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"allow_ip_spoofing\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"floating_ips\": [{\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}], \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"status\": \"available\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\"}"; - String updateInstanceNetworkInterfacePath = "/instances/testString/network_interfaces/testString"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"flow_log_collectors\": [{\"active\": true, \"auto_delete\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\", \"id\": \"r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\", \"lifecycle_state\": \"stable\", \"name\": \"my-flow-log-collector\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"storage_bucket\": {\"name\": \"bucket-27200-lwx4cfvcue\"}, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"resource_type\": \"network_interface\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listFlowLogCollectorsPath = "/flow_log_collectors"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the NetworkInterfacePatch model - NetworkInterfacePatch networkInterfacePatchModel = new NetworkInterfacePatch.Builder() - .allowIpSpoofing(true) - .name("my-network-interface-updated") - .build(); - Map networkInterfacePatchModelAsPatch = networkInterfacePatchModel.asPatch(); - - // Construct an instance of the UpdateInstanceNetworkInterfaceOptions model - UpdateInstanceNetworkInterfaceOptions updateInstanceNetworkInterfaceOptionsModel = new UpdateInstanceNetworkInterfaceOptions.Builder() - .instanceId("testString") - .id("testString") - .networkInterfacePatch(networkInterfacePatchModelAsPatch) + // Construct an instance of the ListFlowLogCollectorsOptions model + ListFlowLogCollectorsOptions listFlowLogCollectorsOptionsModel = new ListFlowLogCollectorsOptions.Builder() + .start("testString") + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .name("my-name") + .vpcId("testString") + .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .vpcName("my-vpc") + .targetId("testString") + .targetResourceType("testString") .build(); - // Invoke updateInstanceNetworkInterface() with a valid options model and verify the result - Response response = vpcService.updateInstanceNetworkInterface(updateInstanceNetworkInterfaceOptionsModel).execute(); + // Invoke listFlowLogCollectors() with a valid options model and verify the result + Response response = vpcService.listFlowLogCollectors(listFlowLogCollectorsOptionsModel).execute(); assertNotNull(response); - NetworkInterface responseObj = response.getResult(); + FlowLogCollectorCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateInstanceNetworkInterfacePath); + assertEquals(parsedPath, listFlowLogCollectorsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("resource_group.id"), "testString"); + assertEquals(query.get("name"), "my-name"); + assertEquals(query.get("vpc.id"), "testString"); + assertEquals(query.get("vpc.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); + assertEquals(query.get("vpc.name"), "my-vpc"); + assertEquals(query.get("target.id"), "testString"); + assertEquals(query.get("target.resource_type"), "testString"); } - // Test the updateInstanceNetworkInterface operation with and without retries enabled + // Test the listFlowLogCollectors operation with and without retries enabled @Test - public void testUpdateInstanceNetworkInterfaceWRetries() throws Throwable { + public void testListFlowLogCollectorsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateInstanceNetworkInterfaceWOptions(); + testListFlowLogCollectorsWOptions(); vpcService.disableRetries(); - testUpdateInstanceNetworkInterfaceWOptions(); + testListFlowLogCollectorsWOptions(); } - // Test the updateInstanceNetworkInterface operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateInstanceNetworkInterfaceNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.updateInstanceNetworkInterface(null).execute(); + // Test the listFlowLogCollectors operation using the FlowLogCollectorsPager.getNext() method + @Test + public void testListFlowLogCollectorsWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"flow_log_collectors\":[{\"active\":true,\"auto_delete\":true,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\",\"id\":\"r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\",\"lifecycle_state\":\"stable\",\"name\":\"my-flow-log-collector\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"storage_bucket\":{\"name\":\"bucket-27200-lwx4cfvcue\"},\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"resource_type\":\"network_interface\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"flow_log_collectors\":[{\"active\":true,\"auto_delete\":true,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\",\"id\":\"r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\",\"lifecycle_state\":\"stable\",\"name\":\"my-flow-log-collector\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"storage_bucket\":{\"name\":\"bucket-27200-lwx4cfvcue\"},\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"resource_type\":\"network_interface\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListFlowLogCollectorsOptions listFlowLogCollectorsOptions = new ListFlowLogCollectorsOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .name("my-name") + .vpcId("testString") + .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .vpcName("my-vpc") + .targetId("testString") + .targetResourceType("testString") + .build(); + + List allResults = new ArrayList<>(); + FlowLogCollectorsPager pager = new FlowLogCollectorsPager(vpcService, listFlowLogCollectorsOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } + + // Test the listFlowLogCollectors operation using the FlowLogCollectorsPager.getAll() method + @Test + public void testListFlowLogCollectorsWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"flow_log_collectors\":[{\"active\":true,\"auto_delete\":true,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\",\"id\":\"r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\",\"lifecycle_state\":\"stable\",\"name\":\"my-flow-log-collector\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"storage_bucket\":{\"name\":\"bucket-27200-lwx4cfvcue\"},\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"resource_type\":\"network_interface\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"flow_log_collectors\":[{\"active\":true,\"auto_delete\":true,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\",\"id\":\"r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\",\"lifecycle_state\":\"stable\",\"name\":\"my-flow-log-collector\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"storage_bucket\":{\"name\":\"bucket-27200-lwx4cfvcue\"},\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"resource_type\":\"network_interface\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Test the listInstanceNetworkInterfaceFloatingIps operation with a valid options model parameter + ListFlowLogCollectorsOptions listFlowLogCollectorsOptions = new ListFlowLogCollectorsOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .name("my-name") + .vpcId("testString") + .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .vpcName("my-vpc") + .targetId("testString") + .targetResourceType("testString") + .build(); + + FlowLogCollectorsPager pager = new FlowLogCollectorsPager(vpcService, listFlowLogCollectorsOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); + } + + // Test the updateFlowLogCollector operation with a valid options model parameter @Test - public void testListInstanceNetworkInterfaceFloatingIpsWOptions() throws Throwable { + public void testUpdateFlowLogCollectorWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"floating_ips\": [{\"address\": \"203.0.113.1\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"available\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}]}"; - String listInstanceNetworkInterfaceFloatingIpsPath = "/instances/testString/network_interfaces/testString/floating_ips"; + String mockResponseBody = "{\"active\": true, \"auto_delete\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\", \"id\": \"r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\", \"lifecycle_state\": \"stable\", \"name\": \"my-flow-log-collector\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"storage_bucket\": {\"name\": \"bucket-27200-lwx4cfvcue\"}, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"resource_type\": \"network_interface\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String updateFlowLogCollectorPath = "/flow_log_collectors/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListInstanceNetworkInterfaceFloatingIpsOptions model - ListInstanceNetworkInterfaceFloatingIpsOptions listInstanceNetworkInterfaceFloatingIpsOptionsModel = new ListInstanceNetworkInterfaceFloatingIpsOptions.Builder() - .instanceId("testString") - .networkInterfaceId("testString") + // Construct an instance of the FlowLogCollectorPatch model + FlowLogCollectorPatch flowLogCollectorPatchModel = new FlowLogCollectorPatch.Builder() + .active(false) + .name("my-flow-log-collector") .build(); + Map flowLogCollectorPatchModelAsPatch = flowLogCollectorPatchModel.asPatch(); - // Invoke listInstanceNetworkInterfaceFloatingIps() with a valid options model and verify the result - Response response = vpcService.listInstanceNetworkInterfaceFloatingIps(listInstanceNetworkInterfaceFloatingIpsOptionsModel).execute(); + // Construct an instance of the UpdateFlowLogCollectorOptions model + UpdateFlowLogCollectorOptions updateFlowLogCollectorOptionsModel = new UpdateFlowLogCollectorOptions.Builder() + .id("testString") + .flowLogCollectorPatch(flowLogCollectorPatchModelAsPatch) + .build(); + + // Invoke updateFlowLogCollector() with a valid options model and verify the result + Response response = vpcService.updateFlowLogCollector(updateFlowLogCollectorOptionsModel).execute(); assertNotNull(response); - FloatingIPUnpaginatedCollection responseObj = response.getResult(); + FlowLogCollector responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listInstanceNetworkInterfaceFloatingIpsPath); + assertEquals(parsedPath, updateFlowLogCollectorPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the listInstanceNetworkInterfaceFloatingIps operation with and without retries enabled + // Test the updateFlowLogCollector operation with and without retries enabled @Test - public void testListInstanceNetworkInterfaceFloatingIpsWRetries() throws Throwable { + public void testUpdateFlowLogCollectorWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListInstanceNetworkInterfaceFloatingIpsWOptions(); + testUpdateFlowLogCollectorWOptions(); vpcService.disableRetries(); - testListInstanceNetworkInterfaceFloatingIpsWOptions(); + testUpdateFlowLogCollectorWOptions(); } - // Test the listInstanceNetworkInterfaceFloatingIps operation with a null options model (negative test) + // Test the updateFlowLogCollector operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListInstanceNetworkInterfaceFloatingIpsNoOptions() throws Throwable { + public void testUpdateFlowLogCollectorNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listInstanceNetworkInterfaceFloatingIps(null).execute(); + vpcService.updateFlowLogCollector(null).execute(); } - // Test the removeInstanceNetworkInterfaceFloatingIp operation with a valid options model parameter + // Test the getRegion operation with a valid options model parameter @Test - public void testRemoveInstanceNetworkInterfaceFloatingIpWOptions() throws Throwable { + public void testGetRegionWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String removeInstanceNetworkInterfaceFloatingIpPath = "/instances/testString/network_interfaces/testString/floating_ips/testString"; + String mockResponseBody = "{\"endpoint\": \"https://us-south.iaas.cloud.ibm.com\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\", \"status\": \"available\"}"; + String getRegionPath = "/regions/us-south"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the RemoveInstanceNetworkInterfaceFloatingIpOptions model - RemoveInstanceNetworkInterfaceFloatingIpOptions removeInstanceNetworkInterfaceFloatingIpOptionsModel = new RemoveInstanceNetworkInterfaceFloatingIpOptions.Builder() - .instanceId("testString") - .networkInterfaceId("testString") - .id("testString") + // Construct an instance of the GetRegionOptions model + GetRegionOptions getRegionOptionsModel = new GetRegionOptions.Builder() + .name("us-south") .build(); - // Invoke removeInstanceNetworkInterfaceFloatingIp() with a valid options model and verify the result - Response response = vpcService.removeInstanceNetworkInterfaceFloatingIp(removeInstanceNetworkInterfaceFloatingIpOptionsModel).execute(); + // Invoke getRegion() with a valid options model and verify the result + Response response = vpcService.getRegion(getRegionOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + Region 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, removeInstanceNetworkInterfaceFloatingIpPath); + assertEquals(parsedPath, getRegionPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the removeInstanceNetworkInterfaceFloatingIp operation with and without retries enabled + // Test the getRegion operation with and without retries enabled @Test - public void testRemoveInstanceNetworkInterfaceFloatingIpWRetries() throws Throwable { + public void testGetRegionWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testRemoveInstanceNetworkInterfaceFloatingIpWOptions(); + testGetRegionWOptions(); vpcService.disableRetries(); - testRemoveInstanceNetworkInterfaceFloatingIpWOptions(); + testGetRegionWOptions(); } - // Test the removeInstanceNetworkInterfaceFloatingIp operation with a null options model (negative test) + // Test the getRegion operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testRemoveInstanceNetworkInterfaceFloatingIpNoOptions() throws Throwable { + public void testGetRegionNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.removeInstanceNetworkInterfaceFloatingIp(null).execute(); + vpcService.getRegion(null).execute(); } - // Test the getInstanceNetworkInterfaceFloatingIp operation with a valid options model parameter + // Test the getRegionZone operation with a valid options model parameter @Test - public void testGetInstanceNetworkInterfaceFloatingIpWOptions() throws Throwable { + public void testGetRegionZoneWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"address\": \"203.0.113.1\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"available\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String getInstanceNetworkInterfaceFloatingIpPath = "/instances/testString/network_interfaces/testString/floating_ips/testString"; + String mockResponseBody = "{\"data_center\": \"DAL12\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\", \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}, \"status\": \"available\", \"universal_name\": \"us-south-dal10-a\"}"; + String getRegionZonePath = "/regions/us-south/zones/us-south-1"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetInstanceNetworkInterfaceFloatingIpOptions model - GetInstanceNetworkInterfaceFloatingIpOptions getInstanceNetworkInterfaceFloatingIpOptionsModel = new GetInstanceNetworkInterfaceFloatingIpOptions.Builder() - .instanceId("testString") - .networkInterfaceId("testString") - .id("testString") + // Construct an instance of the GetRegionZoneOptions model + GetRegionZoneOptions getRegionZoneOptionsModel = new GetRegionZoneOptions.Builder() + .regionName("us-south") + .name("us-south-1") .build(); - // Invoke getInstanceNetworkInterfaceFloatingIp() with a valid options model and verify the result - Response response = vpcService.getInstanceNetworkInterfaceFloatingIp(getInstanceNetworkInterfaceFloatingIpOptionsModel).execute(); + // Invoke getRegionZone() with a valid options model and verify the result + Response response = vpcService.getRegionZone(getRegionZoneOptionsModel).execute(); assertNotNull(response); - FloatingIP responseObj = response.getResult(); + Zone responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -9480,109 +9574,102 @@ public void testGetInstanceNetworkInterfaceFloatingIpWOptions() throws Throwable assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getInstanceNetworkInterfaceFloatingIpPath); + assertEquals(parsedPath, getRegionZonePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getInstanceNetworkInterfaceFloatingIp operation with and without retries enabled + // Test the getRegionZone operation with and without retries enabled @Test - public void testGetInstanceNetworkInterfaceFloatingIpWRetries() throws Throwable { + public void testGetRegionZoneWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetInstanceNetworkInterfaceFloatingIpWOptions(); + testGetRegionZoneWOptions(); vpcService.disableRetries(); - testGetInstanceNetworkInterfaceFloatingIpWOptions(); + testGetRegionZoneWOptions(); } - // Test the getInstanceNetworkInterfaceFloatingIp operation with a null options model (negative test) + // Test the getRegionZone operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetInstanceNetworkInterfaceFloatingIpNoOptions() throws Throwable { + public void testGetRegionZoneNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getInstanceNetworkInterfaceFloatingIp(null).execute(); + vpcService.getRegionZone(null).execute(); } - // Test the addInstanceNetworkInterfaceFloatingIp operation with a valid options model parameter + // Test the listRegionZones operation with a valid options model parameter @Test - public void testAddInstanceNetworkInterfaceFloatingIpWOptions() throws Throwable { + public void testListRegionZonesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"address\": \"203.0.113.1\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"available\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String addInstanceNetworkInterfaceFloatingIpPath = "/instances/testString/network_interfaces/testString/floating_ips/testString"; + String mockResponseBody = "{\"zones\": [{\"data_center\": \"DAL12\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\", \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}, \"status\": \"available\", \"universal_name\": \"us-south-dal10-a\"}]}"; + String listRegionZonesPath = "/regions/us-south/zones"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the AddInstanceNetworkInterfaceFloatingIpOptions model - AddInstanceNetworkInterfaceFloatingIpOptions addInstanceNetworkInterfaceFloatingIpOptionsModel = new AddInstanceNetworkInterfaceFloatingIpOptions.Builder() - .instanceId("testString") - .networkInterfaceId("testString") - .id("testString") + // Construct an instance of the ListRegionZonesOptions model + ListRegionZonesOptions listRegionZonesOptionsModel = new ListRegionZonesOptions.Builder() + .regionName("us-south") .build(); - // Invoke addInstanceNetworkInterfaceFloatingIp() with a valid options model and verify the result - Response response = vpcService.addInstanceNetworkInterfaceFloatingIp(addInstanceNetworkInterfaceFloatingIpOptionsModel).execute(); + // Invoke listRegionZones() with a valid options model and verify the result + Response response = vpcService.listRegionZones(listRegionZonesOptionsModel).execute(); assertNotNull(response); - FloatingIP responseObj = response.getResult(); + ZoneCollection 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"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, addInstanceNetworkInterfaceFloatingIpPath); + assertEquals(parsedPath, listRegionZonesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the addInstanceNetworkInterfaceFloatingIp operation with and without retries enabled + // Test the listRegionZones operation with and without retries enabled @Test - public void testAddInstanceNetworkInterfaceFloatingIpWRetries() throws Throwable { + public void testListRegionZonesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testAddInstanceNetworkInterfaceFloatingIpWOptions(); + testListRegionZonesWOptions(); vpcService.disableRetries(); - testAddInstanceNetworkInterfaceFloatingIpWOptions(); + testListRegionZonesWOptions(); } - // Test the addInstanceNetworkInterfaceFloatingIp operation with a null options model (negative test) + // Test the listRegionZones operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testAddInstanceNetworkInterfaceFloatingIpNoOptions() throws Throwable { + public void testListRegionZonesNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.addInstanceNetworkInterfaceFloatingIp(null).execute(); + vpcService.listRegionZones(null).execute(); } - // Test the listInstanceNetworkInterfaceIps operation with a valid options model parameter + // Test the listRegions operation with a valid options model parameter @Test - public void testListInstanceNetworkInterfaceIpsWOptions() throws Throwable { + public void testListRegionsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"ips\": [{\"address\": \"192.168.3.4\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"lifecycle_state\": \"stable\", \"name\": \"my-reserved-ip\", \"owner\": \"provider\", \"resource_type\": \"subnet_reserved_ip\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"resource_type\": \"endpoint_gateway\"}}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listInstanceNetworkInterfaceIpsPath = "/instances/testString/network_interfaces/testString/ips"; + String mockResponseBody = "{\"regions\": [{\"endpoint\": \"https://us-south.iaas.cloud.ibm.com\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\", \"status\": \"available\"}]}"; + String listRegionsPath = "/regions"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListInstanceNetworkInterfaceIpsOptions model - ListInstanceNetworkInterfaceIpsOptions listInstanceNetworkInterfaceIpsOptionsModel = new ListInstanceNetworkInterfaceIpsOptions.Builder() - .instanceId("testString") - .networkInterfaceId("testString") - .start("testString") - .limit(Long.valueOf("10")) - .build(); + // Construct an instance of the ListRegionsOptions model + ListRegionsOptions listRegionsOptionsModel = new ListRegionsOptions(); - // Invoke listInstanceNetworkInterfaceIps() with a valid options model and verify the result - Response response = vpcService.listInstanceNetworkInterfaceIps(listInstanceNetworkInterfaceIpsOptionsModel).execute(); + // Invoke listRegions() with a valid options model and verify the result + Response response = vpcService.listRegions(listRegionsOptionsModel).execute(); assertNotNull(response); - ReservedIPCollectionInstanceNetworkInterfaceContext responseObj = response.getResult(); + RegionCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -9591,286 +9678,300 @@ public void testListInstanceNetworkInterfaceIpsWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listInstanceNetworkInterfaceIpsPath); + assertEquals(parsedPath, listRegionsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the listInstanceNetworkInterfaceIps operation with and without retries enabled + // Test the listRegions operation with and without retries enabled @Test - public void testListInstanceNetworkInterfaceIpsWRetries() throws Throwable { + public void testListRegionsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListInstanceNetworkInterfaceIpsWOptions(); + testListRegionsWOptions(); vpcService.disableRetries(); - testListInstanceNetworkInterfaceIpsWOptions(); - } - - // Test the listInstanceNetworkInterfaceIps operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListInstanceNetworkInterfaceIpsNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.listInstanceNetworkInterfaceIps(null).execute(); + testListRegionsWOptions(); } - // Test the listInstanceNetworkInterfaceIps operation using the InstanceNetworkInterfaceIpsPager.getNext() method + // Test the createImage operation with a valid options model parameter @Test - public void testListInstanceNetworkInterfaceIpsWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"ips\":[{\"address\":\"192.168.3.4\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"lifecycle_state\":\"stable\",\"name\":\"my-reserved-ip\",\"owner\":\"provider\",\"resource_type\":\"subnet_reserved_ip\",\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"resource_type\":\"endpoint_gateway\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"ips\":[{\"address\":\"192.168.3.4\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"lifecycle_state\":\"stable\",\"name\":\"my-reserved-ip\",\"owner\":\"provider\",\"resource_type\":\"subnet_reserved_ip\",\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"resource_type\":\"endpoint_gateway\"}}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); + public void testCreateImageWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"allowed_use\": {\"api_version\": \"2024-06-23\", \"bare_metal_server\": \"enable_secure_boot == true\", \"instance\": \"gpu.count > 0 && enable_secure_boot == true\"}, \"catalog_offering\": {\"managed\": false, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deprecation_at\": \"2019-01-01T12:00:00.000Z\", \"encryption\": \"user_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"file\": {\"checksums\": {\"sha256\": \"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15\"}, \"size\": 1}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"minimum_provisioned_size\": 22, \"name\": \"my-image\", \"obsolescence_at\": \"2019-01-01T12:00:00.000Z\", \"operating_system\": {\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}, \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"image\", \"source_volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"volume\"}, \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"user_data_format\": \"cloud_init\", \"visibility\": \"private\"}"; + String createImagePath = "/images"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); + .setResponseCode(201) + .setBody(mockResponseBody)); - ListInstanceNetworkInterfaceIpsOptions listInstanceNetworkInterfaceIpsOptions = new ListInstanceNetworkInterfaceIpsOptions.Builder() - .instanceId("testString") - .networkInterfaceId("testString") - .limit(Long.valueOf("10")) + // Construct an instance of the ImageAllowedUsePrototype model + ImageAllowedUsePrototype imageAllowedUsePrototypeModel = new ImageAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") .build(); - List allResults = new ArrayList<>(); - InstanceNetworkInterfaceIpsPager pager = new InstanceNetworkInterfaceIpsPager(vpcService, listInstanceNetworkInterfaceIpsOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") + .build(); + + // Construct an instance of the EncryptionKeyIdentityByCRN model + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() + .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + .build(); + + // Construct an instance of the ImageFilePrototype model + ImageFilePrototype imageFilePrototypeModel = new ImageFilePrototype.Builder() + .href("cos://us-south/my-bucket/my-image.qcow2") + .build(); + + // Construct an instance of the OperatingSystemIdentityByName model + OperatingSystemIdentityByName operatingSystemIdentityModel = new OperatingSystemIdentityByName.Builder() + .name("debian-9-amd64") + .build(); + + // Construct an instance of the ImagePrototypeImageByFile model + ImagePrototypeImageByFile imagePrototypeModel = new ImagePrototypeImageByFile.Builder() + .allowedUse(imageAllowedUsePrototypeModel) + .deprecationAt(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) + .name("my-image") + .obsolescenceAt(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) + .resourceGroup(resourceGroupIdentityModel) + .encryptedDataKey("testString") + .encryptionKey(encryptionKeyIdentityModel) + .file(imageFilePrototypeModel) + .operatingSystem(operatingSystemIdentityModel) + .build(); + + // Construct an instance of the CreateImageOptions model + CreateImageOptions createImageOptionsModel = new CreateImageOptions.Builder() + .imagePrototype(imagePrototypeModel) + .build(); + + // Invoke createImage() with a valid options model and verify the result + Response response = vpcService.createImage(createImageOptionsModel).execute(); + assertNotNull(response); + Image responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "POST"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, createImagePath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - - // Test the listInstanceNetworkInterfaceIps operation using the InstanceNetworkInterfaceIpsPager.getAll() method + + // Test the createImage operation with and without retries enabled @Test - public void testListInstanceNetworkInterfaceIpsWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"ips\":[{\"address\":\"192.168.3.4\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"lifecycle_state\":\"stable\",\"name\":\"my-reserved-ip\",\"owner\":\"provider\",\"resource_type\":\"subnet_reserved_ip\",\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"resource_type\":\"endpoint_gateway\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"ips\":[{\"address\":\"192.168.3.4\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"lifecycle_state\":\"stable\",\"name\":\"my-reserved-ip\",\"owner\":\"provider\",\"resource_type\":\"subnet_reserved_ip\",\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"resource_type\":\"endpoint_gateway\"}}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); + public void testCreateImageWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testCreateImageWOptions(); - ListInstanceNetworkInterfaceIpsOptions listInstanceNetworkInterfaceIpsOptions = new ListInstanceNetworkInterfaceIpsOptions.Builder() - .instanceId("testString") - .networkInterfaceId("testString") - .limit(Long.valueOf("10")) - .build(); + vpcService.disableRetries(); + testCreateImageWOptions(); + } - InstanceNetworkInterfaceIpsPager pager = new InstanceNetworkInterfaceIpsPager(vpcService, listInstanceNetworkInterfaceIpsOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); + // Test the createImage operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testCreateImageNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.createImage(null).execute(); } - - // Test the getInstanceNetworkInterfaceIp operation with a valid options model parameter + + // Test the createImageExportJob operation with a valid options model parameter @Test - public void testGetInstanceNetworkInterfaceIpWOptions() throws Throwable { + public void testCreateImageExportJobWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"address\": \"192.168.3.4\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"lifecycle_state\": \"stable\", \"name\": \"my-reserved-ip\", \"owner\": \"provider\", \"resource_type\": \"subnet_reserved_ip\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"resource_type\": \"endpoint_gateway\"}}"; - String getInstanceNetworkInterfaceIpPath = "/instances/testString/network_interfaces/testString/ips/testString"; + String mockResponseBody = "{\"completed_at\": \"2019-01-01T12:00:00.000Z\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"encrypted_data_key\": \"VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=\", \"format\": \"qcow2\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r006-095e9baf-01d4-4e29-986e-20d26606b82a\", \"id\": \"r006-095e9baf-01d4-4e29-986e-20d26606b82a\", \"name\": \"my-image-export-job\", \"resource_type\": \"image_export_job\", \"started_at\": \"2019-01-01T12:00:00.000Z\", \"status\": \"deleting\", \"status_reasons\": [{\"code\": \"cannot_access_storage_bucket\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq\"}], \"storage_bucket\": {\"crn\": \"crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:bucket-27200-lwx4cfvcue\", \"name\": \"bucket-27200-lwx4cfvcue\"}, \"storage_href\": \"cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2\", \"storage_object\": {\"name\": \"my-object\"}}"; + String createImageExportJobPath = "/images/testString/export_jobs"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the GetInstanceNetworkInterfaceIpOptions model - GetInstanceNetworkInterfaceIpOptions getInstanceNetworkInterfaceIpOptionsModel = new GetInstanceNetworkInterfaceIpOptions.Builder() - .instanceId("testString") - .networkInterfaceId("testString") - .id("testString") + // Construct an instance of the CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName model + CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName cloudObjectStorageBucketIdentityModel = new CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName.Builder() + .name("bucket-27200-lwx4cfvcue") .build(); - // Invoke getInstanceNetworkInterfaceIp() with a valid options model and verify the result - Response response = vpcService.getInstanceNetworkInterfaceIp(getInstanceNetworkInterfaceIpOptionsModel).execute(); + // Construct an instance of the CreateImageExportJobOptions model + CreateImageExportJobOptions createImageExportJobOptionsModel = new CreateImageExportJobOptions.Builder() + .imageId("testString") + .storageBucket(cloudObjectStorageBucketIdentityModel) + .format("qcow2") + .name("my-image-export") + .build(); + + // Invoke createImageExportJob() with a valid options model and verify the result + Response response = vpcService.createImageExportJob(createImageExportJobOptionsModel).execute(); assertNotNull(response); - ReservedIP responseObj = response.getResult(); + ImageExportJob responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getInstanceNetworkInterfaceIpPath); + assertEquals(parsedPath, createImageExportJobPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getInstanceNetworkInterfaceIp operation with and without retries enabled + // Test the createImageExportJob operation with and without retries enabled @Test - public void testGetInstanceNetworkInterfaceIpWRetries() throws Throwable { + public void testCreateImageExportJobWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetInstanceNetworkInterfaceIpWOptions(); + testCreateImageExportJobWOptions(); vpcService.disableRetries(); - testGetInstanceNetworkInterfaceIpWOptions(); + testCreateImageExportJobWOptions(); } - // Test the getInstanceNetworkInterfaceIp operation with a null options model (negative test) + // Test the createImageExportJob operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetInstanceNetworkInterfaceIpNoOptions() throws Throwable { + public void testCreateImageExportJobNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getInstanceNetworkInterfaceIp(null).execute(); + vpcService.createImageExportJob(null).execute(); } - // Test the listInstanceVolumeAttachments operation with a valid options model parameter + // Test the deleteImage operation with a valid options model parameter @Test - public void testListInstanceVolumeAttachmentsWOptions() throws Throwable { + public void testDeleteImageWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"volume_attachments\": [{\"bandwidth\": 250, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"delete_volume_on_instance_delete\": true, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"name\": \"my-volume-attachment\", \"status\": \"attached\", \"type\": \"boot\", \"volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"resource_type\": \"volume\"}}]}"; - String listInstanceVolumeAttachmentsPath = "/instances/testString/volume_attachments"; + String mockResponseBody = ""; + String deleteImagePath = "/images/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the ListInstanceVolumeAttachmentsOptions model - ListInstanceVolumeAttachmentsOptions listInstanceVolumeAttachmentsOptionsModel = new ListInstanceVolumeAttachmentsOptions.Builder() - .instanceId("testString") + // Construct an instance of the DeleteImageOptions model + DeleteImageOptions deleteImageOptionsModel = new DeleteImageOptions.Builder() + .id("testString") .build(); - // Invoke listInstanceVolumeAttachments() with a valid options model and verify the result - Response response = vpcService.listInstanceVolumeAttachments(listInstanceVolumeAttachmentsOptionsModel).execute(); + // Invoke deleteImage() with a valid options model and verify the result + Response response = vpcService.deleteImage(deleteImageOptionsModel).execute(); assertNotNull(response); - VolumeAttachmentCollection responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listInstanceVolumeAttachmentsPath); + assertEquals(parsedPath, deleteImagePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the listInstanceVolumeAttachments operation with and without retries enabled + // Test the deleteImage operation with and without retries enabled @Test - public void testListInstanceVolumeAttachmentsWRetries() throws Throwable { + public void testDeleteImageWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListInstanceVolumeAttachmentsWOptions(); + testDeleteImageWOptions(); vpcService.disableRetries(); - testListInstanceVolumeAttachmentsWOptions(); + testDeleteImageWOptions(); } - // Test the listInstanceVolumeAttachments operation with a null options model (negative test) + // Test the deleteImage operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListInstanceVolumeAttachmentsNoOptions() throws Throwable { + public void testDeleteImageNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listInstanceVolumeAttachments(null).execute(); + vpcService.deleteImage(null).execute(); } - // Test the createInstanceVolumeAttachment operation with a valid options model parameter + // Test the deleteImageExportJob operation with a valid options model parameter @Test - public void testCreateInstanceVolumeAttachmentWOptions() throws Throwable { + public void testDeleteImageExportJobWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"bandwidth\": 250, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"delete_volume_on_instance_delete\": true, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"name\": \"my-volume-attachment\", \"status\": \"attached\", \"type\": \"boot\", \"volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"resource_type\": \"volume\"}}"; - String createInstanceVolumeAttachmentPath = "/instances/testString/volume_attachments"; + String mockResponseBody = ""; + String deleteImageExportJobPath = "/images/testString/export_jobs/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById model - VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById volumeAttachmentPrototypeVolumeModel = new VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById.Builder() - .id("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") - .build(); - - // Construct an instance of the CreateInstanceVolumeAttachmentOptions model - CreateInstanceVolumeAttachmentOptions createInstanceVolumeAttachmentOptionsModel = new CreateInstanceVolumeAttachmentOptions.Builder() - .instanceId("testString") - .volume(volumeAttachmentPrototypeVolumeModel) - .deleteVolumeOnInstanceDelete(false) - .name("my-volume-attachment") + // Construct an instance of the DeleteImageExportJobOptions model + DeleteImageExportJobOptions deleteImageExportJobOptionsModel = new DeleteImageExportJobOptions.Builder() + .imageId("testString") + .id("testString") .build(); - // Invoke createInstanceVolumeAttachment() with a valid options model and verify the result - Response response = vpcService.createInstanceVolumeAttachment(createInstanceVolumeAttachmentOptionsModel).execute(); + // Invoke deleteImageExportJob() with a valid options model and verify the result + Response response = vpcService.deleteImageExportJob(deleteImageExportJobOptionsModel).execute(); assertNotNull(response); - VolumeAttachment responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createInstanceVolumeAttachmentPath); + assertEquals(parsedPath, deleteImageExportJobPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createInstanceVolumeAttachment operation with and without retries enabled + // Test the deleteImageExportJob operation with and without retries enabled @Test - public void testCreateInstanceVolumeAttachmentWRetries() throws Throwable { + public void testDeleteImageExportJobWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateInstanceVolumeAttachmentWOptions(); + testDeleteImageExportJobWOptions(); vpcService.disableRetries(); - testCreateInstanceVolumeAttachmentWOptions(); + testDeleteImageExportJobWOptions(); } - // Test the createInstanceVolumeAttachment operation with a null options model (negative test) + // Test the deleteImageExportJob operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateInstanceVolumeAttachmentNoOptions() throws Throwable { + public void testDeleteImageExportJobNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createInstanceVolumeAttachment(null).execute(); + vpcService.deleteImageExportJob(null).execute(); } - // Test the deleteInstanceVolumeAttachment operation with a valid options model parameter + // Test the deprecateImage operation with a valid options model parameter @Test - public void testDeleteInstanceVolumeAttachmentWOptions() throws Throwable { + public void testDeprecateImageWOptions() throws Throwable { // Register a mock response String mockResponseBody = ""; - String deleteInstanceVolumeAttachmentPath = "/instances/testString/volume_attachments/testString"; + String deprecateImagePath = "/images/testString/deprecate"; server.enqueue(new MockResponse() .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the DeleteInstanceVolumeAttachmentOptions model - DeleteInstanceVolumeAttachmentOptions deleteInstanceVolumeAttachmentOptionsModel = new DeleteInstanceVolumeAttachmentOptions.Builder() - .instanceId("testString") + // Construct an instance of the DeprecateImageOptions model + DeprecateImageOptions deprecateImageOptionsModel = new DeprecateImageOptions.Builder() .id("testString") .build(); - // Invoke deleteInstanceVolumeAttachment() with a valid options model and verify the result - Response response = vpcService.deleteInstanceVolumeAttachment(deleteInstanceVolumeAttachmentOptionsModel).execute(); + // Invoke deprecateImage() with a valid options model and verify the result + Response response = vpcService.deprecateImage(deprecateImageOptionsModel).execute(); assertNotNull(response); Void responseObj = response.getResult(); assertNull(responseObj); @@ -9878,55 +9979,54 @@ public void testDeleteInstanceVolumeAttachmentWOptions() throws Throwable { // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteInstanceVolumeAttachmentPath); + assertEquals(parsedPath, deprecateImagePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteInstanceVolumeAttachment operation with and without retries enabled + // Test the deprecateImage operation with and without retries enabled @Test - public void testDeleteInstanceVolumeAttachmentWRetries() throws Throwable { + public void testDeprecateImageWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteInstanceVolumeAttachmentWOptions(); + testDeprecateImageWOptions(); vpcService.disableRetries(); - testDeleteInstanceVolumeAttachmentWOptions(); + testDeprecateImageWOptions(); } - // Test the deleteInstanceVolumeAttachment operation with a null options model (negative test) + // Test the deprecateImage operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteInstanceVolumeAttachmentNoOptions() throws Throwable { + public void testDeprecateImageNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteInstanceVolumeAttachment(null).execute(); + vpcService.deprecateImage(null).execute(); } - // Test the getInstanceVolumeAttachment operation with a valid options model parameter + // Test the getImage operation with a valid options model parameter @Test - public void testGetInstanceVolumeAttachmentWOptions() throws Throwable { + public void testGetImageWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"bandwidth\": 250, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"delete_volume_on_instance_delete\": true, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"name\": \"my-volume-attachment\", \"status\": \"attached\", \"type\": \"boot\", \"volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"resource_type\": \"volume\"}}"; - String getInstanceVolumeAttachmentPath = "/instances/testString/volume_attachments/testString"; + String mockResponseBody = "{\"allowed_use\": {\"api_version\": \"2024-06-23\", \"bare_metal_server\": \"enable_secure_boot == true\", \"instance\": \"gpu.count > 0 && enable_secure_boot == true\"}, \"catalog_offering\": {\"managed\": false, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deprecation_at\": \"2019-01-01T12:00:00.000Z\", \"encryption\": \"user_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"file\": {\"checksums\": {\"sha256\": \"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15\"}, \"size\": 1}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"minimum_provisioned_size\": 22, \"name\": \"my-image\", \"obsolescence_at\": \"2019-01-01T12:00:00.000Z\", \"operating_system\": {\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}, \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"image\", \"source_volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"volume\"}, \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"user_data_format\": \"cloud_init\", \"visibility\": \"private\"}"; + String getImagePath = "/images/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetInstanceVolumeAttachmentOptions model - GetInstanceVolumeAttachmentOptions getInstanceVolumeAttachmentOptionsModel = new GetInstanceVolumeAttachmentOptions.Builder() - .instanceId("testString") + // Construct an instance of the GetImageOptions model + GetImageOptions getImageOptionsModel = new GetImageOptions.Builder() .id("testString") .build(); - // Invoke getInstanceVolumeAttachment() with a valid options model and verify the result - Response response = vpcService.getInstanceVolumeAttachment(getInstanceVolumeAttachmentOptionsModel).execute(); + // Invoke getImage() with a valid options model and verify the result + Response response = vpcService.getImage(getImageOptionsModel).execute(); assertNotNull(response); - VolumeAttachment responseObj = response.getResult(); + Image responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -9935,114 +10035,160 @@ public void testGetInstanceVolumeAttachmentWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getInstanceVolumeAttachmentPath); + assertEquals(parsedPath, getImagePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getInstanceVolumeAttachment operation with and without retries enabled + // Test the getImage operation with and without retries enabled @Test - public void testGetInstanceVolumeAttachmentWRetries() throws Throwable { + public void testGetImageWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetInstanceVolumeAttachmentWOptions(); + testGetImageWOptions(); vpcService.disableRetries(); - testGetInstanceVolumeAttachmentWOptions(); + testGetImageWOptions(); } - // Test the getInstanceVolumeAttachment operation with a null options model (negative test) + // Test the getImage operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetInstanceVolumeAttachmentNoOptions() throws Throwable { + public void testGetImageNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getInstanceVolumeAttachment(null).execute(); + vpcService.getImage(null).execute(); } - // Test the updateInstanceVolumeAttachment operation with a valid options model parameter + // Test the getImageExportJob operation with a valid options model parameter @Test - public void testUpdateInstanceVolumeAttachmentWOptions() throws Throwable { + public void testGetImageExportJobWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"bandwidth\": 250, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"delete_volume_on_instance_delete\": true, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"name\": \"my-volume-attachment\", \"status\": \"attached\", \"type\": \"boot\", \"volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"resource_type\": \"volume\"}}"; - String updateInstanceVolumeAttachmentPath = "/instances/testString/volume_attachments/testString"; + String mockResponseBody = "{\"completed_at\": \"2019-01-01T12:00:00.000Z\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"encrypted_data_key\": \"VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=\", \"format\": \"qcow2\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r006-095e9baf-01d4-4e29-986e-20d26606b82a\", \"id\": \"r006-095e9baf-01d4-4e29-986e-20d26606b82a\", \"name\": \"my-image-export-job\", \"resource_type\": \"image_export_job\", \"started_at\": \"2019-01-01T12:00:00.000Z\", \"status\": \"deleting\", \"status_reasons\": [{\"code\": \"cannot_access_storage_bucket\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq\"}], \"storage_bucket\": {\"crn\": \"crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:bucket-27200-lwx4cfvcue\", \"name\": \"bucket-27200-lwx4cfvcue\"}, \"storage_href\": \"cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2\", \"storage_object\": {\"name\": \"my-object\"}}"; + String getImageExportJobPath = "/images/testString/export_jobs/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the VolumeAttachmentPatch model - VolumeAttachmentPatch volumeAttachmentPatchModel = new VolumeAttachmentPatch.Builder() - .deleteVolumeOnInstanceDelete(true) - .name("my-volume-attachment") + // Construct an instance of the GetImageExportJobOptions model + GetImageExportJobOptions getImageExportJobOptionsModel = new GetImageExportJobOptions.Builder() + .imageId("testString") + .id("testString") .build(); - Map volumeAttachmentPatchModelAsPatch = volumeAttachmentPatchModel.asPatch(); - // Construct an instance of the UpdateInstanceVolumeAttachmentOptions model - UpdateInstanceVolumeAttachmentOptions updateInstanceVolumeAttachmentOptionsModel = new UpdateInstanceVolumeAttachmentOptions.Builder() - .instanceId("testString") - .id("testString") - .volumeAttachmentPatch(volumeAttachmentPatchModelAsPatch) + // Invoke getImageExportJob() with a valid options model and verify the result + Response response = vpcService.getImageExportJob(getImageExportJobOptionsModel).execute(); + assertNotNull(response); + ImageExportJob responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "GET"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, getImageExportJobPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the getImageExportJob operation with and without retries enabled + @Test + public void testGetImageExportJobWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testGetImageExportJobWOptions(); + + vpcService.disableRetries(); + testGetImageExportJobWOptions(); + } + + // Test the getImageExportJob operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testGetImageExportJobNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.getImageExportJob(null).execute(); + } + + // Test the getOperatingSystem operation with a valid options model parameter + @Test + public void testGetOperatingSystemWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}"; + String getOperatingSystemPath = "/operating_systems/red-7-amd64"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the GetOperatingSystemOptions model + GetOperatingSystemOptions getOperatingSystemOptionsModel = new GetOperatingSystemOptions.Builder() + .name("red-7-amd64") .build(); - // Invoke updateInstanceVolumeAttachment() with a valid options model and verify the result - Response response = vpcService.updateInstanceVolumeAttachment(updateInstanceVolumeAttachmentOptionsModel).execute(); + // Invoke getOperatingSystem() with a valid options model and verify the result + Response response = vpcService.getOperatingSystem(getOperatingSystemOptionsModel).execute(); assertNotNull(response); - VolumeAttachment responseObj = response.getResult(); + OperatingSystem responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateInstanceVolumeAttachmentPath); + assertEquals(parsedPath, getOperatingSystemPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateInstanceVolumeAttachment operation with and without retries enabled + // Test the getOperatingSystem operation with and without retries enabled @Test - public void testUpdateInstanceVolumeAttachmentWRetries() throws Throwable { + public void testGetOperatingSystemWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateInstanceVolumeAttachmentWOptions(); + testGetOperatingSystemWOptions(); vpcService.disableRetries(); - testUpdateInstanceVolumeAttachmentWOptions(); + testGetOperatingSystemWOptions(); } - // Test the updateInstanceVolumeAttachment operation with a null options model (negative test) + // Test the getOperatingSystem operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateInstanceVolumeAttachmentNoOptions() throws Throwable { + public void testGetOperatingSystemNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateInstanceVolumeAttachment(null).execute(); + vpcService.getOperatingSystem(null).execute(); } - // Test the listInstanceGroups operation with a valid options model parameter + // Test the listImageBareMetalServerProfiles operation with a valid options model parameter @Test - public void testListInstanceGroupsWOptions() throws Throwable { + public void testListImageBareMetalServerProfilesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"instance_groups\": [{\"application_port\": 22, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"id\": \"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"instance_template\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"id\": \"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"name\": \"my-instance-template\"}, \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"load_balancer_pool\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}, \"managers\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"id\": \"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"name\": \"my-instance-group-manager\"}], \"membership_count\": 10, \"name\": \"my-instance-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"deleting\", \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listInstanceGroupsPath = "/instance_groups"; + String mockResponseBody = "{\"bare_metal_server_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\", \"name\": \"bx2-metal-192x768\", \"resource_type\": \"bare_metal_server_profile\"}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listImageBareMetalServerProfilesPath = "/images/testString/bare_metal_server_profiles"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListInstanceGroupsOptions model - ListInstanceGroupsOptions listInstanceGroupsOptionsModel = new ListInstanceGroupsOptions.Builder() + // Construct an instance of the ListImageBareMetalServerProfilesOptions model + ListImageBareMetalServerProfilesOptions listImageBareMetalServerProfilesOptionsModel = new ListImageBareMetalServerProfilesOptions.Builder() + .id("testString") .start("testString") .limit(Long.valueOf("10")) .build(); - // Invoke listInstanceGroups() with a valid options model and verify the result - Response response = vpcService.listInstanceGroups(listInstanceGroupsOptionsModel).execute(); + // Invoke listImageBareMetalServerProfiles() with a valid options model and verify the result + Response response = vpcService.listImageBareMetalServerProfiles(listImageBareMetalServerProfilesOptionsModel).execute(); assertNotNull(response); - InstanceGroupCollection responseObj = response.getResult(); + ImageBareMetalServerProfileCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -10051,32 +10197,39 @@ public void testListInstanceGroupsWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listInstanceGroupsPath); + assertEquals(parsedPath, listImageBareMetalServerProfilesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the listInstanceGroups operation with and without retries enabled + // Test the listImageBareMetalServerProfiles operation with and without retries enabled @Test - public void testListInstanceGroupsWRetries() throws Throwable { + public void testListImageBareMetalServerProfilesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListInstanceGroupsWOptions(); + testListImageBareMetalServerProfilesWOptions(); vpcService.disableRetries(); - testListInstanceGroupsWOptions(); + testListImageBareMetalServerProfilesWOptions(); } - // Test the listInstanceGroups operation using the InstanceGroupsPager.getNext() method + // Test the listImageBareMetalServerProfiles operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testListImageBareMetalServerProfilesNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.listImageBareMetalServerProfiles(null).execute(); + } + + // Test the listImageBareMetalServerProfiles operation using the ImageBareMetalServerProfilesPager.getNext() method @Test - public void testListInstanceGroupsWithPagerGetNext() throws Throwable { + public void testListImageBareMetalServerProfilesWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"instance_groups\":[{\"application_port\":22,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\",\"id\":\"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\",\"instance_template\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"id\":\"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"name\":\"my-instance-template\"},\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"load_balancer_pool\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"id\":\"r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"name\":\"my-load-balancer-pool\"},\"managers\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"id\":\"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"name\":\"my-instance-group-manager\"}],\"membership_count\":10,\"name\":\"my-instance-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"status\":\"deleting\",\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"instance_groups\":[{\"application_port\":22,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\",\"id\":\"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\",\"instance_template\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"id\":\"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"name\":\"my-instance-template\"},\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"load_balancer_pool\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"id\":\"r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"name\":\"my-load-balancer-pool\"},\"managers\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"id\":\"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"name\":\"my-instance-group-manager\"}],\"membership_count\":10,\"name\":\"my-instance-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"status\":\"deleting\",\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"bare_metal_server_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\",\"name\":\"bx2-metal-192x768\",\"resource_type\":\"bare_metal_server_profile\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"bare_metal_server_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\",\"name\":\"bx2-metal-192x768\",\"resource_type\":\"bare_metal_server_profile\"}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -10090,26 +10243,27 @@ public void testListInstanceGroupsWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListInstanceGroupsOptions listInstanceGroupsOptions = new ListInstanceGroupsOptions.Builder() + ListImageBareMetalServerProfilesOptions listImageBareMetalServerProfilesOptions = new ListImageBareMetalServerProfilesOptions.Builder() + .id("testString") .limit(Long.valueOf("10")) .build(); - List allResults = new ArrayList<>(); - InstanceGroupsPager pager = new InstanceGroupsPager(vpcService, listInstanceGroupsOptions); + List allResults = new ArrayList<>(); + ImageBareMetalServerProfilesPager pager = new ImageBareMetalServerProfilesPager(vpcService, listImageBareMetalServerProfilesOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listInstanceGroups operation using the InstanceGroupsPager.getAll() method + // Test the listImageBareMetalServerProfiles operation using the ImageBareMetalServerProfilesPager.getAll() method @Test - public void testListInstanceGroupsWithPagerGetAll() throws Throwable { + public void testListImageBareMetalServerProfilesWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"instance_groups\":[{\"application_port\":22,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\",\"id\":\"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\",\"instance_template\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"id\":\"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"name\":\"my-instance-template\"},\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"load_balancer_pool\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"id\":\"r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"name\":\"my-load-balancer-pool\"},\"managers\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"id\":\"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"name\":\"my-instance-group-manager\"}],\"membership_count\":10,\"name\":\"my-instance-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"status\":\"deleting\",\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"instance_groups\":[{\"application_port\":22,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\",\"id\":\"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\",\"instance_template\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"id\":\"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"name\":\"my-instance-template\"},\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"load_balancer_pool\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"id\":\"r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"name\":\"my-load-balancer-pool\"},\"managers\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"id\":\"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"name\":\"my-instance-group-manager\"}],\"membership_count\":10,\"name\":\"my-instance-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"status\":\"deleting\",\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"bare_metal_server_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\",\"name\":\"bx2-metal-192x768\",\"resource_type\":\"bare_metal_server_profile\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"bare_metal_server_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\",\"name\":\"bx2-metal-192x768\",\"resource_type\":\"bare_metal_server_profile\"}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -10123,366 +10277,349 @@ public void testListInstanceGroupsWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListInstanceGroupsOptions listInstanceGroupsOptions = new ListInstanceGroupsOptions.Builder() + ListImageBareMetalServerProfilesOptions listImageBareMetalServerProfilesOptions = new ListImageBareMetalServerProfilesOptions.Builder() + .id("testString") .limit(Long.valueOf("10")) .build(); - InstanceGroupsPager pager = new InstanceGroupsPager(vpcService, listInstanceGroupsOptions); - List allResults = pager.getAll(); + ImageBareMetalServerProfilesPager pager = new ImageBareMetalServerProfilesPager(vpcService, listImageBareMetalServerProfilesOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the createInstanceGroup operation with a valid options model parameter + // Test the listImageExportJobs operation with a valid options model parameter @Test - public void testCreateInstanceGroupWOptions() throws Throwable { + public void testListImageExportJobsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"application_port\": 22, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"id\": \"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"instance_template\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"id\": \"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"name\": \"my-instance-template\"}, \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"load_balancer_pool\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}, \"managers\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"id\": \"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"name\": \"my-instance-group-manager\"}], \"membership_count\": 10, \"name\": \"my-instance-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"deleting\", \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String createInstanceGroupPath = "/instance_groups"; + String mockResponseBody = "{\"export_jobs\": [{\"completed_at\": \"2019-01-01T12:00:00.000Z\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"encrypted_data_key\": \"VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=\", \"format\": \"qcow2\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r006-095e9baf-01d4-4e29-986e-20d26606b82a\", \"id\": \"r006-095e9baf-01d4-4e29-986e-20d26606b82a\", \"name\": \"my-image-export-job\", \"resource_type\": \"image_export_job\", \"started_at\": \"2019-01-01T12:00:00.000Z\", \"status\": \"deleting\", \"status_reasons\": [{\"code\": \"cannot_access_storage_bucket\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq\"}], \"storage_bucket\": {\"crn\": \"crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:bucket-27200-lwx4cfvcue\", \"name\": \"bucket-27200-lwx4cfvcue\"}, \"storage_href\": \"cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2\", \"storage_object\": {\"name\": \"my-object\"}}]}"; + String listImageExportJobsPath = "/images/testString/export_jobs"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the InstanceTemplateIdentityById model - InstanceTemplateIdentityById instanceTemplateIdentityModel = new InstanceTemplateIdentityById.Builder() - .id("0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2") + // Construct an instance of the ListImageExportJobsOptions model + ListImageExportJobsOptions listImageExportJobsOptionsModel = new ListImageExportJobsOptions.Builder() + .imageId("testString") + .name("my-name") .build(); - // Construct an instance of the SubnetIdentityById model - SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() - .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") - .build(); + // Invoke listImageExportJobs() with a valid options model and verify the result + Response response = vpcService.listImageExportJobs(listImageExportJobsOptionsModel).execute(); + assertNotNull(response); + ImageExportJobUnpaginatedCollection responseObj = response.getResult(); + assertNotNull(responseObj); - // Construct an instance of the LoadBalancerIdentityById model - LoadBalancerIdentityById loadBalancerIdentityModel = new LoadBalancerIdentityById.Builder() - .id("r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727") - .build(); + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "GET"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, listImageExportJobsPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("name"), "my-name"); + } - // Construct an instance of the LoadBalancerPoolIdentityLoadBalancerPoolIdentityById model - LoadBalancerPoolIdentityLoadBalancerPoolIdentityById loadBalancerPoolIdentityModel = new LoadBalancerPoolIdentityLoadBalancerPoolIdentityById.Builder() - .id("r006-70294e14-4e61-11e8-bcf4-0242ac110004") - .build(); - - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); - - // Construct an instance of the CreateInstanceGroupOptions model - CreateInstanceGroupOptions createInstanceGroupOptionsModel = new CreateInstanceGroupOptions.Builder() - .instanceTemplate(instanceTemplateIdentityModel) - .subnets(java.util.Arrays.asList(subnetIdentityModel)) - .applicationPort(Long.valueOf("22")) - .loadBalancer(loadBalancerIdentityModel) - .loadBalancerPool(loadBalancerPoolIdentityModel) - .membershipCount(Long.valueOf("10")) - .name("my-instance-group") - .resourceGroup(resourceGroupIdentityModel) - .build(); - - // Invoke createInstanceGroup() with a valid options model and verify the result - Response response = vpcService.createInstanceGroup(createInstanceGroupOptionsModel).execute(); - assertNotNull(response); - InstanceGroup responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createInstanceGroupPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - } - - // Test the createInstanceGroup operation with and without retries enabled - @Test - public void testCreateInstanceGroupWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testCreateInstanceGroupWOptions(); + // Test the listImageExportJobs operation with and without retries enabled + @Test + public void testListImageExportJobsWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testListImageExportJobsWOptions(); vpcService.disableRetries(); - testCreateInstanceGroupWOptions(); + testListImageExportJobsWOptions(); } - // Test the createInstanceGroup operation with a null options model (negative test) + // Test the listImageExportJobs operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateInstanceGroupNoOptions() throws Throwable { + public void testListImageExportJobsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createInstanceGroup(null).execute(); + vpcService.listImageExportJobs(null).execute(); } - // Test the deleteInstanceGroup operation with a valid options model parameter + // Test the listImageInstanceProfiles operation with a valid options model parameter @Test - public void testDeleteInstanceGroupWOptions() throws Throwable { + public void testListImageInstanceProfilesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteInstanceGroupPath = "/instance_groups/testString"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listImageInstanceProfilesPath = "/images/testString/instance_profiles"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteInstanceGroupOptions model - DeleteInstanceGroupOptions deleteInstanceGroupOptionsModel = new DeleteInstanceGroupOptions.Builder() + // Construct an instance of the ListImageInstanceProfilesOptions model + ListImageInstanceProfilesOptions listImageInstanceProfilesOptionsModel = new ListImageInstanceProfilesOptions.Builder() .id("testString") + .start("testString") + .limit(Long.valueOf("10")) .build(); - // Invoke deleteInstanceGroup() with a valid options model and verify the result - Response response = vpcService.deleteInstanceGroup(deleteInstanceGroupOptionsModel).execute(); + // Invoke listImageInstanceProfiles() with a valid options model and verify the result + Response response = vpcService.listImageInstanceProfiles(listImageInstanceProfilesOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + ImageInstanceProfileCollection 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteInstanceGroupPath); + assertEquals(parsedPath, listImageInstanceProfilesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the deleteInstanceGroup operation with and without retries enabled + // Test the listImageInstanceProfiles operation with and without retries enabled @Test - public void testDeleteInstanceGroupWRetries() throws Throwable { + public void testListImageInstanceProfilesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteInstanceGroupWOptions(); + testListImageInstanceProfilesWOptions(); vpcService.disableRetries(); - testDeleteInstanceGroupWOptions(); + testListImageInstanceProfilesWOptions(); } - // Test the deleteInstanceGroup operation with a null options model (negative test) + // Test the listImageInstanceProfiles operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteInstanceGroupNoOptions() throws Throwable { + public void testListImageInstanceProfilesNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteInstanceGroup(null).execute(); + vpcService.listImageInstanceProfiles(null).execute(); } - // Test the getInstanceGroup operation with a valid options model parameter + // Test the listImageInstanceProfiles operation using the ImageInstanceProfilesPager.getNext() method @Test - public void testGetInstanceGroupWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"application_port\": 22, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"id\": \"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"instance_template\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"id\": \"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"name\": \"my-instance-template\"}, \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"load_balancer_pool\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}, \"managers\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"id\": \"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"name\": \"my-instance-group-manager\"}], \"membership_count\": 10, \"name\": \"my-instance-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"deleting\", \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String getInstanceGroupPath = "/instance_groups/testString"; + public void testListImageInstanceProfilesWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) - .setBody(mockResponseBody)); + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the GetInstanceGroupOptions model - GetInstanceGroupOptions getInstanceGroupOptionsModel = new GetInstanceGroupOptions.Builder() + ListImageInstanceProfilesOptions listImageInstanceProfilesOptions = new ListImageInstanceProfilesOptions.Builder() .id("testString") + .limit(Long.valueOf("10")) .build(); - // Invoke getInstanceGroup() with a valid options model and verify the result - Response response = vpcService.getInstanceGroup(getInstanceGroupOptionsModel).execute(); - assertNotNull(response); - InstanceGroup responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getInstanceGroupPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + List allResults = new ArrayList<>(); + ImageInstanceProfilesPager pager = new ImageInstanceProfilesPager(vpcService, listImageInstanceProfilesOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } - - // Test the getInstanceGroup operation with and without retries enabled + + // Test the listImageInstanceProfiles operation using the ImageInstanceProfilesPager.getAll() method @Test - public void testGetInstanceGroupWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testGetInstanceGroupWOptions(); + public void testListImageInstanceProfilesWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"total_count\":2,\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - vpcService.disableRetries(); - testGetInstanceGroupWOptions(); - } + ListImageInstanceProfilesOptions listImageInstanceProfilesOptions = new ListImageInstanceProfilesOptions.Builder() + .id("testString") + .limit(Long.valueOf("10")) + .build(); - // Test the getInstanceGroup operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetInstanceGroupNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.getInstanceGroup(null).execute(); + ImageInstanceProfilesPager pager = new ImageInstanceProfilesPager(vpcService, listImageInstanceProfilesOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); } - - // Test the updateInstanceGroup operation with a valid options model parameter + + // Test the listImages operation with a valid options model parameter @Test - public void testUpdateInstanceGroupWOptions() throws Throwable { + public void testListImagesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"application_port\": 22, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"id\": \"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"instance_template\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"id\": \"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"name\": \"my-instance-template\"}, \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"load_balancer_pool\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}, \"managers\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"id\": \"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"name\": \"my-instance-group-manager\"}], \"membership_count\": 10, \"name\": \"my-instance-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"deleting\", \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String updateInstanceGroupPath = "/instance_groups/testString"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"images\": [{\"allowed_use\": {\"api_version\": \"2024-06-23\", \"bare_metal_server\": \"enable_secure_boot == true\", \"instance\": \"gpu.count > 0 && enable_secure_boot == true\"}, \"catalog_offering\": {\"managed\": false, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deprecation_at\": \"2019-01-01T12:00:00.000Z\", \"encryption\": \"user_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"file\": {\"checksums\": {\"sha256\": \"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15\"}, \"size\": 1}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"minimum_provisioned_size\": 22, \"name\": \"my-image\", \"obsolescence_at\": \"2019-01-01T12:00:00.000Z\", \"operating_system\": {\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}, \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"image\", \"source_volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"volume\"}, \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"user_data_format\": \"cloud_init\", \"visibility\": \"private\"}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listImagesPath = "/images"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the InstanceTemplateIdentityById model - InstanceTemplateIdentityById instanceTemplateIdentityModel = new InstanceTemplateIdentityById.Builder() - .id("0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2") - .build(); - - // Construct an instance of the LoadBalancerIdentityById model - LoadBalancerIdentityById loadBalancerIdentityModel = new LoadBalancerIdentityById.Builder() - .id("r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727") - .build(); - - // Construct an instance of the LoadBalancerPoolIdentityLoadBalancerPoolIdentityById model - LoadBalancerPoolIdentityLoadBalancerPoolIdentityById loadBalancerPoolIdentityModel = new LoadBalancerPoolIdentityLoadBalancerPoolIdentityById.Builder() - .id("r006-70294e14-4e61-11e8-bcf4-0242ac110004") - .build(); - - // Construct an instance of the SubnetIdentityById model - SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() - .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") - .build(); - - // Construct an instance of the InstanceGroupPatch model - InstanceGroupPatch instanceGroupPatchModel = new InstanceGroupPatch.Builder() - .applicationPort(Long.valueOf("22")) - .instanceTemplate(instanceTemplateIdentityModel) - .loadBalancer(loadBalancerIdentityModel) - .loadBalancerPool(loadBalancerPoolIdentityModel) - .membershipCount(Long.valueOf("20")) - .name("my-instance-group") - .subnets(java.util.Arrays.asList(subnetIdentityModel)) - .build(); - Map instanceGroupPatchModelAsPatch = instanceGroupPatchModel.asPatch(); - - // Construct an instance of the UpdateInstanceGroupOptions model - UpdateInstanceGroupOptions updateInstanceGroupOptionsModel = new UpdateInstanceGroupOptions.Builder() - .id("testString") - .instanceGroupPatch(instanceGroupPatchModelAsPatch) + // Construct an instance of the ListImagesOptions model + ListImagesOptions listImagesOptionsModel = new ListImagesOptions.Builder() + .start("testString") + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .name("my-name") + .status(java.util.Arrays.asList("available")) + .visibility("private") + .userDataFormat(java.util.Arrays.asList("cloud_init")) + .remoteAccountId("bb1b52262f7441a586f49068482f1e60") .build(); - // Invoke updateInstanceGroup() with a valid options model and verify the result - Response response = vpcService.updateInstanceGroup(updateInstanceGroupOptionsModel).execute(); + // Invoke listImages() with a valid options model and verify the result + Response response = vpcService.listImages(listImagesOptionsModel).execute(); assertNotNull(response); - InstanceGroup responseObj = response.getResult(); + ImageCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateInstanceGroupPath); + assertEquals(parsedPath, listImagesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("resource_group.id"), "testString"); + assertEquals(query.get("name"), "my-name"); + assertEquals(query.get("status"), RequestUtils.join(java.util.Arrays.asList("available"), ",")); + assertEquals(query.get("visibility"), "private"); + assertEquals(query.get("user_data_format"), RequestUtils.join(java.util.Arrays.asList("cloud_init"), ",")); + assertEquals(query.get("remote.account.id"), "bb1b52262f7441a586f49068482f1e60"); } - // Test the updateInstanceGroup operation with and without retries enabled + // Test the listImages operation with and without retries enabled @Test - public void testUpdateInstanceGroupWRetries() throws Throwable { + public void testListImagesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateInstanceGroupWOptions(); + testListImagesWOptions(); vpcService.disableRetries(); - testUpdateInstanceGroupWOptions(); - } - - // Test the updateInstanceGroup operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateInstanceGroupNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.updateInstanceGroup(null).execute(); + testListImagesWOptions(); } - // Test the deleteInstanceGroupLoadBalancer operation with a valid options model parameter + // Test the listImages operation using the ImagesPager.getNext() method @Test - public void testDeleteInstanceGroupLoadBalancerWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = ""; - String deleteInstanceGroupLoadBalancerPath = "/instance_groups/testString/load_balancer"; + public void testListImagesWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"images\":[{\"allowed_use\":{\"api_version\":\"2024-06-23\",\"bare_metal_server\":\"enable_secure_boot == true\",\"instance\":\"gpu.count > 0 && enable_secure_boot == true\"},\"catalog_offering\":{\"managed\":false,\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deprecation_at\":\"2019-01-01T12:00:00.000Z\",\"encryption\":\"user_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"file\":{\"checksums\":{\"sha256\":\"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15\"},\"size\":1},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"minimum_provisioned_size\":22,\"name\":\"my-image\",\"obsolescence_at\":\"2019-01-01T12:00:00.000Z\",\"operating_system\":{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"},\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"}},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"image\",\"source_volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"volume\"},\"status\":\"available\",\"status_reasons\":[{\"code\":\"encryption_key_deleted\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"user_data_format\":\"cloud_init\",\"visibility\":\"private\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"images\":[{\"allowed_use\":{\"api_version\":\"2024-06-23\",\"bare_metal_server\":\"enable_secure_boot == true\",\"instance\":\"gpu.count > 0 && enable_secure_boot == true\"},\"catalog_offering\":{\"managed\":false,\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deprecation_at\":\"2019-01-01T12:00:00.000Z\",\"encryption\":\"user_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"file\":{\"checksums\":{\"sha256\":\"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15\"},\"size\":1},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"minimum_provisioned_size\":22,\"name\":\"my-image\",\"obsolescence_at\":\"2019-01-01T12:00:00.000Z\",\"operating_system\":{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"},\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"}},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"image\",\"source_volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"volume\"},\"status\":\"available\",\"status_reasons\":[{\"code\":\"encryption_key_deleted\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"user_data_format\":\"cloud_init\",\"visibility\":\"private\"}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() - .setResponseCode(204) - .setBody(mockResponseBody)); + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the DeleteInstanceGroupLoadBalancerOptions model - DeleteInstanceGroupLoadBalancerOptions deleteInstanceGroupLoadBalancerOptionsModel = new DeleteInstanceGroupLoadBalancerOptions.Builder() - .instanceGroupId("testString") + ListImagesOptions listImagesOptions = new ListImagesOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .name("my-name") + .status(java.util.Arrays.asList("available")) + .visibility("private") + .userDataFormat(java.util.Arrays.asList("cloud_init")) + .remoteAccountId("bb1b52262f7441a586f49068482f1e60") .build(); - // Invoke deleteInstanceGroupLoadBalancer() with a valid options model and verify the result - Response response = vpcService.deleteInstanceGroupLoadBalancer(deleteInstanceGroupLoadBalancerOptionsModel).execute(); - assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteInstanceGroupLoadBalancerPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + List allResults = new ArrayList<>(); + ImagesPager pager = new ImagesPager(vpcService, listImagesOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } - - // Test the deleteInstanceGroupLoadBalancer operation with and without retries enabled + + // Test the listImages operation using the ImagesPager.getAll() method @Test - public void testDeleteInstanceGroupLoadBalancerWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testDeleteInstanceGroupLoadBalancerWOptions(); + public void testListImagesWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"images\":[{\"allowed_use\":{\"api_version\":\"2024-06-23\",\"bare_metal_server\":\"enable_secure_boot == true\",\"instance\":\"gpu.count > 0 && enable_secure_boot == true\"},\"catalog_offering\":{\"managed\":false,\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deprecation_at\":\"2019-01-01T12:00:00.000Z\",\"encryption\":\"user_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"file\":{\"checksums\":{\"sha256\":\"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15\"},\"size\":1},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"minimum_provisioned_size\":22,\"name\":\"my-image\",\"obsolescence_at\":\"2019-01-01T12:00:00.000Z\",\"operating_system\":{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"},\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"}},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"image\",\"source_volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"volume\"},\"status\":\"available\",\"status_reasons\":[{\"code\":\"encryption_key_deleted\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"user_data_format\":\"cloud_init\",\"visibility\":\"private\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"images\":[{\"allowed_use\":{\"api_version\":\"2024-06-23\",\"bare_metal_server\":\"enable_secure_boot == true\",\"instance\":\"gpu.count > 0 && enable_secure_boot == true\"},\"catalog_offering\":{\"managed\":false,\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deprecation_at\":\"2019-01-01T12:00:00.000Z\",\"encryption\":\"user_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"file\":{\"checksums\":{\"sha256\":\"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15\"},\"size\":1},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"minimum_provisioned_size\":22,\"name\":\"my-image\",\"obsolescence_at\":\"2019-01-01T12:00:00.000Z\",\"operating_system\":{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"},\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"}},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"image\",\"source_volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"volume\"},\"status\":\"available\",\"status_reasons\":[{\"code\":\"encryption_key_deleted\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"user_data_format\":\"cloud_init\",\"visibility\":\"private\"}],\"total_count\":2,\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - vpcService.disableRetries(); - testDeleteInstanceGroupLoadBalancerWOptions(); - } + ListImagesOptions listImagesOptions = new ListImagesOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .name("my-name") + .status(java.util.Arrays.asList("available")) + .visibility("private") + .userDataFormat(java.util.Arrays.asList("cloud_init")) + .remoteAccountId("bb1b52262f7441a586f49068482f1e60") + .build(); - // Test the deleteInstanceGroupLoadBalancer operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteInstanceGroupLoadBalancerNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.deleteInstanceGroupLoadBalancer(null).execute(); + ImagesPager pager = new ImagesPager(vpcService, listImagesOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); } - - // Test the listInstanceGroupManagers operation with a valid options model parameter + + // Test the listOperatingSystems operation with a valid options model parameter @Test - public void testListInstanceGroupManagersWOptions() throws Throwable { + public void testListOperatingSystemsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"managers\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"id\": \"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"management_enabled\": false, \"name\": \"my-instance-group-manager\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"aggregation_window\": 120, \"cooldown\": 210, \"manager_type\": \"autoscale\", \"max_membership_count\": 10, \"min_membership_count\": 10, \"policies\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"id\": \"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"name\": \"my-instance-group-manager-policy\"}]}], \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listInstanceGroupManagersPath = "/instance_groups/testString/managers"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"operating_systems\": [{\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}], \"total_count\": 132}"; + String listOperatingSystemsPath = "/operating_systems"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListInstanceGroupManagersOptions model - ListInstanceGroupManagersOptions listInstanceGroupManagersOptionsModel = new ListInstanceGroupManagersOptions.Builder() - .instanceGroupId("testString") + // Construct an instance of the ListOperatingSystemsOptions model + ListOperatingSystemsOptions listOperatingSystemsOptionsModel = new ListOperatingSystemsOptions.Builder() .start("testString") .limit(Long.valueOf("10")) .build(); - // Invoke listInstanceGroupManagers() with a valid options model and verify the result - Response response = vpcService.listInstanceGroupManagers(listInstanceGroupManagersOptionsModel).execute(); + // Invoke listOperatingSystems() with a valid options model and verify the result + Response response = vpcService.listOperatingSystems(listOperatingSystemsOptionsModel).execute(); assertNotNull(response); - InstanceGroupManagerCollection responseObj = response.getResult(); + OperatingSystemCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -10491,39 +10628,32 @@ public void testListInstanceGroupManagersWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listInstanceGroupManagersPath); + assertEquals(parsedPath, listOperatingSystemsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the listInstanceGroupManagers operation with and without retries enabled + // Test the listOperatingSystems operation with and without retries enabled @Test - public void testListInstanceGroupManagersWRetries() throws Throwable { + public void testListOperatingSystemsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListInstanceGroupManagersWOptions(); + testListOperatingSystemsWOptions(); vpcService.disableRetries(); - testListInstanceGroupManagersWOptions(); - } - - // Test the listInstanceGroupManagers operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListInstanceGroupManagersNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.listInstanceGroupManagers(null).execute(); + testListOperatingSystemsWOptions(); } - // Test the listInstanceGroupManagers operation using the InstanceGroupManagersPager.getNext() method + // Test the listOperatingSystems operation using the OperatingSystemsPager.getNext() method @Test - public void testListInstanceGroupManagersWithPagerGetNext() throws Throwable { + public void testListOperatingSystemsWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"managers\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"id\":\"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"management_enabled\":false,\"name\":\"my-instance-group-manager\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"aggregation_window\":120,\"cooldown\":210,\"manager_type\":\"autoscale\",\"max_membership_count\":10,\"min_membership_count\":10,\"policies\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"id\":\"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"name\":\"my-instance-group-manager-policy\"}]}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"managers\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"id\":\"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"management_enabled\":false,\"name\":\"my-instance-group-manager\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"aggregation_window\":120,\"cooldown\":210,\"manager_type\":\"autoscale\",\"max_membership_count\":10,\"min_membership_count\":10,\"policies\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"id\":\"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"name\":\"my-instance-group-manager-policy\"}]}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"operating_systems\":[{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"operating_systems\":[{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -10537,27 +10667,26 @@ public void testListInstanceGroupManagersWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListInstanceGroupManagersOptions listInstanceGroupManagersOptions = new ListInstanceGroupManagersOptions.Builder() - .instanceGroupId("testString") + ListOperatingSystemsOptions listOperatingSystemsOptions = new ListOperatingSystemsOptions.Builder() .limit(Long.valueOf("10")) .build(); - List allResults = new ArrayList<>(); - InstanceGroupManagersPager pager = new InstanceGroupManagersPager(vpcService, listInstanceGroupManagersOptions); + List allResults = new ArrayList<>(); + OperatingSystemsPager pager = new OperatingSystemsPager(vpcService, listOperatingSystemsOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listInstanceGroupManagers operation using the InstanceGroupManagersPager.getAll() method + // Test the listOperatingSystems operation using the OperatingSystemsPager.getAll() method @Test - public void testListInstanceGroupManagersWithPagerGetAll() throws Throwable { + public void testListOperatingSystemsWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"managers\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"id\":\"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"management_enabled\":false,\"name\":\"my-instance-group-manager\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"aggregation_window\":120,\"cooldown\":210,\"manager_type\":\"autoscale\",\"max_membership_count\":10,\"min_membership_count\":10,\"policies\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"id\":\"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"name\":\"my-instance-group-manager-policy\"}]}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"managers\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"id\":\"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"management_enabled\":false,\"name\":\"my-instance-group-manager\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"aggregation_window\":120,\"cooldown\":210,\"manager_type\":\"autoscale\",\"max_membership_count\":10,\"min_membership_count\":10,\"policies\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"id\":\"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"name\":\"my-instance-group-manager-policy\"}]}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"operating_systems\":[{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"operating_systems\":[{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -10571,50 +10700,36 @@ public void testListInstanceGroupManagersWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListInstanceGroupManagersOptions listInstanceGroupManagersOptions = new ListInstanceGroupManagersOptions.Builder() - .instanceGroupId("testString") + ListOperatingSystemsOptions listOperatingSystemsOptions = new ListOperatingSystemsOptions.Builder() .limit(Long.valueOf("10")) .build(); - InstanceGroupManagersPager pager = new InstanceGroupManagersPager(vpcService, listInstanceGroupManagersOptions); - List allResults = pager.getAll(); + OperatingSystemsPager pager = new OperatingSystemsPager(vpcService, listOperatingSystemsOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the createInstanceGroupManager operation with a valid options model parameter + // Test the obsoleteImage operation with a valid options model parameter @Test - public void testCreateInstanceGroupManagerWOptions() throws Throwable { + public void testObsoleteImageWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"id\": \"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"management_enabled\": false, \"name\": \"my-instance-group-manager\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"aggregation_window\": 120, \"cooldown\": 210, \"manager_type\": \"autoscale\", \"max_membership_count\": 10, \"min_membership_count\": 10, \"policies\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"id\": \"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"name\": \"my-instance-group-manager-policy\"}]}"; - String createInstanceGroupManagerPath = "/instance_groups/testString/managers"; + String mockResponseBody = ""; + String obsoleteImagePath = "/images/testString/obsolete"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype model - InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype instanceGroupManagerPrototypeModel = new InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype.Builder() - .managementEnabled(true) - .name("my-instance-group-manager") - .aggregationWindow(Long.valueOf("120")) - .cooldown(Long.valueOf("210")) - .managerType("autoscale") - .maxMembershipCount(Long.valueOf("10")) - .minMembershipCount(Long.valueOf("10")) - .build(); - - // Construct an instance of the CreateInstanceGroupManagerOptions model - CreateInstanceGroupManagerOptions createInstanceGroupManagerOptionsModel = new CreateInstanceGroupManagerOptions.Builder() - .instanceGroupId("testString") - .instanceGroupManagerPrototype(instanceGroupManagerPrototypeModel) + // Construct an instance of the ObsoleteImageOptions model + ObsoleteImageOptions obsoleteImageOptionsModel = new ObsoleteImageOptions.Builder() + .id("testString") .build(); - // Invoke createInstanceGroupManager() with a valid options model and verify the result - Response response = vpcService.createInstanceGroupManager(createInstanceGroupManagerOptionsModel).execute(); + // Invoke obsoleteImage() with a valid options model and verify the result + Response response = vpcService.obsoleteImage(obsoleteImageOptionsModel).execute(); assertNotNull(response); - InstanceGroupManager responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); @@ -10622,328 +10737,312 @@ public void testCreateInstanceGroupManagerWOptions() throws Throwable { assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createInstanceGroupManagerPath); + assertEquals(parsedPath, obsoleteImagePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createInstanceGroupManager operation with and without retries enabled + // Test the obsoleteImage operation with and without retries enabled @Test - public void testCreateInstanceGroupManagerWRetries() throws Throwable { + public void testObsoleteImageWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateInstanceGroupManagerWOptions(); + testObsoleteImageWOptions(); vpcService.disableRetries(); - testCreateInstanceGroupManagerWOptions(); + testObsoleteImageWOptions(); } - // Test the createInstanceGroupManager operation with a null options model (negative test) + // Test the obsoleteImage operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateInstanceGroupManagerNoOptions() throws Throwable { + public void testObsoleteImageNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createInstanceGroupManager(null).execute(); + vpcService.obsoleteImage(null).execute(); } - // Test the deleteInstanceGroupManager operation with a valid options model parameter + // Test the updateImage operation with a valid options model parameter @Test - public void testDeleteInstanceGroupManagerWOptions() throws Throwable { + public void testUpdateImageWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteInstanceGroupManagerPath = "/instance_groups/testString/managers/testString"; + String mockResponseBody = "{\"allowed_use\": {\"api_version\": \"2024-06-23\", \"bare_metal_server\": \"enable_secure_boot == true\", \"instance\": \"gpu.count > 0 && enable_secure_boot == true\"}, \"catalog_offering\": {\"managed\": false, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deprecation_at\": \"2019-01-01T12:00:00.000Z\", \"encryption\": \"user_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"file\": {\"checksums\": {\"sha256\": \"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15\"}, \"size\": 1}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"minimum_provisioned_size\": 22, \"name\": \"my-image\", \"obsolescence_at\": \"2019-01-01T12:00:00.000Z\", \"operating_system\": {\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}, \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"image\", \"source_volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"volume\"}, \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"user_data_format\": \"cloud_init\", \"visibility\": \"private\"}"; + String updateImagePath = "/images/testString"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteInstanceGroupManagerOptions model - DeleteInstanceGroupManagerOptions deleteInstanceGroupManagerOptionsModel = new DeleteInstanceGroupManagerOptions.Builder() - .instanceGroupId("testString") + // Construct an instance of the ImageAllowedUsePatch model + ImageAllowedUsePatch imageAllowedUsePatchModel = new ImageAllowedUsePatch.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + + // Construct an instance of the ImagePatch model + ImagePatch imagePatchModel = new ImagePatch.Builder() + .allowedUse(imageAllowedUsePatchModel) + .deprecationAt(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) + .name("my-image") + .obsolescenceAt(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) + .build(); + Map imagePatchModelAsPatch = imagePatchModel.asPatch(); + + // Construct an instance of the UpdateImageOptions model + UpdateImageOptions updateImageOptionsModel = new UpdateImageOptions.Builder() .id("testString") + .imagePatch(imagePatchModelAsPatch) .build(); - // Invoke deleteInstanceGroupManager() with a valid options model and verify the result - Response response = vpcService.deleteInstanceGroupManager(deleteInstanceGroupManagerOptionsModel).execute(); + // Invoke updateImage() with a valid options model and verify the result + Response response = vpcService.updateImage(updateImageOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + Image 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(), "DELETE"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteInstanceGroupManagerPath); + assertEquals(parsedPath, updateImagePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteInstanceGroupManager operation with and without retries enabled + // Test the updateImage operation with and without retries enabled @Test - public void testDeleteInstanceGroupManagerWRetries() throws Throwable { + public void testUpdateImageWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteInstanceGroupManagerWOptions(); + testUpdateImageWOptions(); vpcService.disableRetries(); - testDeleteInstanceGroupManagerWOptions(); + testUpdateImageWOptions(); } - // Test the deleteInstanceGroupManager operation with a null options model (negative test) + // Test the updateImage operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteInstanceGroupManagerNoOptions() throws Throwable { + public void testUpdateImageNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteInstanceGroupManager(null).execute(); + vpcService.updateImage(null).execute(); } - // Test the getInstanceGroupManager operation with a valid options model parameter + // Test the updateImageExportJob operation with a valid options model parameter @Test - public void testGetInstanceGroupManagerWOptions() throws Throwable { + public void testUpdateImageExportJobWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"id\": \"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"management_enabled\": false, \"name\": \"my-instance-group-manager\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"aggregation_window\": 120, \"cooldown\": 210, \"manager_type\": \"autoscale\", \"max_membership_count\": 10, \"min_membership_count\": 10, \"policies\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"id\": \"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"name\": \"my-instance-group-manager-policy\"}]}"; - String getInstanceGroupManagerPath = "/instance_groups/testString/managers/testString"; + String mockResponseBody = "{\"completed_at\": \"2019-01-01T12:00:00.000Z\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"encrypted_data_key\": \"VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=\", \"format\": \"qcow2\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r006-095e9baf-01d4-4e29-986e-20d26606b82a\", \"id\": \"r006-095e9baf-01d4-4e29-986e-20d26606b82a\", \"name\": \"my-image-export-job\", \"resource_type\": \"image_export_job\", \"started_at\": \"2019-01-01T12:00:00.000Z\", \"status\": \"deleting\", \"status_reasons\": [{\"code\": \"cannot_access_storage_bucket\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq\"}], \"storage_bucket\": {\"crn\": \"crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:bucket-27200-lwx4cfvcue\", \"name\": \"bucket-27200-lwx4cfvcue\"}, \"storage_href\": \"cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2\", \"storage_object\": {\"name\": \"my-object\"}}"; + String updateImageExportJobPath = "/images/testString/export_jobs/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetInstanceGroupManagerOptions model - GetInstanceGroupManagerOptions getInstanceGroupManagerOptionsModel = new GetInstanceGroupManagerOptions.Builder() - .instanceGroupId("testString") + // Construct an instance of the ImageExportJobPatch model + ImageExportJobPatch imageExportJobPatchModel = new ImageExportJobPatch.Builder() + .name("my-image-export-job-updated") + .build(); + Map imageExportJobPatchModelAsPatch = imageExportJobPatchModel.asPatch(); + + // Construct an instance of the UpdateImageExportJobOptions model + UpdateImageExportJobOptions updateImageExportJobOptionsModel = new UpdateImageExportJobOptions.Builder() + .imageId("testString") .id("testString") + .imageExportJobPatch(imageExportJobPatchModelAsPatch) .build(); - // Invoke getInstanceGroupManager() with a valid options model and verify the result - Response response = vpcService.getInstanceGroupManager(getInstanceGroupManagerOptionsModel).execute(); + // Invoke updateImageExportJob() with a valid options model and verify the result + Response response = vpcService.updateImageExportJob(updateImageExportJobOptionsModel).execute(); assertNotNull(response); - InstanceGroupManager responseObj = response.getResult(); + ImageExportJob responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getInstanceGroupManagerPath); + assertEquals(parsedPath, updateImageExportJobPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getInstanceGroupManager operation with and without retries enabled + // Test the updateImageExportJob operation with and without retries enabled @Test - public void testGetInstanceGroupManagerWRetries() throws Throwable { + public void testUpdateImageExportJobWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetInstanceGroupManagerWOptions(); + testUpdateImageExportJobWOptions(); vpcService.disableRetries(); - testGetInstanceGroupManagerWOptions(); + testUpdateImageExportJobWOptions(); } - // Test the getInstanceGroupManager operation with a null options model (negative test) + // Test the updateImageExportJob operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetInstanceGroupManagerNoOptions() throws Throwable { + public void testUpdateImageExportJobNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getInstanceGroupManager(null).execute(); + vpcService.updateImageExportJob(null).execute(); } - // Test the updateInstanceGroupManager operation with a valid options model parameter + // Test the createInstanceGroup operation with a valid options model parameter @Test - public void testUpdateInstanceGroupManagerWOptions() throws Throwable { + public void testCreateInstanceGroupWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"id\": \"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"management_enabled\": false, \"name\": \"my-instance-group-manager\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"aggregation_window\": 120, \"cooldown\": 210, \"manager_type\": \"autoscale\", \"max_membership_count\": 10, \"min_membership_count\": 10, \"policies\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"id\": \"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"name\": \"my-instance-group-manager-policy\"}]}"; - String updateInstanceGroupManagerPath = "/instance_groups/testString/managers/testString"; + String mockResponseBody = "{\"application_port\": 22, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"id\": \"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"instance_template\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"id\": \"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"name\": \"my-instance-template\"}, \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"load_balancer_pool\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}, \"managers\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"id\": \"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"name\": \"my-instance-group-manager\"}], \"membership_count\": 10, \"name\": \"my-instance-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"deleting\", \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String createInstanceGroupPath = "/instance_groups"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the InstanceGroupManagerPatch model - InstanceGroupManagerPatch instanceGroupManagerPatchModel = new InstanceGroupManagerPatch.Builder() - .aggregationWindow(Long.valueOf("120")) - .cooldown(Long.valueOf("210")) - .managementEnabled(false) - .maxMembershipCount(Long.valueOf("10")) - .minMembershipCount(Long.valueOf("10")) - .name("my-instance-group-manager") + // Construct an instance of the InstanceTemplateIdentityById model + InstanceTemplateIdentityById instanceTemplateIdentityModel = new InstanceTemplateIdentityById.Builder() + .id("0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2") .build(); - Map instanceGroupManagerPatchModelAsPatch = instanceGroupManagerPatchModel.asPatch(); - // Construct an instance of the UpdateInstanceGroupManagerOptions model - UpdateInstanceGroupManagerOptions updateInstanceGroupManagerOptionsModel = new UpdateInstanceGroupManagerOptions.Builder() - .instanceGroupId("testString") - .id("testString") - .instanceGroupManagerPatch(instanceGroupManagerPatchModelAsPatch) + // Construct an instance of the SubnetIdentityById model + SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() + .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") .build(); - // Invoke updateInstanceGroupManager() with a valid options model and verify the result - Response response = vpcService.updateInstanceGroupManager(updateInstanceGroupManagerOptionsModel).execute(); + // Construct an instance of the LoadBalancerIdentityById model + LoadBalancerIdentityById loadBalancerIdentityModel = new LoadBalancerIdentityById.Builder() + .id("r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + .build(); + + // Construct an instance of the LoadBalancerPoolIdentityLoadBalancerPoolIdentityById model + LoadBalancerPoolIdentityLoadBalancerPoolIdentityById loadBalancerPoolIdentityModel = new LoadBalancerPoolIdentityLoadBalancerPoolIdentityById.Builder() + .id("r006-70294e14-4e61-11e8-bcf4-0242ac110004") + .build(); + + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") + .build(); + + // Construct an instance of the CreateInstanceGroupOptions model + CreateInstanceGroupOptions createInstanceGroupOptionsModel = new CreateInstanceGroupOptions.Builder() + .instanceTemplate(instanceTemplateIdentityModel) + .subnets(java.util.Arrays.asList(subnetIdentityModel)) + .applicationPort(Long.valueOf("22")) + .loadBalancer(loadBalancerIdentityModel) + .loadBalancerPool(loadBalancerPoolIdentityModel) + .membershipCount(Long.valueOf("10")) + .name("my-instance-group") + .resourceGroup(resourceGroupIdentityModel) + .build(); + + // Invoke createInstanceGroup() with a valid options model and verify the result + Response response = vpcService.createInstanceGroup(createInstanceGroupOptionsModel).execute(); assertNotNull(response); - InstanceGroupManager responseObj = response.getResult(); + InstanceGroup responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateInstanceGroupManagerPath); + assertEquals(parsedPath, createInstanceGroupPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateInstanceGroupManager operation with and without retries enabled + // Test the createInstanceGroup operation with and without retries enabled @Test - public void testUpdateInstanceGroupManagerWRetries() throws Throwable { + public void testCreateInstanceGroupWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateInstanceGroupManagerWOptions(); + testCreateInstanceGroupWOptions(); vpcService.disableRetries(); - testUpdateInstanceGroupManagerWOptions(); + testCreateInstanceGroupWOptions(); } - // Test the updateInstanceGroupManager operation with a null options model (negative test) + // Test the createInstanceGroup operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateInstanceGroupManagerNoOptions() throws Throwable { + public void testCreateInstanceGroupNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateInstanceGroupManager(null).execute(); + vpcService.createInstanceGroup(null).execute(); } - // Test the listInstanceGroupManagerActions operation with a valid options model parameter + // Test the createInstanceGroupManager operation with a valid options model parameter @Test - public void testListInstanceGroupManagerActionsWOptions() throws Throwable { + public void testCreateInstanceGroupManagerWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"actions\": [{\"auto_delete\": true, \"auto_delete_timeout\": 24, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\", \"id\": \"r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\", \"name\": \"my-instance-group-manager-action\", \"resource_type\": \"instance_group_manager_action\", \"status\": \"active\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"action_type\": \"scheduled\", \"cron_spec\": \"30 */2 * * 1-5\", \"last_applied_at\": \"2019-01-01T12:00:00.000Z\", \"next_run_at\": \"2019-01-01T12:00:00.000Z\", \"group\": {\"membership_count\": 10}}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listInstanceGroupManagerActionsPath = "/instance_groups/testString/managers/testString/actions"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"id\": \"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"management_enabled\": false, \"name\": \"my-instance-group-manager\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"aggregation_window\": 120, \"cooldown\": 210, \"manager_type\": \"autoscale\", \"max_membership_count\": 10, \"min_membership_count\": 10, \"policies\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"id\": \"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"name\": \"my-instance-group-manager-policy\"}]}"; + String createInstanceGroupManagerPath = "/instance_groups/testString/managers"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the ListInstanceGroupManagerActionsOptions model - ListInstanceGroupManagerActionsOptions listInstanceGroupManagerActionsOptionsModel = new ListInstanceGroupManagerActionsOptions.Builder() + // Construct an instance of the InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype model + InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype instanceGroupManagerPrototypeModel = new InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype.Builder() + .managementEnabled(true) + .name("my-instance-group-manager") + .aggregationWindow(Long.valueOf("120")) + .cooldown(Long.valueOf("210")) + .managerType("autoscale") + .maxMembershipCount(Long.valueOf("10")) + .minMembershipCount(Long.valueOf("10")) + .build(); + + // Construct an instance of the CreateInstanceGroupManagerOptions model + CreateInstanceGroupManagerOptions createInstanceGroupManagerOptionsModel = new CreateInstanceGroupManagerOptions.Builder() .instanceGroupId("testString") - .instanceGroupManagerId("testString") - .start("testString") - .limit(Long.valueOf("10")) + .instanceGroupManagerPrototype(instanceGroupManagerPrototypeModel) .build(); - // Invoke listInstanceGroupManagerActions() with a valid options model and verify the result - Response response = vpcService.listInstanceGroupManagerActions(listInstanceGroupManagerActionsOptionsModel).execute(); + // Invoke createInstanceGroupManager() with a valid options model and verify the result + Response response = vpcService.createInstanceGroupManager(createInstanceGroupManagerOptionsModel).execute(); assertNotNull(response); - InstanceGroupManagerActionsCollection responseObj = response.getResult(); + InstanceGroupManager responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listInstanceGroupManagerActionsPath); + assertEquals(parsedPath, createInstanceGroupManagerPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the listInstanceGroupManagerActions operation with and without retries enabled + // Test the createInstanceGroupManager operation with and without retries enabled @Test - public void testListInstanceGroupManagerActionsWRetries() throws Throwable { + public void testCreateInstanceGroupManagerWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListInstanceGroupManagerActionsWOptions(); + testCreateInstanceGroupManagerWOptions(); vpcService.disableRetries(); - testListInstanceGroupManagerActionsWOptions(); + testCreateInstanceGroupManagerWOptions(); } - // Test the listInstanceGroupManagerActions operation with a null options model (negative test) + // Test the createInstanceGroupManager operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListInstanceGroupManagerActionsNoOptions() throws Throwable { + public void testCreateInstanceGroupManagerNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listInstanceGroupManagerActions(null).execute(); - } - - // Test the listInstanceGroupManagerActions operation using the InstanceGroupManagerActionsPager.getNext() method - @Test - public void testListInstanceGroupManagerActionsWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"actions\":[{\"auto_delete\":true,\"auto_delete_timeout\":24,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\",\"id\":\"r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\",\"name\":\"my-instance-group-manager-action\",\"resource_type\":\"instance_group_manager_action\",\"status\":\"active\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"action_type\":\"scheduled\",\"cron_spec\":\"30 */2 * * 1-5\",\"last_applied_at\":\"2019-01-01T12:00:00.000Z\",\"next_run_at\":\"2019-01-01T12:00:00.000Z\",\"group\":{\"membership_count\":10}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"actions\":[{\"auto_delete\":true,\"auto_delete_timeout\":24,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\",\"id\":\"r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\",\"name\":\"my-instance-group-manager-action\",\"resource_type\":\"instance_group_manager_action\",\"status\":\"active\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"action_type\":\"scheduled\",\"cron_spec\":\"30 */2 * * 1-5\",\"last_applied_at\":\"2019-01-01T12:00:00.000Z\",\"next_run_at\":\"2019-01-01T12:00:00.000Z\",\"group\":{\"membership_count\":10}}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListInstanceGroupManagerActionsOptions listInstanceGroupManagerActionsOptions = new ListInstanceGroupManagerActionsOptions.Builder() - .instanceGroupId("testString") - .instanceGroupManagerId("testString") - .limit(Long.valueOf("10")) - .build(); - - List allResults = new ArrayList<>(); - InstanceGroupManagerActionsPager pager = new InstanceGroupManagerActionsPager(vpcService, listInstanceGroupManagerActionsOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + vpcService.createInstanceGroupManager(null).execute(); } - - // Test the listInstanceGroupManagerActions operation using the InstanceGroupManagerActionsPager.getAll() method - @Test - public void testListInstanceGroupManagerActionsWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"actions\":[{\"auto_delete\":true,\"auto_delete_timeout\":24,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\",\"id\":\"r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\",\"name\":\"my-instance-group-manager-action\",\"resource_type\":\"instance_group_manager_action\",\"status\":\"active\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"action_type\":\"scheduled\",\"cron_spec\":\"30 */2 * * 1-5\",\"last_applied_at\":\"2019-01-01T12:00:00.000Z\",\"next_run_at\":\"2019-01-01T12:00:00.000Z\",\"group\":{\"membership_count\":10}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"actions\":[{\"auto_delete\":true,\"auto_delete_timeout\":24,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\",\"id\":\"r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\",\"name\":\"my-instance-group-manager-action\",\"resource_type\":\"instance_group_manager_action\",\"status\":\"active\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"action_type\":\"scheduled\",\"cron_spec\":\"30 */2 * * 1-5\",\"last_applied_at\":\"2019-01-01T12:00:00.000Z\",\"next_run_at\":\"2019-01-01T12:00:00.000Z\",\"group\":{\"membership_count\":10}}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListInstanceGroupManagerActionsOptions listInstanceGroupManagerActionsOptions = new ListInstanceGroupManagerActionsOptions.Builder() - .instanceGroupId("testString") - .instanceGroupManagerId("testString") - .limit(Long.valueOf("10")) - .build(); - InstanceGroupManagerActionsPager pager = new InstanceGroupManagerActionsPager(vpcService, listInstanceGroupManagerActionsOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - // Test the createInstanceGroupManagerAction operation with a valid options model parameter @Test public void testCreateInstanceGroupManagerActionWOptions() throws Throwable { @@ -10990,7 +11089,7 @@ public void testCreateInstanceGroupManagerActionWOptions() throws Throwable { // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } @@ -11011,433 +11110,599 @@ public void testCreateInstanceGroupManagerActionNoOptions() throws Throwable { vpcService.createInstanceGroupManagerAction(null).execute(); } - // Test the deleteInstanceGroupManagerAction operation with a valid options model parameter + // Test the createInstanceGroupManagerPolicy operation with a valid options model parameter @Test - public void testDeleteInstanceGroupManagerActionWOptions() throws Throwable { + public void testCreateInstanceGroupManagerPolicyWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteInstanceGroupManagerActionPath = "/instance_groups/testString/managers/testString/actions/testString"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"id\": \"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"name\": \"my-instance-group-manager-policy\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"metric_type\": \"cpu\", \"metric_value\": 0, \"policy_type\": \"target\"}"; + String createInstanceGroupManagerPolicyPath = "/instance_groups/testString/managers/testString/policies"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the DeleteInstanceGroupManagerActionOptions model - DeleteInstanceGroupManagerActionOptions deleteInstanceGroupManagerActionOptionsModel = new DeleteInstanceGroupManagerActionOptions.Builder() + // Construct an instance of the InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype model + InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype instanceGroupManagerPolicyPrototypeModel = new InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype.Builder() + .name("my-instance-group-manager-policy") + .metricType("cpu") + .metricValue(Long.valueOf("0")) + .policyType("target") + .build(); + + // Construct an instance of the CreateInstanceGroupManagerPolicyOptions model + CreateInstanceGroupManagerPolicyOptions createInstanceGroupManagerPolicyOptionsModel = new CreateInstanceGroupManagerPolicyOptions.Builder() .instanceGroupId("testString") .instanceGroupManagerId("testString") - .id("testString") + .instanceGroupManagerPolicyPrototype(instanceGroupManagerPolicyPrototypeModel) .build(); - // Invoke deleteInstanceGroupManagerAction() with a valid options model and verify the result - Response response = vpcService.deleteInstanceGroupManagerAction(deleteInstanceGroupManagerActionOptionsModel).execute(); + // Invoke createInstanceGroupManagerPolicy() with a valid options model and verify the result + Response response = vpcService.createInstanceGroupManagerPolicy(createInstanceGroupManagerPolicyOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + InstanceGroupManagerPolicy 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(), "DELETE"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteInstanceGroupManagerActionPath); + assertEquals(parsedPath, createInstanceGroupManagerPolicyPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteInstanceGroupManagerAction operation with and without retries enabled + // Test the createInstanceGroupManagerPolicy operation with and without retries enabled @Test - public void testDeleteInstanceGroupManagerActionWRetries() throws Throwable { + public void testCreateInstanceGroupManagerPolicyWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteInstanceGroupManagerActionWOptions(); + testCreateInstanceGroupManagerPolicyWOptions(); vpcService.disableRetries(); - testDeleteInstanceGroupManagerActionWOptions(); + testCreateInstanceGroupManagerPolicyWOptions(); } - // Test the deleteInstanceGroupManagerAction operation with a null options model (negative test) + // Test the createInstanceGroupManagerPolicy operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteInstanceGroupManagerActionNoOptions() throws Throwable { + public void testCreateInstanceGroupManagerPolicyNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteInstanceGroupManagerAction(null).execute(); + vpcService.createInstanceGroupManagerPolicy(null).execute(); } - // Test the getInstanceGroupManagerAction operation with a valid options model parameter + // Test the deleteInstanceGroup operation with a valid options model parameter @Test - public void testGetInstanceGroupManagerActionWOptions() throws Throwable { + public void testDeleteInstanceGroupWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"auto_delete\": true, \"auto_delete_timeout\": 24, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\", \"id\": \"r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\", \"name\": \"my-instance-group-manager-action\", \"resource_type\": \"instance_group_manager_action\", \"status\": \"active\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"action_type\": \"scheduled\", \"cron_spec\": \"30 */2 * * 1-5\", \"last_applied_at\": \"2019-01-01T12:00:00.000Z\", \"next_run_at\": \"2019-01-01T12:00:00.000Z\", \"group\": {\"membership_count\": 10}}"; - String getInstanceGroupManagerActionPath = "/instance_groups/testString/managers/testString/actions/testString"; + String mockResponseBody = ""; + String deleteInstanceGroupPath = "/instance_groups/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the GetInstanceGroupManagerActionOptions model - GetInstanceGroupManagerActionOptions getInstanceGroupManagerActionOptionsModel = new GetInstanceGroupManagerActionOptions.Builder() - .instanceGroupId("testString") - .instanceGroupManagerId("testString") + // Construct an instance of the DeleteInstanceGroupOptions model + DeleteInstanceGroupOptions deleteInstanceGroupOptionsModel = new DeleteInstanceGroupOptions.Builder() .id("testString") .build(); - // Invoke getInstanceGroupManagerAction() with a valid options model and verify the result - Response response = vpcService.getInstanceGroupManagerAction(getInstanceGroupManagerActionOptionsModel).execute(); + // Invoke deleteInstanceGroup() with a valid options model and verify the result + Response response = vpcService.deleteInstanceGroup(deleteInstanceGroupOptionsModel).execute(); assertNotNull(response); - InstanceGroupManagerAction responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getInstanceGroupManagerActionPath); + assertEquals(parsedPath, deleteInstanceGroupPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getInstanceGroupManagerAction operation with and without retries enabled + // Test the deleteInstanceGroup operation with and without retries enabled @Test - public void testGetInstanceGroupManagerActionWRetries() throws Throwable { + public void testDeleteInstanceGroupWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetInstanceGroupManagerActionWOptions(); + testDeleteInstanceGroupWOptions(); vpcService.disableRetries(); - testGetInstanceGroupManagerActionWOptions(); + testDeleteInstanceGroupWOptions(); } - // Test the getInstanceGroupManagerAction operation with a null options model (negative test) + // Test the deleteInstanceGroup operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetInstanceGroupManagerActionNoOptions() throws Throwable { + public void testDeleteInstanceGroupNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getInstanceGroupManagerAction(null).execute(); + vpcService.deleteInstanceGroup(null).execute(); } - // Test the updateInstanceGroupManagerAction operation with a valid options model parameter + // Test the deleteInstanceGroupLoadBalancer operation with a valid options model parameter @Test - public void testUpdateInstanceGroupManagerActionWOptions() throws Throwable { + public void testDeleteInstanceGroupLoadBalancerWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"auto_delete\": true, \"auto_delete_timeout\": 24, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\", \"id\": \"r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\", \"name\": \"my-instance-group-manager-action\", \"resource_type\": \"instance_group_manager_action\", \"status\": \"active\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"action_type\": \"scheduled\", \"cron_spec\": \"30 */2 * * 1-5\", \"last_applied_at\": \"2019-01-01T12:00:00.000Z\", \"next_run_at\": \"2019-01-01T12:00:00.000Z\", \"group\": {\"membership_count\": 10}}"; - String updateInstanceGroupManagerActionPath = "/instance_groups/testString/managers/testString/actions/testString"; + String mockResponseBody = ""; + String deleteInstanceGroupLoadBalancerPath = "/instance_groups/testString/load_balancer"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the InstanceGroupManagerActionGroupPatch model - InstanceGroupManagerActionGroupPatch instanceGroupManagerActionGroupPatchModel = new InstanceGroupManagerActionGroupPatch.Builder() - .membershipCount(Long.valueOf("10")) - .build(); - - // Construct an instance of the InstanceGroupManagerActionManagerPatch model - InstanceGroupManagerActionManagerPatch instanceGroupManagerActionManagerPatchModel = new InstanceGroupManagerActionManagerPatch.Builder() - .maxMembershipCount(Long.valueOf("10")) - .minMembershipCount(Long.valueOf("10")) - .build(); - - // Construct an instance of the InstanceGroupManagerActionPatch model - InstanceGroupManagerActionPatch instanceGroupManagerActionPatchModel = new InstanceGroupManagerActionPatch.Builder() - .autoDelete(false) - .autoDeleteTimeout(Long.valueOf("24")) - .cronSpec("30 */2 * * 1-5") - .group(instanceGroupManagerActionGroupPatchModel) - .manager(instanceGroupManagerActionManagerPatchModel) - .name("my-instance-group-manager-action") - .runAt(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) - .build(); - Map instanceGroupManagerActionPatchModelAsPatch = instanceGroupManagerActionPatchModel.asPatch(); - - // Construct an instance of the UpdateInstanceGroupManagerActionOptions model - UpdateInstanceGroupManagerActionOptions updateInstanceGroupManagerActionOptionsModel = new UpdateInstanceGroupManagerActionOptions.Builder() + // Construct an instance of the DeleteInstanceGroupLoadBalancerOptions model + DeleteInstanceGroupLoadBalancerOptions deleteInstanceGroupLoadBalancerOptionsModel = new DeleteInstanceGroupLoadBalancerOptions.Builder() .instanceGroupId("testString") - .instanceGroupManagerId("testString") - .id("testString") - .instanceGroupManagerActionPatch(instanceGroupManagerActionPatchModelAsPatch) .build(); - // Invoke updateInstanceGroupManagerAction() with a valid options model and verify the result - Response response = vpcService.updateInstanceGroupManagerAction(updateInstanceGroupManagerActionOptionsModel).execute(); + // Invoke deleteInstanceGroupLoadBalancer() with a valid options model and verify the result + Response response = vpcService.deleteInstanceGroupLoadBalancer(deleteInstanceGroupLoadBalancerOptionsModel).execute(); assertNotNull(response); - InstanceGroupManagerAction responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateInstanceGroupManagerActionPath); + assertEquals(parsedPath, deleteInstanceGroupLoadBalancerPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateInstanceGroupManagerAction operation with and without retries enabled + // Test the deleteInstanceGroupLoadBalancer operation with and without retries enabled @Test - public void testUpdateInstanceGroupManagerActionWRetries() throws Throwable { + public void testDeleteInstanceGroupLoadBalancerWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateInstanceGroupManagerActionWOptions(); + testDeleteInstanceGroupLoadBalancerWOptions(); vpcService.disableRetries(); - testUpdateInstanceGroupManagerActionWOptions(); + testDeleteInstanceGroupLoadBalancerWOptions(); } - // Test the updateInstanceGroupManagerAction operation with a null options model (negative test) + // Test the deleteInstanceGroupLoadBalancer operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateInstanceGroupManagerActionNoOptions() throws Throwable { + public void testDeleteInstanceGroupLoadBalancerNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateInstanceGroupManagerAction(null).execute(); + vpcService.deleteInstanceGroupLoadBalancer(null).execute(); } - // Test the listInstanceGroupManagerPolicies operation with a valid options model parameter + // Test the deleteInstanceGroupManager operation with a valid options model parameter @Test - public void testListInstanceGroupManagerPoliciesWOptions() throws Throwable { + public void testDeleteInstanceGroupManagerWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"policies\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"id\": \"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"name\": \"my-instance-group-manager-policy\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"metric_type\": \"cpu\", \"metric_value\": 0, \"policy_type\": \"target\"}], \"total_count\": 132}"; - String listInstanceGroupManagerPoliciesPath = "/instance_groups/testString/managers/testString/policies"; + String mockResponseBody = ""; + String deleteInstanceGroupManagerPath = "/instance_groups/testString/managers/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the ListInstanceGroupManagerPoliciesOptions model - ListInstanceGroupManagerPoliciesOptions listInstanceGroupManagerPoliciesOptionsModel = new ListInstanceGroupManagerPoliciesOptions.Builder() + // Construct an instance of the DeleteInstanceGroupManagerOptions model + DeleteInstanceGroupManagerOptions deleteInstanceGroupManagerOptionsModel = new DeleteInstanceGroupManagerOptions.Builder() .instanceGroupId("testString") - .instanceGroupManagerId("testString") - .start("testString") - .limit(Long.valueOf("10")) + .id("testString") .build(); - // Invoke listInstanceGroupManagerPolicies() with a valid options model and verify the result - Response response = vpcService.listInstanceGroupManagerPolicies(listInstanceGroupManagerPoliciesOptionsModel).execute(); + // Invoke deleteInstanceGroupManager() with a valid options model and verify the result + Response response = vpcService.deleteInstanceGroupManager(deleteInstanceGroupManagerOptionsModel).execute(); assertNotNull(response); - InstanceGroupManagerPolicyCollection responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listInstanceGroupManagerPoliciesPath); + assertEquals(parsedPath, deleteInstanceGroupManagerPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the listInstanceGroupManagerPolicies operation with and without retries enabled + // Test the deleteInstanceGroupManager operation with and without retries enabled @Test - public void testListInstanceGroupManagerPoliciesWRetries() throws Throwable { + public void testDeleteInstanceGroupManagerWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListInstanceGroupManagerPoliciesWOptions(); + testDeleteInstanceGroupManagerWOptions(); vpcService.disableRetries(); - testListInstanceGroupManagerPoliciesWOptions(); + testDeleteInstanceGroupManagerWOptions(); } - // Test the listInstanceGroupManagerPolicies operation with a null options model (negative test) + // Test the deleteInstanceGroupManager operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListInstanceGroupManagerPoliciesNoOptions() throws Throwable { + public void testDeleteInstanceGroupManagerNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listInstanceGroupManagerPolicies(null).execute(); + vpcService.deleteInstanceGroupManager(null).execute(); } - // Test the listInstanceGroupManagerPolicies operation using the InstanceGroupManagerPoliciesPager.getNext() method + // Test the deleteInstanceGroupManagerAction operation with a valid options model parameter @Test - public void testListInstanceGroupManagerPoliciesWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"policies\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"id\":\"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"name\":\"my-instance-group-manager-policy\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"metric_type\":\"cpu\",\"metric_value\":0,\"policy_type\":\"target\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"policies\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"id\":\"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"name\":\"my-instance-group-manager-policy\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"metric_type\":\"cpu\",\"metric_value\":0,\"policy_type\":\"target\"}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); + public void testDeleteInstanceGroupManagerActionWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = ""; + String deleteInstanceGroupManagerActionPath = "/instance_groups/testString/managers/testString/actions/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); + .setResponseCode(204) + .setBody(mockResponseBody)); - ListInstanceGroupManagerPoliciesOptions listInstanceGroupManagerPoliciesOptions = new ListInstanceGroupManagerPoliciesOptions.Builder() + // Construct an instance of the DeleteInstanceGroupManagerActionOptions model + DeleteInstanceGroupManagerActionOptions deleteInstanceGroupManagerActionOptionsModel = new DeleteInstanceGroupManagerActionOptions.Builder() .instanceGroupId("testString") .instanceGroupManagerId("testString") - .limit(Long.valueOf("10")) + .id("testString") .build(); - List allResults = new ArrayList<>(); - InstanceGroupManagerPoliciesPager pager = new InstanceGroupManagerPoliciesPager(vpcService, listInstanceGroupManagerPoliciesOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + // Invoke deleteInstanceGroupManagerAction() with a valid options model and verify the result + Response response = vpcService.deleteInstanceGroupManagerAction(deleteInstanceGroupManagerActionOptionsModel).execute(); + assertNotNull(response); + Void responseObj = response.getResult(); + assertNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "DELETE"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, deleteInstanceGroupManagerActionPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - - // Test the listInstanceGroupManagerPolicies operation using the InstanceGroupManagerPoliciesPager.getAll() method - @Test - public void testListInstanceGroupManagerPoliciesWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"policies\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"id\":\"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"name\":\"my-instance-group-manager-policy\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"metric_type\":\"cpu\",\"metric_value\":0,\"policy_type\":\"target\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"policies\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"id\":\"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"name\":\"my-instance-group-manager-policy\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"metric_type\":\"cpu\",\"metric_value\":0,\"policy_type\":\"target\"}]}"; + + // Test the deleteInstanceGroupManagerAction operation with and without retries enabled + @Test + public void testDeleteInstanceGroupManagerActionWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testDeleteInstanceGroupManagerActionWOptions(); + + vpcService.disableRetries(); + testDeleteInstanceGroupManagerActionWOptions(); + } + + // Test the deleteInstanceGroupManagerAction operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testDeleteInstanceGroupManagerActionNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.deleteInstanceGroupManagerAction(null).execute(); + } + + // Test the deleteInstanceGroupManagerPolicy operation with a valid options model parameter + @Test + public void testDeleteInstanceGroupManagerPolicyWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = ""; + String deleteInstanceGroupManagerPolicyPath = "/instance_groups/testString/managers/testString/policies/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); + .setResponseCode(204) + .setBody(mockResponseBody)); + + // Construct an instance of the DeleteInstanceGroupManagerPolicyOptions model + DeleteInstanceGroupManagerPolicyOptions deleteInstanceGroupManagerPolicyOptionsModel = new DeleteInstanceGroupManagerPolicyOptions.Builder() + .instanceGroupId("testString") + .instanceGroupManagerId("testString") + .id("testString") + .build(); + + // Invoke deleteInstanceGroupManagerPolicy() with a valid options model and verify the result + Response response = vpcService.deleteInstanceGroupManagerPolicy(deleteInstanceGroupManagerPolicyOptionsModel).execute(); + assertNotNull(response); + Void responseObj = response.getResult(); + assertNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "DELETE"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, deleteInstanceGroupManagerPolicyPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the deleteInstanceGroupManagerPolicy operation with and without retries enabled + @Test + public void testDeleteInstanceGroupManagerPolicyWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testDeleteInstanceGroupManagerPolicyWOptions(); + + vpcService.disableRetries(); + testDeleteInstanceGroupManagerPolicyWOptions(); + } + + // Test the deleteInstanceGroupManagerPolicy operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testDeleteInstanceGroupManagerPolicyNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.deleteInstanceGroupManagerPolicy(null).execute(); + } + + // Test the deleteInstanceGroupMembership operation with a valid options model parameter + @Test + public void testDeleteInstanceGroupMembershipWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = ""; + String deleteInstanceGroupMembershipPath = "/instance_groups/testString/memberships/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); + .setResponseCode(204) + .setBody(mockResponseBody)); + + // Construct an instance of the DeleteInstanceGroupMembershipOptions model + DeleteInstanceGroupMembershipOptions deleteInstanceGroupMembershipOptionsModel = new DeleteInstanceGroupMembershipOptions.Builder() + .instanceGroupId("testString") + .id("testString") + .build(); + + // Invoke deleteInstanceGroupMembership() with a valid options model and verify the result + Response response = vpcService.deleteInstanceGroupMembership(deleteInstanceGroupMembershipOptionsModel).execute(); + assertNotNull(response); + Void responseObj = response.getResult(); + assertNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "DELETE"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, deleteInstanceGroupMembershipPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the deleteInstanceGroupMembership operation with and without retries enabled + @Test + public void testDeleteInstanceGroupMembershipWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testDeleteInstanceGroupMembershipWOptions(); + + vpcService.disableRetries(); + testDeleteInstanceGroupMembershipWOptions(); + } + + // Test the deleteInstanceGroupMembership operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testDeleteInstanceGroupMembershipNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.deleteInstanceGroupMembership(null).execute(); + } + + // Test the deleteInstanceGroupMemberships operation with a valid options model parameter + @Test + public void testDeleteInstanceGroupMembershipsWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = ""; + String deleteInstanceGroupMembershipsPath = "/instance_groups/testString/memberships"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); + .setResponseCode(204) + .setBody(mockResponseBody)); - ListInstanceGroupManagerPoliciesOptions listInstanceGroupManagerPoliciesOptions = new ListInstanceGroupManagerPoliciesOptions.Builder() + // Construct an instance of the DeleteInstanceGroupMembershipsOptions model + DeleteInstanceGroupMembershipsOptions deleteInstanceGroupMembershipsOptionsModel = new DeleteInstanceGroupMembershipsOptions.Builder() .instanceGroupId("testString") - .instanceGroupManagerId("testString") - .limit(Long.valueOf("10")) .build(); - InstanceGroupManagerPoliciesPager pager = new InstanceGroupManagerPoliciesPager(vpcService, listInstanceGroupManagerPoliciesOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); + // Invoke deleteInstanceGroupMemberships() with a valid options model and verify the result + Response response = vpcService.deleteInstanceGroupMemberships(deleteInstanceGroupMembershipsOptionsModel).execute(); + assertNotNull(response); + Void responseObj = response.getResult(); + assertNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "DELETE"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, deleteInstanceGroupMembershipsPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - - // Test the createInstanceGroupManagerPolicy operation with a valid options model parameter + + // Test the deleteInstanceGroupMemberships operation with and without retries enabled @Test - public void testCreateInstanceGroupManagerPolicyWOptions() throws Throwable { + public void testDeleteInstanceGroupMembershipsWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testDeleteInstanceGroupMembershipsWOptions(); + + vpcService.disableRetries(); + testDeleteInstanceGroupMembershipsWOptions(); + } + + // Test the deleteInstanceGroupMemberships operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testDeleteInstanceGroupMembershipsNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.deleteInstanceGroupMemberships(null).execute(); + } + + // Test the getInstanceGroup operation with a valid options model parameter + @Test + public void testGetInstanceGroupWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"id\": \"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"name\": \"my-instance-group-manager-policy\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"metric_type\": \"cpu\", \"metric_value\": 0, \"policy_type\": \"target\"}"; - String createInstanceGroupManagerPolicyPath = "/instance_groups/testString/managers/testString/policies"; + String mockResponseBody = "{\"application_port\": 22, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"id\": \"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"instance_template\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"id\": \"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"name\": \"my-instance-template\"}, \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"load_balancer_pool\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}, \"managers\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"id\": \"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"name\": \"my-instance-group-manager\"}], \"membership_count\": 10, \"name\": \"my-instance-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"deleting\", \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String getInstanceGroupPath = "/instance_groups/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype model - InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype instanceGroupManagerPolicyPrototypeModel = new InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype.Builder() - .name("my-instance-group-manager-policy") - .metricType("cpu") - .metricValue(Long.valueOf("0")) - .policyType("target") + // Construct an instance of the GetInstanceGroupOptions model + GetInstanceGroupOptions getInstanceGroupOptionsModel = new GetInstanceGroupOptions.Builder() + .id("testString") .build(); - // Construct an instance of the CreateInstanceGroupManagerPolicyOptions model - CreateInstanceGroupManagerPolicyOptions createInstanceGroupManagerPolicyOptionsModel = new CreateInstanceGroupManagerPolicyOptions.Builder() + // Invoke getInstanceGroup() with a valid options model and verify the result + Response response = vpcService.getInstanceGroup(getInstanceGroupOptionsModel).execute(); + assertNotNull(response); + InstanceGroup responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "GET"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, getInstanceGroupPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the getInstanceGroup operation with and without retries enabled + @Test + public void testGetInstanceGroupWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testGetInstanceGroupWOptions(); + + vpcService.disableRetries(); + testGetInstanceGroupWOptions(); + } + + // Test the getInstanceGroup operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testGetInstanceGroupNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.getInstanceGroup(null).execute(); + } + + // Test the getInstanceGroupManager operation with a valid options model parameter + @Test + public void testGetInstanceGroupManagerWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"id\": \"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"management_enabled\": false, \"name\": \"my-instance-group-manager\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"aggregation_window\": 120, \"cooldown\": 210, \"manager_type\": \"autoscale\", \"max_membership_count\": 10, \"min_membership_count\": 10, \"policies\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"id\": \"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"name\": \"my-instance-group-manager-policy\"}]}"; + String getInstanceGroupManagerPath = "/instance_groups/testString/managers/testString"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the GetInstanceGroupManagerOptions model + GetInstanceGroupManagerOptions getInstanceGroupManagerOptionsModel = new GetInstanceGroupManagerOptions.Builder() .instanceGroupId("testString") - .instanceGroupManagerId("testString") - .instanceGroupManagerPolicyPrototype(instanceGroupManagerPolicyPrototypeModel) + .id("testString") .build(); - // Invoke createInstanceGroupManagerPolicy() with a valid options model and verify the result - Response response = vpcService.createInstanceGroupManagerPolicy(createInstanceGroupManagerPolicyOptionsModel).execute(); + // Invoke getInstanceGroupManager() with a valid options model and verify the result + Response response = vpcService.getInstanceGroupManager(getInstanceGroupManagerOptionsModel).execute(); assertNotNull(response); - InstanceGroupManagerPolicy responseObj = response.getResult(); + InstanceGroupManager responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createInstanceGroupManagerPolicyPath); + assertEquals(parsedPath, getInstanceGroupManagerPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createInstanceGroupManagerPolicy operation with and without retries enabled + // Test the getInstanceGroupManager operation with and without retries enabled @Test - public void testCreateInstanceGroupManagerPolicyWRetries() throws Throwable { + public void testGetInstanceGroupManagerWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateInstanceGroupManagerPolicyWOptions(); + testGetInstanceGroupManagerWOptions(); vpcService.disableRetries(); - testCreateInstanceGroupManagerPolicyWOptions(); + testGetInstanceGroupManagerWOptions(); } - // Test the createInstanceGroupManagerPolicy operation with a null options model (negative test) + // Test the getInstanceGroupManager operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateInstanceGroupManagerPolicyNoOptions() throws Throwable { + public void testGetInstanceGroupManagerNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createInstanceGroupManagerPolicy(null).execute(); + vpcService.getInstanceGroupManager(null).execute(); } - // Test the deleteInstanceGroupManagerPolicy operation with a valid options model parameter + // Test the getInstanceGroupManagerAction operation with a valid options model parameter @Test - public void testDeleteInstanceGroupManagerPolicyWOptions() throws Throwable { + public void testGetInstanceGroupManagerActionWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteInstanceGroupManagerPolicyPath = "/instance_groups/testString/managers/testString/policies/testString"; + String mockResponseBody = "{\"auto_delete\": true, \"auto_delete_timeout\": 24, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\", \"id\": \"r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\", \"name\": \"my-instance-group-manager-action\", \"resource_type\": \"instance_group_manager_action\", \"status\": \"active\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"action_type\": \"scheduled\", \"cron_spec\": \"30 */2 * * 1-5\", \"last_applied_at\": \"2019-01-01T12:00:00.000Z\", \"next_run_at\": \"2019-01-01T12:00:00.000Z\", \"group\": {\"membership_count\": 10}}"; + String getInstanceGroupManagerActionPath = "/instance_groups/testString/managers/testString/actions/testString"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteInstanceGroupManagerPolicyOptions model - DeleteInstanceGroupManagerPolicyOptions deleteInstanceGroupManagerPolicyOptionsModel = new DeleteInstanceGroupManagerPolicyOptions.Builder() + // Construct an instance of the GetInstanceGroupManagerActionOptions model + GetInstanceGroupManagerActionOptions getInstanceGroupManagerActionOptionsModel = new GetInstanceGroupManagerActionOptions.Builder() .instanceGroupId("testString") .instanceGroupManagerId("testString") .id("testString") .build(); - // Invoke deleteInstanceGroupManagerPolicy() with a valid options model and verify the result - Response response = vpcService.deleteInstanceGroupManagerPolicy(deleteInstanceGroupManagerPolicyOptionsModel).execute(); + // Invoke getInstanceGroupManagerAction() with a valid options model and verify the result + Response response = vpcService.getInstanceGroupManagerAction(getInstanceGroupManagerActionOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + InstanceGroupManagerAction 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteInstanceGroupManagerPolicyPath); + assertEquals(parsedPath, getInstanceGroupManagerActionPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteInstanceGroupManagerPolicy operation with and without retries enabled + // Test the getInstanceGroupManagerAction operation with and without retries enabled @Test - public void testDeleteInstanceGroupManagerPolicyWRetries() throws Throwable { + public void testGetInstanceGroupManagerActionWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteInstanceGroupManagerPolicyWOptions(); + testGetInstanceGroupManagerActionWOptions(); vpcService.disableRetries(); - testDeleteInstanceGroupManagerPolicyWOptions(); + testGetInstanceGroupManagerActionWOptions(); } - // Test the deleteInstanceGroupManagerPolicy operation with a null options model (negative test) + // Test the getInstanceGroupManagerAction operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteInstanceGroupManagerPolicyNoOptions() throws Throwable { + public void testGetInstanceGroupManagerActionNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteInstanceGroupManagerPolicy(null).execute(); + vpcService.getInstanceGroupManagerAction(null).execute(); } // Test the getInstanceGroupManagerPolicy operation with a valid options model parameter @@ -11474,7 +11739,7 @@ public void testGetInstanceGroupManagerPolicyWOptions() throws Throwable { // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } @@ -11495,261 +11760,2248 @@ public void testGetInstanceGroupManagerPolicyNoOptions() throws Throwable { vpcService.getInstanceGroupManagerPolicy(null).execute(); } - // Test the updateInstanceGroupManagerPolicy operation with a valid options model parameter + // Test the getInstanceGroupMembership operation with a valid options model parameter @Test - public void testUpdateInstanceGroupManagerPolicyWOptions() throws Throwable { + public void testGetInstanceGroupMembershipWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"id\": \"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"name\": \"my-instance-group-manager-policy\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"metric_type\": \"cpu\", \"metric_value\": 0, \"policy_type\": \"target\"}"; - String updateInstanceGroupManagerPolicyPath = "/instance_groups/testString/managers/testString/policies/testString"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"delete_instance_on_membership_delete\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741\", \"id\": \"r006-32c8210b-fd1a-409f-8966-de85bbfd3741\", \"instance\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}, \"instance_template\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"id\": \"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"name\": \"my-instance-template\"}, \"name\": \"my-instance-group-membership\", \"pool_member\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}, \"status\": \"deleting\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}"; + String getInstanceGroupMembershipPath = "/instance_groups/testString/memberships/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the InstanceGroupManagerPolicyPatch model - InstanceGroupManagerPolicyPatch instanceGroupManagerPolicyPatchModel = new InstanceGroupManagerPolicyPatch.Builder() - .metricType("cpu") - .metricValue(Long.valueOf("75")) - .name("my-instance-group-manager-policy") + // Construct an instance of the GetInstanceGroupMembershipOptions model + GetInstanceGroupMembershipOptions getInstanceGroupMembershipOptionsModel = new GetInstanceGroupMembershipOptions.Builder() + .instanceGroupId("testString") + .id("testString") .build(); - Map instanceGroupManagerPolicyPatchModelAsPatch = instanceGroupManagerPolicyPatchModel.asPatch(); - // Construct an instance of the UpdateInstanceGroupManagerPolicyOptions model - UpdateInstanceGroupManagerPolicyOptions updateInstanceGroupManagerPolicyOptionsModel = new UpdateInstanceGroupManagerPolicyOptions.Builder() + // Invoke getInstanceGroupMembership() with a valid options model and verify the result + Response response = vpcService.getInstanceGroupMembership(getInstanceGroupMembershipOptionsModel).execute(); + assertNotNull(response); + InstanceGroupMembership responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "GET"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, getInstanceGroupMembershipPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the getInstanceGroupMembership operation with and without retries enabled + @Test + public void testGetInstanceGroupMembershipWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testGetInstanceGroupMembershipWOptions(); + + vpcService.disableRetries(); + testGetInstanceGroupMembershipWOptions(); + } + + // Test the getInstanceGroupMembership operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testGetInstanceGroupMembershipNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.getInstanceGroupMembership(null).execute(); + } + + // Test the listInstanceGroupManagerActions operation with a valid options model parameter + @Test + public void testListInstanceGroupManagerActionsWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"actions\": [{\"auto_delete\": true, \"auto_delete_timeout\": 24, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\", \"id\": \"r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\", \"name\": \"my-instance-group-manager-action\", \"resource_type\": \"instance_group_manager_action\", \"status\": \"active\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"action_type\": \"scheduled\", \"cron_spec\": \"30 */2 * * 1-5\", \"last_applied_at\": \"2019-01-01T12:00:00.000Z\", \"next_run_at\": \"2019-01-01T12:00:00.000Z\", \"group\": {\"membership_count\": 10}}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listInstanceGroupManagerActionsPath = "/instance_groups/testString/managers/testString/actions"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the ListInstanceGroupManagerActionsOptions model + ListInstanceGroupManagerActionsOptions listInstanceGroupManagerActionsOptionsModel = new ListInstanceGroupManagerActionsOptions.Builder() .instanceGroupId("testString") .instanceGroupManagerId("testString") - .id("testString") - .instanceGroupManagerPolicyPatch(instanceGroupManagerPolicyPatchModelAsPatch) + .start("testString") + .limit(Long.valueOf("10")) .build(); - // Invoke updateInstanceGroupManagerPolicy() with a valid options model and verify the result - Response response = vpcService.updateInstanceGroupManagerPolicy(updateInstanceGroupManagerPolicyOptionsModel).execute(); + // Invoke listInstanceGroupManagerActions() with a valid options model and verify the result + Response response = vpcService.listInstanceGroupManagerActions(listInstanceGroupManagerActionsOptionsModel).execute(); + assertNotNull(response); + InstanceGroupManagerActionsCollection responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "GET"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, listInstanceGroupManagerActionsPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + } + + // Test the listInstanceGroupManagerActions operation with and without retries enabled + @Test + public void testListInstanceGroupManagerActionsWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testListInstanceGroupManagerActionsWOptions(); + + vpcService.disableRetries(); + testListInstanceGroupManagerActionsWOptions(); + } + + // Test the listInstanceGroupManagerActions operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testListInstanceGroupManagerActionsNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.listInstanceGroupManagerActions(null).execute(); + } + + // Test the listInstanceGroupManagerActions operation using the InstanceGroupManagerActionsPager.getNext() method + @Test + public void testListInstanceGroupManagerActionsWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"actions\":[{\"auto_delete\":true,\"auto_delete_timeout\":24,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\",\"id\":\"r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\",\"name\":\"my-instance-group-manager-action\",\"resource_type\":\"instance_group_manager_action\",\"status\":\"active\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"action_type\":\"scheduled\",\"cron_spec\":\"30 */2 * * 1-5\",\"last_applied_at\":\"2019-01-01T12:00:00.000Z\",\"next_run_at\":\"2019-01-01T12:00:00.000Z\",\"group\":{\"membership_count\":10}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"actions\":[{\"auto_delete\":true,\"auto_delete_timeout\":24,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\",\"id\":\"r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\",\"name\":\"my-instance-group-manager-action\",\"resource_type\":\"instance_group_manager_action\",\"status\":\"active\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"action_type\":\"scheduled\",\"cron_spec\":\"30 */2 * * 1-5\",\"last_applied_at\":\"2019-01-01T12:00:00.000Z\",\"next_run_at\":\"2019-01-01T12:00:00.000Z\",\"group\":{\"membership_count\":10}}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListInstanceGroupManagerActionsOptions listInstanceGroupManagerActionsOptions = new ListInstanceGroupManagerActionsOptions.Builder() + .instanceGroupId("testString") + .instanceGroupManagerId("testString") + .limit(Long.valueOf("10")) + .build(); + + List allResults = new ArrayList<>(); + InstanceGroupManagerActionsPager pager = new InstanceGroupManagerActionsPager(vpcService, listInstanceGroupManagerActionsOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); + } + + // Test the listInstanceGroupManagerActions operation using the InstanceGroupManagerActionsPager.getAll() method + @Test + public void testListInstanceGroupManagerActionsWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"actions\":[{\"auto_delete\":true,\"auto_delete_timeout\":24,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\",\"id\":\"r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\",\"name\":\"my-instance-group-manager-action\",\"resource_type\":\"instance_group_manager_action\",\"status\":\"active\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"action_type\":\"scheduled\",\"cron_spec\":\"30 */2 * * 1-5\",\"last_applied_at\":\"2019-01-01T12:00:00.000Z\",\"next_run_at\":\"2019-01-01T12:00:00.000Z\",\"group\":{\"membership_count\":10}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"actions\":[{\"auto_delete\":true,\"auto_delete_timeout\":24,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\",\"id\":\"r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\",\"name\":\"my-instance-group-manager-action\",\"resource_type\":\"instance_group_manager_action\",\"status\":\"active\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"action_type\":\"scheduled\",\"cron_spec\":\"30 */2 * * 1-5\",\"last_applied_at\":\"2019-01-01T12:00:00.000Z\",\"next_run_at\":\"2019-01-01T12:00:00.000Z\",\"group\":{\"membership_count\":10}}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListInstanceGroupManagerActionsOptions listInstanceGroupManagerActionsOptions = new ListInstanceGroupManagerActionsOptions.Builder() + .instanceGroupId("testString") + .instanceGroupManagerId("testString") + .limit(Long.valueOf("10")) + .build(); + + InstanceGroupManagerActionsPager pager = new InstanceGroupManagerActionsPager(vpcService, listInstanceGroupManagerActionsOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); + } + + // Test the listInstanceGroupManagerPolicies operation with a valid options model parameter + @Test + public void testListInstanceGroupManagerPoliciesWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"policies\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"id\": \"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"name\": \"my-instance-group-manager-policy\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"metric_type\": \"cpu\", \"metric_value\": 0, \"policy_type\": \"target\"}], \"total_count\": 132}"; + String listInstanceGroupManagerPoliciesPath = "/instance_groups/testString/managers/testString/policies"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the ListInstanceGroupManagerPoliciesOptions model + ListInstanceGroupManagerPoliciesOptions listInstanceGroupManagerPoliciesOptionsModel = new ListInstanceGroupManagerPoliciesOptions.Builder() + .instanceGroupId("testString") + .instanceGroupManagerId("testString") + .start("testString") + .limit(Long.valueOf("10")) + .build(); + + // Invoke listInstanceGroupManagerPolicies() with a valid options model and verify the result + Response response = vpcService.listInstanceGroupManagerPolicies(listInstanceGroupManagerPoliciesOptionsModel).execute(); + assertNotNull(response); + InstanceGroupManagerPolicyCollection responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "GET"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, listInstanceGroupManagerPoliciesPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + } + + // Test the listInstanceGroupManagerPolicies operation with and without retries enabled + @Test + public void testListInstanceGroupManagerPoliciesWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testListInstanceGroupManagerPoliciesWOptions(); + + vpcService.disableRetries(); + testListInstanceGroupManagerPoliciesWOptions(); + } + + // Test the listInstanceGroupManagerPolicies operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testListInstanceGroupManagerPoliciesNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.listInstanceGroupManagerPolicies(null).execute(); + } + + // Test the listInstanceGroupManagerPolicies operation using the InstanceGroupManagerPoliciesPager.getNext() method + @Test + public void testListInstanceGroupManagerPoliciesWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"policies\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"id\":\"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"name\":\"my-instance-group-manager-policy\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"metric_type\":\"cpu\",\"metric_value\":0,\"policy_type\":\"target\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"policies\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"id\":\"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"name\":\"my-instance-group-manager-policy\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"metric_type\":\"cpu\",\"metric_value\":0,\"policy_type\":\"target\"}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListInstanceGroupManagerPoliciesOptions listInstanceGroupManagerPoliciesOptions = new ListInstanceGroupManagerPoliciesOptions.Builder() + .instanceGroupId("testString") + .instanceGroupManagerId("testString") + .limit(Long.valueOf("10")) + .build(); + + List allResults = new ArrayList<>(); + InstanceGroupManagerPoliciesPager pager = new InstanceGroupManagerPoliciesPager(vpcService, listInstanceGroupManagerPoliciesOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); + } + + // Test the listInstanceGroupManagerPolicies operation using the InstanceGroupManagerPoliciesPager.getAll() method + @Test + public void testListInstanceGroupManagerPoliciesWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"policies\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"id\":\"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"name\":\"my-instance-group-manager-policy\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"metric_type\":\"cpu\",\"metric_value\":0,\"policy_type\":\"target\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"policies\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"id\":\"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"name\":\"my-instance-group-manager-policy\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"metric_type\":\"cpu\",\"metric_value\":0,\"policy_type\":\"target\"}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListInstanceGroupManagerPoliciesOptions listInstanceGroupManagerPoliciesOptions = new ListInstanceGroupManagerPoliciesOptions.Builder() + .instanceGroupId("testString") + .instanceGroupManagerId("testString") + .limit(Long.valueOf("10")) + .build(); + + InstanceGroupManagerPoliciesPager pager = new InstanceGroupManagerPoliciesPager(vpcService, listInstanceGroupManagerPoliciesOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); + } + + // Test the listInstanceGroupManagers operation with a valid options model parameter + @Test + public void testListInstanceGroupManagersWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"managers\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"id\": \"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"management_enabled\": false, \"name\": \"my-instance-group-manager\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"aggregation_window\": 120, \"cooldown\": 210, \"manager_type\": \"autoscale\", \"max_membership_count\": 10, \"min_membership_count\": 10, \"policies\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"id\": \"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"name\": \"my-instance-group-manager-policy\"}]}], \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listInstanceGroupManagersPath = "/instance_groups/testString/managers"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the ListInstanceGroupManagersOptions model + ListInstanceGroupManagersOptions listInstanceGroupManagersOptionsModel = new ListInstanceGroupManagersOptions.Builder() + .instanceGroupId("testString") + .start("testString") + .limit(Long.valueOf("10")) + .build(); + + // Invoke listInstanceGroupManagers() with a valid options model and verify the result + Response response = vpcService.listInstanceGroupManagers(listInstanceGroupManagersOptionsModel).execute(); + assertNotNull(response); + InstanceGroupManagerCollection responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "GET"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, listInstanceGroupManagersPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + } + + // Test the listInstanceGroupManagers operation with and without retries enabled + @Test + public void testListInstanceGroupManagersWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testListInstanceGroupManagersWOptions(); + + vpcService.disableRetries(); + testListInstanceGroupManagersWOptions(); + } + + // Test the listInstanceGroupManagers operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testListInstanceGroupManagersNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.listInstanceGroupManagers(null).execute(); + } + + // Test the listInstanceGroupManagers operation using the InstanceGroupManagersPager.getNext() method + @Test + public void testListInstanceGroupManagersWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"managers\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"id\":\"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"management_enabled\":false,\"name\":\"my-instance-group-manager\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"aggregation_window\":120,\"cooldown\":210,\"manager_type\":\"autoscale\",\"max_membership_count\":10,\"min_membership_count\":10,\"policies\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"id\":\"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"name\":\"my-instance-group-manager-policy\"}]}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"managers\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"id\":\"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"management_enabled\":false,\"name\":\"my-instance-group-manager\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"aggregation_window\":120,\"cooldown\":210,\"manager_type\":\"autoscale\",\"max_membership_count\":10,\"min_membership_count\":10,\"policies\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"id\":\"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"name\":\"my-instance-group-manager-policy\"}]}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListInstanceGroupManagersOptions listInstanceGroupManagersOptions = new ListInstanceGroupManagersOptions.Builder() + .instanceGroupId("testString") + .limit(Long.valueOf("10")) + .build(); + + List allResults = new ArrayList<>(); + InstanceGroupManagersPager pager = new InstanceGroupManagersPager(vpcService, listInstanceGroupManagersOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); + } + + // Test the listInstanceGroupManagers operation using the InstanceGroupManagersPager.getAll() method + @Test + public void testListInstanceGroupManagersWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"managers\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"id\":\"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"management_enabled\":false,\"name\":\"my-instance-group-manager\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"aggregation_window\":120,\"cooldown\":210,\"manager_type\":\"autoscale\",\"max_membership_count\":10,\"min_membership_count\":10,\"policies\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"id\":\"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"name\":\"my-instance-group-manager-policy\"}]}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"managers\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"id\":\"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"management_enabled\":false,\"name\":\"my-instance-group-manager\",\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"aggregation_window\":120,\"cooldown\":210,\"manager_type\":\"autoscale\",\"max_membership_count\":10,\"min_membership_count\":10,\"policies\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"id\":\"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\",\"name\":\"my-instance-group-manager-policy\"}]}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListInstanceGroupManagersOptions listInstanceGroupManagersOptions = new ListInstanceGroupManagersOptions.Builder() + .instanceGroupId("testString") + .limit(Long.valueOf("10")) + .build(); + + InstanceGroupManagersPager pager = new InstanceGroupManagersPager(vpcService, listInstanceGroupManagersOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); + } + + // Test the listInstanceGroupMemberships operation with a valid options model parameter + @Test + public void testListInstanceGroupMembershipsWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"memberships\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"delete_instance_on_membership_delete\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741\", \"id\": \"r006-32c8210b-fd1a-409f-8966-de85bbfd3741\", \"instance\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}, \"instance_template\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"id\": \"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"name\": \"my-instance-template\"}, \"name\": \"my-instance-group-membership\", \"pool_member\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}, \"status\": \"deleting\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}], \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listInstanceGroupMembershipsPath = "/instance_groups/testString/memberships"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the ListInstanceGroupMembershipsOptions model + ListInstanceGroupMembershipsOptions listInstanceGroupMembershipsOptionsModel = new ListInstanceGroupMembershipsOptions.Builder() + .instanceGroupId("testString") + .start("testString") + .limit(Long.valueOf("10")) + .build(); + + // Invoke listInstanceGroupMemberships() with a valid options model and verify the result + Response response = vpcService.listInstanceGroupMemberships(listInstanceGroupMembershipsOptionsModel).execute(); + assertNotNull(response); + InstanceGroupMembershipCollection responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "GET"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, listInstanceGroupMembershipsPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + } + + // Test the listInstanceGroupMemberships operation with and without retries enabled + @Test + public void testListInstanceGroupMembershipsWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testListInstanceGroupMembershipsWOptions(); + + vpcService.disableRetries(); + testListInstanceGroupMembershipsWOptions(); + } + + // Test the listInstanceGroupMemberships operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testListInstanceGroupMembershipsNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.listInstanceGroupMemberships(null).execute(); + } + + // Test the listInstanceGroupMemberships operation using the InstanceGroupMembershipsPager.getNext() method + @Test + public void testListInstanceGroupMembershipsWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"memberships\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"delete_instance_on_membership_delete\":true,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741\",\"id\":\"r006-32c8210b-fd1a-409f-8966-de85bbfd3741\",\"instance\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"name\":\"my-instance\"},\"instance_template\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"id\":\"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"name\":\"my-instance-template\"},\"name\":\"my-instance-group-membership\",\"pool_member\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\",\"id\":\"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"},\"status\":\"deleting\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"memberships\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"delete_instance_on_membership_delete\":true,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741\",\"id\":\"r006-32c8210b-fd1a-409f-8966-de85bbfd3741\",\"instance\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"name\":\"my-instance\"},\"instance_template\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"id\":\"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"name\":\"my-instance-template\"},\"name\":\"my-instance-group-membership\",\"pool_member\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\",\"id\":\"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"},\"status\":\"deleting\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListInstanceGroupMembershipsOptions listInstanceGroupMembershipsOptions = new ListInstanceGroupMembershipsOptions.Builder() + .instanceGroupId("testString") + .limit(Long.valueOf("10")) + .build(); + + List allResults = new ArrayList<>(); + InstanceGroupMembershipsPager pager = new InstanceGroupMembershipsPager(vpcService, listInstanceGroupMembershipsOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); + } + + // Test the listInstanceGroupMemberships operation using the InstanceGroupMembershipsPager.getAll() method + @Test + public void testListInstanceGroupMembershipsWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"memberships\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"delete_instance_on_membership_delete\":true,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741\",\"id\":\"r006-32c8210b-fd1a-409f-8966-de85bbfd3741\",\"instance\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"name\":\"my-instance\"},\"instance_template\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"id\":\"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"name\":\"my-instance-template\"},\"name\":\"my-instance-group-membership\",\"pool_member\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\",\"id\":\"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"},\"status\":\"deleting\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"memberships\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"delete_instance_on_membership_delete\":true,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741\",\"id\":\"r006-32c8210b-fd1a-409f-8966-de85bbfd3741\",\"instance\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"name\":\"my-instance\"},\"instance_template\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"id\":\"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"name\":\"my-instance-template\"},\"name\":\"my-instance-group-membership\",\"pool_member\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\",\"id\":\"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"},\"status\":\"deleting\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListInstanceGroupMembershipsOptions listInstanceGroupMembershipsOptions = new ListInstanceGroupMembershipsOptions.Builder() + .instanceGroupId("testString") + .limit(Long.valueOf("10")) + .build(); + + InstanceGroupMembershipsPager pager = new InstanceGroupMembershipsPager(vpcService, listInstanceGroupMembershipsOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); + } + + // Test the listInstanceGroups operation with a valid options model parameter + @Test + public void testListInstanceGroupsWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"instance_groups\": [{\"application_port\": 22, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"id\": \"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"instance_template\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"id\": \"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"name\": \"my-instance-template\"}, \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"load_balancer_pool\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}, \"managers\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"id\": \"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"name\": \"my-instance-group-manager\"}], \"membership_count\": 10, \"name\": \"my-instance-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"deleting\", \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listInstanceGroupsPath = "/instance_groups"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the ListInstanceGroupsOptions model + ListInstanceGroupsOptions listInstanceGroupsOptionsModel = new ListInstanceGroupsOptions.Builder() + .start("testString") + .limit(Long.valueOf("10")) + .build(); + + // Invoke listInstanceGroups() with a valid options model and verify the result + Response response = vpcService.listInstanceGroups(listInstanceGroupsOptionsModel).execute(); + assertNotNull(response); + InstanceGroupCollection responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "GET"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, listInstanceGroupsPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + } + + // Test the listInstanceGroups operation with and without retries enabled + @Test + public void testListInstanceGroupsWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testListInstanceGroupsWOptions(); + + vpcService.disableRetries(); + testListInstanceGroupsWOptions(); + } + + // Test the listInstanceGroups operation using the InstanceGroupsPager.getNext() method + @Test + public void testListInstanceGroupsWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"instance_groups\":[{\"application_port\":22,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\",\"id\":\"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\",\"instance_template\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"id\":\"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"name\":\"my-instance-template\"},\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"load_balancer_pool\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"id\":\"r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"name\":\"my-load-balancer-pool\"},\"managers\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"id\":\"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"name\":\"my-instance-group-manager\"}],\"membership_count\":10,\"name\":\"my-instance-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"status\":\"deleting\",\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"instance_groups\":[{\"application_port\":22,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\",\"id\":\"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\",\"instance_template\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"id\":\"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"name\":\"my-instance-template\"},\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"load_balancer_pool\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"id\":\"r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"name\":\"my-load-balancer-pool\"},\"managers\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"id\":\"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"name\":\"my-instance-group-manager\"}],\"membership_count\":10,\"name\":\"my-instance-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"status\":\"deleting\",\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListInstanceGroupsOptions listInstanceGroupsOptions = new ListInstanceGroupsOptions.Builder() + .limit(Long.valueOf("10")) + .build(); + + List allResults = new ArrayList<>(); + InstanceGroupsPager pager = new InstanceGroupsPager(vpcService, listInstanceGroupsOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); + } + + // Test the listInstanceGroups operation using the InstanceGroupsPager.getAll() method + @Test + public void testListInstanceGroupsWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"instance_groups\":[{\"application_port\":22,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\",\"id\":\"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\",\"instance_template\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"id\":\"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"name\":\"my-instance-template\"},\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"load_balancer_pool\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"id\":\"r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"name\":\"my-load-balancer-pool\"},\"managers\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"id\":\"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"name\":\"my-instance-group-manager\"}],\"membership_count\":10,\"name\":\"my-instance-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"status\":\"deleting\",\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"instance_groups\":[{\"application_port\":22,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\",\"id\":\"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\",\"instance_template\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"id\":\"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"name\":\"my-instance-template\"},\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"load_balancer_pool\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"id\":\"r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"name\":\"my-load-balancer-pool\"},\"managers\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"id\":\"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\",\"name\":\"my-instance-group-manager\"}],\"membership_count\":10,\"name\":\"my-instance-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"status\":\"deleting\",\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"updated_at\":\"2019-01-01T12:00:00.000Z\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListInstanceGroupsOptions listInstanceGroupsOptions = new ListInstanceGroupsOptions.Builder() + .limit(Long.valueOf("10")) + .build(); + + InstanceGroupsPager pager = new InstanceGroupsPager(vpcService, listInstanceGroupsOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); + } + + // Test the updateInstanceGroup operation with a valid options model parameter + @Test + public void testUpdateInstanceGroupWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"application_port\": 22, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"id\": \"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"instance_template\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"id\": \"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"name\": \"my-instance-template\"}, \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"load_balancer_pool\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}, \"managers\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"id\": \"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"name\": \"my-instance-group-manager\"}], \"membership_count\": 10, \"name\": \"my-instance-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"deleting\", \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String updateInstanceGroupPath = "/instance_groups/testString"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the InstanceTemplateIdentityById model + InstanceTemplateIdentityById instanceTemplateIdentityModel = new InstanceTemplateIdentityById.Builder() + .id("0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2") + .build(); + + // Construct an instance of the LoadBalancerIdentityById model + LoadBalancerIdentityById loadBalancerIdentityModel = new LoadBalancerIdentityById.Builder() + .id("r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + .build(); + + // Construct an instance of the LoadBalancerPoolIdentityLoadBalancerPoolIdentityById model + LoadBalancerPoolIdentityLoadBalancerPoolIdentityById loadBalancerPoolIdentityModel = new LoadBalancerPoolIdentityLoadBalancerPoolIdentityById.Builder() + .id("r006-70294e14-4e61-11e8-bcf4-0242ac110004") + .build(); + + // Construct an instance of the SubnetIdentityById model + SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() + .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + .build(); + + // Construct an instance of the InstanceGroupPatch model + InstanceGroupPatch instanceGroupPatchModel = new InstanceGroupPatch.Builder() + .applicationPort(Long.valueOf("22")) + .instanceTemplate(instanceTemplateIdentityModel) + .loadBalancer(loadBalancerIdentityModel) + .loadBalancerPool(loadBalancerPoolIdentityModel) + .membershipCount(Long.valueOf("20")) + .name("my-instance-group") + .subnets(java.util.Arrays.asList(subnetIdentityModel)) + .build(); + Map instanceGroupPatchModelAsPatch = instanceGroupPatchModel.asPatch(); + + // Construct an instance of the UpdateInstanceGroupOptions model + UpdateInstanceGroupOptions updateInstanceGroupOptionsModel = new UpdateInstanceGroupOptions.Builder() + .id("testString") + .instanceGroupPatch(instanceGroupPatchModelAsPatch) + .build(); + + // Invoke updateInstanceGroup() with a valid options model and verify the result + Response response = vpcService.updateInstanceGroup(updateInstanceGroupOptionsModel).execute(); + assertNotNull(response); + InstanceGroup responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "PATCH"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, updateInstanceGroupPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the updateInstanceGroup operation with and without retries enabled + @Test + public void testUpdateInstanceGroupWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testUpdateInstanceGroupWOptions(); + + vpcService.disableRetries(); + testUpdateInstanceGroupWOptions(); + } + + // Test the updateInstanceGroup operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testUpdateInstanceGroupNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.updateInstanceGroup(null).execute(); + } + + // Test the updateInstanceGroupManager operation with a valid options model parameter + @Test + public void testUpdateInstanceGroupManagerWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"id\": \"r006-bd21f31f-8a05-4451-836d-ab0347e91fea\", \"management_enabled\": false, \"name\": \"my-instance-group-manager\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"aggregation_window\": 120, \"cooldown\": 210, \"manager_type\": \"autoscale\", \"max_membership_count\": 10, \"min_membership_count\": 10, \"policies\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"id\": \"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"name\": \"my-instance-group-manager-policy\"}]}"; + String updateInstanceGroupManagerPath = "/instance_groups/testString/managers/testString"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the InstanceGroupManagerPatch model + InstanceGroupManagerPatch instanceGroupManagerPatchModel = new InstanceGroupManagerPatch.Builder() + .aggregationWindow(Long.valueOf("120")) + .cooldown(Long.valueOf("210")) + .managementEnabled(false) + .maxMembershipCount(Long.valueOf("10")) + .minMembershipCount(Long.valueOf("10")) + .name("my-instance-group-manager") + .build(); + Map instanceGroupManagerPatchModelAsPatch = instanceGroupManagerPatchModel.asPatch(); + + // Construct an instance of the UpdateInstanceGroupManagerOptions model + UpdateInstanceGroupManagerOptions updateInstanceGroupManagerOptionsModel = new UpdateInstanceGroupManagerOptions.Builder() + .instanceGroupId("testString") + .id("testString") + .instanceGroupManagerPatch(instanceGroupManagerPatchModelAsPatch) + .build(); + + // Invoke updateInstanceGroupManager() with a valid options model and verify the result + Response response = vpcService.updateInstanceGroupManager(updateInstanceGroupManagerOptionsModel).execute(); + assertNotNull(response); + InstanceGroupManager responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "PATCH"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, updateInstanceGroupManagerPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the updateInstanceGroupManager operation with and without retries enabled + @Test + public void testUpdateInstanceGroupManagerWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testUpdateInstanceGroupManagerWOptions(); + + vpcService.disableRetries(); + testUpdateInstanceGroupManagerWOptions(); + } + + // Test the updateInstanceGroupManager operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testUpdateInstanceGroupManagerNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.updateInstanceGroupManager(null).execute(); + } + + // Test the updateInstanceGroupManagerAction operation with a valid options model parameter + @Test + public void testUpdateInstanceGroupManagerActionWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"auto_delete\": true, \"auto_delete_timeout\": 24, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\", \"id\": \"r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7\", \"name\": \"my-instance-group-manager-action\", \"resource_type\": \"instance_group_manager_action\", \"status\": \"active\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"action_type\": \"scheduled\", \"cron_spec\": \"30 */2 * * 1-5\", \"last_applied_at\": \"2019-01-01T12:00:00.000Z\", \"next_run_at\": \"2019-01-01T12:00:00.000Z\", \"group\": {\"membership_count\": 10}}"; + String updateInstanceGroupManagerActionPath = "/instance_groups/testString/managers/testString/actions/testString"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the InstanceGroupManagerActionGroupPatch model + InstanceGroupManagerActionGroupPatch instanceGroupManagerActionGroupPatchModel = new InstanceGroupManagerActionGroupPatch.Builder() + .membershipCount(Long.valueOf("10")) + .build(); + + // Construct an instance of the InstanceGroupManagerActionManagerPatch model + InstanceGroupManagerActionManagerPatch instanceGroupManagerActionManagerPatchModel = new InstanceGroupManagerActionManagerPatch.Builder() + .maxMembershipCount(Long.valueOf("10")) + .minMembershipCount(Long.valueOf("10")) + .build(); + + // Construct an instance of the InstanceGroupManagerActionPatch model + InstanceGroupManagerActionPatch instanceGroupManagerActionPatchModel = new InstanceGroupManagerActionPatch.Builder() + .autoDelete(false) + .autoDeleteTimeout(Long.valueOf("24")) + .cronSpec("30 */2 * * 1-5") + .group(instanceGroupManagerActionGroupPatchModel) + .manager(instanceGroupManagerActionManagerPatchModel) + .name("my-instance-group-manager-action") + .runAt(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) + .build(); + Map instanceGroupManagerActionPatchModelAsPatch = instanceGroupManagerActionPatchModel.asPatch(); + + // Construct an instance of the UpdateInstanceGroupManagerActionOptions model + UpdateInstanceGroupManagerActionOptions updateInstanceGroupManagerActionOptionsModel = new UpdateInstanceGroupManagerActionOptions.Builder() + .instanceGroupId("testString") + .instanceGroupManagerId("testString") + .id("testString") + .instanceGroupManagerActionPatch(instanceGroupManagerActionPatchModelAsPatch) + .build(); + + // Invoke updateInstanceGroupManagerAction() with a valid options model and verify the result + Response response = vpcService.updateInstanceGroupManagerAction(updateInstanceGroupManagerActionOptionsModel).execute(); + assertNotNull(response); + InstanceGroupManagerAction responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "PATCH"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, updateInstanceGroupManagerActionPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the updateInstanceGroupManagerAction operation with and without retries enabled + @Test + public void testUpdateInstanceGroupManagerActionWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testUpdateInstanceGroupManagerActionWOptions(); + + vpcService.disableRetries(); + testUpdateInstanceGroupManagerActionWOptions(); + } + + // Test the updateInstanceGroupManagerAction operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testUpdateInstanceGroupManagerActionNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.updateInstanceGroupManagerAction(null).execute(); + } + + // Test the updateInstanceGroupManagerPolicy operation with a valid options model parameter + @Test + public void testUpdateInstanceGroupManagerPolicyWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"id\": \"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7\", \"name\": \"my-instance-group-manager-policy\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"metric_type\": \"cpu\", \"metric_value\": 0, \"policy_type\": \"target\"}"; + String updateInstanceGroupManagerPolicyPath = "/instance_groups/testString/managers/testString/policies/testString"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the InstanceGroupManagerPolicyPatch model + InstanceGroupManagerPolicyPatch instanceGroupManagerPolicyPatchModel = new InstanceGroupManagerPolicyPatch.Builder() + .metricType("cpu") + .metricValue(Long.valueOf("75")) + .name("my-instance-group-manager-policy") + .build(); + Map instanceGroupManagerPolicyPatchModelAsPatch = instanceGroupManagerPolicyPatchModel.asPatch(); + + // Construct an instance of the UpdateInstanceGroupManagerPolicyOptions model + UpdateInstanceGroupManagerPolicyOptions updateInstanceGroupManagerPolicyOptionsModel = new UpdateInstanceGroupManagerPolicyOptions.Builder() + .instanceGroupId("testString") + .instanceGroupManagerId("testString") + .id("testString") + .instanceGroupManagerPolicyPatch(instanceGroupManagerPolicyPatchModelAsPatch) + .build(); + + // Invoke updateInstanceGroupManagerPolicy() with a valid options model and verify the result + Response response = vpcService.updateInstanceGroupManagerPolicy(updateInstanceGroupManagerPolicyOptionsModel).execute(); + assertNotNull(response); + InstanceGroupManagerPolicy responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "PATCH"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, updateInstanceGroupManagerPolicyPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the updateInstanceGroupManagerPolicy operation with and without retries enabled + @Test + public void testUpdateInstanceGroupManagerPolicyWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testUpdateInstanceGroupManagerPolicyWOptions(); + + vpcService.disableRetries(); + testUpdateInstanceGroupManagerPolicyWOptions(); + } + + // Test the updateInstanceGroupManagerPolicy operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testUpdateInstanceGroupManagerPolicyNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.updateInstanceGroupManagerPolicy(null).execute(); + } + + // Test the updateInstanceGroupMembership operation with a valid options model parameter + @Test + public void testUpdateInstanceGroupMembershipWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"delete_instance_on_membership_delete\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741\", \"id\": \"r006-32c8210b-fd1a-409f-8966-de85bbfd3741\", \"instance\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}, \"instance_template\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"id\": \"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"name\": \"my-instance-template\"}, \"name\": \"my-instance-group-membership\", \"pool_member\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}, \"status\": \"deleting\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}"; + String updateInstanceGroupMembershipPath = "/instance_groups/testString/memberships/testString"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the InstanceGroupMembershipPatch model + InstanceGroupMembershipPatch instanceGroupMembershipPatchModel = new InstanceGroupMembershipPatch.Builder() + .deleteInstanceOnMembershipDelete(false) + .name("my-instance-group-membership") + .build(); + Map instanceGroupMembershipPatchModelAsPatch = instanceGroupMembershipPatchModel.asPatch(); + + // Construct an instance of the UpdateInstanceGroupMembershipOptions model + UpdateInstanceGroupMembershipOptions updateInstanceGroupMembershipOptionsModel = new UpdateInstanceGroupMembershipOptions.Builder() + .instanceGroupId("testString") + .id("testString") + .instanceGroupMembershipPatch(instanceGroupMembershipPatchModelAsPatch) + .build(); + + // Invoke updateInstanceGroupMembership() with a valid options model and verify the result + Response response = vpcService.updateInstanceGroupMembership(updateInstanceGroupMembershipOptionsModel).execute(); + assertNotNull(response); + InstanceGroupMembership responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "PATCH"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, updateInstanceGroupMembershipPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the updateInstanceGroupMembership operation with and without retries enabled + @Test + public void testUpdateInstanceGroupMembershipWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testUpdateInstanceGroupMembershipWOptions(); + + vpcService.disableRetries(); + testUpdateInstanceGroupMembershipWOptions(); + } + + // Test the updateInstanceGroupMembership operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testUpdateInstanceGroupMembershipNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.updateInstanceGroupMembership(null).execute(); + } + + // Test the createInstanceTemplate operation with a valid options model parameter + @Test + public void testCreateInstanceTemplateWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"availability_policy\": {\"host_failure\": \"restart\"}, \"cluster_network_attachments\": [{\"cluster_network_interface\": {\"auto_delete\": false, \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\"}, \"subnet\": {\"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\"}}, \"name\": \"my-instance-network-attachment\"}], \"confidential_compute_mode\": \"disabled\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"default_trusted_profile\": {\"auto_link\": false, \"target\": {\"id\": \"Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5\"}}, \"enable_secure_boot\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"id\": \"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"keys\": [{\"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\"}], \"metadata_service\": {\"enabled\": false, \"protocol\": \"https\", \"response_hop_limit\": 2}, \"name\": \"my-instance-template\", \"placement_target\": {\"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\"}, \"profile\": {\"name\": \"bx2-4x16\"}, \"reservation_affinity\": {\"policy\": \"automatic\", \"pool\": [{\"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\"}]}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"total_volume_bandwidth\": 500, \"user_data\": \"userData\", \"volume_attachments\": [{\"delete_volume_on_instance_delete\": false, \"name\": \"my-volume-attachment\", \"volume\": {\"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\"}}], \"volume_bandwidth_qos_mode\": \"pooled\", \"vpc\": {\"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\"}, \"boot_volume_attachment\": {\"delete_volume_on_instance_delete\": true, \"name\": \"my-volume-attachment\", \"volume\": {\"allowed_use\": {\"api_version\": \"2024-06-23\", \"bare_metal_server\": \"enable_secure_boot == true\", \"instance\": \"gpu.count > 0 && enable_secure_boot == true\"}, \"bandwidth\": 1000, \"capacity\": 100, \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"iops\": 10000, \"name\": \"my-volume\", \"profile\": {\"name\": \"general-purpose\"}, \"resource_group\": {\"id\": \"fee82deba12e4c0fb69c3b09d1f12345\"}, \"user_tags\": [\"userTags\"]}}, \"image\": {\"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\"}, \"zone\": {\"name\": \"us-south-1\"}, \"network_attachments\": [{\"name\": \"my-instance-network-attachment\", \"virtual_network_interface\": {\"allow_ip_spoofing\": true, \"auto_delete\": false, \"enable_infrastructure_nat\": true, \"ips\": [{\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}], \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"id\": \"fee82deba12e4c0fb69c3b09d1f12345\"}, \"security_groups\": [{\"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\"}], \"subnet\": {\"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\"}}}], \"primary_network_attachment\": {\"name\": \"my-instance-network-attachment\", \"virtual_network_interface\": {\"allow_ip_spoofing\": true, \"auto_delete\": false, \"enable_infrastructure_nat\": true, \"ips\": [{\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}], \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"id\": \"fee82deba12e4c0fb69c3b09d1f12345\"}, \"security_groups\": [{\"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\"}], \"subnet\": {\"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\"}}}}"; + String createInstanceTemplatePath = "/instance/templates"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(201) + .setBody(mockResponseBody)); + + // Construct an instance of the InstanceAvailabilityPolicyPrototype model + InstanceAvailabilityPolicyPrototype instanceAvailabilityPolicyPrototypeModel = new InstanceAvailabilityPolicyPrototype.Builder() + .hostFailure("restart") + .build(); + + // Construct an instance of the ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext model + ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext clusterNetworkInterfacePrimaryIpPrototypeModel = new ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext.Builder() + .address("10.0.0.5") + .autoDelete(false) + .name("my-cluster-network-subnet-reserved-ip") + .build(); + + // Construct an instance of the ClusterNetworkSubnetIdentityById model + ClusterNetworkSubnetIdentityById clusterNetworkSubnetIdentityModel = new ClusterNetworkSubnetIdentityById.Builder() + .id("0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930") + .build(); + + // Construct an instance of the InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment model + InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceModel = new InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment.Builder() + .autoDelete(false) + .name("my-cluster-network-interface") + .primaryIp(clusterNetworkInterfacePrimaryIpPrototypeModel) + .subnet(clusterNetworkSubnetIdentityModel) + .build(); + + // Construct an instance of the InstanceClusterNetworkAttachmentPrototypeInstanceContext model + InstanceClusterNetworkAttachmentPrototypeInstanceContext instanceClusterNetworkAttachmentPrototypeInstanceContextModel = new InstanceClusterNetworkAttachmentPrototypeInstanceContext.Builder() + .clusterNetworkInterface(instanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceModel) + .name("my-instance-network-attachment") + .build(); + + // Construct an instance of the TrustedProfileIdentityById model + TrustedProfileIdentityById trustedProfileIdentityModel = new TrustedProfileIdentityById.Builder() + .id("Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5") + .build(); + + // Construct an instance of the InstanceDefaultTrustedProfilePrototype model + InstanceDefaultTrustedProfilePrototype instanceDefaultTrustedProfilePrototypeModel = new InstanceDefaultTrustedProfilePrototype.Builder() + .autoLink(false) + .target(trustedProfileIdentityModel) + .build(); + + // Construct an instance of the KeyIdentityById model + KeyIdentityById keyIdentityModel = new KeyIdentityById.Builder() + .id("r006-82679077-ac3b-4c10-be16-63e9c21f0f45") + .build(); + + // Construct an instance of the InstanceMetadataServicePrototype model + InstanceMetadataServicePrototype instanceMetadataServicePrototypeModel = new InstanceMetadataServicePrototype.Builder() + .enabled(false) + .protocol("https") + .responseHopLimit(Long.valueOf("2")) + .build(); + + // Construct an instance of the InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById model + InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instancePlacementTargetPrototypeModel = new InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById.Builder() + .id("0717-1e09281b-f177-46fb-baf1-bc152b2e391a") + .build(); + + // Construct an instance of the InstanceProfileIdentityByName model + InstanceProfileIdentityByName instanceProfileIdentityModel = new InstanceProfileIdentityByName.Builder() + .name("bx2-4x16") + .build(); + + // Construct an instance of the ReservationIdentityById model + ReservationIdentityById reservationIdentityModel = new ReservationIdentityById.Builder() + .id("0717-ba49df72-37b8-43ac-98da-f8e029de0e63") + .build(); + + // Construct an instance of the InstanceReservationAffinityPrototype model + InstanceReservationAffinityPrototype instanceReservationAffinityPrototypeModel = new InstanceReservationAffinityPrototype.Builder() + .policy("automatic") + .pool(java.util.Arrays.asList(reservationIdentityModel)) + .build(); + + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") + .build(); + + // Construct an instance of the VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById model + VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById volumeAttachmentPrototypeVolumeModel = new VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById.Builder() + .id("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + .build(); + + // Construct an instance of the VolumeAttachmentPrototype model + VolumeAttachmentPrototype volumeAttachmentPrototypeModel = new VolumeAttachmentPrototype.Builder() + .deleteVolumeOnInstanceDelete(false) + .name("my-volume-attachment") + .volume(volumeAttachmentPrototypeVolumeModel) + .build(); + + // Construct an instance of the VPCIdentityById model + VPCIdentityById vpcIdentityModel = new VPCIdentityById.Builder() + .id("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .build(); + + // Construct an instance of the VolumeAllowedUsePrototype model + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModel = new VolumeAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + + // Construct an instance of the EncryptionKeyIdentityByCRN model + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() + .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + .build(); + + // Construct an instance of the VolumeProfileIdentityByName model + VolumeProfileIdentityByName volumeProfileIdentityModel = new VolumeProfileIdentityByName.Builder() + .name("general-purpose") + .build(); + + // Construct an instance of the VolumePrototypeInstanceByImageContext model + VolumePrototypeInstanceByImageContext volumePrototypeInstanceByImageContextModel = new VolumePrototypeInstanceByImageContext.Builder() + .allowedUse(volumeAllowedUsePrototypeModel) + .bandwidth(Long.valueOf("1000")) + .capacity(Long.valueOf("100")) + .encryptionKey(encryptionKeyIdentityModel) + .iops(Long.valueOf("10000")) + .name("my-boot-volume") + .profile(volumeProfileIdentityModel) + .resourceGroup(resourceGroupIdentityModel) + .userTags(java.util.Arrays.asList()) + .build(); + + // Construct an instance of the VolumeAttachmentPrototypeInstanceByImageContext model + VolumeAttachmentPrototypeInstanceByImageContext volumeAttachmentPrototypeInstanceByImageContextModel = new VolumeAttachmentPrototypeInstanceByImageContext.Builder() + .deleteVolumeOnInstanceDelete(true) + .name("my-volume-attachment") + .volume(volumePrototypeInstanceByImageContextModel) + .build(); + + // Construct an instance of the ImageIdentityById model + ImageIdentityById imageIdentityModel = new ImageIdentityById.Builder() + .id("r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") + .build(); + + // Construct an instance of the ZoneIdentityByName model + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() + .name("us-south-1") + .build(); + + // Construct an instance of the VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext model + VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtualNetworkInterfaceIpPrototypeModel = new VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext.Builder() + .address("10.0.0.5") + .autoDelete(false) + .name("my-reserved-ip") + .build(); + + // Construct an instance of the VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model + VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext virtualNetworkInterfacePrimaryIpPrototypeModel = new VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext.Builder() + .address("10.0.0.5") + .autoDelete(false) + .name("my-reserved-ip") + .build(); + + // Construct an instance of the SecurityGroupIdentityById model + SecurityGroupIdentityById securityGroupIdentityModel = new SecurityGroupIdentityById.Builder() + .id("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + .build(); + + // Construct an instance of the SubnetIdentityById model + SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() + .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + .build(); + + // Construct an instance of the InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext model + InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext instanceNetworkAttachmentPrototypeVirtualNetworkInterfaceModel = new InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext.Builder() + .allowIpSpoofing(true) + .autoDelete(false) + .enableInfrastructureNat(true) + .ips(java.util.Arrays.asList(virtualNetworkInterfaceIpPrototypeModel)) + .name("my-virtual-network-interface") + .primaryIp(virtualNetworkInterfacePrimaryIpPrototypeModel) + .protocolStateFilteringMode("auto") + .resourceGroup(resourceGroupIdentityModel) + .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) + .subnet(subnetIdentityModel) + .build(); + + // Construct an instance of the InstanceNetworkAttachmentPrototype model + InstanceNetworkAttachmentPrototype instanceNetworkAttachmentPrototypeModel = new InstanceNetworkAttachmentPrototype.Builder() + .name("my-instance-network-attachment") + .virtualNetworkInterface(instanceNetworkAttachmentPrototypeVirtualNetworkInterfaceModel) + .build(); + + // Construct an instance of the InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment model + InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment instanceTemplatePrototypeModel = new InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment.Builder() + .availabilityPolicy(instanceAvailabilityPolicyPrototypeModel) + .clusterNetworkAttachments(java.util.Arrays.asList(instanceClusterNetworkAttachmentPrototypeInstanceContextModel)) + .confidentialComputeMode("disabled") + .defaultTrustedProfile(instanceDefaultTrustedProfilePrototypeModel) + .enableSecureBoot(true) + .keys(java.util.Arrays.asList(keyIdentityModel)) + .metadataService(instanceMetadataServicePrototypeModel) + .name("my-instance") + .placementTarget(instancePlacementTargetPrototypeModel) + .profile(instanceProfileIdentityModel) + .reservationAffinity(instanceReservationAffinityPrototypeModel) + .resourceGroup(resourceGroupIdentityModel) + .totalVolumeBandwidth(Long.valueOf("500")) + .userData("testString") + .volumeAttachments(java.util.Arrays.asList(volumeAttachmentPrototypeModel)) + .volumeBandwidthQosMode("pooled") + .vpc(vpcIdentityModel) + .bootVolumeAttachment(volumeAttachmentPrototypeInstanceByImageContextModel) + .image(imageIdentityModel) + .zone(zoneIdentityModel) + .networkAttachments(java.util.Arrays.asList(instanceNetworkAttachmentPrototypeModel)) + .primaryNetworkAttachment(instanceNetworkAttachmentPrototypeModel) + .build(); + + // Construct an instance of the CreateInstanceTemplateOptions model + CreateInstanceTemplateOptions createInstanceTemplateOptionsModel = new CreateInstanceTemplateOptions.Builder() + .instanceTemplatePrototype(instanceTemplatePrototypeModel) + .build(); + + // Invoke createInstanceTemplate() with a valid options model and verify the result + Response response = vpcService.createInstanceTemplate(createInstanceTemplateOptionsModel).execute(); + assertNotNull(response); + InstanceTemplate responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "POST"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, createInstanceTemplatePath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the createInstanceTemplate operation with and without retries enabled + @Test + public void testCreateInstanceTemplateWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testCreateInstanceTemplateWOptions(); + + vpcService.disableRetries(); + testCreateInstanceTemplateWOptions(); + } + + // Test the createInstanceTemplate operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testCreateInstanceTemplateNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.createInstanceTemplate(null).execute(); + } + + // Test the deleteInstanceTemplate operation with a valid options model parameter + @Test + public void testDeleteInstanceTemplateWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = ""; + String deleteInstanceTemplatePath = "/instance/templates/testString"; + server.enqueue(new MockResponse() + .setResponseCode(204) + .setBody(mockResponseBody)); + + // Construct an instance of the DeleteInstanceTemplateOptions model + DeleteInstanceTemplateOptions deleteInstanceTemplateOptionsModel = new DeleteInstanceTemplateOptions.Builder() + .id("testString") + .build(); + + // Invoke deleteInstanceTemplate() with a valid options model and verify the result + Response response = vpcService.deleteInstanceTemplate(deleteInstanceTemplateOptionsModel).execute(); + assertNotNull(response); + Void responseObj = response.getResult(); + assertNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "DELETE"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, deleteInstanceTemplatePath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the deleteInstanceTemplate operation with and without retries enabled + @Test + public void testDeleteInstanceTemplateWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testDeleteInstanceTemplateWOptions(); + + vpcService.disableRetries(); + testDeleteInstanceTemplateWOptions(); + } + + // Test the deleteInstanceTemplate operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testDeleteInstanceTemplateNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.deleteInstanceTemplate(null).execute(); + } + + // Test the getInstanceTemplate operation with a valid options model parameter + @Test + public void testGetInstanceTemplateWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"availability_policy\": {\"host_failure\": \"restart\"}, \"cluster_network_attachments\": [{\"cluster_network_interface\": {\"auto_delete\": false, \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\"}, \"subnet\": {\"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\"}}, \"name\": \"my-instance-network-attachment\"}], \"confidential_compute_mode\": \"disabled\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"default_trusted_profile\": {\"auto_link\": false, \"target\": {\"id\": \"Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5\"}}, \"enable_secure_boot\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"id\": \"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"keys\": [{\"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\"}], \"metadata_service\": {\"enabled\": false, \"protocol\": \"https\", \"response_hop_limit\": 2}, \"name\": \"my-instance-template\", \"placement_target\": {\"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\"}, \"profile\": {\"name\": \"bx2-4x16\"}, \"reservation_affinity\": {\"policy\": \"automatic\", \"pool\": [{\"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\"}]}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"total_volume_bandwidth\": 500, \"user_data\": \"userData\", \"volume_attachments\": [{\"delete_volume_on_instance_delete\": false, \"name\": \"my-volume-attachment\", \"volume\": {\"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\"}}], \"volume_bandwidth_qos_mode\": \"pooled\", \"vpc\": {\"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\"}, \"boot_volume_attachment\": {\"delete_volume_on_instance_delete\": true, \"name\": \"my-volume-attachment\", \"volume\": {\"allowed_use\": {\"api_version\": \"2024-06-23\", \"bare_metal_server\": \"enable_secure_boot == true\", \"instance\": \"gpu.count > 0 && enable_secure_boot == true\"}, \"bandwidth\": 1000, \"capacity\": 100, \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"iops\": 10000, \"name\": \"my-volume\", \"profile\": {\"name\": \"general-purpose\"}, \"resource_group\": {\"id\": \"fee82deba12e4c0fb69c3b09d1f12345\"}, \"user_tags\": [\"userTags\"]}}, \"image\": {\"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\"}, \"zone\": {\"name\": \"us-south-1\"}, \"network_attachments\": [{\"name\": \"my-instance-network-attachment\", \"virtual_network_interface\": {\"allow_ip_spoofing\": true, \"auto_delete\": false, \"enable_infrastructure_nat\": true, \"ips\": [{\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}], \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"id\": \"fee82deba12e4c0fb69c3b09d1f12345\"}, \"security_groups\": [{\"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\"}], \"subnet\": {\"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\"}}}], \"primary_network_attachment\": {\"name\": \"my-instance-network-attachment\", \"virtual_network_interface\": {\"allow_ip_spoofing\": true, \"auto_delete\": false, \"enable_infrastructure_nat\": true, \"ips\": [{\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}], \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"id\": \"fee82deba12e4c0fb69c3b09d1f12345\"}, \"security_groups\": [{\"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\"}], \"subnet\": {\"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\"}}}}"; + String getInstanceTemplatePath = "/instance/templates/testString"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the GetInstanceTemplateOptions model + GetInstanceTemplateOptions getInstanceTemplateOptionsModel = new GetInstanceTemplateOptions.Builder() + .id("testString") + .build(); + + // Invoke getInstanceTemplate() with a valid options model and verify the result + Response response = vpcService.getInstanceTemplate(getInstanceTemplateOptionsModel).execute(); + assertNotNull(response); + InstanceTemplate responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "GET"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, getInstanceTemplatePath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the getInstanceTemplate operation with and without retries enabled + @Test + public void testGetInstanceTemplateWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testGetInstanceTemplateWOptions(); + + vpcService.disableRetries(); + testGetInstanceTemplateWOptions(); + } + + // Test the getInstanceTemplate operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testGetInstanceTemplateNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.getInstanceTemplate(null).execute(); + } + + // Test the listInstanceTemplates operation with a valid options model parameter + @Test + public void testListInstanceTemplatesWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"templates\": [{\"availability_policy\": {\"host_failure\": \"restart\"}, \"cluster_network_attachments\": [{\"cluster_network_interface\": {\"auto_delete\": false, \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\"}, \"subnet\": {\"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\"}}, \"name\": \"my-instance-network-attachment\"}], \"confidential_compute_mode\": \"disabled\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"default_trusted_profile\": {\"auto_link\": false, \"target\": {\"id\": \"Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5\"}}, \"enable_secure_boot\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"id\": \"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"keys\": [{\"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\"}], \"metadata_service\": {\"enabled\": false, \"protocol\": \"https\", \"response_hop_limit\": 2}, \"name\": \"my-instance-template\", \"placement_target\": {\"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\"}, \"profile\": {\"name\": \"bx2-4x16\"}, \"reservation_affinity\": {\"policy\": \"automatic\", \"pool\": [{\"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\"}]}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"total_volume_bandwidth\": 500, \"user_data\": \"userData\", \"volume_attachments\": [{\"delete_volume_on_instance_delete\": false, \"name\": \"my-volume-attachment\", \"volume\": {\"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\"}}], \"volume_bandwidth_qos_mode\": \"pooled\", \"vpc\": {\"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\"}, \"boot_volume_attachment\": {\"delete_volume_on_instance_delete\": true, \"name\": \"my-volume-attachment\", \"volume\": {\"allowed_use\": {\"api_version\": \"2024-06-23\", \"bare_metal_server\": \"enable_secure_boot == true\", \"instance\": \"gpu.count > 0 && enable_secure_boot == true\"}, \"bandwidth\": 1000, \"capacity\": 100, \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"iops\": 10000, \"name\": \"my-volume\", \"profile\": {\"name\": \"general-purpose\"}, \"resource_group\": {\"id\": \"fee82deba12e4c0fb69c3b09d1f12345\"}, \"user_tags\": [\"userTags\"]}}, \"image\": {\"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\"}, \"zone\": {\"name\": \"us-south-1\"}, \"network_attachments\": [{\"name\": \"my-instance-network-attachment\", \"virtual_network_interface\": {\"allow_ip_spoofing\": true, \"auto_delete\": false, \"enable_infrastructure_nat\": true, \"ips\": [{\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}], \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"id\": \"fee82deba12e4c0fb69c3b09d1f12345\"}, \"security_groups\": [{\"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\"}], \"subnet\": {\"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\"}}}], \"primary_network_attachment\": {\"name\": \"my-instance-network-attachment\", \"virtual_network_interface\": {\"allow_ip_spoofing\": true, \"auto_delete\": false, \"enable_infrastructure_nat\": true, \"ips\": [{\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}], \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"id\": \"fee82deba12e4c0fb69c3b09d1f12345\"}, \"security_groups\": [{\"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\"}], \"subnet\": {\"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\"}}}}], \"total_count\": 132}"; + String listInstanceTemplatesPath = "/instance/templates"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the ListInstanceTemplatesOptions model + ListInstanceTemplatesOptions listInstanceTemplatesOptionsModel = new ListInstanceTemplatesOptions(); + + // Invoke listInstanceTemplates() with a valid options model and verify the result + Response response = vpcService.listInstanceTemplates(listInstanceTemplatesOptionsModel).execute(); + assertNotNull(response); + InstanceTemplateCollection responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "GET"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, listInstanceTemplatesPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the listInstanceTemplates operation with and without retries enabled + @Test + public void testListInstanceTemplatesWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testListInstanceTemplatesWOptions(); + + vpcService.disableRetries(); + testListInstanceTemplatesWOptions(); + } + + // Test the updateInstanceTemplate operation with a valid options model parameter + @Test + public void testUpdateInstanceTemplateWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"availability_policy\": {\"host_failure\": \"restart\"}, \"cluster_network_attachments\": [{\"cluster_network_interface\": {\"auto_delete\": false, \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\"}, \"subnet\": {\"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\"}}, \"name\": \"my-instance-network-attachment\"}], \"confidential_compute_mode\": \"disabled\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"default_trusted_profile\": {\"auto_link\": false, \"target\": {\"id\": \"Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5\"}}, \"enable_secure_boot\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"id\": \"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"keys\": [{\"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\"}], \"metadata_service\": {\"enabled\": false, \"protocol\": \"https\", \"response_hop_limit\": 2}, \"name\": \"my-instance-template\", \"placement_target\": {\"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\"}, \"profile\": {\"name\": \"bx2-4x16\"}, \"reservation_affinity\": {\"policy\": \"automatic\", \"pool\": [{\"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\"}]}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"total_volume_bandwidth\": 500, \"user_data\": \"userData\", \"volume_attachments\": [{\"delete_volume_on_instance_delete\": false, \"name\": \"my-volume-attachment\", \"volume\": {\"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\"}}], \"volume_bandwidth_qos_mode\": \"pooled\", \"vpc\": {\"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\"}, \"boot_volume_attachment\": {\"delete_volume_on_instance_delete\": true, \"name\": \"my-volume-attachment\", \"volume\": {\"allowed_use\": {\"api_version\": \"2024-06-23\", \"bare_metal_server\": \"enable_secure_boot == true\", \"instance\": \"gpu.count > 0 && enable_secure_boot == true\"}, \"bandwidth\": 1000, \"capacity\": 100, \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"iops\": 10000, \"name\": \"my-volume\", \"profile\": {\"name\": \"general-purpose\"}, \"resource_group\": {\"id\": \"fee82deba12e4c0fb69c3b09d1f12345\"}, \"user_tags\": [\"userTags\"]}}, \"image\": {\"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\"}, \"zone\": {\"name\": \"us-south-1\"}, \"network_attachments\": [{\"name\": \"my-instance-network-attachment\", \"virtual_network_interface\": {\"allow_ip_spoofing\": true, \"auto_delete\": false, \"enable_infrastructure_nat\": true, \"ips\": [{\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}], \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"id\": \"fee82deba12e4c0fb69c3b09d1f12345\"}, \"security_groups\": [{\"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\"}], \"subnet\": {\"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\"}}}], \"primary_network_attachment\": {\"name\": \"my-instance-network-attachment\", \"virtual_network_interface\": {\"allow_ip_spoofing\": true, \"auto_delete\": false, \"enable_infrastructure_nat\": true, \"ips\": [{\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}], \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"id\": \"fee82deba12e4c0fb69c3b09d1f12345\"}, \"security_groups\": [{\"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\"}], \"subnet\": {\"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\"}}}}"; + String updateInstanceTemplatePath = "/instance/templates/testString"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the InstanceTemplatePatch model + InstanceTemplatePatch instanceTemplatePatchModel = new InstanceTemplatePatch.Builder() + .name("my-instance-template-updated") + .build(); + Map instanceTemplatePatchModelAsPatch = instanceTemplatePatchModel.asPatch(); + + // Construct an instance of the UpdateInstanceTemplateOptions model + UpdateInstanceTemplateOptions updateInstanceTemplateOptionsModel = new UpdateInstanceTemplateOptions.Builder() + .id("testString") + .instanceTemplatePatch(instanceTemplatePatchModelAsPatch) + .build(); + + // Invoke updateInstanceTemplate() with a valid options model and verify the result + Response response = vpcService.updateInstanceTemplate(updateInstanceTemplateOptionsModel).execute(); + assertNotNull(response); + InstanceTemplate responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "PATCH"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, updateInstanceTemplatePath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the updateInstanceTemplate operation with and without retries enabled + @Test + public void testUpdateInstanceTemplateWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testUpdateInstanceTemplateWOptions(); + + vpcService.disableRetries(); + testUpdateInstanceTemplateWOptions(); + } + + // Test the updateInstanceTemplate operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testUpdateInstanceTemplateNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.updateInstanceTemplate(null).execute(); + } + + // Test the addInstanceNetworkInterfaceFloatingIp operation with a valid options model parameter + @Test + public void testAddInstanceNetworkInterfaceFloatingIpWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"address\": \"203.0.113.1\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"available\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String addInstanceNetworkInterfaceFloatingIpPath = "/instances/testString/network_interfaces/testString/floating_ips/testString"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(201) + .setBody(mockResponseBody)); + + // Construct an instance of the AddInstanceNetworkInterfaceFloatingIpOptions model + AddInstanceNetworkInterfaceFloatingIpOptions addInstanceNetworkInterfaceFloatingIpOptionsModel = new AddInstanceNetworkInterfaceFloatingIpOptions.Builder() + .instanceId("testString") + .networkInterfaceId("testString") + .id("testString") + .build(); + + // Invoke addInstanceNetworkInterfaceFloatingIp() with a valid options model and verify the result + Response response = vpcService.addInstanceNetworkInterfaceFloatingIp(addInstanceNetworkInterfaceFloatingIpOptionsModel).execute(); + assertNotNull(response); + FloatingIP 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, addInstanceNetworkInterfaceFloatingIpPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the addInstanceNetworkInterfaceFloatingIp operation with and without retries enabled + @Test + public void testAddInstanceNetworkInterfaceFloatingIpWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testAddInstanceNetworkInterfaceFloatingIpWOptions(); + + vpcService.disableRetries(); + testAddInstanceNetworkInterfaceFloatingIpWOptions(); + } + + // Test the addInstanceNetworkInterfaceFloatingIp operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testAddInstanceNetworkInterfaceFloatingIpNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.addInstanceNetworkInterfaceFloatingIp(null).execute(); + } + + // Test the createClusterNetworkAttachment operation with a valid options model parameter + @Test + public void testCreateClusterNetworkAttachmentWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"before\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}, \"cluster_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"address\": \"10.1.0.6\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"resource_type\": \"cluster_network_subnet_reserved_ip\"}, \"resource_type\": \"cluster_network_interface\", \"subnet\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\"}}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}"; + String createClusterNetworkAttachmentPath = "/instances/testString/cluster_network_attachments"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(201) + .setBody(mockResponseBody)); + + // Construct an instance of the ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext model + ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext clusterNetworkInterfacePrimaryIpPrototypeModel = new ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext.Builder() + .address("10.0.0.5") + .autoDelete(false) + .name("my-cluster-network-subnet-reserved-ip") + .build(); + + // Construct an instance of the ClusterNetworkSubnetIdentityById model + ClusterNetworkSubnetIdentityById clusterNetworkSubnetIdentityModel = new ClusterNetworkSubnetIdentityById.Builder() + .id("0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930") + .build(); + + // Construct an instance of the InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment model + InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceModel = new InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment.Builder() + .autoDelete(false) + .name("my-cluster-network-interface") + .primaryIp(clusterNetworkInterfacePrimaryIpPrototypeModel) + .subnet(clusterNetworkSubnetIdentityModel) + .build(); + + // Construct an instance of the InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById model + InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById instanceClusterNetworkAttachmentBeforePrototypeModel = new InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById.Builder() + .id("0717-fb880975-db45-4459-8548-64e3995ac213") + .build(); + + // Construct an instance of the CreateClusterNetworkAttachmentOptions model + CreateClusterNetworkAttachmentOptions createClusterNetworkAttachmentOptionsModel = new CreateClusterNetworkAttachmentOptions.Builder() + .instanceId("testString") + .clusterNetworkInterface(instanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceModel) + .before(instanceClusterNetworkAttachmentBeforePrototypeModel) + .name("my-instance-network-attachment") + .build(); + + // Invoke createClusterNetworkAttachment() with a valid options model and verify the result + Response response = vpcService.createClusterNetworkAttachment(createClusterNetworkAttachmentOptionsModel).execute(); + assertNotNull(response); + InstanceClusterNetworkAttachment responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "POST"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, createClusterNetworkAttachmentPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the createClusterNetworkAttachment operation with and without retries enabled + @Test + public void testCreateClusterNetworkAttachmentWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testCreateClusterNetworkAttachmentWOptions(); + + vpcService.disableRetries(); + testCreateClusterNetworkAttachmentWOptions(); + } + + // Test the createClusterNetworkAttachment operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testCreateClusterNetworkAttachmentNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.createClusterNetworkAttachment(null).execute(); + } + + // Test the createInstance operation with a valid options model parameter + @Test + public void testCreateInstanceWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"availability_policy\": {\"host_failure\": \"restart\"}, \"bandwidth\": 1000, \"boot_volume_attachment\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"name\": \"my-volume-attachment\", \"volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"resource_type\": \"volume\"}}, \"catalog_offering\": {\"plan\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}}, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"cluster_network\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"id\": \"0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"name\": \"my-cluster-network\", \"resource_type\": \"cluster_network\"}, \"cluster_network_attachments\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}], \"confidential_compute_mode\": \"disabled\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"dedicated_host\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"name\": \"my-host\", \"resource_type\": \"dedicated_host\"}, \"disks\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"interface_type\": \"nvme\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\", \"size\": 100}], \"enable_secure_boot\": true, \"gpu\": {\"count\": 1, \"manufacturer\": \"amd\", \"memory\": 1, \"model\": \"Tesla V100\"}, \"health_reasons\": [{\"code\": \"reservation_expired\", \"message\": \"The reservation cannot be used because it has expired.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"memory\": 64, \"metadata_service\": {\"enabled\": false, \"protocol\": \"http\", \"response_hop_limit\": 1}, \"name\": \"my-instance\", \"network_attachments\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"instance_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}], \"network_interfaces\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}], \"numa_count\": 2, \"placement_target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"id\": \"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"name\": \"my-dedicated-host-group\", \"resource_type\": \"dedicated_host_group\"}, \"primary_network_attachment\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"instance_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}, \"primary_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}, \"reservation\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}, \"reservation_affinity\": {\"policy\": \"automatic\", \"pool\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}]}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"instance\", \"startable\": false, \"status\": \"deleting\", \"status_reasons\": [{\"code\": \"cannot_start_storage\", \"message\": \"The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"total_network_bandwidth\": 500, \"total_volume_bandwidth\": 500, \"vcpu\": {\"architecture\": \"amd64\", \"count\": 4, \"manufacturer\": \"intel\"}, \"volume_attachments\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"name\": \"my-volume-attachment\", \"volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"resource_type\": \"volume\"}}], \"volume_bandwidth_qos_mode\": \"pooled\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String createInstancePath = "/instances"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(201) + .setBody(mockResponseBody)); + + // Construct an instance of the InstanceAvailabilityPolicyPrototype model + InstanceAvailabilityPolicyPrototype instanceAvailabilityPolicyPrototypeModel = new InstanceAvailabilityPolicyPrototype.Builder() + .hostFailure("restart") + .build(); + + // Construct an instance of the ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext model + ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext clusterNetworkInterfacePrimaryIpPrototypeModel = new ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext.Builder() + .address("10.0.0.5") + .autoDelete(false) + .name("my-cluster-network-subnet-reserved-ip") + .build(); + + // Construct an instance of the ClusterNetworkSubnetIdentityById model + ClusterNetworkSubnetIdentityById clusterNetworkSubnetIdentityModel = new ClusterNetworkSubnetIdentityById.Builder() + .id("0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930") + .build(); + + // Construct an instance of the InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment model + InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceModel = new InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment.Builder() + .autoDelete(false) + .name("my-cluster-network-interface") + .primaryIp(clusterNetworkInterfacePrimaryIpPrototypeModel) + .subnet(clusterNetworkSubnetIdentityModel) + .build(); + + // Construct an instance of the InstanceClusterNetworkAttachmentPrototypeInstanceContext model + InstanceClusterNetworkAttachmentPrototypeInstanceContext instanceClusterNetworkAttachmentPrototypeInstanceContextModel = new InstanceClusterNetworkAttachmentPrototypeInstanceContext.Builder() + .clusterNetworkInterface(instanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceModel) + .name("my-instance-network-attachment") + .build(); + + // Construct an instance of the TrustedProfileIdentityById model + TrustedProfileIdentityById trustedProfileIdentityModel = new TrustedProfileIdentityById.Builder() + .id("Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5") + .build(); + + // Construct an instance of the InstanceDefaultTrustedProfilePrototype model + InstanceDefaultTrustedProfilePrototype instanceDefaultTrustedProfilePrototypeModel = new InstanceDefaultTrustedProfilePrototype.Builder() + .autoLink(false) + .target(trustedProfileIdentityModel) + .build(); + + // Construct an instance of the KeyIdentityById model + KeyIdentityById keyIdentityModel = new KeyIdentityById.Builder() + .id("r006-82679077-ac3b-4c10-be16-63e9c21f0f45") + .build(); + + // Construct an instance of the InstanceMetadataServicePrototype model + InstanceMetadataServicePrototype instanceMetadataServicePrototypeModel = new InstanceMetadataServicePrototype.Builder() + .enabled(false) + .protocol("https") + .responseHopLimit(Long.valueOf("2")) + .build(); + + // Construct an instance of the InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById model + InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instancePlacementTargetPrototypeModel = new InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById.Builder() + .id("r006-418fe842-a3e9-47b9-a938-1aa5bd632871") + .build(); + + // Construct an instance of the InstanceProfileIdentityByName model + InstanceProfileIdentityByName instanceProfileIdentityModel = new InstanceProfileIdentityByName.Builder() + .name("bx2-2x8") + .build(); + + // Construct an instance of the ReservationIdentityById model + ReservationIdentityById reservationIdentityModel = new ReservationIdentityById.Builder() + .id("0717-ba49df72-37b8-43ac-98da-f8e029de0e63") + .build(); + + // Construct an instance of the InstanceReservationAffinityPrototype model + InstanceReservationAffinityPrototype instanceReservationAffinityPrototypeModel = new InstanceReservationAffinityPrototype.Builder() + .policy("automatic") + .pool(java.util.Arrays.asList(reservationIdentityModel)) + .build(); + + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") + .build(); + + // Construct an instance of the VolumeProfileIdentityByName model + VolumeProfileIdentityByName volumeProfileIdentityModel = new VolumeProfileIdentityByName.Builder() + .name("5iops-tier") + .build(); + + // Construct an instance of the EncryptionKeyIdentityByCRN model + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() + .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + .build(); + + // Construct an instance of the VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity model + VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity volumeAttachmentPrototypeVolumeModel = new VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity.Builder() + .bandwidth(Long.valueOf("1000")) + .iops(Long.valueOf("10000")) + .name("my-data-volume") + .profile(volumeProfileIdentityModel) + .resourceGroup(resourceGroupIdentityModel) + .userTags(java.util.Arrays.asList()) + .capacity(Long.valueOf("1000")) + .encryptionKey(encryptionKeyIdentityModel) + .build(); + + // Construct an instance of the VolumeAttachmentPrototype model + VolumeAttachmentPrototype volumeAttachmentPrototypeModel = new VolumeAttachmentPrototype.Builder() + .deleteVolumeOnInstanceDelete(false) + .name("my-volume-attachment") + .volume(volumeAttachmentPrototypeVolumeModel) + .build(); + + // Construct an instance of the VPCIdentityById model + VPCIdentityById vpcIdentityModel = new VPCIdentityById.Builder() + .id("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .build(); + + // Construct an instance of the VolumeAllowedUsePrototype model + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModel = new VolumeAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + + // Construct an instance of the VolumePrototypeInstanceByImageContext model + VolumePrototypeInstanceByImageContext volumePrototypeInstanceByImageContextModel = new VolumePrototypeInstanceByImageContext.Builder() + .allowedUse(volumeAllowedUsePrototypeModel) + .bandwidth(Long.valueOf("1000")) + .capacity(Long.valueOf("100")) + .encryptionKey(encryptionKeyIdentityModel) + .iops(Long.valueOf("10000")) + .name("my-boot-volume") + .profile(volumeProfileIdentityModel) + .resourceGroup(resourceGroupIdentityModel) + .userTags(java.util.Arrays.asList()) + .build(); + + // Construct an instance of the VolumeAttachmentPrototypeInstanceByImageContext model + VolumeAttachmentPrototypeInstanceByImageContext volumeAttachmentPrototypeInstanceByImageContextModel = new VolumeAttachmentPrototypeInstanceByImageContext.Builder() + .deleteVolumeOnInstanceDelete(true) + .name("my-volume-attachment") + .volume(volumePrototypeInstanceByImageContextModel) + .build(); + + // Construct an instance of the ImageIdentityById model + ImageIdentityById imageIdentityModel = new ImageIdentityById.Builder() + .id("r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") + .build(); + + // Construct an instance of the ZoneIdentityByName model + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() + .name("us-south-1") + .build(); + + // Construct an instance of the NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext model + NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext networkInterfaceIpPrototypeModel = new NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext.Builder() + .address("10.0.0.5") + .autoDelete(false) + .name("my-reserved-ip") + .build(); + + // Construct an instance of the SecurityGroupIdentityById model + SecurityGroupIdentityById securityGroupIdentityModel = new SecurityGroupIdentityById.Builder() + .id("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + .build(); + + // Construct an instance of the SubnetIdentityById model + SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() + .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + .build(); + + // Construct an instance of the NetworkInterfacePrototype model + NetworkInterfacePrototype networkInterfacePrototypeModel = new NetworkInterfacePrototype.Builder() + .allowIpSpoofing(true) + .name("my-instance-network-interface") + .primaryIp(networkInterfaceIpPrototypeModel) + .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) + .subnet(subnetIdentityModel) + .build(); + + // Construct an instance of the InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface model + InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface instancePrototypeModel = new InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface.Builder() + .availabilityPolicy(instanceAvailabilityPolicyPrototypeModel) + .clusterNetworkAttachments(java.util.Arrays.asList(instanceClusterNetworkAttachmentPrototypeInstanceContextModel)) + .confidentialComputeMode("disabled") + .defaultTrustedProfile(instanceDefaultTrustedProfilePrototypeModel) + .enableSecureBoot(true) + .keys(java.util.Arrays.asList(keyIdentityModel)) + .metadataService(instanceMetadataServicePrototypeModel) + .name("my-instance") + .placementTarget(instancePlacementTargetPrototypeModel) + .profile(instanceProfileIdentityModel) + .reservationAffinity(instanceReservationAffinityPrototypeModel) + .resourceGroup(resourceGroupIdentityModel) + .totalVolumeBandwidth(Long.valueOf("500")) + .userData("testString") + .volumeAttachments(java.util.Arrays.asList(volumeAttachmentPrototypeModel)) + .volumeBandwidthQosMode("pooled") + .vpc(vpcIdentityModel) + .bootVolumeAttachment(volumeAttachmentPrototypeInstanceByImageContextModel) + .image(imageIdentityModel) + .zone(zoneIdentityModel) + .networkInterfaces(java.util.Arrays.asList(networkInterfacePrototypeModel)) + .primaryNetworkInterface(networkInterfacePrototypeModel) + .build(); + + // Construct an instance of the CreateInstanceOptions model + CreateInstanceOptions createInstanceOptionsModel = new CreateInstanceOptions.Builder() + .instancePrototype(instancePrototypeModel) + .build(); + + // Invoke createInstance() with a valid options model and verify the result + Response response = vpcService.createInstance(createInstanceOptionsModel).execute(); + assertNotNull(response); + Instance responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "POST"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, createInstancePath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the createInstance operation with and without retries enabled + @Test + public void testCreateInstanceWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testCreateInstanceWOptions(); + + vpcService.disableRetries(); + testCreateInstanceWOptions(); + } + + // Test the createInstance operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testCreateInstanceNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.createInstance(null).execute(); + } + + // Test the createInstanceAction operation with a valid options model parameter + @Test + public void testCreateInstanceActionWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"completed_at\": \"2019-01-01T12:00:00.000Z\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"force\": false, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/actions/109a1b6e-1242-4de1-be44-38705e9474ed\", \"id\": \"109a1b6e-1242-4de1-be44-38705e9474ed\", \"started_at\": \"2019-01-01T12:00:00.000Z\", \"status\": \"completed\", \"type\": \"reboot\"}"; + String createInstanceActionPath = "/instances/testString/actions"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(201) + .setBody(mockResponseBody)); + + // Construct an instance of the CreateInstanceActionOptions model + CreateInstanceActionOptions createInstanceActionOptionsModel = new CreateInstanceActionOptions.Builder() + .instanceId("testString") + .type("reboot") + .force(true) + .build(); + + // Invoke createInstanceAction() with a valid options model and verify the result + Response response = vpcService.createInstanceAction(createInstanceActionOptionsModel).execute(); + assertNotNull(response); + InstanceAction responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "POST"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, createInstanceActionPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the createInstanceAction operation with and without retries enabled + @Test + public void testCreateInstanceActionWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testCreateInstanceActionWOptions(); + + vpcService.disableRetries(); + testCreateInstanceActionWOptions(); + } + + // Test the createInstanceAction operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testCreateInstanceActionNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.createInstanceAction(null).execute(); + } + + // Test the createInstanceConsoleAccessToken operation with a valid options model parameter + @Test + public void testCreateInstanceConsoleAccessTokenWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjoiYWEyNDMyYjFmYTRkNGFjZTg5MWU5YjgwZmMxMDRlMzQiLCJzZWNyZXQiOiJRVzRnWlhoaGJYQnNaU0J6WldOeVpYUUsiLCJleHAiOjE3MjYwNzU1OTR9.UFDVzzGJ54Go9Z4jgyPSLG49zNx-AjHTQrJA6ee8KLI\", \"console_type\": \"serial\", \"created_at\": \"2020-07-27T21:50:14.000Z\", \"expires_at\": \"2020-07-27T21:51:14.000Z\", \"force\": false, \"href\": \"wss://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/console?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjoiYWEyNDMyYjFmYTRkNGFjZTg5MWU5YjgwZmMxMDRlMzQiLCJzZWNyZXQiOiJRVzRnWlhoaGJYQnNaU0J6WldOeVpYUUsiLCJleHAiOjE3MjYwNzU1OTR9.UFDVzzGJ54Go9Z4jgyPSLG49zNx-AjHTQrJA6ee8KLI\"}"; + String createInstanceConsoleAccessTokenPath = "/instances/testString/console_access_token"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the CreateInstanceConsoleAccessTokenOptions model + CreateInstanceConsoleAccessTokenOptions createInstanceConsoleAccessTokenOptionsModel = new CreateInstanceConsoleAccessTokenOptions.Builder() + .instanceId("testString") + .consoleType("serial") + .force(false) + .build(); + + // Invoke createInstanceConsoleAccessToken() with a valid options model and verify the result + Response response = vpcService.createInstanceConsoleAccessToken(createInstanceConsoleAccessTokenOptionsModel).execute(); + assertNotNull(response); + InstanceConsoleAccessToken responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "POST"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, createInstanceConsoleAccessTokenPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the createInstanceConsoleAccessToken operation with and without retries enabled + @Test + public void testCreateInstanceConsoleAccessTokenWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testCreateInstanceConsoleAccessTokenWOptions(); + + vpcService.disableRetries(); + testCreateInstanceConsoleAccessTokenWOptions(); + } + + // Test the createInstanceConsoleAccessToken operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testCreateInstanceConsoleAccessTokenNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.createInstanceConsoleAccessToken(null).execute(); + } + + // Test the createInstanceNetworkAttachment operation with a valid options model parameter + @Test + public void testCreateInstanceNetworkAttachmentWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"lifecycle_state\": \"stable\", \"name\": \"my-instance-network-attachment\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"instance_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}"; + String createInstanceNetworkAttachmentPath = "/instances/testString/network_attachments"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(201) + .setBody(mockResponseBody)); + + // Construct an instance of the VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext model + VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtualNetworkInterfaceIpPrototypeModel = new VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext.Builder() + .address("10.0.0.5") + .autoDelete(false) + .name("my-reserved-ip") + .build(); + + // Construct an instance of the VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model + VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext virtualNetworkInterfacePrimaryIpPrototypeModel = new VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext.Builder() + .address("10.0.0.7") + .autoDelete(false) + .name("my-reserved-ip") + .build(); + + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") + .build(); + + // Construct an instance of the SecurityGroupIdentityById model + SecurityGroupIdentityById securityGroupIdentityModel = new SecurityGroupIdentityById.Builder() + .id("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + .build(); + + // Construct an instance of the SubnetIdentityById model + SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() + .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + .build(); + + // Construct an instance of the InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext model + InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext instanceNetworkAttachmentPrototypeVirtualNetworkInterfaceModel = new InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext.Builder() + .allowIpSpoofing(true) + .autoDelete(false) + .enableInfrastructureNat(true) + .ips(java.util.Arrays.asList(virtualNetworkInterfaceIpPrototypeModel)) + .name("my-virtual-network-interface") + .primaryIp(virtualNetworkInterfacePrimaryIpPrototypeModel) + .protocolStateFilteringMode("auto") + .resourceGroup(resourceGroupIdentityModel) + .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) + .subnet(subnetIdentityModel) + .build(); + + // Construct an instance of the CreateInstanceNetworkAttachmentOptions model + CreateInstanceNetworkAttachmentOptions createInstanceNetworkAttachmentOptionsModel = new CreateInstanceNetworkAttachmentOptions.Builder() + .instanceId("testString") + .virtualNetworkInterface(instanceNetworkAttachmentPrototypeVirtualNetworkInterfaceModel) + .name("testString") + .build(); + + // Invoke createInstanceNetworkAttachment() with a valid options model and verify the result + Response response = vpcService.createInstanceNetworkAttachment(createInstanceNetworkAttachmentOptionsModel).execute(); assertNotNull(response); - InstanceGroupManagerPolicy responseObj = response.getResult(); + InstanceNetworkAttachment responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateInstanceGroupManagerPolicyPath); + assertEquals(parsedPath, createInstanceNetworkAttachmentPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateInstanceGroupManagerPolicy operation with and without retries enabled + // Test the createInstanceNetworkAttachment operation with and without retries enabled @Test - public void testUpdateInstanceGroupManagerPolicyWRetries() throws Throwable { + public void testCreateInstanceNetworkAttachmentWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateInstanceGroupManagerPolicyWOptions(); + testCreateInstanceNetworkAttachmentWOptions(); vpcService.disableRetries(); - testUpdateInstanceGroupManagerPolicyWOptions(); + testCreateInstanceNetworkAttachmentWOptions(); } - // Test the updateInstanceGroupManagerPolicy operation with a null options model (negative test) + // Test the createInstanceNetworkAttachment operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateInstanceGroupManagerPolicyNoOptions() throws Throwable { + public void testCreateInstanceNetworkAttachmentNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateInstanceGroupManagerPolicy(null).execute(); + vpcService.createInstanceNetworkAttachment(null).execute(); } - // Test the deleteInstanceGroupMemberships operation with a valid options model parameter + // Test the createInstanceNetworkInterface operation with a valid options model parameter @Test - public void testDeleteInstanceGroupMembershipsWOptions() throws Throwable { + public void testCreateInstanceNetworkInterfaceWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteInstanceGroupMembershipsPath = "/instance_groups/testString/memberships"; + String mockResponseBody = "{\"allow_ip_spoofing\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"floating_ips\": [{\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}], \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"status\": \"available\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\"}"; + String createInstanceNetworkInterfacePath = "/instances/testString/network_interfaces"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the DeleteInstanceGroupMembershipsOptions model - DeleteInstanceGroupMembershipsOptions deleteInstanceGroupMembershipsOptionsModel = new DeleteInstanceGroupMembershipsOptions.Builder() - .instanceGroupId("testString") + // Construct an instance of the SubnetIdentityById model + SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() + .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") .build(); - // Invoke deleteInstanceGroupMemberships() with a valid options model and verify the result - Response response = vpcService.deleteInstanceGroupMemberships(deleteInstanceGroupMembershipsOptionsModel).execute(); + // Construct an instance of the NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext model + NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext networkInterfaceIpPrototypeModel = new NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext.Builder() + .address("10.0.0.5") + .autoDelete(false) + .name("my-reserved-ip") + .build(); + + // Construct an instance of the SecurityGroupIdentityById model + SecurityGroupIdentityById securityGroupIdentityModel = new SecurityGroupIdentityById.Builder() + .id("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + .build(); + + // Construct an instance of the CreateInstanceNetworkInterfaceOptions model + CreateInstanceNetworkInterfaceOptions createInstanceNetworkInterfaceOptionsModel = new CreateInstanceNetworkInterfaceOptions.Builder() + .instanceId("testString") + .subnet(subnetIdentityModel) + .allowIpSpoofing(true) + .name("my-instance-network-interface") + .primaryIp(networkInterfaceIpPrototypeModel) + .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) + .build(); + + // Invoke createInstanceNetworkInterface() with a valid options model and verify the result + Response response = vpcService.createInstanceNetworkInterface(createInstanceNetworkInterfaceOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + NetworkInterface 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(), "DELETE"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteInstanceGroupMembershipsPath); + assertEquals(parsedPath, createInstanceNetworkInterfacePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteInstanceGroupMemberships operation with and without retries enabled + // Test the createInstanceNetworkInterface operation with and without retries enabled @Test - public void testDeleteInstanceGroupMembershipsWRetries() throws Throwable { + public void testCreateInstanceNetworkInterfaceWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteInstanceGroupMembershipsWOptions(); + testCreateInstanceNetworkInterfaceWOptions(); vpcService.disableRetries(); - testDeleteInstanceGroupMembershipsWOptions(); + testCreateInstanceNetworkInterfaceWOptions(); } - // Test the deleteInstanceGroupMemberships operation with a null options model (negative test) + // Test the createInstanceNetworkInterface operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteInstanceGroupMembershipsNoOptions() throws Throwable { + public void testCreateInstanceNetworkInterfaceNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteInstanceGroupMemberships(null).execute(); + vpcService.createInstanceNetworkInterface(null).execute(); } - // Test the listInstanceGroupMemberships operation with a valid options model parameter + // Test the createInstanceVolumeAttachment operation with a valid options model parameter @Test - public void testListInstanceGroupMembershipsWOptions() throws Throwable { + public void testCreateInstanceVolumeAttachmentWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"memberships\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"delete_instance_on_membership_delete\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741\", \"id\": \"r006-32c8210b-fd1a-409f-8966-de85bbfd3741\", \"instance\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}, \"instance_template\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"id\": \"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"name\": \"my-instance-template\"}, \"name\": \"my-instance-group-membership\", \"pool_member\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}, \"status\": \"deleting\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}], \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listInstanceGroupMembershipsPath = "/instance_groups/testString/memberships"; + String mockResponseBody = "{\"bandwidth\": 250, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"delete_volume_on_instance_delete\": true, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"name\": \"my-volume-attachment\", \"status\": \"attached\", \"type\": \"boot\", \"volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"resource_type\": \"volume\"}}"; + String createInstanceVolumeAttachmentPath = "/instances/testString/volume_attachments"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the ListInstanceGroupMembershipsOptions model - ListInstanceGroupMembershipsOptions listInstanceGroupMembershipsOptionsModel = new ListInstanceGroupMembershipsOptions.Builder() - .instanceGroupId("testString") - .start("testString") - .limit(Long.valueOf("10")) + // Construct an instance of the VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById model + VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById volumeAttachmentPrototypeVolumeModel = new VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById.Builder() + .id("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") .build(); - // Invoke listInstanceGroupMemberships() with a valid options model and verify the result - Response response = vpcService.listInstanceGroupMemberships(listInstanceGroupMembershipsOptionsModel).execute(); + // Construct an instance of the CreateInstanceVolumeAttachmentOptions model + CreateInstanceVolumeAttachmentOptions createInstanceVolumeAttachmentOptionsModel = new CreateInstanceVolumeAttachmentOptions.Builder() + .instanceId("testString") + .volume(volumeAttachmentPrototypeVolumeModel) + .deleteVolumeOnInstanceDelete(false) + .name("my-volume-attachment") + .build(); + + // Invoke createInstanceVolumeAttachment() with a valid options model and verify the result + Response response = vpcService.createInstanceVolumeAttachment(createInstanceVolumeAttachmentOptionsModel).execute(); assertNotNull(response); - InstanceGroupMembershipCollection responseObj = response.getResult(); + VolumeAttachment responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listInstanceGroupMembershipsPath); + assertEquals(parsedPath, createInstanceVolumeAttachmentPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the listInstanceGroupMemberships operation with and without retries enabled + // Test the createInstanceVolumeAttachment operation with and without retries enabled @Test - public void testListInstanceGroupMembershipsWRetries() throws Throwable { + public void testCreateInstanceVolumeAttachmentWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListInstanceGroupMembershipsWOptions(); + testCreateInstanceVolumeAttachmentWOptions(); vpcService.disableRetries(); - testListInstanceGroupMembershipsWOptions(); + testCreateInstanceVolumeAttachmentWOptions(); } - // Test the listInstanceGroupMemberships operation with a null options model (negative test) + // Test the createInstanceVolumeAttachment operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListInstanceGroupMembershipsNoOptions() throws Throwable { + public void testCreateInstanceVolumeAttachmentNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listInstanceGroupMemberships(null).execute(); - } - - // Test the listInstanceGroupMemberships operation using the InstanceGroupMembershipsPager.getNext() method - @Test - public void testListInstanceGroupMembershipsWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"memberships\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"delete_instance_on_membership_delete\":true,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741\",\"id\":\"r006-32c8210b-fd1a-409f-8966-de85bbfd3741\",\"instance\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"name\":\"my-instance\"},\"instance_template\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"id\":\"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"name\":\"my-instance-template\"},\"name\":\"my-instance-group-membership\",\"pool_member\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\",\"id\":\"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"},\"status\":\"deleting\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"memberships\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"delete_instance_on_membership_delete\":true,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741\",\"id\":\"r006-32c8210b-fd1a-409f-8966-de85bbfd3741\",\"instance\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"name\":\"my-instance\"},\"instance_template\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"id\":\"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"name\":\"my-instance-template\"},\"name\":\"my-instance-group-membership\",\"pool_member\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\",\"id\":\"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"},\"status\":\"deleting\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListInstanceGroupMembershipsOptions listInstanceGroupMembershipsOptions = new ListInstanceGroupMembershipsOptions.Builder() - .instanceGroupId("testString") - .limit(Long.valueOf("10")) - .build(); - - List allResults = new ArrayList<>(); - InstanceGroupMembershipsPager pager = new InstanceGroupMembershipsPager(vpcService, listInstanceGroupMembershipsOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + vpcService.createInstanceVolumeAttachment(null).execute(); } - - // Test the listInstanceGroupMemberships operation using the InstanceGroupMembershipsPager.getAll() method - @Test - public void testListInstanceGroupMembershipsWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"memberships\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"delete_instance_on_membership_delete\":true,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741\",\"id\":\"r006-32c8210b-fd1a-409f-8966-de85bbfd3741\",\"instance\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"name\":\"my-instance\"},\"instance_template\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"id\":\"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"name\":\"my-instance-template\"},\"name\":\"my-instance-group-membership\",\"pool_member\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\",\"id\":\"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"},\"status\":\"deleting\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"memberships\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"delete_instance_on_membership_delete\":true,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741\",\"id\":\"r006-32c8210b-fd1a-409f-8966-de85bbfd3741\",\"instance\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"name\":\"my-instance\"},\"instance_template\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"id\":\"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\",\"name\":\"my-instance-template\"},\"name\":\"my-instance-group-membership\",\"pool_member\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\",\"id\":\"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"},\"status\":\"deleting\",\"updated_at\":\"2019-01-01T12:00:00.000Z\"}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListInstanceGroupMembershipsOptions listInstanceGroupMembershipsOptions = new ListInstanceGroupMembershipsOptions.Builder() - .instanceGroupId("testString") - .limit(Long.valueOf("10")) - .build(); - InstanceGroupMembershipsPager pager = new InstanceGroupMembershipsPager(vpcService, listInstanceGroupMembershipsOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the deleteInstanceGroupMembership operation with a valid options model parameter + // Test the deleteInstance operation with a valid options model parameter @Test - public void testDeleteInstanceGroupMembershipWOptions() throws Throwable { + public void testDeleteInstanceWOptions() throws Throwable { // Register a mock response String mockResponseBody = ""; - String deleteInstanceGroupMembershipPath = "/instance_groups/testString/memberships/testString"; + String deleteInstancePath = "/instances/testString"; server.enqueue(new MockResponse() .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the DeleteInstanceGroupMembershipOptions model - DeleteInstanceGroupMembershipOptions deleteInstanceGroupMembershipOptionsModel = new DeleteInstanceGroupMembershipOptions.Builder() - .instanceGroupId("testString") + // Construct an instance of the DeleteInstanceOptions model + DeleteInstanceOptions deleteInstanceOptionsModel = new DeleteInstanceOptions.Builder() .id("testString") + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke deleteInstanceGroupMembership() with a valid options model and verify the result - Response response = vpcService.deleteInstanceGroupMembership(deleteInstanceGroupMembershipOptionsModel).execute(); + // Invoke deleteInstance() with a valid options model and verify the result + Response response = vpcService.deleteInstance(deleteInstanceOptionsModel).execute(); assertNotNull(response); Void responseObj = response.getResult(); assertNull(responseObj); @@ -11760,385 +14012,212 @@ public void testDeleteInstanceGroupMembershipWOptions() throws Throwable { assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteInstanceGroupMembershipPath); + assertEquals(parsedPath, deleteInstancePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteInstanceGroupMembership operation with and without retries enabled + // Test the deleteInstance operation with and without retries enabled @Test - public void testDeleteInstanceGroupMembershipWRetries() throws Throwable { + public void testDeleteInstanceWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteInstanceGroupMembershipWOptions(); + testDeleteInstanceWOptions(); vpcService.disableRetries(); - testDeleteInstanceGroupMembershipWOptions(); + testDeleteInstanceWOptions(); } - // Test the deleteInstanceGroupMembership operation with a null options model (negative test) + // Test the deleteInstance operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteInstanceGroupMembershipNoOptions() throws Throwable { + public void testDeleteInstanceNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteInstanceGroupMembership(null).execute(); + vpcService.deleteInstance(null).execute(); } - // Test the getInstanceGroupMembership operation with a valid options model parameter + // Test the deleteInstanceClusterNetworkAttachment operation with a valid options model parameter @Test - public void testGetInstanceGroupMembershipWOptions() throws Throwable { + public void testDeleteInstanceClusterNetworkAttachmentWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"delete_instance_on_membership_delete\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741\", \"id\": \"r006-32c8210b-fd1a-409f-8966-de85bbfd3741\", \"instance\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}, \"instance_template\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"id\": \"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"name\": \"my-instance-template\"}, \"name\": \"my-instance-group-membership\", \"pool_member\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}, \"status\": \"deleting\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}"; - String getInstanceGroupMembershipPath = "/instance_groups/testString/memberships/testString"; + String mockResponseBody = "{\"before\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}, \"cluster_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"address\": \"10.1.0.6\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"resource_type\": \"cluster_network_subnet_reserved_ip\"}, \"resource_type\": \"cluster_network_interface\", \"subnet\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\"}}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}"; + String deleteInstanceClusterNetworkAttachmentPath = "/instances/testString/cluster_network_attachments/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the GetInstanceGroupMembershipOptions model - GetInstanceGroupMembershipOptions getInstanceGroupMembershipOptionsModel = new GetInstanceGroupMembershipOptions.Builder() - .instanceGroupId("testString") + // Construct an instance of the DeleteInstanceClusterNetworkAttachmentOptions model + DeleteInstanceClusterNetworkAttachmentOptions deleteInstanceClusterNetworkAttachmentOptionsModel = new DeleteInstanceClusterNetworkAttachmentOptions.Builder() + .instanceId("testString") .id("testString") .build(); - // Invoke getInstanceGroupMembership() with a valid options model and verify the result - Response response = vpcService.getInstanceGroupMembership(getInstanceGroupMembershipOptionsModel).execute(); + // Invoke deleteInstanceClusterNetworkAttachment() with a valid options model and verify the result + Response response = vpcService.deleteInstanceClusterNetworkAttachment(deleteInstanceClusterNetworkAttachmentOptionsModel).execute(); assertNotNull(response); - InstanceGroupMembership responseObj = response.getResult(); + InstanceClusterNetworkAttachment responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getInstanceGroupMembershipPath); + assertEquals(parsedPath, deleteInstanceClusterNetworkAttachmentPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getInstanceGroupMembership operation with and without retries enabled + // Test the deleteInstanceClusterNetworkAttachment operation with and without retries enabled @Test - public void testGetInstanceGroupMembershipWRetries() throws Throwable { + public void testDeleteInstanceClusterNetworkAttachmentWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetInstanceGroupMembershipWOptions(); + testDeleteInstanceClusterNetworkAttachmentWOptions(); vpcService.disableRetries(); - testGetInstanceGroupMembershipWOptions(); + testDeleteInstanceClusterNetworkAttachmentWOptions(); } - // Test the getInstanceGroupMembership operation with a null options model (negative test) + // Test the deleteInstanceClusterNetworkAttachment operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetInstanceGroupMembershipNoOptions() throws Throwable { + public void testDeleteInstanceClusterNetworkAttachmentNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getInstanceGroupMembership(null).execute(); + vpcService.deleteInstanceClusterNetworkAttachment(null).execute(); } - // Test the updateInstanceGroupMembership operation with a valid options model parameter + // Test the deleteInstanceNetworkAttachment operation with a valid options model parameter @Test - public void testUpdateInstanceGroupMembershipWOptions() throws Throwable { + public void testDeleteInstanceNetworkAttachmentWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"delete_instance_on_membership_delete\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741\", \"id\": \"r006-32c8210b-fd1a-409f-8966-de85bbfd3741\", \"instance\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}, \"instance_template\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"id\": \"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2\", \"name\": \"my-instance-template\"}, \"name\": \"my-instance-group-membership\", \"pool_member\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}, \"status\": \"deleting\", \"updated_at\": \"2019-01-01T12:00:00.000Z\"}"; - String updateInstanceGroupMembershipPath = "/instance_groups/testString/memberships/testString"; + String mockResponseBody = ""; + String deleteInstanceNetworkAttachmentPath = "/instances/testString/network_attachments/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the InstanceGroupMembershipPatch model - InstanceGroupMembershipPatch instanceGroupMembershipPatchModel = new InstanceGroupMembershipPatch.Builder() - .deleteInstanceOnMembershipDelete(false) - .name("my-instance-group-membership") - .build(); - Map instanceGroupMembershipPatchModelAsPatch = instanceGroupMembershipPatchModel.asPatch(); - - // Construct an instance of the UpdateInstanceGroupMembershipOptions model - UpdateInstanceGroupMembershipOptions updateInstanceGroupMembershipOptionsModel = new UpdateInstanceGroupMembershipOptions.Builder() - .instanceGroupId("testString") + // Construct an instance of the DeleteInstanceNetworkAttachmentOptions model + DeleteInstanceNetworkAttachmentOptions deleteInstanceNetworkAttachmentOptionsModel = new DeleteInstanceNetworkAttachmentOptions.Builder() + .instanceId("testString") .id("testString") - .instanceGroupMembershipPatch(instanceGroupMembershipPatchModelAsPatch) .build(); - // Invoke updateInstanceGroupMembership() with a valid options model and verify the result - Response response = vpcService.updateInstanceGroupMembership(updateInstanceGroupMembershipOptionsModel).execute(); + // Invoke deleteInstanceNetworkAttachment() with a valid options model and verify the result + Response response = vpcService.deleteInstanceNetworkAttachment(deleteInstanceNetworkAttachmentOptionsModel).execute(); assertNotNull(response); - InstanceGroupMembership responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateInstanceGroupMembershipPath); + assertEquals(parsedPath, deleteInstanceNetworkAttachmentPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateInstanceGroupMembership operation with and without retries enabled + // Test the deleteInstanceNetworkAttachment operation with and without retries enabled @Test - public void testUpdateInstanceGroupMembershipWRetries() throws Throwable { + public void testDeleteInstanceNetworkAttachmentWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateInstanceGroupMembershipWOptions(); + testDeleteInstanceNetworkAttachmentWOptions(); vpcService.disableRetries(); - testUpdateInstanceGroupMembershipWOptions(); + testDeleteInstanceNetworkAttachmentWOptions(); } - // Test the updateInstanceGroupMembership operation with a null options model (negative test) + // Test the deleteInstanceNetworkAttachment operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateInstanceGroupMembershipNoOptions() throws Throwable { + public void testDeleteInstanceNetworkAttachmentNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateInstanceGroupMembership(null).execute(); - } - - // Test the listReservations operation with a valid options model parameter - @Test - public void testListReservationsWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"reservations\": [{\"affinity_policy\": \"automatic\", \"capacity\": {\"allocated\": 10, \"available\": 8, \"status\": \"allocated\", \"total\": 10, \"used\": 2}, \"committed_use\": {\"expiration_at\": \"2019-01-01T12:00:00.000Z\", \"expiration_policy\": \"release\", \"term\": \"term\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"lifecycle_state\": \"stable\", \"name\": \"my-reservation\", \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"reservation\", \"status\": \"activating\", \"status_reasons\": [{\"code\": \"cannot_activate_no_capacity_available\", \"message\": \"The reservation cannot be activated because capacity is unavailable\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"total_count\": 132}"; - String listReservationsPath = "/reservations"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the ListReservationsOptions model - ListReservationsOptions listReservationsOptionsModel = new ListReservationsOptions.Builder() - .start("testString") - .limit(Long.valueOf("10")) - .name("my-name") - .profileResourceType("testString") - .affinityPolicy("automatic") - .resourceGroupId("testString") - .zoneName("us-south-1") - .build(); - - // Invoke listReservations() with a valid options model and verify the result - Response response = vpcService.listReservations(listReservationsOptionsModel).execute(); - assertNotNull(response); - ReservationCollection responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listReservationsPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("name"), "my-name"); - assertEquals(query.get("profile.resource_type"), "testString"); - assertEquals(query.get("affinity_policy"), "automatic"); - assertEquals(query.get("resource_group.id"), "testString"); - assertEquals(query.get("zone.name"), "us-south-1"); - } - - // Test the listReservations operation with and without retries enabled - @Test - public void testListReservationsWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testListReservationsWOptions(); - - vpcService.disableRetries(); - testListReservationsWOptions(); - } - - // Test the listReservations operation using the ReservationsPager.getNext() method - @Test - public void testListReservationsWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"reservations\":[{\"affinity_policy\":\"automatic\",\"capacity\":{\"allocated\":10,\"available\":8,\"status\":\"allocated\",\"total\":10,\"used\":2},\"committed_use\":{\"expiration_at\":\"2019-01-01T12:00:00.000Z\",\"expiration_policy\":\"release\",\"term\":\"term\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"lifecycle_state\":\"stable\",\"name\":\"my-reservation\",\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"reservation\",\"status\":\"activating\",\"status_reasons\":[{\"code\":\"cannot_activate_no_capacity_available\",\"message\":\"The reservation cannot be activated because capacity is unavailable\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons\"}],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"reservations\":[{\"affinity_policy\":\"automatic\",\"capacity\":{\"allocated\":10,\"available\":8,\"status\":\"allocated\",\"total\":10,\"used\":2},\"committed_use\":{\"expiration_at\":\"2019-01-01T12:00:00.000Z\",\"expiration_policy\":\"release\",\"term\":\"term\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"lifecycle_state\":\"stable\",\"name\":\"my-reservation\",\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"reservation\",\"status\":\"activating\",\"status_reasons\":[{\"code\":\"cannot_activate_no_capacity_available\",\"message\":\"The reservation cannot be activated because capacity is unavailable\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons\"}],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListReservationsOptions listReservationsOptions = new ListReservationsOptions.Builder() - .limit(Long.valueOf("10")) - .name("my-name") - .profileResourceType("testString") - .affinityPolicy("automatic") - .resourceGroupId("testString") - .zoneName("us-south-1") - .build(); - - List allResults = new ArrayList<>(); - ReservationsPager pager = new ReservationsPager(vpcService, listReservationsOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + vpcService.deleteInstanceNetworkAttachment(null).execute(); } - - // Test the listReservations operation using the ReservationsPager.getAll() method - @Test - public void testListReservationsWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"reservations\":[{\"affinity_policy\":\"automatic\",\"capacity\":{\"allocated\":10,\"available\":8,\"status\":\"allocated\",\"total\":10,\"used\":2},\"committed_use\":{\"expiration_at\":\"2019-01-01T12:00:00.000Z\",\"expiration_policy\":\"release\",\"term\":\"term\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"lifecycle_state\":\"stable\",\"name\":\"my-reservation\",\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"reservation\",\"status\":\"activating\",\"status_reasons\":[{\"code\":\"cannot_activate_no_capacity_available\",\"message\":\"The reservation cannot be activated because capacity is unavailable\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons\"}],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"reservations\":[{\"affinity_policy\":\"automatic\",\"capacity\":{\"allocated\":10,\"available\":8,\"status\":\"allocated\",\"total\":10,\"used\":2},\"committed_use\":{\"expiration_at\":\"2019-01-01T12:00:00.000Z\",\"expiration_policy\":\"release\",\"term\":\"term\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"lifecycle_state\":\"stable\",\"name\":\"my-reservation\",\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"reservation\",\"status\":\"activating\",\"status_reasons\":[{\"code\":\"cannot_activate_no_capacity_available\",\"message\":\"The reservation cannot be activated because capacity is unavailable\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons\"}],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListReservationsOptions listReservationsOptions = new ListReservationsOptions.Builder() - .limit(Long.valueOf("10")) - .name("my-name") - .profileResourceType("testString") - .affinityPolicy("automatic") - .resourceGroupId("testString") - .zoneName("us-south-1") - .build(); - ReservationsPager pager = new ReservationsPager(vpcService, listReservationsOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the createReservation operation with a valid options model parameter + // Test the deleteInstanceNetworkInterface operation with a valid options model parameter @Test - public void testCreateReservationWOptions() throws Throwable { + public void testDeleteInstanceNetworkInterfaceWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"affinity_policy\": \"automatic\", \"capacity\": {\"allocated\": 10, \"available\": 8, \"status\": \"allocated\", \"total\": 10, \"used\": 2}, \"committed_use\": {\"expiration_at\": \"2019-01-01T12:00:00.000Z\", \"expiration_policy\": \"release\", \"term\": \"term\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"lifecycle_state\": \"stable\", \"name\": \"my-reservation\", \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"reservation\", \"status\": \"activating\", \"status_reasons\": [{\"code\": \"cannot_activate_no_capacity_available\", \"message\": \"The reservation cannot be activated because capacity is unavailable\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String createReservationPath = "/reservations"; + String mockResponseBody = ""; + String deleteInstanceNetworkInterfacePath = "/instances/testString/network_interfaces/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the ReservationCapacityPrototype model - ReservationCapacityPrototype reservationCapacityPrototypeModel = new ReservationCapacityPrototype.Builder() - .total(Long.valueOf("10")) - .build(); - - // Construct an instance of the ReservationCommittedUsePrototype model - ReservationCommittedUsePrototype reservationCommittedUsePrototypeModel = new ReservationCommittedUsePrototype.Builder() - .expirationPolicy("release") - .term("testString") - .build(); - - // Construct an instance of the ReservationProfilePrototype model - ReservationProfilePrototype reservationProfilePrototypeModel = new ReservationProfilePrototype.Builder() - .name("bx2-4x16") - .resourceType("bare_metal_server_profile") - .build(); - - // Construct an instance of the ZoneIdentityByName model - ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() - .name("us-south-1") - .build(); - - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); - - // Construct an instance of the CreateReservationOptions model - CreateReservationOptions createReservationOptionsModel = new CreateReservationOptions.Builder() - .capacity(reservationCapacityPrototypeModel) - .committedUse(reservationCommittedUsePrototypeModel) - .profile(reservationProfilePrototypeModel) - .zone(zoneIdentityModel) - .affinityPolicy("automatic") - .name("my-reservation") - .resourceGroup(resourceGroupIdentityModel) + // Construct an instance of the DeleteInstanceNetworkInterfaceOptions model + DeleteInstanceNetworkInterfaceOptions deleteInstanceNetworkInterfaceOptionsModel = new DeleteInstanceNetworkInterfaceOptions.Builder() + .instanceId("testString") + .id("testString") .build(); - // Invoke createReservation() with a valid options model and verify the result - Response response = vpcService.createReservation(createReservationOptionsModel).execute(); + // Invoke deleteInstanceNetworkInterface() with a valid options model and verify the result + Response response = vpcService.deleteInstanceNetworkInterface(deleteInstanceNetworkInterfaceOptionsModel).execute(); assertNotNull(response); - Reservation responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createReservationPath); + assertEquals(parsedPath, deleteInstanceNetworkInterfacePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createReservation operation with and without retries enabled + // Test the deleteInstanceNetworkInterface operation with and without retries enabled @Test - public void testCreateReservationWRetries() throws Throwable { + public void testDeleteInstanceNetworkInterfaceWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateReservationWOptions(); + testDeleteInstanceNetworkInterfaceWOptions(); vpcService.disableRetries(); - testCreateReservationWOptions(); + testDeleteInstanceNetworkInterfaceWOptions(); } - // Test the createReservation operation with a null options model (negative test) + // Test the deleteInstanceNetworkInterface operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateReservationNoOptions() throws Throwable { + public void testDeleteInstanceNetworkInterfaceNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createReservation(null).execute(); + vpcService.deleteInstanceNetworkInterface(null).execute(); } - // Test the deleteReservation operation with a valid options model parameter + // Test the deleteInstanceVolumeAttachment operation with a valid options model parameter @Test - public void testDeleteReservationWOptions() throws Throwable { + public void testDeleteInstanceVolumeAttachmentWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"affinity_policy\": \"automatic\", \"capacity\": {\"allocated\": 10, \"available\": 8, \"status\": \"allocated\", \"total\": 10, \"used\": 2}, \"committed_use\": {\"expiration_at\": \"2019-01-01T12:00:00.000Z\", \"expiration_policy\": \"release\", \"term\": \"term\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"lifecycle_state\": \"stable\", \"name\": \"my-reservation\", \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"reservation\", \"status\": \"activating\", \"status_reasons\": [{\"code\": \"cannot_activate_no_capacity_available\", \"message\": \"The reservation cannot be activated because capacity is unavailable\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String deleteReservationPath = "/reservations/testString"; + String mockResponseBody = ""; + String deleteInstanceVolumeAttachmentPath = "/instances/testString/volume_attachments/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(202) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the DeleteReservationOptions model - DeleteReservationOptions deleteReservationOptionsModel = new DeleteReservationOptions.Builder() + // Construct an instance of the DeleteInstanceVolumeAttachmentOptions model + DeleteInstanceVolumeAttachmentOptions deleteInstanceVolumeAttachmentOptionsModel = new DeleteInstanceVolumeAttachmentOptions.Builder() + .instanceId("testString") .id("testString") .build(); - // Invoke deleteReservation() with a valid options model and verify the result - Response response = vpcService.deleteReservation(deleteReservationOptionsModel).execute(); + // Invoke deleteInstanceVolumeAttachment() with a valid options model and verify the result + Response response = vpcService.deleteInstanceVolumeAttachment(deleteInstanceVolumeAttachmentOptionsModel).execute(); assertNotNull(response); - Reservation responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); @@ -12146,51 +14225,51 @@ public void testDeleteReservationWOptions() throws Throwable { assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteReservationPath); + assertEquals(parsedPath, deleteInstanceVolumeAttachmentPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteReservation operation with and without retries enabled + // Test the deleteInstanceVolumeAttachment operation with and without retries enabled @Test - public void testDeleteReservationWRetries() throws Throwable { + public void testDeleteInstanceVolumeAttachmentWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteReservationWOptions(); + testDeleteInstanceVolumeAttachmentWOptions(); vpcService.disableRetries(); - testDeleteReservationWOptions(); + testDeleteInstanceVolumeAttachmentWOptions(); } - // Test the deleteReservation operation with a null options model (negative test) + // Test the deleteInstanceVolumeAttachment operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteReservationNoOptions() throws Throwable { + public void testDeleteInstanceVolumeAttachmentNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteReservation(null).execute(); + vpcService.deleteInstanceVolumeAttachment(null).execute(); } - // Test the getReservation operation with a valid options model parameter + // Test the getInstance operation with a valid options model parameter @Test - public void testGetReservationWOptions() throws Throwable { + public void testGetInstanceWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"affinity_policy\": \"automatic\", \"capacity\": {\"allocated\": 10, \"available\": 8, \"status\": \"allocated\", \"total\": 10, \"used\": 2}, \"committed_use\": {\"expiration_at\": \"2019-01-01T12:00:00.000Z\", \"expiration_policy\": \"release\", \"term\": \"term\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"lifecycle_state\": \"stable\", \"name\": \"my-reservation\", \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"reservation\", \"status\": \"activating\", \"status_reasons\": [{\"code\": \"cannot_activate_no_capacity_available\", \"message\": \"The reservation cannot be activated because capacity is unavailable\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String getReservationPath = "/reservations/testString"; + String mockResponseBody = "{\"availability_policy\": {\"host_failure\": \"restart\"}, \"bandwidth\": 1000, \"boot_volume_attachment\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"name\": \"my-volume-attachment\", \"volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"resource_type\": \"volume\"}}, \"catalog_offering\": {\"plan\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}}, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"cluster_network\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"id\": \"0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"name\": \"my-cluster-network\", \"resource_type\": \"cluster_network\"}, \"cluster_network_attachments\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}], \"confidential_compute_mode\": \"disabled\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"dedicated_host\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"name\": \"my-host\", \"resource_type\": \"dedicated_host\"}, \"disks\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"interface_type\": \"nvme\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\", \"size\": 100}], \"enable_secure_boot\": true, \"gpu\": {\"count\": 1, \"manufacturer\": \"amd\", \"memory\": 1, \"model\": \"Tesla V100\"}, \"health_reasons\": [{\"code\": \"reservation_expired\", \"message\": \"The reservation cannot be used because it has expired.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"memory\": 64, \"metadata_service\": {\"enabled\": false, \"protocol\": \"http\", \"response_hop_limit\": 1}, \"name\": \"my-instance\", \"network_attachments\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"instance_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}], \"network_interfaces\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}], \"numa_count\": 2, \"placement_target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"id\": \"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"name\": \"my-dedicated-host-group\", \"resource_type\": \"dedicated_host_group\"}, \"primary_network_attachment\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"instance_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}, \"primary_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}, \"reservation\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}, \"reservation_affinity\": {\"policy\": \"automatic\", \"pool\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}]}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"instance\", \"startable\": false, \"status\": \"deleting\", \"status_reasons\": [{\"code\": \"cannot_start_storage\", \"message\": \"The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"total_network_bandwidth\": 500, \"total_volume_bandwidth\": 500, \"vcpu\": {\"architecture\": \"amd64\", \"count\": 4, \"manufacturer\": \"intel\"}, \"volume_attachments\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"name\": \"my-volume-attachment\", \"volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"resource_type\": \"volume\"}}], \"volume_bandwidth_qos_mode\": \"pooled\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String getInstancePath = "/instances/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetReservationOptions model - GetReservationOptions getReservationOptionsModel = new GetReservationOptions.Builder() + // Construct an instance of the GetInstanceOptions model + GetInstanceOptions getInstanceOptionsModel = new GetInstanceOptions.Builder() .id("testString") .build(); - // Invoke getReservation() with a valid options model and verify the result - Response response = vpcService.getReservation(getReservationOptionsModel).execute(); + // Invoke getInstance() with a valid options model and verify the result + Response response = vpcService.getInstance(getInstanceOptionsModel).execute(); assertNotNull(response); - Reservation responseObj = response.getResult(); + Instance responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -12199,188 +14278,159 @@ public void testGetReservationWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getReservationPath); + assertEquals(parsedPath, getInstancePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getReservation operation with and without retries enabled + // Test the getInstance operation with and without retries enabled @Test - public void testGetReservationWRetries() throws Throwable { + public void testGetInstanceWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetReservationWOptions(); + testGetInstanceWOptions(); vpcService.disableRetries(); - testGetReservationWOptions(); + testGetInstanceWOptions(); } - // Test the getReservation operation with a null options model (negative test) + // Test the getInstance operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetReservationNoOptions() throws Throwable { + public void testGetInstanceNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getReservation(null).execute(); + vpcService.getInstance(null).execute(); } - // Test the updateReservation operation with a valid options model parameter + // Test the getInstanceClusterNetworkAttachment operation with a valid options model parameter @Test - public void testUpdateReservationWOptions() throws Throwable { + public void testGetInstanceClusterNetworkAttachmentWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"affinity_policy\": \"automatic\", \"capacity\": {\"allocated\": 10, \"available\": 8, \"status\": \"allocated\", \"total\": 10, \"used\": 2}, \"committed_use\": {\"expiration_at\": \"2019-01-01T12:00:00.000Z\", \"expiration_policy\": \"release\", \"term\": \"term\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"lifecycle_state\": \"stable\", \"name\": \"my-reservation\", \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"reservation\", \"status\": \"activating\", \"status_reasons\": [{\"code\": \"cannot_activate_no_capacity_available\", \"message\": \"The reservation cannot be activated because capacity is unavailable\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String updateReservationPath = "/reservations/testString"; + String mockResponseBody = "{\"before\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}, \"cluster_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"address\": \"10.1.0.6\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"resource_type\": \"cluster_network_subnet_reserved_ip\"}, \"resource_type\": \"cluster_network_interface\", \"subnet\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\"}}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}"; + String getInstanceClusterNetworkAttachmentPath = "/instances/testString/cluster_network_attachments/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ReservationCapacityPatch model - ReservationCapacityPatch reservationCapacityPatchModel = new ReservationCapacityPatch.Builder() - .total(Long.valueOf("10")) - .build(); - - // Construct an instance of the ReservationCommittedUsePatch model - ReservationCommittedUsePatch reservationCommittedUsePatchModel = new ReservationCommittedUsePatch.Builder() - .expirationPolicy("release") - .term("testString") - .build(); - - // Construct an instance of the ReservationProfilePatch model - ReservationProfilePatch reservationProfilePatchModel = new ReservationProfilePatch.Builder() - .name("bx2-4x16") - .resourceType("bare_metal_server_profile") - .build(); - - // Construct an instance of the ReservationPatch model - ReservationPatch reservationPatchModel = new ReservationPatch.Builder() - .affinityPolicy("automatic") - .capacity(reservationCapacityPatchModel) - .committedUse(reservationCommittedUsePatchModel) - .name("my-reservation") - .profile(reservationProfilePatchModel) - .build(); - Map reservationPatchModelAsPatch = reservationPatchModel.asPatch(); - - // Construct an instance of the UpdateReservationOptions model - UpdateReservationOptions updateReservationOptionsModel = new UpdateReservationOptions.Builder() + // Construct an instance of the GetInstanceClusterNetworkAttachmentOptions model + GetInstanceClusterNetworkAttachmentOptions getInstanceClusterNetworkAttachmentOptionsModel = new GetInstanceClusterNetworkAttachmentOptions.Builder() + .instanceId("testString") .id("testString") - .reservationPatch(reservationPatchModelAsPatch) .build(); - // Invoke updateReservation() with a valid options model and verify the result - Response response = vpcService.updateReservation(updateReservationOptionsModel).execute(); + // Invoke getInstanceClusterNetworkAttachment() with a valid options model and verify the result + Response response = vpcService.getInstanceClusterNetworkAttachment(getInstanceClusterNetworkAttachmentOptionsModel).execute(); assertNotNull(response); - Reservation responseObj = response.getResult(); + InstanceClusterNetworkAttachment responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateReservationPath); + assertEquals(parsedPath, getInstanceClusterNetworkAttachmentPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateReservation operation with and without retries enabled + // Test the getInstanceClusterNetworkAttachment operation with and without retries enabled @Test - public void testUpdateReservationWRetries() throws Throwable { + public void testGetInstanceClusterNetworkAttachmentWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateReservationWOptions(); + testGetInstanceClusterNetworkAttachmentWOptions(); vpcService.disableRetries(); - testUpdateReservationWOptions(); + testGetInstanceClusterNetworkAttachmentWOptions(); } - // Test the updateReservation operation with a null options model (negative test) + // Test the getInstanceClusterNetworkAttachment operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateReservationNoOptions() throws Throwable { + public void testGetInstanceClusterNetworkAttachmentNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateReservation(null).execute(); + vpcService.getInstanceClusterNetworkAttachment(null).execute(); } - // Test the activateReservation operation with a valid options model parameter + // Test the getInstanceDisk operation with a valid options model parameter @Test - public void testActivateReservationWOptions() throws Throwable { + public void testGetInstanceDiskWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String activateReservationPath = "/reservations/testString/activate"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"interface_type\": \"nvme\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\", \"size\": 100}"; + String getInstanceDiskPath = "/instances/testString/disks/testString"; server.enqueue(new MockResponse() - .setResponseCode(202) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ActivateReservationOptions model - ActivateReservationOptions activateReservationOptionsModel = new ActivateReservationOptions.Builder() + // Construct an instance of the GetInstanceDiskOptions model + GetInstanceDiskOptions getInstanceDiskOptionsModel = new GetInstanceDiskOptions.Builder() + .instanceId("testString") .id("testString") .build(); - // Invoke activateReservation() with a valid options model and verify the result - Response response = vpcService.activateReservation(activateReservationOptionsModel).execute(); + // Invoke getInstanceDisk() with a valid options model and verify the result + Response response = vpcService.getInstanceDisk(getInstanceDiskOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + InstanceDisk responseObj = response.getResult(); + assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, activateReservationPath); + assertEquals(parsedPath, getInstanceDiskPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the activateReservation operation with and without retries enabled + // Test the getInstanceDisk operation with and without retries enabled @Test - public void testActivateReservationWRetries() throws Throwable { + public void testGetInstanceDiskWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testActivateReservationWOptions(); + testGetInstanceDiskWOptions(); vpcService.disableRetries(); - testActivateReservationWOptions(); + testGetInstanceDiskWOptions(); } - // Test the activateReservation operation with a null options model (negative test) + // Test the getInstanceDisk operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testActivateReservationNoOptions() throws Throwable { + public void testGetInstanceDiskNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.activateReservation(null).execute(); + vpcService.getInstanceDisk(null).execute(); } - // Test the listDedicatedHostGroups operation with a valid options model parameter + // Test the getInstanceInitialization operation with a valid options model parameter @Test - public void testListDedicatedHostGroupsWOptions() throws Throwable { + public void testGetInstanceInitializationWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"groups\": [{\"class\": \"bx2\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"dedicated_hosts\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"name\": \"my-host\", \"resource_type\": \"dedicated_host\"}], \"family\": \"balanced\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"id\": \"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"name\": \"my-dedicated-host-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"dedicated_host_group\", \"supported_instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listDedicatedHostGroupsPath = "/dedicated_host/groups"; + String mockResponseBody = "{\"default_trusted_profile\": {\"auto_link\": true, \"target\": {\"crn\": \"crn:v1:bluemix:public:iam-identity::a/aa2432b1fa4d4ace891e9b80fc104e34::profile:Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5\", \"id\": \"Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5\", \"resource_type\": \"trusted_profile\"}}, \"keys\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"fingerprint\": \"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"name\": \"my-key-1\"}], \"password\": {\"encrypted_password\": \"qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==\", \"encryption_key\": {\"fingerprint\": \"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\"}}}"; + String getInstanceInitializationPath = "/instances/testString/initialization"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListDedicatedHostGroupsOptions model - ListDedicatedHostGroupsOptions listDedicatedHostGroupsOptionsModel = new ListDedicatedHostGroupsOptions.Builder() - .start("testString") - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .zoneName("us-south-1") - .name("my-name") + // Construct an instance of the GetInstanceInitializationOptions model + GetInstanceInitializationOptions getInstanceInitializationOptionsModel = new GetInstanceInitializationOptions.Builder() + .id("testString") .build(); - // Invoke listDedicatedHostGroups() with a valid options model and verify the result - Response response = vpcService.listDedicatedHostGroups(listDedicatedHostGroupsOptionsModel).execute(); + // Invoke getInstanceInitialization() with a valid options model and verify the result + Response response = vpcService.getInstanceInitialization(getInstanceInitializationOptionsModel).execute(); assertNotNull(response); - DedicatedHostGroupCollection responseObj = response.getResult(); + InstanceInitialization responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -12389,236 +14439,161 @@ public void testListDedicatedHostGroupsWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listDedicatedHostGroupsPath); + assertEquals(parsedPath, getInstanceInitializationPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("resource_group.id"), "testString"); - assertEquals(query.get("zone.name"), "us-south-1"); - assertEquals(query.get("name"), "my-name"); } - // Test the listDedicatedHostGroups operation with and without retries enabled + // Test the getInstanceInitialization operation with and without retries enabled @Test - public void testListDedicatedHostGroupsWRetries() throws Throwable { + public void testGetInstanceInitializationWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListDedicatedHostGroupsWOptions(); + testGetInstanceInitializationWOptions(); vpcService.disableRetries(); - testListDedicatedHostGroupsWOptions(); + testGetInstanceInitializationWOptions(); } - // Test the listDedicatedHostGroups operation using the DedicatedHostGroupsPager.getNext() method - @Test - public void testListDedicatedHostGroupsWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"groups\":[{\"class\":\"bx2\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"dedicated_hosts\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"id\":\"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"name\":\"my-host\",\"resource_type\":\"dedicated_host\"}],\"family\":\"balanced\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"id\":\"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"name\":\"my-dedicated-host-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"dedicated_host_group\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"groups\":[{\"class\":\"bx2\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"dedicated_hosts\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"id\":\"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"name\":\"my-host\",\"resource_type\":\"dedicated_host\"}],\"family\":\"balanced\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"id\":\"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"name\":\"my-dedicated-host-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"dedicated_host_group\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListDedicatedHostGroupsOptions listDedicatedHostGroupsOptions = new ListDedicatedHostGroupsOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .zoneName("us-south-1") - .name("my-name") - .build(); - - List allResults = new ArrayList<>(); - DedicatedHostGroupsPager pager = new DedicatedHostGroupsPager(vpcService, listDedicatedHostGroupsOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + // Test the getInstanceInitialization operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testGetInstanceInitializationNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.getInstanceInitialization(null).execute(); } - - // Test the listDedicatedHostGroups operation using the DedicatedHostGroupsPager.getAll() method - @Test - public void testListDedicatedHostGroupsWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"groups\":[{\"class\":\"bx2\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"dedicated_hosts\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"id\":\"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"name\":\"my-host\",\"resource_type\":\"dedicated_host\"}],\"family\":\"balanced\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"id\":\"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"name\":\"my-dedicated-host-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"dedicated_host_group\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"groups\":[{\"class\":\"bx2\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"dedicated_hosts\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"id\":\"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"name\":\"my-host\",\"resource_type\":\"dedicated_host\"}],\"family\":\"balanced\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"id\":\"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"name\":\"my-dedicated-host-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"dedicated_host_group\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListDedicatedHostGroupsOptions listDedicatedHostGroupsOptions = new ListDedicatedHostGroupsOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .zoneName("us-south-1") - .name("my-name") - .build(); - DedicatedHostGroupsPager pager = new DedicatedHostGroupsPager(vpcService, listDedicatedHostGroupsOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the createDedicatedHostGroup operation with a valid options model parameter + // Test the getInstanceNetworkAttachment operation with a valid options model parameter @Test - public void testCreateDedicatedHostGroupWOptions() throws Throwable { + public void testGetInstanceNetworkAttachmentWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"class\": \"bx2\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"dedicated_hosts\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"name\": \"my-host\", \"resource_type\": \"dedicated_host\"}], \"family\": \"balanced\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"id\": \"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"name\": \"my-dedicated-host-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"dedicated_host_group\", \"supported_instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String createDedicatedHostGroupPath = "/dedicated_host/groups"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"lifecycle_state\": \"stable\", \"name\": \"my-instance-network-attachment\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"instance_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}"; + String getInstanceNetworkAttachmentPath = "/instances/testString/network_attachments/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ZoneIdentityByName model - ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() - .name("us-south-1") - .build(); - - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); - - // Construct an instance of the CreateDedicatedHostGroupOptions model - CreateDedicatedHostGroupOptions createDedicatedHostGroupOptionsModel = new CreateDedicatedHostGroupOptions.Builder() - .xClass("mx2") - .family("balanced") - .zone(zoneIdentityModel) - .name("testString") - .resourceGroup(resourceGroupIdentityModel) + // Construct an instance of the GetInstanceNetworkAttachmentOptions model + GetInstanceNetworkAttachmentOptions getInstanceNetworkAttachmentOptionsModel = new GetInstanceNetworkAttachmentOptions.Builder() + .instanceId("testString") + .id("testString") .build(); - // Invoke createDedicatedHostGroup() with a valid options model and verify the result - Response response = vpcService.createDedicatedHostGroup(createDedicatedHostGroupOptionsModel).execute(); + // Invoke getInstanceNetworkAttachment() with a valid options model and verify the result + Response response = vpcService.getInstanceNetworkAttachment(getInstanceNetworkAttachmentOptionsModel).execute(); assertNotNull(response); - DedicatedHostGroup responseObj = response.getResult(); + InstanceNetworkAttachment responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createDedicatedHostGroupPath); + assertEquals(parsedPath, getInstanceNetworkAttachmentPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createDedicatedHostGroup operation with and without retries enabled + // Test the getInstanceNetworkAttachment operation with and without retries enabled @Test - public void testCreateDedicatedHostGroupWRetries() throws Throwable { + public void testGetInstanceNetworkAttachmentWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateDedicatedHostGroupWOptions(); + testGetInstanceNetworkAttachmentWOptions(); vpcService.disableRetries(); - testCreateDedicatedHostGroupWOptions(); + testGetInstanceNetworkAttachmentWOptions(); } - // Test the createDedicatedHostGroup operation with a null options model (negative test) + // Test the getInstanceNetworkAttachment operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateDedicatedHostGroupNoOptions() throws Throwable { + public void testGetInstanceNetworkAttachmentNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createDedicatedHostGroup(null).execute(); + vpcService.getInstanceNetworkAttachment(null).execute(); } - // Test the deleteDedicatedHostGroup operation with a valid options model parameter + // Test the getInstanceNetworkInterface operation with a valid options model parameter @Test - public void testDeleteDedicatedHostGroupWOptions() throws Throwable { + public void testGetInstanceNetworkInterfaceWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteDedicatedHostGroupPath = "/dedicated_host/groups/testString"; + String mockResponseBody = "{\"allow_ip_spoofing\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"floating_ips\": [{\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}], \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"status\": \"available\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\"}"; + String getInstanceNetworkInterfacePath = "/instances/testString/network_interfaces/testString"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteDedicatedHostGroupOptions model - DeleteDedicatedHostGroupOptions deleteDedicatedHostGroupOptionsModel = new DeleteDedicatedHostGroupOptions.Builder() + // Construct an instance of the GetInstanceNetworkInterfaceOptions model + GetInstanceNetworkInterfaceOptions getInstanceNetworkInterfaceOptionsModel = new GetInstanceNetworkInterfaceOptions.Builder() + .instanceId("testString") .id("testString") .build(); - // Invoke deleteDedicatedHostGroup() with a valid options model and verify the result - Response response = vpcService.deleteDedicatedHostGroup(deleteDedicatedHostGroupOptionsModel).execute(); + // Invoke getInstanceNetworkInterface() with a valid options model and verify the result + Response response = vpcService.getInstanceNetworkInterface(getInstanceNetworkInterfaceOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + NetworkInterface 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteDedicatedHostGroupPath); + assertEquals(parsedPath, getInstanceNetworkInterfacePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteDedicatedHostGroup operation with and without retries enabled + // Test the getInstanceNetworkInterface operation with and without retries enabled @Test - public void testDeleteDedicatedHostGroupWRetries() throws Throwable { + public void testGetInstanceNetworkInterfaceWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteDedicatedHostGroupWOptions(); + testGetInstanceNetworkInterfaceWOptions(); vpcService.disableRetries(); - testDeleteDedicatedHostGroupWOptions(); + testGetInstanceNetworkInterfaceWOptions(); } - // Test the deleteDedicatedHostGroup operation with a null options model (negative test) + // Test the getInstanceNetworkInterface operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteDedicatedHostGroupNoOptions() throws Throwable { + public void testGetInstanceNetworkInterfaceNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteDedicatedHostGroup(null).execute(); + vpcService.getInstanceNetworkInterface(null).execute(); } - // Test the getDedicatedHostGroup operation with a valid options model parameter + // Test the getInstanceNetworkInterfaceFloatingIp operation with a valid options model parameter @Test - public void testGetDedicatedHostGroupWOptions() throws Throwable { + public void testGetInstanceNetworkInterfaceFloatingIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"class\": \"bx2\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"dedicated_hosts\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"name\": \"my-host\", \"resource_type\": \"dedicated_host\"}], \"family\": \"balanced\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"id\": \"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"name\": \"my-dedicated-host-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"dedicated_host_group\", \"supported_instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String getDedicatedHostGroupPath = "/dedicated_host/groups/testString"; + String mockResponseBody = "{\"address\": \"203.0.113.1\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"available\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String getInstanceNetworkInterfaceFloatingIpPath = "/instances/testString/network_interfaces/testString/floating_ips/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetDedicatedHostGroupOptions model - GetDedicatedHostGroupOptions getDedicatedHostGroupOptionsModel = new GetDedicatedHostGroupOptions.Builder() + // Construct an instance of the GetInstanceNetworkInterfaceFloatingIpOptions model + GetInstanceNetworkInterfaceFloatingIpOptions getInstanceNetworkInterfaceFloatingIpOptionsModel = new GetInstanceNetworkInterfaceFloatingIpOptions.Builder() + .instanceId("testString") + .networkInterfaceId("testString") .id("testString") .build(); - // Invoke getDedicatedHostGroup() with a valid options model and verify the result - Response response = vpcService.getDedicatedHostGroup(getDedicatedHostGroupOptionsModel).execute(); + // Invoke getInstanceNetworkInterfaceFloatingIp() with a valid options model and verify the result + Response response = vpcService.getInstanceNetworkInterfaceFloatingIp(getInstanceNetworkInterfaceFloatingIpOptionsModel).execute(); assertNotNull(response); - DedicatedHostGroup responseObj = response.getResult(); + FloatingIP responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -12627,112 +14602,106 @@ public void testGetDedicatedHostGroupWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getDedicatedHostGroupPath); + assertEquals(parsedPath, getInstanceNetworkInterfaceFloatingIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getDedicatedHostGroup operation with and without retries enabled + // Test the getInstanceNetworkInterfaceFloatingIp operation with and without retries enabled @Test - public void testGetDedicatedHostGroupWRetries() throws Throwable { + public void testGetInstanceNetworkInterfaceFloatingIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetDedicatedHostGroupWOptions(); + testGetInstanceNetworkInterfaceFloatingIpWOptions(); vpcService.disableRetries(); - testGetDedicatedHostGroupWOptions(); + testGetInstanceNetworkInterfaceFloatingIpWOptions(); } - // Test the getDedicatedHostGroup operation with a null options model (negative test) + // Test the getInstanceNetworkInterfaceFloatingIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetDedicatedHostGroupNoOptions() throws Throwable { + public void testGetInstanceNetworkInterfaceFloatingIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getDedicatedHostGroup(null).execute(); + vpcService.getInstanceNetworkInterfaceFloatingIp(null).execute(); } - // Test the updateDedicatedHostGroup operation with a valid options model parameter + // Test the getInstanceNetworkInterfaceIp operation with a valid options model parameter @Test - public void testUpdateDedicatedHostGroupWOptions() throws Throwable { + public void testGetInstanceNetworkInterfaceIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"class\": \"bx2\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"dedicated_hosts\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"name\": \"my-host\", \"resource_type\": \"dedicated_host\"}], \"family\": \"balanced\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"id\": \"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"name\": \"my-dedicated-host-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"dedicated_host_group\", \"supported_instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String updateDedicatedHostGroupPath = "/dedicated_host/groups/testString"; + String mockResponseBody = "{\"address\": \"192.168.3.4\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"lifecycle_state\": \"stable\", \"name\": \"my-reserved-ip\", \"owner\": \"provider\", \"resource_type\": \"subnet_reserved_ip\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"resource_type\": \"endpoint_gateway\"}}"; + String getInstanceNetworkInterfaceIpPath = "/instances/testString/network_interfaces/testString/ips/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DedicatedHostGroupPatch model - DedicatedHostGroupPatch dedicatedHostGroupPatchModel = new DedicatedHostGroupPatch.Builder() - .name("my-dedicated-host-group-updated") - .build(); - Map dedicatedHostGroupPatchModelAsPatch = dedicatedHostGroupPatchModel.asPatch(); - - // Construct an instance of the UpdateDedicatedHostGroupOptions model - UpdateDedicatedHostGroupOptions updateDedicatedHostGroupOptionsModel = new UpdateDedicatedHostGroupOptions.Builder() + // Construct an instance of the GetInstanceNetworkInterfaceIpOptions model + GetInstanceNetworkInterfaceIpOptions getInstanceNetworkInterfaceIpOptionsModel = new GetInstanceNetworkInterfaceIpOptions.Builder() + .instanceId("testString") + .networkInterfaceId("testString") .id("testString") - .dedicatedHostGroupPatch(dedicatedHostGroupPatchModelAsPatch) .build(); - // Invoke updateDedicatedHostGroup() with a valid options model and verify the result - Response response = vpcService.updateDedicatedHostGroup(updateDedicatedHostGroupOptionsModel).execute(); + // Invoke getInstanceNetworkInterfaceIp() with a valid options model and verify the result + Response response = vpcService.getInstanceNetworkInterfaceIp(getInstanceNetworkInterfaceIpOptionsModel).execute(); assertNotNull(response); - DedicatedHostGroup responseObj = response.getResult(); + ReservedIP responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateDedicatedHostGroupPath); + assertEquals(parsedPath, getInstanceNetworkInterfaceIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateDedicatedHostGroup operation with and without retries enabled + // Test the getInstanceNetworkInterfaceIp operation with and without retries enabled @Test - public void testUpdateDedicatedHostGroupWRetries() throws Throwable { + public void testGetInstanceNetworkInterfaceIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateDedicatedHostGroupWOptions(); + testGetInstanceNetworkInterfaceIpWOptions(); vpcService.disableRetries(); - testUpdateDedicatedHostGroupWOptions(); + testGetInstanceNetworkInterfaceIpWOptions(); } - // Test the updateDedicatedHostGroup operation with a null options model (negative test) + // Test the getInstanceNetworkInterfaceIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateDedicatedHostGroupNoOptions() throws Throwable { + public void testGetInstanceNetworkInterfaceIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateDedicatedHostGroup(null).execute(); + vpcService.getInstanceNetworkInterfaceIp(null).execute(); } - // Test the listDedicatedHostProfiles operation with a valid options model parameter + // Test the getInstanceProfile operation with a valid options model parameter @Test - public void testListDedicatedHostProfilesWOptions() throws Throwable { + public void testGetInstanceProfileWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"profiles\": [{\"class\": \"bx2\", \"disks\": [{\"interface_type\": {\"type\": \"fixed\", \"value\": \"nvme\"}, \"quantity\": {\"type\": \"fixed\", \"value\": 4}, \"size\": {\"type\": \"fixed\", \"value\": 3200}, \"supported_instance_interface_types\": {\"type\": \"fixed\", \"value\": [\"nvme\"]}}], \"family\": \"balanced\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"memory\": {\"type\": \"fixed\", \"value\": 16}, \"name\": \"mx2-host-152x1216\", \"socket_count\": {\"type\": \"fixed\", \"value\": 2}, \"status\": \"current\", \"supported_instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"vcpu_architecture\": {\"type\": \"fixed\", \"value\": \"amd64\"}, \"vcpu_count\": {\"type\": \"fixed\", \"value\": 16}, \"vcpu_manufacturer\": {\"type\": \"fixed\", \"value\": \"intel\"}}], \"total_count\": 132}"; - String listDedicatedHostProfilesPath = "/dedicated_host/profiles"; + String mockResponseBody = "{\"bandwidth\": {\"type\": \"fixed\", \"value\": 20000}, \"cluster_network_attachment_count\": {\"type\": \"dependent\"}, \"confidential_compute_modes\": {\"default\": \"disabled\", \"type\": \"enum\", \"values\": [\"disabled\"]}, \"disks\": [{\"quantity\": {\"type\": \"fixed\", \"value\": 4}, \"size\": {\"type\": \"fixed\", \"value\": 100}, \"supported_interface_types\": {\"default\": \"nvme\", \"type\": \"enum\", \"values\": [\"nvme\"]}}], \"family\": \"balanced\", \"gpu_count\": {\"type\": \"fixed\", \"value\": 2}, \"gpu_manufacturer\": {\"type\": \"enum\", \"values\": [\"amd\"]}, \"gpu_memory\": {\"type\": \"fixed\", \"value\": 16}, \"gpu_model\": {\"type\": \"enum\", \"values\": [\"Tesla V100\"]}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"memory\": {\"type\": \"fixed\", \"value\": 16}, \"name\": \"bx2-4x16\", \"network_attachment_count\": {\"max\": 5, \"min\": 1, \"type\": \"range\"}, \"network_interface_count\": {\"max\": 5, \"min\": 1, \"type\": \"range\"}, \"numa_count\": {\"type\": \"fixed\", \"value\": 2}, \"os_architecture\": {\"default\": \"amd64\", \"type\": \"enum\", \"values\": [\"amd64\"]}, \"port_speed\": {\"type\": \"fixed\", \"value\": 1000}, \"reservation_terms\": {\"type\": \"enum\", \"values\": [\"one_year\"]}, \"resource_type\": \"instance_profile\", \"secure_boot_modes\": {\"default\": true, \"type\": \"enum\", \"values\": [true]}, \"status\": \"current\", \"supported_cluster_network_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\", \"name\": \"h100\", \"resource_type\": \"cluster_network_profile\"}], \"total_volume_bandwidth\": {\"type\": \"fixed\", \"value\": 20000}, \"vcpu_architecture\": {\"type\": \"fixed\", \"value\": \"amd64\"}, \"vcpu_count\": {\"type\": \"fixed\", \"value\": 16}, \"vcpu_manufacturer\": {\"type\": \"fixed\", \"value\": \"intel\"}, \"volume_bandwidth_qos_modes\": {\"default\": \"pooled\", \"type\": \"enum\", \"values\": [\"pooled\"]}}"; + String getInstanceProfilePath = "/instance/profiles/mx2-host-152x1216"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListDedicatedHostProfilesOptions model - ListDedicatedHostProfilesOptions listDedicatedHostProfilesOptionsModel = new ListDedicatedHostProfilesOptions.Builder() - .start("testString") - .limit(Long.valueOf("10")) + // Construct an instance of the GetInstanceProfileOptions model + GetInstanceProfileOptions getInstanceProfileOptionsModel = new GetInstanceProfileOptions.Builder() + .name("mx2-host-152x1216") .build(); - // Invoke listDedicatedHostProfiles() with a valid options model and verify the result - Response response = vpcService.listDedicatedHostProfiles(listDedicatedHostProfilesOptionsModel).execute(); + // Invoke getInstanceProfile() with a valid options model and verify the result + Response response = vpcService.getInstanceProfile(getInstanceProfileOptionsModel).execute(); assertNotNull(response); - DedicatedHostProfileCollection responseObj = response.getResult(); + InstanceProfile responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -12741,108 +14710,52 @@ public void testListDedicatedHostProfilesWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listDedicatedHostProfilesPath); + assertEquals(parsedPath, getInstanceProfilePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the listDedicatedHostProfiles operation with and without retries enabled + // Test the getInstanceProfile operation with and without retries enabled @Test - public void testListDedicatedHostProfilesWRetries() throws Throwable { + public void testGetInstanceProfileWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListDedicatedHostProfilesWOptions(); + testGetInstanceProfileWOptions(); vpcService.disableRetries(); - testListDedicatedHostProfilesWOptions(); + testGetInstanceProfileWOptions(); } - // Test the listDedicatedHostProfiles operation using the DedicatedHostProfilesPager.getNext() method - @Test - public void testListDedicatedHostProfilesWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"profiles\":[{\"class\":\"bx2\",\"disks\":[{\"interface_type\":{\"type\":\"fixed\",\"value\":\"nvme\"},\"quantity\":{\"type\":\"fixed\",\"value\":4},\"size\":{\"type\":\"fixed\",\"value\":3200},\"supported_instance_interface_types\":{\"type\":\"fixed\",\"value\":[\"nvme\"]}}],\"family\":\"balanced\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"memory\":{\"type\":\"fixed\",\"value\":16},\"name\":\"mx2-host-152x1216\",\"socket_count\":{\"type\":\"fixed\",\"value\":2},\"status\":\"current\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"vcpu_architecture\":{\"type\":\"fixed\",\"value\":\"amd64\"},\"vcpu_count\":{\"type\":\"fixed\",\"value\":16},\"vcpu_manufacturer\":{\"type\":\"fixed\",\"value\":\"intel\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"profiles\":[{\"class\":\"bx2\",\"disks\":[{\"interface_type\":{\"type\":\"fixed\",\"value\":\"nvme\"},\"quantity\":{\"type\":\"fixed\",\"value\":4},\"size\":{\"type\":\"fixed\",\"value\":3200},\"supported_instance_interface_types\":{\"type\":\"fixed\",\"value\":[\"nvme\"]}}],\"family\":\"balanced\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"memory\":{\"type\":\"fixed\",\"value\":16},\"name\":\"mx2-host-152x1216\",\"socket_count\":{\"type\":\"fixed\",\"value\":2},\"status\":\"current\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"vcpu_architecture\":{\"type\":\"fixed\",\"value\":\"amd64\"},\"vcpu_count\":{\"type\":\"fixed\",\"value\":16},\"vcpu_manufacturer\":{\"type\":\"fixed\",\"value\":\"intel\"}}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListDedicatedHostProfilesOptions listDedicatedHostProfilesOptions = new ListDedicatedHostProfilesOptions.Builder() - .limit(Long.valueOf("10")) - .build(); - - List allResults = new ArrayList<>(); - DedicatedHostProfilesPager pager = new DedicatedHostProfilesPager(vpcService, listDedicatedHostProfilesOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + // Test the getInstanceProfile operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testGetInstanceProfileNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.getInstanceProfile(null).execute(); } - - // Test the listDedicatedHostProfiles operation using the DedicatedHostProfilesPager.getAll() method - @Test - public void testListDedicatedHostProfilesWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"profiles\":[{\"class\":\"bx2\",\"disks\":[{\"interface_type\":{\"type\":\"fixed\",\"value\":\"nvme\"},\"quantity\":{\"type\":\"fixed\",\"value\":4},\"size\":{\"type\":\"fixed\",\"value\":3200},\"supported_instance_interface_types\":{\"type\":\"fixed\",\"value\":[\"nvme\"]}}],\"family\":\"balanced\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"memory\":{\"type\":\"fixed\",\"value\":16},\"name\":\"mx2-host-152x1216\",\"socket_count\":{\"type\":\"fixed\",\"value\":2},\"status\":\"current\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"vcpu_architecture\":{\"type\":\"fixed\",\"value\":\"amd64\"},\"vcpu_count\":{\"type\":\"fixed\",\"value\":16},\"vcpu_manufacturer\":{\"type\":\"fixed\",\"value\":\"intel\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"profiles\":[{\"class\":\"bx2\",\"disks\":[{\"interface_type\":{\"type\":\"fixed\",\"value\":\"nvme\"},\"quantity\":{\"type\":\"fixed\",\"value\":4},\"size\":{\"type\":\"fixed\",\"value\":3200},\"supported_instance_interface_types\":{\"type\":\"fixed\",\"value\":[\"nvme\"]}}],\"family\":\"balanced\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"memory\":{\"type\":\"fixed\",\"value\":16},\"name\":\"mx2-host-152x1216\",\"socket_count\":{\"type\":\"fixed\",\"value\":2},\"status\":\"current\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"vcpu_architecture\":{\"type\":\"fixed\",\"value\":\"amd64\"},\"vcpu_count\":{\"type\":\"fixed\",\"value\":16},\"vcpu_manufacturer\":{\"type\":\"fixed\",\"value\":\"intel\"}}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListDedicatedHostProfilesOptions listDedicatedHostProfilesOptions = new ListDedicatedHostProfilesOptions.Builder() - .limit(Long.valueOf("10")) - .build(); - DedicatedHostProfilesPager pager = new DedicatedHostProfilesPager(vpcService, listDedicatedHostProfilesOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the getDedicatedHostProfile operation with a valid options model parameter + // Test the getInstanceVolumeAttachment operation with a valid options model parameter @Test - public void testGetDedicatedHostProfileWOptions() throws Throwable { + public void testGetInstanceVolumeAttachmentWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"class\": \"bx2\", \"disks\": [{\"interface_type\": {\"type\": \"fixed\", \"value\": \"nvme\"}, \"quantity\": {\"type\": \"fixed\", \"value\": 4}, \"size\": {\"type\": \"fixed\", \"value\": 3200}, \"supported_instance_interface_types\": {\"type\": \"fixed\", \"value\": [\"nvme\"]}}], \"family\": \"balanced\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"memory\": {\"type\": \"fixed\", \"value\": 16}, \"name\": \"mx2-host-152x1216\", \"socket_count\": {\"type\": \"fixed\", \"value\": 2}, \"status\": \"current\", \"supported_instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"vcpu_architecture\": {\"type\": \"fixed\", \"value\": \"amd64\"}, \"vcpu_count\": {\"type\": \"fixed\", \"value\": 16}, \"vcpu_manufacturer\": {\"type\": \"fixed\", \"value\": \"intel\"}}"; - String getDedicatedHostProfilePath = "/dedicated_host/profiles/mx2-host-152x1216"; + String mockResponseBody = "{\"bandwidth\": 250, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"delete_volume_on_instance_delete\": true, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"name\": \"my-volume-attachment\", \"status\": \"attached\", \"type\": \"boot\", \"volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"resource_type\": \"volume\"}}"; + String getInstanceVolumeAttachmentPath = "/instances/testString/volume_attachments/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetDedicatedHostProfileOptions model - GetDedicatedHostProfileOptions getDedicatedHostProfileOptionsModel = new GetDedicatedHostProfileOptions.Builder() - .name("mx2-host-152x1216") + // Construct an instance of the GetInstanceVolumeAttachmentOptions model + GetInstanceVolumeAttachmentOptions getInstanceVolumeAttachmentOptionsModel = new GetInstanceVolumeAttachmentOptions.Builder() + .instanceId("testString") + .id("testString") .build(); - // Invoke getDedicatedHostProfile() with a valid options model and verify the result - Response response = vpcService.getDedicatedHostProfile(getDedicatedHostProfileOptionsModel).execute(); + // Invoke getInstanceVolumeAttachment() with a valid options model and verify the result + Response response = vpcService.getInstanceVolumeAttachment(getInstanceVolumeAttachmentOptionsModel).execute(); assertNotNull(response); - DedicatedHostProfile responseObj = response.getResult(); + VolumeAttachment responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -12851,56 +14764,53 @@ public void testGetDedicatedHostProfileWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getDedicatedHostProfilePath); + assertEquals(parsedPath, getInstanceVolumeAttachmentPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getDedicatedHostProfile operation with and without retries enabled + // Test the getInstanceVolumeAttachment operation with and without retries enabled @Test - public void testGetDedicatedHostProfileWRetries() throws Throwable { + public void testGetInstanceVolumeAttachmentWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetDedicatedHostProfileWOptions(); + testGetInstanceVolumeAttachmentWOptions(); vpcService.disableRetries(); - testGetDedicatedHostProfileWOptions(); + testGetInstanceVolumeAttachmentWOptions(); } - // Test the getDedicatedHostProfile operation with a null options model (negative test) + // Test the getInstanceVolumeAttachment operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetDedicatedHostProfileNoOptions() throws Throwable { + public void testGetInstanceVolumeAttachmentNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getDedicatedHostProfile(null).execute(); + vpcService.getInstanceVolumeAttachment(null).execute(); } - // Test the listDedicatedHosts operation with a valid options model parameter + // Test the listInstanceClusterNetworkAttachments operation with a valid options model parameter @Test - public void testListDedicatedHostsWOptions() throws Throwable { + public void testListInstanceClusterNetworkAttachmentsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"dedicated_hosts\": [{\"available_memory\": 128, \"available_vcpu\": {\"architecture\": \"amd64\", \"count\": 4, \"manufacturer\": \"intel\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"disks\": [{\"available\": 9, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"id\": \"0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"instance_disks\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\"}], \"interface_type\": \"nvme\", \"lifecycle_state\": \"stable\", \"name\": \"my-dedicated-host-disk\", \"provisionable\": false, \"resource_type\": \"dedicated_host_disk\", \"size\": 4, \"supported_instance_interface_types\": [\"nvme\"]}], \"group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"id\": \"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"name\": \"my-dedicated-host-group\", \"resource_type\": \"dedicated_host_group\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"instance_placement_enabled\": true, \"instances\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}], \"lifecycle_state\": \"stable\", \"memory\": 128, \"name\": \"my-host\", \"numa\": {\"count\": 2, \"nodes\": [{\"available_vcpu\": 24, \"vcpu\": 56}]}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"name\": \"mx2-host-152x1216\"}, \"provisionable\": false, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"dedicated_host\", \"socket_count\": 4, \"state\": \"available\", \"supported_instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"vcpu\": {\"architecture\": \"amd64\", \"count\": 4, \"manufacturer\": \"intel\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listDedicatedHostsPath = "/dedicated_hosts"; + String mockResponseBody = "{\"cluster_network_attachments\": [{\"before\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}, \"cluster_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"address\": \"10.1.0.6\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"resource_type\": \"cluster_network_subnet_reserved_ip\"}, \"resource_type\": \"cluster_network_interface\", \"subnet\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\"}}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listInstanceClusterNetworkAttachmentsPath = "/instances/testString/cluster_network_attachments"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListDedicatedHostsOptions model - ListDedicatedHostsOptions listDedicatedHostsOptionsModel = new ListDedicatedHostsOptions.Builder() - .dedicatedHostGroupId("testString") + // Construct an instance of the ListInstanceClusterNetworkAttachmentsOptions model + ListInstanceClusterNetworkAttachmentsOptions listInstanceClusterNetworkAttachmentsOptionsModel = new ListInstanceClusterNetworkAttachmentsOptions.Builder() + .instanceId("testString") .start("testString") .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .zoneName("us-south-1") - .name("my-name") .build(); - // Invoke listDedicatedHosts() with a valid options model and verify the result - Response response = vpcService.listDedicatedHosts(listDedicatedHostsOptionsModel).execute(); + // Invoke listInstanceClusterNetworkAttachments() with a valid options model and verify the result + Response response = vpcService.listInstanceClusterNetworkAttachments(listInstanceClusterNetworkAttachmentsOptionsModel).execute(); assertNotNull(response); - DedicatedHostCollection responseObj = response.getResult(); + InstanceClusterNetworkAttachmentCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -12909,36 +14819,39 @@ public void testListDedicatedHostsWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listDedicatedHostsPath); + assertEquals(parsedPath, listInstanceClusterNetworkAttachmentsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("dedicated_host_group.id"), "testString"); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("resource_group.id"), "testString"); - assertEquals(query.get("zone.name"), "us-south-1"); - assertEquals(query.get("name"), "my-name"); } - // Test the listDedicatedHosts operation with and without retries enabled + // Test the listInstanceClusterNetworkAttachments operation with and without retries enabled @Test - public void testListDedicatedHostsWRetries() throws Throwable { + public void testListInstanceClusterNetworkAttachmentsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListDedicatedHostsWOptions(); + testListInstanceClusterNetworkAttachmentsWOptions(); vpcService.disableRetries(); - testListDedicatedHostsWOptions(); + testListInstanceClusterNetworkAttachmentsWOptions(); } - // Test the listDedicatedHosts operation using the DedicatedHostsPager.getNext() method + // Test the listInstanceClusterNetworkAttachments operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testListInstanceClusterNetworkAttachmentsNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.listInstanceClusterNetworkAttachments(null).execute(); + } + + // Test the listInstanceClusterNetworkAttachments operation using the InstanceClusterNetworkAttachmentsPager.getNext() method @Test - public void testListDedicatedHostsWithPagerGetNext() throws Throwable { + public void testListInstanceClusterNetworkAttachmentsWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"dedicated_hosts\":[{\"available_memory\":128,\"available_vcpu\":{\"architecture\":\"amd64\",\"count\":4,\"manufacturer\":\"intel\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"disks\":[{\"available\":9,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e\",\"id\":\"0717-bd091a9e-b036-4c65-a79b-56d164911f6e\",\"instance_disks\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\",\"id\":\"10c02d81-0ecb-4dc5-897d-28392913b81e\",\"name\":\"my-instance-disk\",\"resource_type\":\"instance_disk\"}],\"interface_type\":\"nvme\",\"lifecycle_state\":\"stable\",\"name\":\"my-dedicated-host-disk\",\"provisionable\":false,\"resource_type\":\"dedicated_host_disk\",\"size\":4,\"supported_instance_interface_types\":[\"nvme\"]}],\"group\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"id\":\"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"name\":\"my-dedicated-host-group\",\"resource_type\":\"dedicated_host_group\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"id\":\"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"instance_placement_enabled\":true,\"instances\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"name\":\"my-instance\"}],\"lifecycle_state\":\"stable\",\"memory\":128,\"name\":\"my-host\",\"numa\":{\"count\":2,\"nodes\":[{\"available_vcpu\":24,\"vcpu\":56}]},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"name\":\"mx2-host-152x1216\"},\"provisionable\":false,\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"dedicated_host\",\"socket_count\":4,\"state\":\"available\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"vcpu\":{\"architecture\":\"amd64\",\"count\":4,\"manufacturer\":\"intel\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"dedicated_hosts\":[{\"available_memory\":128,\"available_vcpu\":{\"architecture\":\"amd64\",\"count\":4,\"manufacturer\":\"intel\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"disks\":[{\"available\":9,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e\",\"id\":\"0717-bd091a9e-b036-4c65-a79b-56d164911f6e\",\"instance_disks\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\",\"id\":\"10c02d81-0ecb-4dc5-897d-28392913b81e\",\"name\":\"my-instance-disk\",\"resource_type\":\"instance_disk\"}],\"interface_type\":\"nvme\",\"lifecycle_state\":\"stable\",\"name\":\"my-dedicated-host-disk\",\"provisionable\":false,\"resource_type\":\"dedicated_host_disk\",\"size\":4,\"supported_instance_interface_types\":[\"nvme\"]}],\"group\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"id\":\"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"name\":\"my-dedicated-host-group\",\"resource_type\":\"dedicated_host_group\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"id\":\"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"instance_placement_enabled\":true,\"instances\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"name\":\"my-instance\"}],\"lifecycle_state\":\"stable\",\"memory\":128,\"name\":\"my-host\",\"numa\":{\"count\":2,\"nodes\":[{\"available_vcpu\":24,\"vcpu\":56}]},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"name\":\"mx2-host-152x1216\"},\"provisionable\":false,\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"dedicated_host\",\"socket_count\":4,\"state\":\"available\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"vcpu\":{\"architecture\":\"amd64\",\"count\":4,\"manufacturer\":\"intel\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"cluster_network_attachments\":[{\"before\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"},\"cluster_network_interface\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"id\":\"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"name\":\"my-cluster-network-interface\",\"primary_ip\":{\"address\":\"10.1.0.6\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"id\":\"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"name\":\"my-cluster-network-subnet-reserved-ip\",\"resource_type\":\"cluster_network_subnet_reserved_ip\"},\"resource_type\":\"cluster_network_interface\",\"subnet\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"id\":\"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"name\":\"my-cluster-network-subnet\",\"resource_type\":\"cluster_network_subnet\"}},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"}],\"limit\":1}"; + String mockResponsePage2 = "{\"total_count\":2,\"cluster_network_attachments\":[{\"before\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"},\"cluster_network_interface\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"id\":\"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"name\":\"my-cluster-network-interface\",\"primary_ip\":{\"address\":\"10.1.0.6\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"id\":\"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"name\":\"my-cluster-network-subnet-reserved-ip\",\"resource_type\":\"cluster_network_subnet_reserved_ip\"},\"resource_type\":\"cluster_network_interface\",\"subnet\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"id\":\"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"name\":\"my-cluster-network-subnet\",\"resource_type\":\"cluster_network_subnet\"}},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"}],\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -12952,30 +14865,27 @@ public void testListDedicatedHostsWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListDedicatedHostsOptions listDedicatedHostsOptions = new ListDedicatedHostsOptions.Builder() - .dedicatedHostGroupId("testString") + ListInstanceClusterNetworkAttachmentsOptions listInstanceClusterNetworkAttachmentsOptions = new ListInstanceClusterNetworkAttachmentsOptions.Builder() + .instanceId("testString") .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .zoneName("us-south-1") - .name("my-name") .build(); - List allResults = new ArrayList<>(); - DedicatedHostsPager pager = new DedicatedHostsPager(vpcService, listDedicatedHostsOptions); + List allResults = new ArrayList<>(); + InstanceClusterNetworkAttachmentsPager pager = new InstanceClusterNetworkAttachmentsPager(vpcService, listInstanceClusterNetworkAttachmentsOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listDedicatedHosts operation using the DedicatedHostsPager.getAll() method + // Test the listInstanceClusterNetworkAttachments operation using the InstanceClusterNetworkAttachmentsPager.getAll() method @Test - public void testListDedicatedHostsWithPagerGetAll() throws Throwable { + public void testListInstanceClusterNetworkAttachmentsWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"dedicated_hosts\":[{\"available_memory\":128,\"available_vcpu\":{\"architecture\":\"amd64\",\"count\":4,\"manufacturer\":\"intel\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"disks\":[{\"available\":9,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e\",\"id\":\"0717-bd091a9e-b036-4c65-a79b-56d164911f6e\",\"instance_disks\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\",\"id\":\"10c02d81-0ecb-4dc5-897d-28392913b81e\",\"name\":\"my-instance-disk\",\"resource_type\":\"instance_disk\"}],\"interface_type\":\"nvme\",\"lifecycle_state\":\"stable\",\"name\":\"my-dedicated-host-disk\",\"provisionable\":false,\"resource_type\":\"dedicated_host_disk\",\"size\":4,\"supported_instance_interface_types\":[\"nvme\"]}],\"group\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"id\":\"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"name\":\"my-dedicated-host-group\",\"resource_type\":\"dedicated_host_group\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"id\":\"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"instance_placement_enabled\":true,\"instances\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"name\":\"my-instance\"}],\"lifecycle_state\":\"stable\",\"memory\":128,\"name\":\"my-host\",\"numa\":{\"count\":2,\"nodes\":[{\"available_vcpu\":24,\"vcpu\":56}]},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"name\":\"mx2-host-152x1216\"},\"provisionable\":false,\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"dedicated_host\",\"socket_count\":4,\"state\":\"available\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"vcpu\":{\"architecture\":\"amd64\",\"count\":4,\"manufacturer\":\"intel\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"dedicated_hosts\":[{\"available_memory\":128,\"available_vcpu\":{\"architecture\":\"amd64\",\"count\":4,\"manufacturer\":\"intel\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"disks\":[{\"available\":9,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e\",\"id\":\"0717-bd091a9e-b036-4c65-a79b-56d164911f6e\",\"instance_disks\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\",\"id\":\"10c02d81-0ecb-4dc5-897d-28392913b81e\",\"name\":\"my-instance-disk\",\"resource_type\":\"instance_disk\"}],\"interface_type\":\"nvme\",\"lifecycle_state\":\"stable\",\"name\":\"my-dedicated-host-disk\",\"provisionable\":false,\"resource_type\":\"dedicated_host_disk\",\"size\":4,\"supported_instance_interface_types\":[\"nvme\"]}],\"group\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"id\":\"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"name\":\"my-dedicated-host-group\",\"resource_type\":\"dedicated_host_group\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"id\":\"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"instance_placement_enabled\":true,\"instances\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"name\":\"my-instance\"}],\"lifecycle_state\":\"stable\",\"memory\":128,\"name\":\"my-host\",\"numa\":{\"count\":2,\"nodes\":[{\"available_vcpu\":24,\"vcpu\":56}]},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"name\":\"mx2-host-152x1216\"},\"provisionable\":false,\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"dedicated_host\",\"socket_count\":4,\"state\":\"available\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"vcpu\":{\"architecture\":\"amd64\",\"count\":4,\"manufacturer\":\"intel\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"cluster_network_attachments\":[{\"before\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"},\"cluster_network_interface\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"id\":\"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"name\":\"my-cluster-network-interface\",\"primary_ip\":{\"address\":\"10.1.0.6\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"id\":\"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"name\":\"my-cluster-network-subnet-reserved-ip\",\"resource_type\":\"cluster_network_subnet_reserved_ip\"},\"resource_type\":\"cluster_network_interface\",\"subnet\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"id\":\"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"name\":\"my-cluster-network-subnet\",\"resource_type\":\"cluster_network_subnet\"}},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"}],\"limit\":1}"; + String mockResponsePage2 = "{\"total_count\":2,\"cluster_network_attachments\":[{\"before\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"},\"cluster_network_interface\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"id\":\"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"name\":\"my-cluster-network-interface\",\"primary_ip\":{\"address\":\"10.1.0.6\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"id\":\"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"name\":\"my-cluster-network-subnet-reserved-ip\",\"resource_type\":\"cluster_network_subnet_reserved_ip\"},\"resource_type\":\"cluster_network_interface\",\"subnet\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"id\":\"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"name\":\"my-cluster-network-subnet\",\"resource_type\":\"cluster_network_subnet\"}},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"}],\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -12989,117 +14899,90 @@ public void testListDedicatedHostsWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListDedicatedHostsOptions listDedicatedHostsOptions = new ListDedicatedHostsOptions.Builder() - .dedicatedHostGroupId("testString") + ListInstanceClusterNetworkAttachmentsOptions listInstanceClusterNetworkAttachmentsOptions = new ListInstanceClusterNetworkAttachmentsOptions.Builder() + .instanceId("testString") .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .zoneName("us-south-1") - .name("my-name") .build(); - DedicatedHostsPager pager = new DedicatedHostsPager(vpcService, listDedicatedHostsOptions); - List allResults = pager.getAll(); + InstanceClusterNetworkAttachmentsPager pager = new InstanceClusterNetworkAttachmentsPager(vpcService, listInstanceClusterNetworkAttachmentsOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the createDedicatedHost operation with a valid options model parameter + // Test the listInstanceDisks operation with a valid options model parameter @Test - public void testCreateDedicatedHostWOptions() throws Throwable { + public void testListInstanceDisksWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"available_memory\": 128, \"available_vcpu\": {\"architecture\": \"amd64\", \"count\": 4, \"manufacturer\": \"intel\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"disks\": [{\"available\": 9, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"id\": \"0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"instance_disks\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\"}], \"interface_type\": \"nvme\", \"lifecycle_state\": \"stable\", \"name\": \"my-dedicated-host-disk\", \"provisionable\": false, \"resource_type\": \"dedicated_host_disk\", \"size\": 4, \"supported_instance_interface_types\": [\"nvme\"]}], \"group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"id\": \"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"name\": \"my-dedicated-host-group\", \"resource_type\": \"dedicated_host_group\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"instance_placement_enabled\": true, \"instances\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}], \"lifecycle_state\": \"stable\", \"memory\": 128, \"name\": \"my-host\", \"numa\": {\"count\": 2, \"nodes\": [{\"available_vcpu\": 24, \"vcpu\": 56}]}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"name\": \"mx2-host-152x1216\"}, \"provisionable\": false, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"dedicated_host\", \"socket_count\": 4, \"state\": \"available\", \"supported_instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"vcpu\": {\"architecture\": \"amd64\", \"count\": 4, \"manufacturer\": \"intel\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String createDedicatedHostPath = "/dedicated_hosts"; + String mockResponseBody = "{\"disks\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"interface_type\": \"nvme\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\", \"size\": 100}]}"; + String listInstanceDisksPath = "/instances/testString/disks"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DedicatedHostProfileIdentityByName model - DedicatedHostProfileIdentityByName dedicatedHostProfileIdentityModel = new DedicatedHostProfileIdentityByName.Builder() - .name("mx2-host-152x1216") - .build(); - - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); - - // Construct an instance of the DedicatedHostGroupIdentityById model - DedicatedHostGroupIdentityById dedicatedHostGroupIdentityModel = new DedicatedHostGroupIdentityById.Builder() - .id("0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0") - .build(); - - // Construct an instance of the DedicatedHostPrototypeDedicatedHostByGroup model - DedicatedHostPrototypeDedicatedHostByGroup dedicatedHostPrototypeModel = new DedicatedHostPrototypeDedicatedHostByGroup.Builder() - .instancePlacementEnabled(true) - .name("my-host") - .profile(dedicatedHostProfileIdentityModel) - .resourceGroup(resourceGroupIdentityModel) - .group(dedicatedHostGroupIdentityModel) - .build(); - - // Construct an instance of the CreateDedicatedHostOptions model - CreateDedicatedHostOptions createDedicatedHostOptionsModel = new CreateDedicatedHostOptions.Builder() - .dedicatedHostPrototype(dedicatedHostPrototypeModel) + // Construct an instance of the ListInstanceDisksOptions model + ListInstanceDisksOptions listInstanceDisksOptionsModel = new ListInstanceDisksOptions.Builder() + .instanceId("testString") .build(); - // Invoke createDedicatedHost() with a valid options model and verify the result - Response response = vpcService.createDedicatedHost(createDedicatedHostOptionsModel).execute(); + // Invoke listInstanceDisks() with a valid options model and verify the result + Response response = vpcService.listInstanceDisks(listInstanceDisksOptionsModel).execute(); assertNotNull(response); - DedicatedHost responseObj = response.getResult(); + InstanceDiskCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createDedicatedHostPath); + assertEquals(parsedPath, listInstanceDisksPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createDedicatedHost operation with and without retries enabled + // Test the listInstanceDisks operation with and without retries enabled @Test - public void testCreateDedicatedHostWRetries() throws Throwable { + public void testListInstanceDisksWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateDedicatedHostWOptions(); + testListInstanceDisksWOptions(); vpcService.disableRetries(); - testCreateDedicatedHostWOptions(); + testListInstanceDisksWOptions(); } - // Test the createDedicatedHost operation with a null options model (negative test) + // Test the listInstanceDisks operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateDedicatedHostNoOptions() throws Throwable { + public void testListInstanceDisksNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createDedicatedHost(null).execute(); + vpcService.listInstanceDisks(null).execute(); } - // Test the listDedicatedHostDisks operation with a valid options model parameter + // Test the listInstanceNetworkAttachments operation with a valid options model parameter @Test - public void testListDedicatedHostDisksWOptions() throws Throwable { + public void testListInstanceNetworkAttachmentsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"disks\": [{\"available\": 9, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"id\": \"0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"instance_disks\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\"}], \"interface_type\": \"nvme\", \"lifecycle_state\": \"stable\", \"name\": \"my-dedicated-host-disk\", \"provisionable\": false, \"resource_type\": \"dedicated_host_disk\", \"size\": 4, \"supported_instance_interface_types\": [\"nvme\"]}]}"; - String listDedicatedHostDisksPath = "/dedicated_hosts/testString/disks"; + String mockResponseBody = "{\"network_attachments\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"lifecycle_state\": \"stable\", \"name\": \"my-instance-network-attachment\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"instance_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}]}"; + String listInstanceNetworkAttachmentsPath = "/instances/testString/network_attachments"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListDedicatedHostDisksOptions model - ListDedicatedHostDisksOptions listDedicatedHostDisksOptionsModel = new ListDedicatedHostDisksOptions.Builder() - .dedicatedHostId("testString") + // Construct an instance of the ListInstanceNetworkAttachmentsOptions model + ListInstanceNetworkAttachmentsOptions listInstanceNetworkAttachmentsOptionsModel = new ListInstanceNetworkAttachmentsOptions.Builder() + .instanceId("testString") .build(); - // Invoke listDedicatedHostDisks() with a valid options model and verify the result - Response response = vpcService.listDedicatedHostDisks(listDedicatedHostDisksOptionsModel).execute(); + // Invoke listInstanceNetworkAttachments() with a valid options model and verify the result + Response response = vpcService.listInstanceNetworkAttachments(listInstanceNetworkAttachmentsOptionsModel).execute(); assertNotNull(response); - DedicatedHostDiskCollection responseObj = response.getResult(); + InstanceNetworkAttachmentCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -13108,52 +14991,52 @@ public void testListDedicatedHostDisksWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listDedicatedHostDisksPath); + assertEquals(parsedPath, listInstanceNetworkAttachmentsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the listDedicatedHostDisks operation with and without retries enabled + // Test the listInstanceNetworkAttachments operation with and without retries enabled @Test - public void testListDedicatedHostDisksWRetries() throws Throwable { + public void testListInstanceNetworkAttachmentsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListDedicatedHostDisksWOptions(); + testListInstanceNetworkAttachmentsWOptions(); vpcService.disableRetries(); - testListDedicatedHostDisksWOptions(); + testListInstanceNetworkAttachmentsWOptions(); } - // Test the listDedicatedHostDisks operation with a null options model (negative test) + // Test the listInstanceNetworkAttachments operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListDedicatedHostDisksNoOptions() throws Throwable { + public void testListInstanceNetworkAttachmentsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listDedicatedHostDisks(null).execute(); + vpcService.listInstanceNetworkAttachments(null).execute(); } - // Test the getDedicatedHostDisk operation with a valid options model parameter + // Test the listInstanceNetworkInterfaceFloatingIps operation with a valid options model parameter @Test - public void testGetDedicatedHostDiskWOptions() throws Throwable { + public void testListInstanceNetworkInterfaceFloatingIpsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"available\": 9, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"id\": \"0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"instance_disks\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\"}], \"interface_type\": \"nvme\", \"lifecycle_state\": \"stable\", \"name\": \"my-dedicated-host-disk\", \"provisionable\": false, \"resource_type\": \"dedicated_host_disk\", \"size\": 4, \"supported_instance_interface_types\": [\"nvme\"]}"; - String getDedicatedHostDiskPath = "/dedicated_hosts/testString/disks/testString"; + String mockResponseBody = "{\"floating_ips\": [{\"address\": \"203.0.113.1\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"available\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}]}"; + String listInstanceNetworkInterfaceFloatingIpsPath = "/instances/testString/network_interfaces/testString/floating_ips"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetDedicatedHostDiskOptions model - GetDedicatedHostDiskOptions getDedicatedHostDiskOptionsModel = new GetDedicatedHostDiskOptions.Builder() - .dedicatedHostId("testString") - .id("testString") + // Construct an instance of the ListInstanceNetworkInterfaceFloatingIpsOptions model + ListInstanceNetworkInterfaceFloatingIpsOptions listInstanceNetworkInterfaceFloatingIpsOptionsModel = new ListInstanceNetworkInterfaceFloatingIpsOptions.Builder() + .instanceId("testString") + .networkInterfaceId("testString") .build(); - // Invoke getDedicatedHostDisk() with a valid options model and verify the result - Response response = vpcService.getDedicatedHostDisk(getDedicatedHostDiskOptionsModel).execute(); + // Invoke listInstanceNetworkInterfaceFloatingIps() with a valid options model and verify the result + Response response = vpcService.listInstanceNetworkInterfaceFloatingIps(listInstanceNetworkInterfaceFloatingIpsOptionsModel).execute(); assertNotNull(response); - DedicatedHostDisk responseObj = response.getResult(); + FloatingIPUnpaginatedCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -13162,164 +15045,226 @@ public void testGetDedicatedHostDiskWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getDedicatedHostDiskPath); + assertEquals(parsedPath, listInstanceNetworkInterfaceFloatingIpsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getDedicatedHostDisk operation with and without retries enabled + // Test the listInstanceNetworkInterfaceFloatingIps operation with and without retries enabled @Test - public void testGetDedicatedHostDiskWRetries() throws Throwable { + public void testListInstanceNetworkInterfaceFloatingIpsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetDedicatedHostDiskWOptions(); + testListInstanceNetworkInterfaceFloatingIpsWOptions(); vpcService.disableRetries(); - testGetDedicatedHostDiskWOptions(); + testListInstanceNetworkInterfaceFloatingIpsWOptions(); } - // Test the getDedicatedHostDisk operation with a null options model (negative test) + // Test the listInstanceNetworkInterfaceFloatingIps operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetDedicatedHostDiskNoOptions() throws Throwable { + public void testListInstanceNetworkInterfaceFloatingIpsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getDedicatedHostDisk(null).execute(); + vpcService.listInstanceNetworkInterfaceFloatingIps(null).execute(); } - // Test the updateDedicatedHostDisk operation with a valid options model parameter + // Test the listInstanceNetworkInterfaceIps operation with a valid options model parameter @Test - public void testUpdateDedicatedHostDiskWOptions() throws Throwable { + public void testListInstanceNetworkInterfaceIpsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"available\": 9, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"id\": \"0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"instance_disks\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\"}], \"interface_type\": \"nvme\", \"lifecycle_state\": \"stable\", \"name\": \"my-dedicated-host-disk\", \"provisionable\": false, \"resource_type\": \"dedicated_host_disk\", \"size\": 4, \"supported_instance_interface_types\": [\"nvme\"]}"; - String updateDedicatedHostDiskPath = "/dedicated_hosts/testString/disks/testString"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"ips\": [{\"address\": \"192.168.3.4\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"lifecycle_state\": \"stable\", \"name\": \"my-reserved-ip\", \"owner\": \"provider\", \"resource_type\": \"subnet_reserved_ip\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"resource_type\": \"endpoint_gateway\"}}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listInstanceNetworkInterfaceIpsPath = "/instances/testString/network_interfaces/testString/ips"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DedicatedHostDiskPatch model - DedicatedHostDiskPatch dedicatedHostDiskPatchModel = new DedicatedHostDiskPatch.Builder() - .name("my-dedicated-host-disk-updated") - .build(); - Map dedicatedHostDiskPatchModelAsPatch = dedicatedHostDiskPatchModel.asPatch(); - - // Construct an instance of the UpdateDedicatedHostDiskOptions model - UpdateDedicatedHostDiskOptions updateDedicatedHostDiskOptionsModel = new UpdateDedicatedHostDiskOptions.Builder() - .dedicatedHostId("testString") - .id("testString") - .dedicatedHostDiskPatch(dedicatedHostDiskPatchModelAsPatch) + // Construct an instance of the ListInstanceNetworkInterfaceIpsOptions model + ListInstanceNetworkInterfaceIpsOptions listInstanceNetworkInterfaceIpsOptionsModel = new ListInstanceNetworkInterfaceIpsOptions.Builder() + .instanceId("testString") + .networkInterfaceId("testString") + .start("testString") + .limit(Long.valueOf("10")) .build(); - // Invoke updateDedicatedHostDisk() with a valid options model and verify the result - Response response = vpcService.updateDedicatedHostDisk(updateDedicatedHostDiskOptionsModel).execute(); + // Invoke listInstanceNetworkInterfaceIps() with a valid options model and verify the result + Response response = vpcService.listInstanceNetworkInterfaceIps(listInstanceNetworkInterfaceIpsOptionsModel).execute(); assertNotNull(response); - DedicatedHostDisk responseObj = response.getResult(); + ReservedIPCollectionInstanceNetworkInterfaceContext responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateDedicatedHostDiskPath); + assertEquals(parsedPath, listInstanceNetworkInterfaceIpsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the updateDedicatedHostDisk operation with and without retries enabled + // Test the listInstanceNetworkInterfaceIps operation with and without retries enabled @Test - public void testUpdateDedicatedHostDiskWRetries() throws Throwable { + public void testListInstanceNetworkInterfaceIpsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateDedicatedHostDiskWOptions(); + testListInstanceNetworkInterfaceIpsWOptions(); vpcService.disableRetries(); - testUpdateDedicatedHostDiskWOptions(); + testListInstanceNetworkInterfaceIpsWOptions(); } - // Test the updateDedicatedHostDisk operation with a null options model (negative test) + // Test the listInstanceNetworkInterfaceIps operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateDedicatedHostDiskNoOptions() throws Throwable { + public void testListInstanceNetworkInterfaceIpsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateDedicatedHostDisk(null).execute(); + vpcService.listInstanceNetworkInterfaceIps(null).execute(); } - // Test the deleteDedicatedHost operation with a valid options model parameter + // Test the listInstanceNetworkInterfaceIps operation using the InstanceNetworkInterfaceIpsPager.getNext() method @Test - public void testDeleteDedicatedHostWOptions() throws Throwable { + public void testListInstanceNetworkInterfaceIpsWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"ips\":[{\"address\":\"192.168.3.4\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"lifecycle_state\":\"stable\",\"name\":\"my-reserved-ip\",\"owner\":\"provider\",\"resource_type\":\"subnet_reserved_ip\",\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"resource_type\":\"endpoint_gateway\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"ips\":[{\"address\":\"192.168.3.4\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"lifecycle_state\":\"stable\",\"name\":\"my-reserved-ip\",\"owner\":\"provider\",\"resource_type\":\"subnet_reserved_ip\",\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"resource_type\":\"endpoint_gateway\"}}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListInstanceNetworkInterfaceIpsOptions listInstanceNetworkInterfaceIpsOptions = new ListInstanceNetworkInterfaceIpsOptions.Builder() + .instanceId("testString") + .networkInterfaceId("testString") + .limit(Long.valueOf("10")) + .build(); + + List allResults = new ArrayList<>(); + InstanceNetworkInterfaceIpsPager pager = new InstanceNetworkInterfaceIpsPager(vpcService, listInstanceNetworkInterfaceIpsOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); + } + + // Test the listInstanceNetworkInterfaceIps operation using the InstanceNetworkInterfaceIpsPager.getAll() method + @Test + public void testListInstanceNetworkInterfaceIpsWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"ips\":[{\"address\":\"192.168.3.4\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"lifecycle_state\":\"stable\",\"name\":\"my-reserved-ip\",\"owner\":\"provider\",\"resource_type\":\"subnet_reserved_ip\",\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"resource_type\":\"endpoint_gateway\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"ips\":[{\"address\":\"192.168.3.4\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"lifecycle_state\":\"stable\",\"name\":\"my-reserved-ip\",\"owner\":\"provider\",\"resource_type\":\"subnet_reserved_ip\",\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"resource_type\":\"endpoint_gateway\"}}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListInstanceNetworkInterfaceIpsOptions listInstanceNetworkInterfaceIpsOptions = new ListInstanceNetworkInterfaceIpsOptions.Builder() + .instanceId("testString") + .networkInterfaceId("testString") + .limit(Long.valueOf("10")) + .build(); + + InstanceNetworkInterfaceIpsPager pager = new InstanceNetworkInterfaceIpsPager(vpcService, listInstanceNetworkInterfaceIpsOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); + } + + // Test the listInstanceNetworkInterfaces operation with a valid options model parameter + @Test + public void testListInstanceNetworkInterfacesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteDedicatedHostPath = "/dedicated_hosts/testString"; + String mockResponseBody = "{\"network_interfaces\": [{\"allow_ip_spoofing\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"floating_ips\": [{\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}], \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"status\": \"available\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\"}]}"; + String listInstanceNetworkInterfacesPath = "/instances/testString/network_interfaces"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteDedicatedHostOptions model - DeleteDedicatedHostOptions deleteDedicatedHostOptionsModel = new DeleteDedicatedHostOptions.Builder() - .id("testString") + // Construct an instance of the ListInstanceNetworkInterfacesOptions model + ListInstanceNetworkInterfacesOptions listInstanceNetworkInterfacesOptionsModel = new ListInstanceNetworkInterfacesOptions.Builder() + .instanceId("testString") .build(); - // Invoke deleteDedicatedHost() with a valid options model and verify the result - Response response = vpcService.deleteDedicatedHost(deleteDedicatedHostOptionsModel).execute(); + // Invoke listInstanceNetworkInterfaces() with a valid options model and verify the result + Response response = vpcService.listInstanceNetworkInterfaces(listInstanceNetworkInterfacesOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + NetworkInterfaceUnpaginatedCollection 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteDedicatedHostPath); + assertEquals(parsedPath, listInstanceNetworkInterfacesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteDedicatedHost operation with and without retries enabled + // Test the listInstanceNetworkInterfaces operation with and without retries enabled @Test - public void testDeleteDedicatedHostWRetries() throws Throwable { + public void testListInstanceNetworkInterfacesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteDedicatedHostWOptions(); + testListInstanceNetworkInterfacesWOptions(); vpcService.disableRetries(); - testDeleteDedicatedHostWOptions(); + testListInstanceNetworkInterfacesWOptions(); } - // Test the deleteDedicatedHost operation with a null options model (negative test) + // Test the listInstanceNetworkInterfaces operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteDedicatedHostNoOptions() throws Throwable { + public void testListInstanceNetworkInterfacesNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteDedicatedHost(null).execute(); + vpcService.listInstanceNetworkInterfaces(null).execute(); } - // Test the getDedicatedHost operation with a valid options model parameter + // Test the listInstanceProfiles operation with a valid options model parameter @Test - public void testGetDedicatedHostWOptions() throws Throwable { + public void testListInstanceProfilesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"available_memory\": 128, \"available_vcpu\": {\"architecture\": \"amd64\", \"count\": 4, \"manufacturer\": \"intel\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"disks\": [{\"available\": 9, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"id\": \"0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"instance_disks\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\"}], \"interface_type\": \"nvme\", \"lifecycle_state\": \"stable\", \"name\": \"my-dedicated-host-disk\", \"provisionable\": false, \"resource_type\": \"dedicated_host_disk\", \"size\": 4, \"supported_instance_interface_types\": [\"nvme\"]}], \"group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"id\": \"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"name\": \"my-dedicated-host-group\", \"resource_type\": \"dedicated_host_group\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"instance_placement_enabled\": true, \"instances\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}], \"lifecycle_state\": \"stable\", \"memory\": 128, \"name\": \"my-host\", \"numa\": {\"count\": 2, \"nodes\": [{\"available_vcpu\": 24, \"vcpu\": 56}]}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"name\": \"mx2-host-152x1216\"}, \"provisionable\": false, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"dedicated_host\", \"socket_count\": 4, \"state\": \"available\", \"supported_instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"vcpu\": {\"architecture\": \"amd64\", \"count\": 4, \"manufacturer\": \"intel\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String getDedicatedHostPath = "/dedicated_hosts/testString"; + String mockResponseBody = "{\"profiles\": [{\"bandwidth\": {\"type\": \"fixed\", \"value\": 20000}, \"cluster_network_attachment_count\": {\"type\": \"dependent\"}, \"confidential_compute_modes\": {\"default\": \"disabled\", \"type\": \"enum\", \"values\": [\"disabled\"]}, \"disks\": [{\"quantity\": {\"type\": \"fixed\", \"value\": 4}, \"size\": {\"type\": \"fixed\", \"value\": 100}, \"supported_interface_types\": {\"default\": \"nvme\", \"type\": \"enum\", \"values\": [\"nvme\"]}}], \"family\": \"balanced\", \"gpu_count\": {\"type\": \"fixed\", \"value\": 2}, \"gpu_manufacturer\": {\"type\": \"enum\", \"values\": [\"amd\"]}, \"gpu_memory\": {\"type\": \"fixed\", \"value\": 16}, \"gpu_model\": {\"type\": \"enum\", \"values\": [\"Tesla V100\"]}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"memory\": {\"type\": \"fixed\", \"value\": 16}, \"name\": \"bx2-4x16\", \"network_attachment_count\": {\"max\": 5, \"min\": 1, \"type\": \"range\"}, \"network_interface_count\": {\"max\": 5, \"min\": 1, \"type\": \"range\"}, \"numa_count\": {\"type\": \"fixed\", \"value\": 2}, \"os_architecture\": {\"default\": \"amd64\", \"type\": \"enum\", \"values\": [\"amd64\"]}, \"port_speed\": {\"type\": \"fixed\", \"value\": 1000}, \"reservation_terms\": {\"type\": \"enum\", \"values\": [\"one_year\"]}, \"resource_type\": \"instance_profile\", \"secure_boot_modes\": {\"default\": true, \"type\": \"enum\", \"values\": [true]}, \"status\": \"current\", \"supported_cluster_network_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\", \"name\": \"h100\", \"resource_type\": \"cluster_network_profile\"}], \"total_volume_bandwidth\": {\"type\": \"fixed\", \"value\": 20000}, \"vcpu_architecture\": {\"type\": \"fixed\", \"value\": \"amd64\"}, \"vcpu_count\": {\"type\": \"fixed\", \"value\": 16}, \"vcpu_manufacturer\": {\"type\": \"fixed\", \"value\": \"intel\"}, \"volume_bandwidth_qos_modes\": {\"default\": \"pooled\", \"type\": \"enum\", \"values\": [\"pooled\"]}}]}"; + String listInstanceProfilesPath = "/instance/profiles"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetDedicatedHostOptions model - GetDedicatedHostOptions getDedicatedHostOptionsModel = new GetDedicatedHostOptions.Builder() - .id("testString") - .build(); + // Construct an instance of the ListInstanceProfilesOptions model + ListInstanceProfilesOptions listInstanceProfilesOptionsModel = new ListInstanceProfilesOptions(); - // Invoke getDedicatedHost() with a valid options model and verify the result - Response response = vpcService.getDedicatedHost(getDedicatedHostOptionsModel).execute(); + // Invoke listInstanceProfiles() with a valid options model and verify the result + Response response = vpcService.listInstanceProfiles(listInstanceProfilesOptionsModel).execute(); assertNotNull(response); - DedicatedHost responseObj = response.getResult(); + InstanceProfileCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -13328,113 +15273,116 @@ public void testGetDedicatedHostWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getDedicatedHostPath); + assertEquals(parsedPath, listInstanceProfilesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getDedicatedHost operation with and without retries enabled + // Test the listInstanceProfiles operation with and without retries enabled @Test - public void testGetDedicatedHostWRetries() throws Throwable { + public void testListInstanceProfilesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetDedicatedHostWOptions(); + testListInstanceProfilesWOptions(); vpcService.disableRetries(); - testGetDedicatedHostWOptions(); - } - - // Test the getDedicatedHost operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetDedicatedHostNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.getDedicatedHost(null).execute(); + testListInstanceProfilesWOptions(); } - // Test the updateDedicatedHost operation with a valid options model parameter + // Test the listInstanceVolumeAttachments operation with a valid options model parameter @Test - public void testUpdateDedicatedHostWOptions() throws Throwable { + public void testListInstanceVolumeAttachmentsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"available_memory\": 128, \"available_vcpu\": {\"architecture\": \"amd64\", \"count\": 4, \"manufacturer\": \"intel\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"disks\": [{\"available\": 9, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"id\": \"0717-bd091a9e-b036-4c65-a79b-56d164911f6e\", \"instance_disks\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\"}], \"interface_type\": \"nvme\", \"lifecycle_state\": \"stable\", \"name\": \"my-dedicated-host-disk\", \"provisionable\": false, \"resource_type\": \"dedicated_host_disk\", \"size\": 4, \"supported_instance_interface_types\": [\"nvme\"]}], \"group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"id\": \"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"name\": \"my-dedicated-host-group\", \"resource_type\": \"dedicated_host_group\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"instance_placement_enabled\": true, \"instances\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}], \"lifecycle_state\": \"stable\", \"memory\": 128, \"name\": \"my-host\", \"numa\": {\"count\": 2, \"nodes\": [{\"available_vcpu\": 24, \"vcpu\": 56}]}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"name\": \"mx2-host-152x1216\"}, \"provisionable\": false, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"dedicated_host\", \"socket_count\": 4, \"state\": \"available\", \"supported_instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"vcpu\": {\"architecture\": \"amd64\", \"count\": 4, \"manufacturer\": \"intel\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String updateDedicatedHostPath = "/dedicated_hosts/testString"; + String mockResponseBody = "{\"volume_attachments\": [{\"bandwidth\": 250, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"delete_volume_on_instance_delete\": true, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"name\": \"my-volume-attachment\", \"status\": \"attached\", \"type\": \"boot\", \"volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"resource_type\": \"volume\"}}]}"; + String listInstanceVolumeAttachmentsPath = "/instances/testString/volume_attachments"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DedicatedHostPatch model - DedicatedHostPatch dedicatedHostPatchModel = new DedicatedHostPatch.Builder() - .instancePlacementEnabled(false) - .name("my-host") - .build(); - Map dedicatedHostPatchModelAsPatch = dedicatedHostPatchModel.asPatch(); - - // Construct an instance of the UpdateDedicatedHostOptions model - UpdateDedicatedHostOptions updateDedicatedHostOptionsModel = new UpdateDedicatedHostOptions.Builder() - .id("testString") - .dedicatedHostPatch(dedicatedHostPatchModelAsPatch) + // Construct an instance of the ListInstanceVolumeAttachmentsOptions model + ListInstanceVolumeAttachmentsOptions listInstanceVolumeAttachmentsOptionsModel = new ListInstanceVolumeAttachmentsOptions.Builder() + .instanceId("testString") .build(); - // Invoke updateDedicatedHost() with a valid options model and verify the result - Response response = vpcService.updateDedicatedHost(updateDedicatedHostOptionsModel).execute(); + // Invoke listInstanceVolumeAttachments() with a valid options model and verify the result + Response response = vpcService.listInstanceVolumeAttachments(listInstanceVolumeAttachmentsOptionsModel).execute(); assertNotNull(response); - DedicatedHost responseObj = response.getResult(); + VolumeAttachmentCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateDedicatedHostPath); + assertEquals(parsedPath, listInstanceVolumeAttachmentsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateDedicatedHost operation with and without retries enabled + // Test the listInstanceVolumeAttachments operation with and without retries enabled @Test - public void testUpdateDedicatedHostWRetries() throws Throwable { + public void testListInstanceVolumeAttachmentsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateDedicatedHostWOptions(); + testListInstanceVolumeAttachmentsWOptions(); vpcService.disableRetries(); - testUpdateDedicatedHostWOptions(); + testListInstanceVolumeAttachmentsWOptions(); } - // Test the updateDedicatedHost operation with a null options model (negative test) + // Test the listInstanceVolumeAttachments operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateDedicatedHostNoOptions() throws Throwable { + public void testListInstanceVolumeAttachmentsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateDedicatedHost(null).execute(); + vpcService.listInstanceVolumeAttachments(null).execute(); } - // Test the listPlacementGroups operation with a valid options model parameter + // Test the listInstances operation with a valid options model parameter @Test - public void testListPlacementGroupsWOptions() throws Throwable { + public void testListInstancesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"placement_groups\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r006-418fe842-a3e9-47b9-a938-1aa5bd632871\", \"id\": \"r006-418fe842-a3e9-47b9-a938-1aa5bd632871\", \"lifecycle_state\": \"stable\", \"name\": \"my-placement-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"placement_group\", \"strategy\": \"host_spread\"}], \"total_count\": 132}"; - String listPlacementGroupsPath = "/placement_groups"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"instances\": [{\"availability_policy\": {\"host_failure\": \"restart\"}, \"bandwidth\": 1000, \"boot_volume_attachment\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"name\": \"my-volume-attachment\", \"volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"resource_type\": \"volume\"}}, \"catalog_offering\": {\"plan\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}}, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"cluster_network\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"id\": \"0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"name\": \"my-cluster-network\", \"resource_type\": \"cluster_network\"}, \"cluster_network_attachments\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}], \"confidential_compute_mode\": \"disabled\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"dedicated_host\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"name\": \"my-host\", \"resource_type\": \"dedicated_host\"}, \"disks\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"interface_type\": \"nvme\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\", \"size\": 100}], \"enable_secure_boot\": true, \"gpu\": {\"count\": 1, \"manufacturer\": \"amd\", \"memory\": 1, \"model\": \"Tesla V100\"}, \"health_reasons\": [{\"code\": \"reservation_expired\", \"message\": \"The reservation cannot be used because it has expired.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"memory\": 64, \"metadata_service\": {\"enabled\": false, \"protocol\": \"http\", \"response_hop_limit\": 1}, \"name\": \"my-instance\", \"network_attachments\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"instance_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}], \"network_interfaces\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}], \"numa_count\": 2, \"placement_target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"id\": \"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"name\": \"my-dedicated-host-group\", \"resource_type\": \"dedicated_host_group\"}, \"primary_network_attachment\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"instance_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}, \"primary_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}, \"reservation\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}, \"reservation_affinity\": {\"policy\": \"automatic\", \"pool\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}]}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"instance\", \"startable\": false, \"status\": \"deleting\", \"status_reasons\": [{\"code\": \"cannot_start_storage\", \"message\": \"The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"total_network_bandwidth\": 500, \"total_volume_bandwidth\": 500, \"vcpu\": {\"architecture\": \"amd64\", \"count\": 4, \"manufacturer\": \"intel\"}, \"volume_attachments\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"name\": \"my-volume-attachment\", \"volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"resource_type\": \"volume\"}}], \"volume_bandwidth_qos_mode\": \"pooled\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listInstancesPath = "/instances"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListPlacementGroupsOptions model - ListPlacementGroupsOptions listPlacementGroupsOptionsModel = new ListPlacementGroupsOptions.Builder() + // Construct an instance of the ListInstancesOptions model + ListInstancesOptions listInstancesOptionsModel = new ListInstancesOptions.Builder() .start("testString") .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .name("my-name") + .clusterNetworkId("testString") + .clusterNetworkCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573") + .clusterNetworkName("my-cluster-network") + .dedicatedHostId("testString") + .dedicatedHostCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a") + .dedicatedHostName("my-dedicated-host") + .placementGroupId("testString") + .placementGroupCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871") + .placementGroupName("my-placement-group") + .reservationAffinityPolicy("automatic") + .reservationId("testString") + .reservationCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63") + .reservationName("my-reservation") + .vpcId("testString") + .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .vpcName("my-vpc") .build(); - // Invoke listPlacementGroups() with a valid options model and verify the result - Response response = vpcService.listPlacementGroups(listPlacementGroupsOptionsModel).execute(); + // Invoke listInstances() with a valid options model and verify the result + Response response = vpcService.listInstances(listInstancesOptionsModel).execute(); assertNotNull(response); - PlacementGroupCollection responseObj = response.getResult(); + InstanceCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -13443,32 +15391,50 @@ public void testListPlacementGroupsWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listPlacementGroupsPath); + assertEquals(parsedPath, listInstancesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("resource_group.id"), "testString"); + assertEquals(query.get("name"), "my-name"); + assertEquals(query.get("cluster_network.id"), "testString"); + assertEquals(query.get("cluster_network.crn"), "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573"); + assertEquals(query.get("cluster_network.name"), "my-cluster-network"); + assertEquals(query.get("dedicated_host.id"), "testString"); + assertEquals(query.get("dedicated_host.crn"), "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a"); + assertEquals(query.get("dedicated_host.name"), "my-dedicated-host"); + assertEquals(query.get("placement_group.id"), "testString"); + assertEquals(query.get("placement_group.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871"); + assertEquals(query.get("placement_group.name"), "my-placement-group"); + assertEquals(query.get("reservation_affinity.policy"), "automatic"); + assertEquals(query.get("reservation.id"), "testString"); + assertEquals(query.get("reservation.crn"), "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63"); + assertEquals(query.get("reservation.name"), "my-reservation"); + assertEquals(query.get("vpc.id"), "testString"); + assertEquals(query.get("vpc.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); + assertEquals(query.get("vpc.name"), "my-vpc"); } - // Test the listPlacementGroups operation with and without retries enabled + // Test the listInstances operation with and without retries enabled @Test - public void testListPlacementGroupsWRetries() throws Throwable { + public void testListInstancesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListPlacementGroupsWOptions(); + testListInstancesWOptions(); vpcService.disableRetries(); - testListPlacementGroupsWOptions(); + testListInstancesWOptions(); } - // Test the listPlacementGroups operation using the PlacementGroupsPager.getNext() method + // Test the listInstances operation using the InstancesPager.getNext() method @Test - public void testListPlacementGroupsWithPagerGetNext() throws Throwable { + public void testListInstancesWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"placement_groups\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r006-418fe842-a3e9-47b9-a938-1aa5bd632871\",\"id\":\"r006-418fe842-a3e9-47b9-a938-1aa5bd632871\",\"lifecycle_state\":\"stable\",\"name\":\"my-placement-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"placement_group\",\"strategy\":\"host_spread\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"placement_groups\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r006-418fe842-a3e9-47b9-a938-1aa5bd632871\",\"id\":\"r006-418fe842-a3e9-47b9-a938-1aa5bd632871\",\"lifecycle_state\":\"stable\",\"name\":\"my-placement-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"placement_group\",\"strategy\":\"host_spread\"}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"instances\":[{\"availability_policy\":{\"host_failure\":\"restart\"},\"bandwidth\":1000,\"boot_volume_attachment\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"device\":{\"id\":\"id\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"id\":\"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"name\":\"my-volume-attachment\",\"volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"resource_type\":\"volume\"}},\"catalog_offering\":{\"plan\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}},\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"cluster_network\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"id\":\"0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"name\":\"my-cluster-network\",\"resource_type\":\"cluster_network\"},\"cluster_network_attachments\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"}],\"confidential_compute_mode\":\"disabled\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"dedicated_host\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"id\":\"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"name\":\"my-host\",\"resource_type\":\"dedicated_host\"},\"disks\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\",\"id\":\"10c02d81-0ecb-4dc5-897d-28392913b81e\",\"interface_type\":\"nvme\",\"name\":\"my-instance-disk\",\"resource_type\":\"instance_disk\",\"size\":100}],\"enable_secure_boot\":true,\"gpu\":{\"count\":1,\"manufacturer\":\"amd\",\"memory\":1,\"model\":\"Tesla V100\"},\"health_reasons\":[{\"code\":\"reservation_expired\",\"message\":\"The reservation cannot be used because it has expired.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"image\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"name\":\"my-image\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"image\"},\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"memory\":64,\"metadata_service\":{\"enabled\":false,\"protocol\":\"http\",\"response_hop_limit\":1},\"name\":\"my-instance\",\"network_attachments\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"instance_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}}],\"network_interfaces\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}}],\"numa_count\":2,\"placement_target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"id\":\"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"name\":\"my-dedicated-host-group\",\"resource_type\":\"dedicated_host_group\"},\"primary_network_attachment\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"instance_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}},\"primary_network_interface\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"},\"reservation\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"},\"reservation_affinity\":{\"policy\":\"automatic\",\"pool\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"}]},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"instance\",\"startable\":false,\"status\":\"deleting\",\"status_reasons\":[{\"code\":\"cannot_start_storage\",\"message\":\"The virtual server instance is unusable because the encryption key for the boot volume\\nhas been deleted\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"total_network_bandwidth\":500,\"total_volume_bandwidth\":500,\"vcpu\":{\"architecture\":\"amd64\",\"count\":4,\"manufacturer\":\"intel\"},\"volume_attachments\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"device\":{\"id\":\"id\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"id\":\"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"name\":\"my-volume-attachment\",\"volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"resource_type\":\"volume\"}}],\"volume_bandwidth_qos_mode\":\"pooled\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"instances\":[{\"availability_policy\":{\"host_failure\":\"restart\"},\"bandwidth\":1000,\"boot_volume_attachment\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"device\":{\"id\":\"id\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"id\":\"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"name\":\"my-volume-attachment\",\"volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"resource_type\":\"volume\"}},\"catalog_offering\":{\"plan\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}},\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"cluster_network\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"id\":\"0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"name\":\"my-cluster-network\",\"resource_type\":\"cluster_network\"},\"cluster_network_attachments\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"}],\"confidential_compute_mode\":\"disabled\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"dedicated_host\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"id\":\"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"name\":\"my-host\",\"resource_type\":\"dedicated_host\"},\"disks\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\",\"id\":\"10c02d81-0ecb-4dc5-897d-28392913b81e\",\"interface_type\":\"nvme\",\"name\":\"my-instance-disk\",\"resource_type\":\"instance_disk\",\"size\":100}],\"enable_secure_boot\":true,\"gpu\":{\"count\":1,\"manufacturer\":\"amd\",\"memory\":1,\"model\":\"Tesla V100\"},\"health_reasons\":[{\"code\":\"reservation_expired\",\"message\":\"The reservation cannot be used because it has expired.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"image\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"name\":\"my-image\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"image\"},\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"memory\":64,\"metadata_service\":{\"enabled\":false,\"protocol\":\"http\",\"response_hop_limit\":1},\"name\":\"my-instance\",\"network_attachments\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"instance_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}}],\"network_interfaces\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}}],\"numa_count\":2,\"placement_target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"id\":\"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"name\":\"my-dedicated-host-group\",\"resource_type\":\"dedicated_host_group\"},\"primary_network_attachment\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"instance_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}},\"primary_network_interface\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"},\"reservation\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"},\"reservation_affinity\":{\"policy\":\"automatic\",\"pool\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"}]},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"instance\",\"startable\":false,\"status\":\"deleting\",\"status_reasons\":[{\"code\":\"cannot_start_storage\",\"message\":\"The virtual server instance is unusable because the encryption key for the boot volume\\nhas been deleted\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"total_network_bandwidth\":500,\"total_volume_bandwidth\":500,\"vcpu\":{\"architecture\":\"amd64\",\"count\":4,\"manufacturer\":\"intel\"},\"volume_attachments\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"device\":{\"id\":\"id\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"id\":\"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"name\":\"my-volume-attachment\",\"volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"resource_type\":\"volume\"}}],\"volume_bandwidth_qos_mode\":\"pooled\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -13482,26 +15448,44 @@ public void testListPlacementGroupsWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListPlacementGroupsOptions listPlacementGroupsOptions = new ListPlacementGroupsOptions.Builder() + ListInstancesOptions listInstancesOptions = new ListInstancesOptions.Builder() .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .name("my-name") + .clusterNetworkId("testString") + .clusterNetworkCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573") + .clusterNetworkName("my-cluster-network") + .dedicatedHostId("testString") + .dedicatedHostCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a") + .dedicatedHostName("my-dedicated-host") + .placementGroupId("testString") + .placementGroupCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871") + .placementGroupName("my-placement-group") + .reservationAffinityPolicy("automatic") + .reservationId("testString") + .reservationCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63") + .reservationName("my-reservation") + .vpcId("testString") + .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .vpcName("my-vpc") .build(); - List allResults = new ArrayList<>(); - PlacementGroupsPager pager = new PlacementGroupsPager(vpcService, listPlacementGroupsOptions); + List allResults = new ArrayList<>(); + InstancesPager pager = new InstancesPager(vpcService, listInstancesOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listPlacementGroups operation using the PlacementGroupsPager.getAll() method + // Test the listInstances operation using the InstancesPager.getAll() method @Test - public void testListPlacementGroupsWithPagerGetAll() throws Throwable { + public void testListInstancesWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"placement_groups\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r006-418fe842-a3e9-47b9-a938-1aa5bd632871\",\"id\":\"r006-418fe842-a3e9-47b9-a938-1aa5bd632871\",\"lifecycle_state\":\"stable\",\"name\":\"my-placement-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"placement_group\",\"strategy\":\"host_spread\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"placement_groups\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r006-418fe842-a3e9-47b9-a938-1aa5bd632871\",\"id\":\"r006-418fe842-a3e9-47b9-a938-1aa5bd632871\",\"lifecycle_state\":\"stable\",\"name\":\"my-placement-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"placement_group\",\"strategy\":\"host_spread\"}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"instances\":[{\"availability_policy\":{\"host_failure\":\"restart\"},\"bandwidth\":1000,\"boot_volume_attachment\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"device\":{\"id\":\"id\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"id\":\"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"name\":\"my-volume-attachment\",\"volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"resource_type\":\"volume\"}},\"catalog_offering\":{\"plan\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}},\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"cluster_network\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"id\":\"0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"name\":\"my-cluster-network\",\"resource_type\":\"cluster_network\"},\"cluster_network_attachments\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"}],\"confidential_compute_mode\":\"disabled\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"dedicated_host\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"id\":\"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"name\":\"my-host\",\"resource_type\":\"dedicated_host\"},\"disks\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\",\"id\":\"10c02d81-0ecb-4dc5-897d-28392913b81e\",\"interface_type\":\"nvme\",\"name\":\"my-instance-disk\",\"resource_type\":\"instance_disk\",\"size\":100}],\"enable_secure_boot\":true,\"gpu\":{\"count\":1,\"manufacturer\":\"amd\",\"memory\":1,\"model\":\"Tesla V100\"},\"health_reasons\":[{\"code\":\"reservation_expired\",\"message\":\"The reservation cannot be used because it has expired.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"image\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"name\":\"my-image\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"image\"},\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"memory\":64,\"metadata_service\":{\"enabled\":false,\"protocol\":\"http\",\"response_hop_limit\":1},\"name\":\"my-instance\",\"network_attachments\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"instance_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}}],\"network_interfaces\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}}],\"numa_count\":2,\"placement_target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"id\":\"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"name\":\"my-dedicated-host-group\",\"resource_type\":\"dedicated_host_group\"},\"primary_network_attachment\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"instance_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}},\"primary_network_interface\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"},\"reservation\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"},\"reservation_affinity\":{\"policy\":\"automatic\",\"pool\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"}]},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"instance\",\"startable\":false,\"status\":\"deleting\",\"status_reasons\":[{\"code\":\"cannot_start_storage\",\"message\":\"The virtual server instance is unusable because the encryption key for the boot volume\\nhas been deleted\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"total_network_bandwidth\":500,\"total_volume_bandwidth\":500,\"vcpu\":{\"architecture\":\"amd64\",\"count\":4,\"manufacturer\":\"intel\"},\"volume_attachments\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"device\":{\"id\":\"id\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"id\":\"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"name\":\"my-volume-attachment\",\"volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"resource_type\":\"volume\"}}],\"volume_bandwidth_qos_mode\":\"pooled\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"instances\":[{\"availability_policy\":{\"host_failure\":\"restart\"},\"bandwidth\":1000,\"boot_volume_attachment\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"device\":{\"id\":\"id\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"id\":\"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"name\":\"my-volume-attachment\",\"volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"resource_type\":\"volume\"}},\"catalog_offering\":{\"plan\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}},\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"cluster_network\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"id\":\"0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"name\":\"my-cluster-network\",\"resource_type\":\"cluster_network\"},\"cluster_network_attachments\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"}],\"confidential_compute_mode\":\"disabled\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"dedicated_host\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"id\":\"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\",\"name\":\"my-host\",\"resource_type\":\"dedicated_host\"},\"disks\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\",\"id\":\"10c02d81-0ecb-4dc5-897d-28392913b81e\",\"interface_type\":\"nvme\",\"name\":\"my-instance-disk\",\"resource_type\":\"instance_disk\",\"size\":100}],\"enable_secure_boot\":true,\"gpu\":{\"count\":1,\"manufacturer\":\"amd\",\"memory\":1,\"model\":\"Tesla V100\"},\"health_reasons\":[{\"code\":\"reservation_expired\",\"message\":\"The reservation cannot be used because it has expired.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"image\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"name\":\"my-image\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"image\"},\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"memory\":64,\"metadata_service\":{\"enabled\":false,\"protocol\":\"http\",\"response_hop_limit\":1},\"name\":\"my-instance\",\"network_attachments\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"instance_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}}],\"network_interfaces\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}}],\"numa_count\":2,\"placement_target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"id\":\"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\",\"name\":\"my-dedicated-host-group\",\"resource_type\":\"dedicated_host_group\"},\"primary_network_attachment\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"instance_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}},\"primary_network_interface\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"},\"reservation\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"},\"reservation_affinity\":{\"policy\":\"automatic\",\"pool\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"}]},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"instance\",\"startable\":false,\"status\":\"deleting\",\"status_reasons\":[{\"code\":\"cannot_start_storage\",\"message\":\"The virtual server instance is unusable because the encryption key for the boot volume\\nhas been deleted\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"total_network_bandwidth\":500,\"total_volume_bandwidth\":500,\"vcpu\":{\"architecture\":\"amd64\",\"count\":4,\"manufacturer\":\"intel\"},\"volume_attachments\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"device\":{\"id\":\"id\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"id\":\"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"name\":\"my-volume-attachment\",\"volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"resource_type\":\"volume\"}}],\"volume_bandwidth_qos_mode\":\"pooled\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -13515,93 +15499,53 @@ public void testListPlacementGroupsWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListPlacementGroupsOptions listPlacementGroupsOptions = new ListPlacementGroupsOptions.Builder() + ListInstancesOptions listInstancesOptions = new ListInstancesOptions.Builder() .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .name("my-name") + .clusterNetworkId("testString") + .clusterNetworkCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573") + .clusterNetworkName("my-cluster-network") + .dedicatedHostId("testString") + .dedicatedHostCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a") + .dedicatedHostName("my-dedicated-host") + .placementGroupId("testString") + .placementGroupCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871") + .placementGroupName("my-placement-group") + .reservationAffinityPolicy("automatic") + .reservationId("testString") + .reservationCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63") + .reservationName("my-reservation") + .vpcId("testString") + .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .vpcName("my-vpc") .build(); - PlacementGroupsPager pager = new PlacementGroupsPager(vpcService, listPlacementGroupsOptions); - List allResults = pager.getAll(); + InstancesPager pager = new InstancesPager(vpcService, listInstancesOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the createPlacementGroup operation with a valid options model parameter - @Test - public void testCreatePlacementGroupWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r006-418fe842-a3e9-47b9-a938-1aa5bd632871\", \"id\": \"r006-418fe842-a3e9-47b9-a938-1aa5bd632871\", \"lifecycle_state\": \"stable\", \"name\": \"my-placement-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"placement_group\", \"strategy\": \"host_spread\"}"; - String createPlacementGroupPath = "/placement_groups"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(201) - .setBody(mockResponseBody)); - - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); - - // Construct an instance of the CreatePlacementGroupOptions model - CreatePlacementGroupOptions createPlacementGroupOptionsModel = new CreatePlacementGroupOptions.Builder() - .strategy("host_spread") - .name("my-placement-group") - .resourceGroup(resourceGroupIdentityModel) - .build(); - - // Invoke createPlacementGroup() with a valid options model and verify the result - Response response = vpcService.createPlacementGroup(createPlacementGroupOptionsModel).execute(); - assertNotNull(response); - PlacementGroup responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createPlacementGroupPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - } - - // Test the createPlacementGroup operation with and without retries enabled - @Test - public void testCreatePlacementGroupWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testCreatePlacementGroupWOptions(); - - vpcService.disableRetries(); - testCreatePlacementGroupWOptions(); - } - - // Test the createPlacementGroup operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreatePlacementGroupNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.createPlacementGroup(null).execute(); - } - - // Test the deletePlacementGroup operation with a valid options model parameter + // Test the removeInstanceNetworkInterfaceFloatingIp operation with a valid options model parameter @Test - public void testDeletePlacementGroupWOptions() throws Throwable { + public void testRemoveInstanceNetworkInterfaceFloatingIpWOptions() throws Throwable { // Register a mock response String mockResponseBody = ""; - String deletePlacementGroupPath = "/placement_groups/testString"; + String removeInstanceNetworkInterfaceFloatingIpPath = "/instances/testString/network_interfaces/testString/floating_ips/testString"; server.enqueue(new MockResponse() - .setResponseCode(202) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the DeletePlacementGroupOptions model - DeletePlacementGroupOptions deletePlacementGroupOptionsModel = new DeletePlacementGroupOptions.Builder() + // Construct an instance of the RemoveInstanceNetworkInterfaceFloatingIpOptions model + RemoveInstanceNetworkInterfaceFloatingIpOptions removeInstanceNetworkInterfaceFloatingIpOptionsModel = new RemoveInstanceNetworkInterfaceFloatingIpOptions.Builder() + .instanceId("testString") + .networkInterfaceId("testString") .id("testString") .build(); - // Invoke deletePlacementGroup() with a valid options model and verify the result - Response response = vpcService.deletePlacementGroup(deletePlacementGroupOptionsModel).execute(); + // Invoke removeInstanceNetworkInterfaceFloatingIp() with a valid options model and verify the result + Response response = vpcService.removeInstanceNetworkInterfaceFloatingIp(removeInstanceNetworkInterfaceFloatingIpOptionsModel).execute(); assertNotNull(response); Void responseObj = response.getResult(); assertNull(responseObj); @@ -13612,111 +15556,101 @@ public void testDeletePlacementGroupWOptions() throws Throwable { assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deletePlacementGroupPath); + assertEquals(parsedPath, removeInstanceNetworkInterfaceFloatingIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deletePlacementGroup operation with and without retries enabled + // Test the removeInstanceNetworkInterfaceFloatingIp operation with and without retries enabled @Test - public void testDeletePlacementGroupWRetries() throws Throwable { + public void testRemoveInstanceNetworkInterfaceFloatingIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeletePlacementGroupWOptions(); + testRemoveInstanceNetworkInterfaceFloatingIpWOptions(); vpcService.disableRetries(); - testDeletePlacementGroupWOptions(); + testRemoveInstanceNetworkInterfaceFloatingIpWOptions(); } - // Test the deletePlacementGroup operation with a null options model (negative test) + // Test the removeInstanceNetworkInterfaceFloatingIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeletePlacementGroupNoOptions() throws Throwable { + public void testRemoveInstanceNetworkInterfaceFloatingIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deletePlacementGroup(null).execute(); + vpcService.removeInstanceNetworkInterfaceFloatingIp(null).execute(); } - // Test the getPlacementGroup operation with a valid options model parameter + // Test the updateInstance operation with a valid options model parameter @Test - public void testGetPlacementGroupWOptions() throws Throwable { + public void testUpdateInstanceWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r006-418fe842-a3e9-47b9-a938-1aa5bd632871\", \"id\": \"r006-418fe842-a3e9-47b9-a938-1aa5bd632871\", \"lifecycle_state\": \"stable\", \"name\": \"my-placement-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"placement_group\", \"strategy\": \"host_spread\"}"; - String getPlacementGroupPath = "/placement_groups/testString"; + String mockResponseBody = "{\"availability_policy\": {\"host_failure\": \"restart\"}, \"bandwidth\": 1000, \"boot_volume_attachment\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"name\": \"my-volume-attachment\", \"volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"resource_type\": \"volume\"}}, \"catalog_offering\": {\"plan\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}}, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"cluster_network\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"id\": \"0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"name\": \"my-cluster-network\", \"resource_type\": \"cluster_network\"}, \"cluster_network_attachments\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}], \"confidential_compute_mode\": \"disabled\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"dedicated_host\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"id\": \"0717-1e09281b-f177-46fb-baf1-bc152b2e391a\", \"name\": \"my-host\", \"resource_type\": \"dedicated_host\"}, \"disks\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"interface_type\": \"nvme\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\", \"size\": 100}], \"enable_secure_boot\": true, \"gpu\": {\"count\": 1, \"manufacturer\": \"amd\", \"memory\": 1, \"model\": \"Tesla V100\"}, \"health_reasons\": [{\"code\": \"reservation_expired\", \"message\": \"The reservation cannot be used because it has expired.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"memory\": 64, \"metadata_service\": {\"enabled\": false, \"protocol\": \"http\", \"response_hop_limit\": 1}, \"name\": \"my-instance\", \"network_attachments\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"instance_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}], \"network_interfaces\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}], \"numa_count\": 2, \"placement_target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"id\": \"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0\", \"name\": \"my-dedicated-host-group\", \"resource_type\": \"dedicated_host_group\"}, \"primary_network_attachment\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"instance_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}, \"primary_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}, \"reservation\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}, \"reservation_affinity\": {\"policy\": \"automatic\", \"pool\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}]}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"instance\", \"startable\": false, \"status\": \"deleting\", \"status_reasons\": [{\"code\": \"cannot_start_storage\", \"message\": \"The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"total_network_bandwidth\": 500, \"total_volume_bandwidth\": 500, \"vcpu\": {\"architecture\": \"amd64\", \"count\": 4, \"manufacturer\": \"intel\"}, \"volume_attachments\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"name\": \"my-volume-attachment\", \"volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"resource_type\": \"volume\"}}], \"volume_bandwidth_qos_mode\": \"pooled\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String updateInstancePath = "/instances/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetPlacementGroupOptions model - GetPlacementGroupOptions getPlacementGroupOptionsModel = new GetPlacementGroupOptions.Builder() - .id("testString") + // Construct an instance of the InstanceAvailabilityPolicyPatch model + InstanceAvailabilityPolicyPatch instanceAvailabilityPolicyPatchModel = new InstanceAvailabilityPolicyPatch.Builder() + .hostFailure("restart") .build(); - // Invoke getPlacementGroup() with a valid options model and verify the result - Response response = vpcService.getPlacementGroup(getPlacementGroupOptionsModel).execute(); - assertNotNull(response); - PlacementGroup responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getPlacementGroupPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - } + // Construct an instance of the InstanceMetadataServicePatch model + InstanceMetadataServicePatch instanceMetadataServicePatchModel = new InstanceMetadataServicePatch.Builder() + .enabled(true) + .protocol("http") + .responseHopLimit(Long.valueOf("1")) + .build(); - // Test the getPlacementGroup operation with and without retries enabled - @Test - public void testGetPlacementGroupWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testGetPlacementGroupWOptions(); + // Construct an instance of the InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById model + InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById instancePlacementTargetPatchModel = new InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById.Builder() + .id("0717-1e09281b-f177-46fb-baf1-bc152b2e391a") + .build(); - vpcService.disableRetries(); - testGetPlacementGroupWOptions(); - } + // Construct an instance of the InstancePatchProfileInstanceProfileIdentityByName model + InstancePatchProfileInstanceProfileIdentityByName instancePatchProfileModel = new InstancePatchProfileInstanceProfileIdentityByName.Builder() + .name("bx2-4x16") + .build(); - // Test the getPlacementGroup operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetPlacementGroupNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.getPlacementGroup(null).execute(); - } + // Construct an instance of the ReservationIdentityById model + ReservationIdentityById reservationIdentityModel = new ReservationIdentityById.Builder() + .id("0717-ba49df72-37b8-43ac-98da-f8e029de0e63") + .build(); - // Test the updatePlacementGroup operation with a valid options model parameter - @Test - public void testUpdatePlacementGroupWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r006-418fe842-a3e9-47b9-a938-1aa5bd632871\", \"id\": \"r006-418fe842-a3e9-47b9-a938-1aa5bd632871\", \"lifecycle_state\": \"stable\", \"name\": \"my-placement-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"placement_group\", \"strategy\": \"host_spread\"}"; - String updatePlacementGroupPath = "/placement_groups/testString"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); + // Construct an instance of the InstanceReservationAffinityPatch model + InstanceReservationAffinityPatch instanceReservationAffinityPatchModel = new InstanceReservationAffinityPatch.Builder() + .policy("automatic") + .pool(java.util.Arrays.asList(reservationIdentityModel)) + .build(); - // Construct an instance of the PlacementGroupPatch model - PlacementGroupPatch placementGroupPatchModel = new PlacementGroupPatch.Builder() - .name("my-placement-group-updated") + // Construct an instance of the InstancePatch model + InstancePatch instancePatchModel = new InstancePatch.Builder() + .availabilityPolicy(instanceAvailabilityPolicyPatchModel) + .confidentialComputeMode("disabled") + .enableSecureBoot(true) + .metadataService(instanceMetadataServicePatchModel) + .name("my-instance") + .placementTarget(instancePlacementTargetPatchModel) + .profile(instancePatchProfileModel) + .reservationAffinity(instanceReservationAffinityPatchModel) + .totalVolumeBandwidth(Long.valueOf("500")) + .volumeBandwidthQosMode("pooled") .build(); - Map placementGroupPatchModelAsPatch = placementGroupPatchModel.asPatch(); + Map instancePatchModelAsPatch = instancePatchModel.asPatch(); - // Construct an instance of the UpdatePlacementGroupOptions model - UpdatePlacementGroupOptions updatePlacementGroupOptionsModel = new UpdatePlacementGroupOptions.Builder() + // Construct an instance of the UpdateInstanceOptions model + UpdateInstanceOptions updateInstanceOptionsModel = new UpdateInstanceOptions.Builder() .id("testString") - .placementGroupPatch(placementGroupPatchModelAsPatch) + .instancePatch(instancePatchModelAsPatch) + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke updatePlacementGroup() with a valid options model and verify the result - Response response = vpcService.updatePlacementGroup(updatePlacementGroupOptionsModel).execute(); + // Invoke updateInstance() with a valid options model and verify the result + Response response = vpcService.updateInstance(updateInstanceOptionsModel).execute(); assertNotNull(response); - PlacementGroup responseObj = response.getResult(); + Instance responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -13725,759 +15659,526 @@ public void testUpdatePlacementGroupWOptions() throws Throwable { assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updatePlacementGroupPath); + assertEquals(parsedPath, updateInstancePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updatePlacementGroup operation with and without retries enabled + // Test the updateInstance operation with and without retries enabled @Test - public void testUpdatePlacementGroupWRetries() throws Throwable { + public void testUpdateInstanceWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdatePlacementGroupWOptions(); + testUpdateInstanceWOptions(); vpcService.disableRetries(); - testUpdatePlacementGroupWOptions(); + testUpdateInstanceWOptions(); } - // Test the updatePlacementGroup operation with a null options model (negative test) + // Test the updateInstance operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdatePlacementGroupNoOptions() throws Throwable { + public void testUpdateInstanceNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updatePlacementGroup(null).execute(); + vpcService.updateInstance(null).execute(); } - // Test the listBareMetalServerProfiles operation with a valid options model parameter + // Test the updateInstanceClusterNetworkAttachment operation with a valid options model parameter @Test - public void testListBareMetalServerProfilesWOptions() throws Throwable { + public void testUpdateInstanceClusterNetworkAttachmentWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"profiles\": [{\"bandwidth\": {\"type\": \"fixed\", \"value\": 20000}, \"console_types\": {\"type\": \"enum\", \"values\": [\"serial\"]}, \"cpu_architecture\": {\"type\": \"fixed\", \"value\": \"amd64\"}, \"cpu_core_count\": {\"type\": \"fixed\", \"value\": 80}, \"cpu_socket_count\": {\"type\": \"fixed\", \"value\": 4}, \"disks\": [{\"quantity\": {\"type\": \"fixed\", \"value\": 4}, \"size\": {\"type\": \"fixed\", \"value\": 100}, \"supported_interface_types\": {\"default\": \"fcp\", \"type\": \"enum\", \"values\": [\"fcp\"]}}], \"family\": \"balanced\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\", \"memory\": {\"type\": \"fixed\", \"value\": 16}, \"name\": \"bx2-metal-192x768\", \"network_attachment_count\": {\"max\": 128, \"min\": 1, \"type\": \"range\"}, \"network_interface_count\": {\"max\": 128, \"min\": 1, \"type\": \"range\"}, \"os_architecture\": {\"default\": \"amd64\", \"type\": \"enum\", \"values\": [\"amd64\"]}, \"reservation_terms\": {\"type\": \"enum\", \"values\": [\"one_year\"]}, \"resource_type\": \"bare_metal_server_profile\", \"supported_trusted_platform_module_modes\": {\"default\": \"disabled\", \"type\": \"enum\", \"values\": [\"disabled\"]}, \"virtual_network_interfaces_supported\": {\"type\": \"fixed\", \"value\": false}}], \"total_count\": 132}"; - String listBareMetalServerProfilesPath = "/bare_metal_server/profiles"; + String mockResponseBody = "{\"before\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}, \"cluster_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"address\": \"10.1.0.6\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"resource_type\": \"cluster_network_subnet_reserved_ip\"}, \"resource_type\": \"cluster_network_interface\", \"subnet\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\"}}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}"; + String updateInstanceClusterNetworkAttachmentPath = "/instances/testString/cluster_network_attachments/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListBareMetalServerProfilesOptions model - ListBareMetalServerProfilesOptions listBareMetalServerProfilesOptionsModel = new ListBareMetalServerProfilesOptions.Builder() - .start("testString") - .limit(Long.valueOf("10")) + // Construct an instance of the InstanceClusterNetworkAttachmentPatch model + InstanceClusterNetworkAttachmentPatch instanceClusterNetworkAttachmentPatchModel = new InstanceClusterNetworkAttachmentPatch.Builder() + .name("my-instance-network-attachment-updated") .build(); + Map instanceClusterNetworkAttachmentPatchModelAsPatch = instanceClusterNetworkAttachmentPatchModel.asPatch(); - // Invoke listBareMetalServerProfiles() with a valid options model and verify the result - Response response = vpcService.listBareMetalServerProfiles(listBareMetalServerProfilesOptionsModel).execute(); + // Construct an instance of the UpdateInstanceClusterNetworkAttachmentOptions model + UpdateInstanceClusterNetworkAttachmentOptions updateInstanceClusterNetworkAttachmentOptionsModel = new UpdateInstanceClusterNetworkAttachmentOptions.Builder() + .instanceId("testString") + .id("testString") + .instanceClusterNetworkAttachmentPatch(instanceClusterNetworkAttachmentPatchModelAsPatch) + .build(); + + // Invoke updateInstanceClusterNetworkAttachment() with a valid options model and verify the result + Response response = vpcService.updateInstanceClusterNetworkAttachment(updateInstanceClusterNetworkAttachmentOptionsModel).execute(); assertNotNull(response); - BareMetalServerProfileCollection responseObj = response.getResult(); + InstanceClusterNetworkAttachment responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listBareMetalServerProfilesPath); + assertEquals(parsedPath, updateInstanceClusterNetworkAttachmentPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the listBareMetalServerProfiles operation with and without retries enabled + // Test the updateInstanceClusterNetworkAttachment operation with and without retries enabled @Test - public void testListBareMetalServerProfilesWRetries() throws Throwable { + public void testUpdateInstanceClusterNetworkAttachmentWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListBareMetalServerProfilesWOptions(); + testUpdateInstanceClusterNetworkAttachmentWOptions(); vpcService.disableRetries(); - testListBareMetalServerProfilesWOptions(); - } - - // Test the listBareMetalServerProfiles operation using the BareMetalServerProfilesPager.getNext() method - @Test - public void testListBareMetalServerProfilesWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"profiles\":[{\"bandwidth\":{\"type\":\"fixed\",\"value\":20000},\"console_types\":{\"type\":\"enum\",\"values\":[\"serial\"]},\"cpu_architecture\":{\"type\":\"fixed\",\"value\":\"amd64\"},\"cpu_core_count\":{\"type\":\"fixed\",\"value\":80},\"cpu_socket_count\":{\"type\":\"fixed\",\"value\":4},\"disks\":[{\"quantity\":{\"type\":\"fixed\",\"value\":4},\"size\":{\"type\":\"fixed\",\"value\":100},\"supported_interface_types\":{\"default\":\"fcp\",\"type\":\"enum\",\"values\":[\"fcp\"]}}],\"family\":\"balanced\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\",\"memory\":{\"type\":\"fixed\",\"value\":16},\"name\":\"bx2-metal-192x768\",\"network_attachment_count\":{\"max\":128,\"min\":1,\"type\":\"range\"},\"network_interface_count\":{\"max\":128,\"min\":1,\"type\":\"range\"},\"os_architecture\":{\"default\":\"amd64\",\"type\":\"enum\",\"values\":[\"amd64\"]},\"reservation_terms\":{\"type\":\"enum\",\"values\":[\"one_year\"]},\"resource_type\":\"bare_metal_server_profile\",\"supported_trusted_platform_module_modes\":{\"default\":\"disabled\",\"type\":\"enum\",\"values\":[\"disabled\"]},\"virtual_network_interfaces_supported\":{\"type\":\"fixed\",\"value\":false}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"profiles\":[{\"bandwidth\":{\"type\":\"fixed\",\"value\":20000},\"console_types\":{\"type\":\"enum\",\"values\":[\"serial\"]},\"cpu_architecture\":{\"type\":\"fixed\",\"value\":\"amd64\"},\"cpu_core_count\":{\"type\":\"fixed\",\"value\":80},\"cpu_socket_count\":{\"type\":\"fixed\",\"value\":4},\"disks\":[{\"quantity\":{\"type\":\"fixed\",\"value\":4},\"size\":{\"type\":\"fixed\",\"value\":100},\"supported_interface_types\":{\"default\":\"fcp\",\"type\":\"enum\",\"values\":[\"fcp\"]}}],\"family\":\"balanced\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\",\"memory\":{\"type\":\"fixed\",\"value\":16},\"name\":\"bx2-metal-192x768\",\"network_attachment_count\":{\"max\":128,\"min\":1,\"type\":\"range\"},\"network_interface_count\":{\"max\":128,\"min\":1,\"type\":\"range\"},\"os_architecture\":{\"default\":\"amd64\",\"type\":\"enum\",\"values\":[\"amd64\"]},\"reservation_terms\":{\"type\":\"enum\",\"values\":[\"one_year\"]},\"resource_type\":\"bare_metal_server_profile\",\"supported_trusted_platform_module_modes\":{\"default\":\"disabled\",\"type\":\"enum\",\"values\":[\"disabled\"]},\"virtual_network_interfaces_supported\":{\"type\":\"fixed\",\"value\":false}}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListBareMetalServerProfilesOptions listBareMetalServerProfilesOptions = new ListBareMetalServerProfilesOptions.Builder() - .limit(Long.valueOf("10")) - .build(); - - List allResults = new ArrayList<>(); - BareMetalServerProfilesPager pager = new BareMetalServerProfilesPager(vpcService, listBareMetalServerProfilesOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + testUpdateInstanceClusterNetworkAttachmentWOptions(); } - - // Test the listBareMetalServerProfiles operation using the BareMetalServerProfilesPager.getAll() method - @Test - public void testListBareMetalServerProfilesWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"profiles\":[{\"bandwidth\":{\"type\":\"fixed\",\"value\":20000},\"console_types\":{\"type\":\"enum\",\"values\":[\"serial\"]},\"cpu_architecture\":{\"type\":\"fixed\",\"value\":\"amd64\"},\"cpu_core_count\":{\"type\":\"fixed\",\"value\":80},\"cpu_socket_count\":{\"type\":\"fixed\",\"value\":4},\"disks\":[{\"quantity\":{\"type\":\"fixed\",\"value\":4},\"size\":{\"type\":\"fixed\",\"value\":100},\"supported_interface_types\":{\"default\":\"fcp\",\"type\":\"enum\",\"values\":[\"fcp\"]}}],\"family\":\"balanced\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\",\"memory\":{\"type\":\"fixed\",\"value\":16},\"name\":\"bx2-metal-192x768\",\"network_attachment_count\":{\"max\":128,\"min\":1,\"type\":\"range\"},\"network_interface_count\":{\"max\":128,\"min\":1,\"type\":\"range\"},\"os_architecture\":{\"default\":\"amd64\",\"type\":\"enum\",\"values\":[\"amd64\"]},\"reservation_terms\":{\"type\":\"enum\",\"values\":[\"one_year\"]},\"resource_type\":\"bare_metal_server_profile\",\"supported_trusted_platform_module_modes\":{\"default\":\"disabled\",\"type\":\"enum\",\"values\":[\"disabled\"]},\"virtual_network_interfaces_supported\":{\"type\":\"fixed\",\"value\":false}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"profiles\":[{\"bandwidth\":{\"type\":\"fixed\",\"value\":20000},\"console_types\":{\"type\":\"enum\",\"values\":[\"serial\"]},\"cpu_architecture\":{\"type\":\"fixed\",\"value\":\"amd64\"},\"cpu_core_count\":{\"type\":\"fixed\",\"value\":80},\"cpu_socket_count\":{\"type\":\"fixed\",\"value\":4},\"disks\":[{\"quantity\":{\"type\":\"fixed\",\"value\":4},\"size\":{\"type\":\"fixed\",\"value\":100},\"supported_interface_types\":{\"default\":\"fcp\",\"type\":\"enum\",\"values\":[\"fcp\"]}}],\"family\":\"balanced\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\",\"memory\":{\"type\":\"fixed\",\"value\":16},\"name\":\"bx2-metal-192x768\",\"network_attachment_count\":{\"max\":128,\"min\":1,\"type\":\"range\"},\"network_interface_count\":{\"max\":128,\"min\":1,\"type\":\"range\"},\"os_architecture\":{\"default\":\"amd64\",\"type\":\"enum\",\"values\":[\"amd64\"]},\"reservation_terms\":{\"type\":\"enum\",\"values\":[\"one_year\"]},\"resource_type\":\"bare_metal_server_profile\",\"supported_trusted_platform_module_modes\":{\"default\":\"disabled\",\"type\":\"enum\",\"values\":[\"disabled\"]},\"virtual_network_interfaces_supported\":{\"type\":\"fixed\",\"value\":false}}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListBareMetalServerProfilesOptions listBareMetalServerProfilesOptions = new ListBareMetalServerProfilesOptions.Builder() - .limit(Long.valueOf("10")) - .build(); - BareMetalServerProfilesPager pager = new BareMetalServerProfilesPager(vpcService, listBareMetalServerProfilesOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); + // Test the updateInstanceClusterNetworkAttachment operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testUpdateInstanceClusterNetworkAttachmentNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.updateInstanceClusterNetworkAttachment(null).execute(); } - - // Test the getBareMetalServerProfile operation with a valid options model parameter + + // Test the updateInstanceDisk operation with a valid options model parameter @Test - public void testGetBareMetalServerProfileWOptions() throws Throwable { + public void testUpdateInstanceDiskWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"bandwidth\": {\"type\": \"fixed\", \"value\": 20000}, \"console_types\": {\"type\": \"enum\", \"values\": [\"serial\"]}, \"cpu_architecture\": {\"type\": \"fixed\", \"value\": \"amd64\"}, \"cpu_core_count\": {\"type\": \"fixed\", \"value\": 80}, \"cpu_socket_count\": {\"type\": \"fixed\", \"value\": 4}, \"disks\": [{\"quantity\": {\"type\": \"fixed\", \"value\": 4}, \"size\": {\"type\": \"fixed\", \"value\": 100}, \"supported_interface_types\": {\"default\": \"fcp\", \"type\": \"enum\", \"values\": [\"fcp\"]}}], \"family\": \"balanced\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\", \"memory\": {\"type\": \"fixed\", \"value\": 16}, \"name\": \"bx2-metal-192x768\", \"network_attachment_count\": {\"max\": 128, \"min\": 1, \"type\": \"range\"}, \"network_interface_count\": {\"max\": 128, \"min\": 1, \"type\": \"range\"}, \"os_architecture\": {\"default\": \"amd64\", \"type\": \"enum\", \"values\": [\"amd64\"]}, \"reservation_terms\": {\"type\": \"enum\", \"values\": [\"one_year\"]}, \"resource_type\": \"bare_metal_server_profile\", \"supported_trusted_platform_module_modes\": {\"default\": \"disabled\", \"type\": \"enum\", \"values\": [\"disabled\"]}, \"virtual_network_interfaces_supported\": {\"type\": \"fixed\", \"value\": false}}"; - String getBareMetalServerProfilePath = "/bare_metal_server/profiles/bx2-metal-192x768"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e\", \"id\": \"10c02d81-0ecb-4dc5-897d-28392913b81e\", \"interface_type\": \"nvme\", \"name\": \"my-instance-disk\", \"resource_type\": \"instance_disk\", \"size\": 100}"; + String updateInstanceDiskPath = "/instances/testString/disks/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetBareMetalServerProfileOptions model - GetBareMetalServerProfileOptions getBareMetalServerProfileOptionsModel = new GetBareMetalServerProfileOptions.Builder() - .name("bx2-metal-192x768") + // Construct an instance of the InstanceDiskPatch model + InstanceDiskPatch instanceDiskPatchModel = new InstanceDiskPatch.Builder() + .name("my-instance-disk-updated") .build(); + Map instanceDiskPatchModelAsPatch = instanceDiskPatchModel.asPatch(); - // Invoke getBareMetalServerProfile() with a valid options model and verify the result - Response response = vpcService.getBareMetalServerProfile(getBareMetalServerProfileOptionsModel).execute(); + // Construct an instance of the UpdateInstanceDiskOptions model + UpdateInstanceDiskOptions updateInstanceDiskOptionsModel = new UpdateInstanceDiskOptions.Builder() + .instanceId("testString") + .id("testString") + .instanceDiskPatch(instanceDiskPatchModelAsPatch) + .build(); + + // Invoke updateInstanceDisk() with a valid options model and verify the result + Response response = vpcService.updateInstanceDisk(updateInstanceDiskOptionsModel).execute(); assertNotNull(response); - BareMetalServerProfile responseObj = response.getResult(); + InstanceDisk responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getBareMetalServerProfilePath); + assertEquals(parsedPath, updateInstanceDiskPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getBareMetalServerProfile operation with and without retries enabled + // Test the updateInstanceDisk operation with and without retries enabled @Test - public void testGetBareMetalServerProfileWRetries() throws Throwable { + public void testUpdateInstanceDiskWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetBareMetalServerProfileWOptions(); + testUpdateInstanceDiskWOptions(); vpcService.disableRetries(); - testGetBareMetalServerProfileWOptions(); + testUpdateInstanceDiskWOptions(); } - // Test the getBareMetalServerProfile operation with a null options model (negative test) + // Test the updateInstanceDisk operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetBareMetalServerProfileNoOptions() throws Throwable { + public void testUpdateInstanceDiskNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getBareMetalServerProfile(null).execute(); + vpcService.updateInstanceDisk(null).execute(); } - // Test the listBareMetalServers operation with a valid options model parameter + // Test the updateInstanceNetworkAttachment operation with a valid options model parameter @Test - public void testListBareMetalServersWOptions() throws Throwable { + public void testUpdateInstanceNetworkAttachmentWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"bare_metal_servers\": [{\"bandwidth\": 20000, \"boot_target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"id\": \"0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"name\": \"my-bare-metal-server-disk\", \"resource_type\": \"bare_metal_server_disk\"}, \"cpu\": {\"architecture\": \"amd64\", \"core_count\": 80, \"socket_count\": 4, \"threads_per_core\": 2}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\", \"disks\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"id\": \"0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"interface_type\": \"fcp\", \"name\": \"my-bare-metal-server-disk\", \"resource_type\": \"bare_metal_server_disk\", \"size\": 100}], \"enable_secure_boot\": false, \"firmware\": {\"update\": \"none\"}, \"health_reasons\": [{\"code\": \"reservation_expired\", \"message\": \"The reservation cannot be used because it has expired.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\", \"id\": \"0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"memory\": 1536, \"name\": \"my-bare-metal-server\", \"network_attachments\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"bare_metal_server_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}], \"network_interfaces\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}], \"primary_network_attachment\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"bare_metal_server_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}, \"primary_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\", \"name\": \"bx2-metal-192x768\", \"resource_type\": \"bare_metal_server_profile\"}, \"reservation\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}, \"reservation_affinity\": {\"policy\": \"automatic\", \"pool\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}]}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"bare_metal_server\", \"status\": \"deleting\", \"status_reasons\": [{\"code\": \"cannot_start_capacity\", \"message\": \"The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.\", \"more_info\": \"https://console.bluemix.net/docs/iaas/bare_metal_server.html\"}], \"trusted_platform_module\": {\"enabled\": true, \"mode\": \"disabled\", \"supported_modes\": [\"disabled\"]}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listBareMetalServersPath = "/bare_metal_servers"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"lifecycle_state\": \"stable\", \"name\": \"my-instance-network-attachment\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"instance_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}"; + String updateInstanceNetworkAttachmentPath = "/instances/testString/network_attachments/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListBareMetalServersOptions model - ListBareMetalServersOptions listBareMetalServersOptionsModel = new ListBareMetalServersOptions.Builder() - .start("testString") - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .name("my-name") - .reservationId("testString") - .reservationCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63") - .reservationName("my-reservation") - .vpcId("testString") - .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .vpcName("my-vpc") + // Construct an instance of the InstanceNetworkAttachmentPatch model + InstanceNetworkAttachmentPatch instanceNetworkAttachmentPatchModel = new InstanceNetworkAttachmentPatch.Builder() + .name("my-instance-network-attachment-updated") .build(); + Map instanceNetworkAttachmentPatchModelAsPatch = instanceNetworkAttachmentPatchModel.asPatch(); - // Invoke listBareMetalServers() with a valid options model and verify the result - Response response = vpcService.listBareMetalServers(listBareMetalServersOptionsModel).execute(); + // Construct an instance of the UpdateInstanceNetworkAttachmentOptions model + UpdateInstanceNetworkAttachmentOptions updateInstanceNetworkAttachmentOptionsModel = new UpdateInstanceNetworkAttachmentOptions.Builder() + .instanceId("testString") + .id("testString") + .instanceNetworkAttachmentPatch(instanceNetworkAttachmentPatchModelAsPatch) + .build(); + + // Invoke updateInstanceNetworkAttachment() with a valid options model and verify the result + Response response = vpcService.updateInstanceNetworkAttachment(updateInstanceNetworkAttachmentOptionsModel).execute(); assertNotNull(response); - BareMetalServerCollection responseObj = response.getResult(); + InstanceNetworkAttachment responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listBareMetalServersPath); + assertEquals(parsedPath, updateInstanceNetworkAttachmentPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("resource_group.id"), "testString"); - assertEquals(query.get("name"), "my-name"); - assertEquals(query.get("reservation.id"), "testString"); - assertEquals(query.get("reservation.crn"), "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63"); - assertEquals(query.get("reservation.name"), "my-reservation"); - assertEquals(query.get("vpc.id"), "testString"); - assertEquals(query.get("vpc.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); - assertEquals(query.get("vpc.name"), "my-vpc"); } - // Test the listBareMetalServers operation with and without retries enabled + // Test the updateInstanceNetworkAttachment operation with and without retries enabled @Test - public void testListBareMetalServersWRetries() throws Throwable { + public void testUpdateInstanceNetworkAttachmentWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListBareMetalServersWOptions(); + testUpdateInstanceNetworkAttachmentWOptions(); vpcService.disableRetries(); - testListBareMetalServersWOptions(); + testUpdateInstanceNetworkAttachmentWOptions(); } - // Test the listBareMetalServers operation using the BareMetalServersPager.getNext() method - @Test - public void testListBareMetalServersWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"bare_metal_servers\":[{\"bandwidth\":20000,\"boot_target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"id\":\"0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"name\":\"my-bare-metal-server-disk\",\"resource_type\":\"bare_metal_server_disk\"},\"cpu\":{\"architecture\":\"amd64\",\"core_count\":80,\"socket_count\":4,\"threads_per_core\":2},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\",\"disks\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"id\":\"0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"interface_type\":\"fcp\",\"name\":\"my-bare-metal-server-disk\",\"resource_type\":\"bare_metal_server_disk\",\"size\":100}],\"enable_secure_boot\":false,\"firmware\":{\"update\":\"none\"},\"health_reasons\":[{\"code\":\"reservation_expired\",\"message\":\"The reservation cannot be used because it has expired.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\",\"id\":\"0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"memory\":1536,\"name\":\"my-bare-metal-server\",\"network_attachments\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"bare_metal_server_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}}],\"network_interfaces\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}}],\"primary_network_attachment\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"bare_metal_server_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}},\"primary_network_interface\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\",\"name\":\"bx2-metal-192x768\",\"resource_type\":\"bare_metal_server_profile\"},\"reservation\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"},\"reservation_affinity\":{\"policy\":\"automatic\",\"pool\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"}]},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"bare_metal_server\",\"status\":\"deleting\",\"status_reasons\":[{\"code\":\"cannot_start_capacity\",\"message\":\"The bare metal server cannot start as there is no more capacity in this\\nzone for a bare metal server with the requested profile.\",\"more_info\":\"https://console.bluemix.net/docs/iaas/bare_metal_server.html\"}],\"trusted_platform_module\":{\"enabled\":true,\"mode\":\"disabled\",\"supported_modes\":[\"disabled\"]},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"bare_metal_servers\":[{\"bandwidth\":20000,\"boot_target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"id\":\"0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"name\":\"my-bare-metal-server-disk\",\"resource_type\":\"bare_metal_server_disk\"},\"cpu\":{\"architecture\":\"amd64\",\"core_count\":80,\"socket_count\":4,\"threads_per_core\":2},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\",\"disks\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"id\":\"0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"interface_type\":\"fcp\",\"name\":\"my-bare-metal-server-disk\",\"resource_type\":\"bare_metal_server_disk\",\"size\":100}],\"enable_secure_boot\":false,\"firmware\":{\"update\":\"none\"},\"health_reasons\":[{\"code\":\"reservation_expired\",\"message\":\"The reservation cannot be used because it has expired.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\",\"id\":\"0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"memory\":1536,\"name\":\"my-bare-metal-server\",\"network_attachments\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"bare_metal_server_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}}],\"network_interfaces\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}}],\"primary_network_attachment\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"bare_metal_server_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}},\"primary_network_interface\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\",\"name\":\"bx2-metal-192x768\",\"resource_type\":\"bare_metal_server_profile\"},\"reservation\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"},\"reservation_affinity\":{\"policy\":\"automatic\",\"pool\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"}]},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"bare_metal_server\",\"status\":\"deleting\",\"status_reasons\":[{\"code\":\"cannot_start_capacity\",\"message\":\"The bare metal server cannot start as there is no more capacity in this\\nzone for a bare metal server with the requested profile.\",\"more_info\":\"https://console.bluemix.net/docs/iaas/bare_metal_server.html\"}],\"trusted_platform_module\":{\"enabled\":true,\"mode\":\"disabled\",\"supported_modes\":[\"disabled\"]},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListBareMetalServersOptions listBareMetalServersOptions = new ListBareMetalServersOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .name("my-name") - .reservationId("testString") - .reservationCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63") - .reservationName("my-reservation") - .vpcId("testString") - .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .vpcName("my-vpc") - .build(); - - List allResults = new ArrayList<>(); - BareMetalServersPager pager = new BareMetalServersPager(vpcService, listBareMetalServersOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + // Test the updateInstanceNetworkAttachment operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testUpdateInstanceNetworkAttachmentNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.updateInstanceNetworkAttachment(null).execute(); } - - // Test the listBareMetalServers operation using the BareMetalServersPager.getAll() method - @Test - public void testListBareMetalServersWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"bare_metal_servers\":[{\"bandwidth\":20000,\"boot_target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"id\":\"0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"name\":\"my-bare-metal-server-disk\",\"resource_type\":\"bare_metal_server_disk\"},\"cpu\":{\"architecture\":\"amd64\",\"core_count\":80,\"socket_count\":4,\"threads_per_core\":2},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\",\"disks\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"id\":\"0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"interface_type\":\"fcp\",\"name\":\"my-bare-metal-server-disk\",\"resource_type\":\"bare_metal_server_disk\",\"size\":100}],\"enable_secure_boot\":false,\"firmware\":{\"update\":\"none\"},\"health_reasons\":[{\"code\":\"reservation_expired\",\"message\":\"The reservation cannot be used because it has expired.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\",\"id\":\"0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"memory\":1536,\"name\":\"my-bare-metal-server\",\"network_attachments\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"bare_metal_server_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}}],\"network_interfaces\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}}],\"primary_network_attachment\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"bare_metal_server_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}},\"primary_network_interface\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\",\"name\":\"bx2-metal-192x768\",\"resource_type\":\"bare_metal_server_profile\"},\"reservation\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"},\"reservation_affinity\":{\"policy\":\"automatic\",\"pool\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"}]},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"bare_metal_server\",\"status\":\"deleting\",\"status_reasons\":[{\"code\":\"cannot_start_capacity\",\"message\":\"The bare metal server cannot start as there is no more capacity in this\\nzone for a bare metal server with the requested profile.\",\"more_info\":\"https://console.bluemix.net/docs/iaas/bare_metal_server.html\"}],\"trusted_platform_module\":{\"enabled\":true,\"mode\":\"disabled\",\"supported_modes\":[\"disabled\"]},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"bare_metal_servers\":[{\"bandwidth\":20000,\"boot_target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"id\":\"0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"name\":\"my-bare-metal-server-disk\",\"resource_type\":\"bare_metal_server_disk\"},\"cpu\":{\"architecture\":\"amd64\",\"core_count\":80,\"socket_count\":4,\"threads_per_core\":2},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\",\"disks\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"id\":\"0717-3744f199-6ccc-4698-8772-bb3937348c96\",\"interface_type\":\"fcp\",\"name\":\"my-bare-metal-server-disk\",\"resource_type\":\"bare_metal_server_disk\",\"size\":100}],\"enable_secure_boot\":false,\"firmware\":{\"update\":\"none\"},\"health_reasons\":[{\"code\":\"reservation_expired\",\"message\":\"The reservation cannot be used because it has expired.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\",\"id\":\"0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"memory\":1536,\"name\":\"my-bare-metal-server\",\"network_attachments\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"bare_metal_server_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}}],\"network_interfaces\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}}],\"primary_network_attachment\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-attachment\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"bare_metal_server_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"}},\"primary_network_interface\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\",\"name\":\"bx2-metal-192x768\",\"resource_type\":\"bare_metal_server_profile\"},\"reservation\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"},\"reservation_affinity\":{\"policy\":\"automatic\",\"pool\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"name\":\"my-reservation\",\"resource_type\":\"reservation\"}]},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"bare_metal_server\",\"status\":\"deleting\",\"status_reasons\":[{\"code\":\"cannot_start_capacity\",\"message\":\"The bare metal server cannot start as there is no more capacity in this\\nzone for a bare metal server with the requested profile.\",\"more_info\":\"https://console.bluemix.net/docs/iaas/bare_metal_server.html\"}],\"trusted_platform_module\":{\"enabled\":true,\"mode\":\"disabled\",\"supported_modes\":[\"disabled\"]},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListBareMetalServersOptions listBareMetalServersOptions = new ListBareMetalServersOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .name("my-name") - .reservationId("testString") - .reservationCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63") - .reservationName("my-reservation") - .vpcId("testString") - .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .vpcName("my-vpc") - .build(); - BareMetalServersPager pager = new BareMetalServersPager(vpcService, listBareMetalServersOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the createBareMetalServer operation with a valid options model parameter + // Test the updateInstanceNetworkInterface operation with a valid options model parameter @Test - public void testCreateBareMetalServerWOptions() throws Throwable { + public void testUpdateInstanceNetworkInterfaceWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"bandwidth\": 20000, \"boot_target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"id\": \"0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"name\": \"my-bare-metal-server-disk\", \"resource_type\": \"bare_metal_server_disk\"}, \"cpu\": {\"architecture\": \"amd64\", \"core_count\": 80, \"socket_count\": 4, \"threads_per_core\": 2}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\", \"disks\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"id\": \"0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"interface_type\": \"fcp\", \"name\": \"my-bare-metal-server-disk\", \"resource_type\": \"bare_metal_server_disk\", \"size\": 100}], \"enable_secure_boot\": false, \"firmware\": {\"update\": \"none\"}, \"health_reasons\": [{\"code\": \"reservation_expired\", \"message\": \"The reservation cannot be used because it has expired.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\", \"id\": \"0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"memory\": 1536, \"name\": \"my-bare-metal-server\", \"network_attachments\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"bare_metal_server_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}], \"network_interfaces\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}], \"primary_network_attachment\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"bare_metal_server_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}, \"primary_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\", \"name\": \"bx2-metal-192x768\", \"resource_type\": \"bare_metal_server_profile\"}, \"reservation\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}, \"reservation_affinity\": {\"policy\": \"automatic\", \"pool\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}]}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"bare_metal_server\", \"status\": \"deleting\", \"status_reasons\": [{\"code\": \"cannot_start_capacity\", \"message\": \"The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.\", \"more_info\": \"https://console.bluemix.net/docs/iaas/bare_metal_server.html\"}], \"trusted_platform_module\": {\"enabled\": true, \"mode\": \"disabled\", \"supported_modes\": [\"disabled\"]}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String createBareMetalServerPath = "/bare_metal_servers"; + String mockResponseBody = "{\"allow_ip_spoofing\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"floating_ips\": [{\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}], \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"status\": \"available\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\"}"; + String updateInstanceNetworkInterfacePath = "/instances/testString/network_interfaces/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ImageIdentityById model - ImageIdentityById imageIdentityModel = new ImageIdentityById.Builder() - .id("r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") - .build(); - - // Construct an instance of the KeyIdentityById model - KeyIdentityById keyIdentityModel = new KeyIdentityById.Builder() - .id("r006-82679077-ac3b-4c10-be16-63e9c21f0f45") - .build(); - - // Construct an instance of the BareMetalServerInitializationPrototype model - BareMetalServerInitializationPrototype bareMetalServerInitializationPrototypeModel = new BareMetalServerInitializationPrototype.Builder() - .image(imageIdentityModel) - .keys(java.util.Arrays.asList(keyIdentityModel)) - .userData("testString") - .build(); - - // Construct an instance of the BareMetalServerProfileIdentityByName model - BareMetalServerProfileIdentityByName bareMetalServerProfileIdentityModel = new BareMetalServerProfileIdentityByName.Builder() - .name("bx2-metal-192x768") - .build(); - - // Construct an instance of the ReservationIdentityById model - ReservationIdentityById reservationIdentityModel = new ReservationIdentityById.Builder() - .id("0717-ba49df72-37b8-43ac-98da-f8e029de0e63") - .build(); - - // Construct an instance of the BareMetalServerReservationAffinityPrototype model - BareMetalServerReservationAffinityPrototype bareMetalServerReservationAffinityPrototypeModel = new BareMetalServerReservationAffinityPrototype.Builder() - .policy("automatic") - .pool(java.util.Arrays.asList(reservationIdentityModel)) - .build(); - - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); - - // Construct an instance of the BareMetalServerTrustedPlatformModulePrototype model - BareMetalServerTrustedPlatformModulePrototype bareMetalServerTrustedPlatformModulePrototypeModel = new BareMetalServerTrustedPlatformModulePrototype.Builder() - .mode("disabled") - .build(); - - // Construct an instance of the VPCIdentityById model - VPCIdentityById vpcIdentityModel = new VPCIdentityById.Builder() - .id("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .build(); - - // Construct an instance of the ZoneIdentityByName model - ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() - .name("us-south-1") - .build(); - - // Construct an instance of the VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext model - VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtualNetworkInterfaceIpPrototypeModel = new VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext.Builder() - .address("10.0.0.5") - .autoDelete(false) - .name("my-reserved-ip") - .build(); - - // Construct an instance of the VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model - VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext virtualNetworkInterfacePrimaryIpPrototypeModel = new VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext.Builder() - .address("10.0.0.5") - .autoDelete(false) - .name("my-reserved-ip") - .build(); - - // Construct an instance of the SecurityGroupIdentityById model - SecurityGroupIdentityById securityGroupIdentityModel = new SecurityGroupIdentityById.Builder() - .id("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") - .build(); - - // Construct an instance of the SubnetIdentityById model - SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() - .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") - .build(); - - // Construct an instance of the BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext model - BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext bareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceModel = new BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext.Builder() + // Construct an instance of the NetworkInterfacePatch model + NetworkInterfacePatch networkInterfacePatchModel = new NetworkInterfacePatch.Builder() .allowIpSpoofing(true) - .autoDelete(false) - .enableInfrastructureNat(true) - .ips(java.util.Arrays.asList(virtualNetworkInterfaceIpPrototypeModel)) - .name("my-virtual-network-interface") - .primaryIp(virtualNetworkInterfacePrimaryIpPrototypeModel) - .protocolStateFilteringMode("auto") - .resourceGroup(resourceGroupIdentityModel) - .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) - .subnet(subnetIdentityModel) - .build(); - - // Construct an instance of the BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype model - BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype bareMetalServerNetworkAttachmentPrototypeModel = new BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype.Builder() - .name("my-bare-metal-server-network-attachment") - .virtualNetworkInterface(bareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceModel) - .allowedVlans(java.util.Arrays.asList(Long.valueOf("4"))) - .interfaceType("pci") - .build(); - - // Construct an instance of the BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype model - BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype bareMetalServerPrimaryNetworkAttachmentPrototypeModel = new BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype.Builder() - .name("my-bare-metal-server-network-attachment") - .virtualNetworkInterface(bareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceModel) - .allowedVlans(java.util.Arrays.asList(Long.valueOf("4"))) - .interfaceType("pci") - .build(); - - // Construct an instance of the BareMetalServerPrototypeBareMetalServerByNetworkAttachment model - BareMetalServerPrototypeBareMetalServerByNetworkAttachment bareMetalServerPrototypeModel = new BareMetalServerPrototypeBareMetalServerByNetworkAttachment.Builder() - .bandwidth(Long.valueOf("20000")) - .enableSecureBoot(false) - .initialization(bareMetalServerInitializationPrototypeModel) - .name("my-bare-metal-server") - .profile(bareMetalServerProfileIdentityModel) - .reservationAffinity(bareMetalServerReservationAffinityPrototypeModel) - .resourceGroup(resourceGroupIdentityModel) - .trustedPlatformModule(bareMetalServerTrustedPlatformModulePrototypeModel) - .vpc(vpcIdentityModel) - .zone(zoneIdentityModel) - .networkAttachments(java.util.Arrays.asList(bareMetalServerNetworkAttachmentPrototypeModel)) - .primaryNetworkAttachment(bareMetalServerPrimaryNetworkAttachmentPrototypeModel) + .name("my-network-interface-updated") .build(); + Map networkInterfacePatchModelAsPatch = networkInterfacePatchModel.asPatch(); - // Construct an instance of the CreateBareMetalServerOptions model - CreateBareMetalServerOptions createBareMetalServerOptionsModel = new CreateBareMetalServerOptions.Builder() - .bareMetalServerPrototype(bareMetalServerPrototypeModel) + // Construct an instance of the UpdateInstanceNetworkInterfaceOptions model + UpdateInstanceNetworkInterfaceOptions updateInstanceNetworkInterfaceOptionsModel = new UpdateInstanceNetworkInterfaceOptions.Builder() + .instanceId("testString") + .id("testString") + .networkInterfacePatch(networkInterfacePatchModelAsPatch) .build(); - // Invoke createBareMetalServer() with a valid options model and verify the result - Response response = vpcService.createBareMetalServer(createBareMetalServerOptionsModel).execute(); + // Invoke updateInstanceNetworkInterface() with a valid options model and verify the result + Response response = vpcService.updateInstanceNetworkInterface(updateInstanceNetworkInterfaceOptionsModel).execute(); assertNotNull(response); - BareMetalServer responseObj = response.getResult(); + NetworkInterface responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createBareMetalServerPath); + assertEquals(parsedPath, updateInstanceNetworkInterfacePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createBareMetalServer operation with and without retries enabled + // Test the updateInstanceNetworkInterface operation with and without retries enabled @Test - public void testCreateBareMetalServerWRetries() throws Throwable { + public void testUpdateInstanceNetworkInterfaceWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateBareMetalServerWOptions(); + testUpdateInstanceNetworkInterfaceWOptions(); vpcService.disableRetries(); - testCreateBareMetalServerWOptions(); + testUpdateInstanceNetworkInterfaceWOptions(); } - // Test the createBareMetalServer operation with a null options model (negative test) + // Test the updateInstanceNetworkInterface operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateBareMetalServerNoOptions() throws Throwable { + public void testUpdateInstanceNetworkInterfaceNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createBareMetalServer(null).execute(); + vpcService.updateInstanceNetworkInterface(null).execute(); } - // Test the createBareMetalServerConsoleAccessToken operation with a valid options model parameter + // Test the updateInstanceVolumeAttachment operation with a valid options model parameter @Test - public void testCreateBareMetalServerConsoleAccessTokenWOptions() throws Throwable { + public void testUpdateInstanceVolumeAttachmentWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjoiYWEyNDMyYjFmYTRkNGFjZTg5MWU5YjgwZmMxMDRlMzQiLCJzZWNyZXQiOiJRVzRnWlhoaGJYQnNaU0J6WldOeVpYUUsiLCJleHAiOjE3MjYwNzU1OTR9.UFDVzzGJ54Go9Z4jgyPSLG49zNx-AjHTQrJA6ee8KLI\", \"console_type\": \"serial\", \"created_at\": \"2020-07-27T21:50:14.000Z\", \"expires_at\": \"2020-07-27T21:51:14.000Z\", \"force\": false, \"href\": \"wss://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/console?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjoiYWEyNDMyYjFmYTRkNGFjZTg5MWU5YjgwZmMxMDRlMzQiLCJzZWNyZXQiOiJRVzRnWlhoaGJYQnNaU0J6WldOeVpYUUsiLCJleHAiOjE3MjYwNzU1OTR9.UFDVzzGJ54Go9Z4jgyPSLG49zNx-AjHTQrJA6ee8KLI\"}"; - String createBareMetalServerConsoleAccessTokenPath = "/bare_metal_servers/testString/console_access_token"; + String mockResponseBody = "{\"bandwidth\": 250, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"delete_volume_on_instance_delete\": true, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"name\": \"my-volume-attachment\", \"status\": \"attached\", \"type\": \"boot\", \"volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"resource_type\": \"volume\"}}"; + String updateInstanceVolumeAttachmentPath = "/instances/testString/volume_attachments/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the CreateBareMetalServerConsoleAccessTokenOptions model - CreateBareMetalServerConsoleAccessTokenOptions createBareMetalServerConsoleAccessTokenOptionsModel = new CreateBareMetalServerConsoleAccessTokenOptions.Builder() - .bareMetalServerId("testString") - .consoleType("serial") - .force(false) + // Construct an instance of the VolumeAttachmentPatch model + VolumeAttachmentPatch volumeAttachmentPatchModel = new VolumeAttachmentPatch.Builder() + .deleteVolumeOnInstanceDelete(true) + .name("my-volume-attachment") .build(); + Map volumeAttachmentPatchModelAsPatch = volumeAttachmentPatchModel.asPatch(); - // Invoke createBareMetalServerConsoleAccessToken() with a valid options model and verify the result - Response response = vpcService.createBareMetalServerConsoleAccessToken(createBareMetalServerConsoleAccessTokenOptionsModel).execute(); + // Construct an instance of the UpdateInstanceVolumeAttachmentOptions model + UpdateInstanceVolumeAttachmentOptions updateInstanceVolumeAttachmentOptionsModel = new UpdateInstanceVolumeAttachmentOptions.Builder() + .instanceId("testString") + .id("testString") + .volumeAttachmentPatch(volumeAttachmentPatchModelAsPatch) + .build(); + + // Invoke updateInstanceVolumeAttachment() with a valid options model and verify the result + Response response = vpcService.updateInstanceVolumeAttachment(updateInstanceVolumeAttachmentOptionsModel).execute(); assertNotNull(response); - BareMetalServerConsoleAccessToken responseObj = response.getResult(); + VolumeAttachment responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createBareMetalServerConsoleAccessTokenPath); + assertEquals(parsedPath, updateInstanceVolumeAttachmentPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createBareMetalServerConsoleAccessToken operation with and without retries enabled + // Test the updateInstanceVolumeAttachment operation with and without retries enabled @Test - public void testCreateBareMetalServerConsoleAccessTokenWRetries() throws Throwable { + public void testUpdateInstanceVolumeAttachmentWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateBareMetalServerConsoleAccessTokenWOptions(); + testUpdateInstanceVolumeAttachmentWOptions(); vpcService.disableRetries(); - testCreateBareMetalServerConsoleAccessTokenWOptions(); + testUpdateInstanceVolumeAttachmentWOptions(); } - // Test the createBareMetalServerConsoleAccessToken operation with a null options model (negative test) + // Test the updateInstanceVolumeAttachment operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateBareMetalServerConsoleAccessTokenNoOptions() throws Throwable { + public void testUpdateInstanceVolumeAttachmentNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createBareMetalServerConsoleAccessToken(null).execute(); + vpcService.updateInstanceVolumeAttachment(null).execute(); } - // Test the listBareMetalServerDisks operation with a valid options model parameter + // Test the createKey operation with a valid options model parameter @Test - public void testListBareMetalServerDisksWOptions() throws Throwable { + public void testCreateKeyWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"disks\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"id\": \"0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"interface_type\": \"fcp\", \"name\": \"my-bare-metal-server-disk\", \"resource_type\": \"bare_metal_server_disk\", \"size\": 100}]}"; - String listBareMetalServerDisksPath = "/bare_metal_servers/testString/disks"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"fingerprint\": \"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"length\": 2048, \"name\": \"my-key-1\", \"public_key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"type\": \"ed25519\"}"; + String createKeyPath = "/keys"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the ListBareMetalServerDisksOptions model - ListBareMetalServerDisksOptions listBareMetalServerDisksOptionsModel = new ListBareMetalServerDisksOptions.Builder() - .bareMetalServerId("testString") + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") .build(); - // Invoke listBareMetalServerDisks() with a valid options model and verify the result - Response response = vpcService.listBareMetalServerDisks(listBareMetalServerDisksOptionsModel).execute(); + // Construct an instance of the CreateKeyOptions model + CreateKeyOptions createKeyOptionsModel = new CreateKeyOptions.Builder() + .publicKey("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En") + .name("my-key-1") + .resourceGroup(resourceGroupIdentityModel) + .type("rsa") + .build(); + + // Invoke createKey() with a valid options model and verify the result + Response response = vpcService.createKey(createKeyOptionsModel).execute(); assertNotNull(response); - BareMetalServerDiskCollection responseObj = response.getResult(); + Key responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listBareMetalServerDisksPath); + assertEquals(parsedPath, createKeyPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the listBareMetalServerDisks operation with and without retries enabled + // Test the createKey operation with and without retries enabled @Test - public void testListBareMetalServerDisksWRetries() throws Throwable { + public void testCreateKeyWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListBareMetalServerDisksWOptions(); + testCreateKeyWOptions(); vpcService.disableRetries(); - testListBareMetalServerDisksWOptions(); + testCreateKeyWOptions(); } - // Test the listBareMetalServerDisks operation with a null options model (negative test) + // Test the createKey operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListBareMetalServerDisksNoOptions() throws Throwable { + public void testCreateKeyNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listBareMetalServerDisks(null).execute(); + vpcService.createKey(null).execute(); } - // Test the getBareMetalServerDisk operation with a valid options model parameter + // Test the deleteKey operation with a valid options model parameter @Test - public void testGetBareMetalServerDiskWOptions() throws Throwable { + public void testDeleteKeyWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"id\": \"0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"interface_type\": \"fcp\", \"name\": \"my-bare-metal-server-disk\", \"resource_type\": \"bare_metal_server_disk\", \"size\": 100}"; - String getBareMetalServerDiskPath = "/bare_metal_servers/testString/disks/testString"; + String mockResponseBody = ""; + String deleteKeyPath = "/keys/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the GetBareMetalServerDiskOptions model - GetBareMetalServerDiskOptions getBareMetalServerDiskOptionsModel = new GetBareMetalServerDiskOptions.Builder() - .bareMetalServerId("testString") + // Construct an instance of the DeleteKeyOptions model + DeleteKeyOptions deleteKeyOptionsModel = new DeleteKeyOptions.Builder() .id("testString") .build(); - // Invoke getBareMetalServerDisk() with a valid options model and verify the result - Response response = vpcService.getBareMetalServerDisk(getBareMetalServerDiskOptionsModel).execute(); + // Invoke deleteKey() with a valid options model and verify the result + Response response = vpcService.deleteKey(deleteKeyOptionsModel).execute(); assertNotNull(response); - BareMetalServerDisk responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getBareMetalServerDiskPath); + assertEquals(parsedPath, deleteKeyPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getBareMetalServerDisk operation with and without retries enabled + // Test the deleteKey operation with and without retries enabled @Test - public void testGetBareMetalServerDiskWRetries() throws Throwable { + public void testDeleteKeyWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetBareMetalServerDiskWOptions(); + testDeleteKeyWOptions(); vpcService.disableRetries(); - testGetBareMetalServerDiskWOptions(); + testDeleteKeyWOptions(); } - // Test the getBareMetalServerDisk operation with a null options model (negative test) + // Test the deleteKey operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetBareMetalServerDiskNoOptions() throws Throwable { + public void testDeleteKeyNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getBareMetalServerDisk(null).execute(); + vpcService.deleteKey(null).execute(); } - // Test the updateBareMetalServerDisk operation with a valid options model parameter + // Test the getKey operation with a valid options model parameter @Test - public void testUpdateBareMetalServerDiskWOptions() throws Throwable { + public void testGetKeyWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"id\": \"0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"interface_type\": \"fcp\", \"name\": \"my-bare-metal-server-disk\", \"resource_type\": \"bare_metal_server_disk\", \"size\": 100}"; - String updateBareMetalServerDiskPath = "/bare_metal_servers/testString/disks/testString"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"fingerprint\": \"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"length\": 2048, \"name\": \"my-key-1\", \"public_key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"type\": \"ed25519\"}"; + String getKeyPath = "/keys/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the BareMetalServerDiskPatch model - BareMetalServerDiskPatch bareMetalServerDiskPatchModel = new BareMetalServerDiskPatch.Builder() - .name("my-bare-metal-server-disk-updated") - .build(); - Map bareMetalServerDiskPatchModelAsPatch = bareMetalServerDiskPatchModel.asPatch(); - - // Construct an instance of the UpdateBareMetalServerDiskOptions model - UpdateBareMetalServerDiskOptions updateBareMetalServerDiskOptionsModel = new UpdateBareMetalServerDiskOptions.Builder() - .bareMetalServerId("testString") + // Construct an instance of the GetKeyOptions model + GetKeyOptions getKeyOptionsModel = new GetKeyOptions.Builder() .id("testString") - .bareMetalServerDiskPatch(bareMetalServerDiskPatchModelAsPatch) .build(); - // Invoke updateBareMetalServerDisk() with a valid options model and verify the result - Response response = vpcService.updateBareMetalServerDisk(updateBareMetalServerDiskOptionsModel).execute(); + // Invoke getKey() with a valid options model and verify the result + Response response = vpcService.getKey(getKeyOptionsModel).execute(); assertNotNull(response); - BareMetalServerDisk responseObj = response.getResult(); + Key responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateBareMetalServerDiskPath); + assertEquals(parsedPath, getKeyPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateBareMetalServerDisk operation with and without retries enabled + // Test the getKey operation with and without retries enabled @Test - public void testUpdateBareMetalServerDiskWRetries() throws Throwable { + public void testGetKeyWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateBareMetalServerDiskWOptions(); + testGetKeyWOptions(); vpcService.disableRetries(); - testUpdateBareMetalServerDiskWOptions(); + testGetKeyWOptions(); } - // Test the updateBareMetalServerDisk operation with a null options model (negative test) + // Test the getKey operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateBareMetalServerDiskNoOptions() throws Throwable { + public void testGetKeyNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateBareMetalServerDisk(null).execute(); + vpcService.getKey(null).execute(); } - // Test the listBareMetalServerNetworkAttachments operation with a valid options model parameter + // Test the listKeys operation with a valid options model parameter @Test - public void testListBareMetalServerNetworkAttachmentsWOptions() throws Throwable { + public void testListKeysWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"network_attachments\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"lifecycle_state\": \"stable\", \"name\": \"my-bare-metal-server-network-attachment\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"bare_metal_server_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}, \"allowed_vlans\": [4], \"interface_type\": \"pci\"}], \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listBareMetalServerNetworkAttachmentsPath = "/bare_metal_servers/testString/network_attachments"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"keys\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"fingerprint\": \"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"length\": 2048, \"name\": \"my-key-1\", \"public_key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"type\": \"ed25519\"}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listKeysPath = "/keys"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListBareMetalServerNetworkAttachmentsOptions model - ListBareMetalServerNetworkAttachmentsOptions listBareMetalServerNetworkAttachmentsOptionsModel = new ListBareMetalServerNetworkAttachmentsOptions.Builder() - .bareMetalServerId("testString") + // Construct an instance of the ListKeysOptions model + ListKeysOptions listKeysOptionsModel = new ListKeysOptions.Builder() .start("testString") .limit(Long.valueOf("10")) + .resourceGroupId("testString") .build(); - // Invoke listBareMetalServerNetworkAttachments() with a valid options model and verify the result - Response response = vpcService.listBareMetalServerNetworkAttachments(listBareMetalServerNetworkAttachmentsOptionsModel).execute(); + // Invoke listKeys() with a valid options model and verify the result + Response response = vpcService.listKeys(listKeysOptionsModel).execute(); assertNotNull(response); - BareMetalServerNetworkAttachmentCollection responseObj = response.getResult(); + KeyCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -14486,39 +16187,33 @@ public void testListBareMetalServerNetworkAttachmentsWOptions() throws Throwable assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listBareMetalServerNetworkAttachmentsPath); + assertEquals(parsedPath, listKeysPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("resource_group.id"), "testString"); } - // Test the listBareMetalServerNetworkAttachments operation with and without retries enabled + // Test the listKeys operation with and without retries enabled @Test - public void testListBareMetalServerNetworkAttachmentsWRetries() throws Throwable { + public void testListKeysWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListBareMetalServerNetworkAttachmentsWOptions(); + testListKeysWOptions(); vpcService.disableRetries(); - testListBareMetalServerNetworkAttachmentsWOptions(); - } - - // Test the listBareMetalServerNetworkAttachments operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListBareMetalServerNetworkAttachmentsNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.listBareMetalServerNetworkAttachments(null).execute(); + testListKeysWOptions(); } - // Test the listBareMetalServerNetworkAttachments operation using the BareMetalServerNetworkAttachmentsPager.getNext() method + // Test the listKeys operation using the KeysPager.getNext() method @Test - public void testListBareMetalServerNetworkAttachmentsWithPagerGetNext() throws Throwable { + public void testListKeysWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"network_attachments\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"lifecycle_state\":\"stable\",\"name\":\"my-bare-metal-server-network-attachment\",\"port_speed\":1000,\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"bare_metal_server_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"type\":\"primary\",\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"},\"allowed_vlans\":[4],\"interface_type\":\"pci\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"network_attachments\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"lifecycle_state\":\"stable\",\"name\":\"my-bare-metal-server-network-attachment\",\"port_speed\":1000,\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"bare_metal_server_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"type\":\"primary\",\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"},\"allowed_vlans\":[4],\"interface_type\":\"pci\"}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"keys\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\",\"fingerprint\":\"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\",\"id\":\"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\",\"length\":2048,\"name\":\"my-key-1\",\"public_key\":\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"type\":\"ed25519\"}],\"limit\":1}"; + String mockResponsePage2 = "{\"total_count\":2,\"keys\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\",\"fingerprint\":\"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\",\"id\":\"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\",\"length\":2048,\"name\":\"my-key-1\",\"public_key\":\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"type\":\"ed25519\"}],\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -14532,27 +16227,27 @@ public void testListBareMetalServerNetworkAttachmentsWithPagerGetNext() throws T .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListBareMetalServerNetworkAttachmentsOptions listBareMetalServerNetworkAttachmentsOptions = new ListBareMetalServerNetworkAttachmentsOptions.Builder() - .bareMetalServerId("testString") + ListKeysOptions listKeysOptions = new ListKeysOptions.Builder() .limit(Long.valueOf("10")) + .resourceGroupId("testString") .build(); - List allResults = new ArrayList<>(); - BareMetalServerNetworkAttachmentsPager pager = new BareMetalServerNetworkAttachmentsPager(vpcService, listBareMetalServerNetworkAttachmentsOptions); + List allResults = new ArrayList<>(); + KeysPager pager = new KeysPager(vpcService, listKeysOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listBareMetalServerNetworkAttachments operation using the BareMetalServerNetworkAttachmentsPager.getAll() method + // Test the listKeys operation using the KeysPager.getAll() method @Test - public void testListBareMetalServerNetworkAttachmentsWithPagerGetAll() throws Throwable { + public void testListKeysWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"network_attachments\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"lifecycle_state\":\"stable\",\"name\":\"my-bare-metal-server-network-attachment\",\"port_speed\":1000,\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"bare_metal_server_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"type\":\"primary\",\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"},\"allowed_vlans\":[4],\"interface_type\":\"pci\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"network_attachments\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"lifecycle_state\":\"stable\",\"name\":\"my-bare-metal-server-network-attachment\",\"port_speed\":1000,\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"bare_metal_server_network_attachment\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"type\":\"primary\",\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"},\"allowed_vlans\":[4],\"interface_type\":\"pci\"}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"keys\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\",\"fingerprint\":\"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\",\"id\":\"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\",\"length\":2048,\"name\":\"my-key-1\",\"public_key\":\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"type\":\"ed25519\"}],\"limit\":1}"; + String mockResponsePage2 = "{\"total_count\":2,\"keys\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\",\"fingerprint\":\"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\",\"id\":\"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\",\"length\":2048,\"name\":\"my-key-1\",\"public_key\":\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"type\":\"ed25519\"}],\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -14566,40 +16261,196 @@ public void testListBareMetalServerNetworkAttachmentsWithPagerGetAll() throws Th .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListBareMetalServerNetworkAttachmentsOptions listBareMetalServerNetworkAttachmentsOptions = new ListBareMetalServerNetworkAttachmentsOptions.Builder() - .bareMetalServerId("testString") + ListKeysOptions listKeysOptions = new ListKeysOptions.Builder() .limit(Long.valueOf("10")) + .resourceGroupId("testString") .build(); - BareMetalServerNetworkAttachmentsPager pager = new BareMetalServerNetworkAttachmentsPager(vpcService, listBareMetalServerNetworkAttachmentsOptions); - List allResults = pager.getAll(); + KeysPager pager = new KeysPager(vpcService, listKeysOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the createBareMetalServerNetworkAttachment operation with a valid options model parameter + // Test the updateKey operation with a valid options model parameter @Test - public void testCreateBareMetalServerNetworkAttachmentWOptions() throws Throwable { + public void testUpdateKeyWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"lifecycle_state\": \"stable\", \"name\": \"my-bare-metal-server-network-attachment\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"bare_metal_server_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}, \"allowed_vlans\": [4], \"interface_type\": \"pci\"}"; - String createBareMetalServerNetworkAttachmentPath = "/bare_metal_servers/testString/network_attachments"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"fingerprint\": \"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"length\": 2048, \"name\": \"my-key-1\", \"public_key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"type\": \"ed25519\"}"; + String updateKeyPath = "/keys/testString"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the KeyPatch model + KeyPatch keyPatchModel = new KeyPatch.Builder() + .name("my-key-1") + .build(); + Map keyPatchModelAsPatch = keyPatchModel.asPatch(); + + // Construct an instance of the UpdateKeyOptions model + UpdateKeyOptions updateKeyOptionsModel = new UpdateKeyOptions.Builder() + .id("testString") + .keyPatch(keyPatchModelAsPatch) + .build(); + + // Invoke updateKey() with a valid options model and verify the result + Response response = vpcService.updateKey(updateKeyOptionsModel).execute(); + assertNotNull(response); + Key responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "PATCH"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, updateKeyPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the updateKey operation with and without retries enabled + @Test + public void testUpdateKeyWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testUpdateKeyWOptions(); + + vpcService.disableRetries(); + testUpdateKeyWOptions(); + } + + // Test the updateKey operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testUpdateKeyNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.updateKey(null).execute(); + } + + // Test the createLoadBalancer operation with a valid options model parameter + @Test + public void testCreateLoadBalancerWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"access_mode\": \"private\", \"attached_load_balancer_pool_members\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}], \"availability\": \"region\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"dns\": {\"instance\": {\"crn\": \"crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::\"}, \"zone\": {\"id\": \"d66662cc-aa23-4fe1-9987-858487a61f45\"}}, \"failsafe_policy_actions\": [\"forward\"], \"hostname\": \"6b88d615-us-south.lb.appdomain.cloud\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"id\": \"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"instance_groups_supported\": true, \"is_private_path\": true, \"is_public\": true, \"listeners\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"id\": \"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\"}], \"logging\": {\"datapath\": {\"active\": true}}, \"name\": \"my-load-balancer\", \"operating_status\": \"offline\", \"pools\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}], \"private_ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"profile\": {\"family\": \"application\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\", \"name\": \"network-fixed\"}, \"provisioning_status\": \"active\", \"public_ips\": [{\"address\": \"192.168.3.4\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"load_balancer\", \"route_mode\": true, \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"security_groups_supported\": false, \"source_ip_session_persistence_supported\": true, \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"udp_supported\": true}"; + String createLoadBalancerPath = "/load_balancers"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext model - VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtualNetworkInterfaceIpPrototypeModel = new VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext.Builder() - .address("10.0.0.5") - .autoDelete(false) - .name("my-reserved-ip") + // Construct an instance of the SubnetIdentityById model + SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() + .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") .build(); - // Construct an instance of the VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model - VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext virtualNetworkInterfacePrimaryIpPrototypeModel = new VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext.Builder() - .address("10.0.0.5") - .autoDelete(false) - .name("my-reserved-ip") + // Construct an instance of the DNSInstanceIdentityByCRN model + DNSInstanceIdentityByCRN dnsInstanceIdentityModel = new DNSInstanceIdentityByCRN.Builder() + .crn("crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::") + .build(); + + // Construct an instance of the DNSZoneIdentityById model + DNSZoneIdentityById dnsZoneIdentityModel = new DNSZoneIdentityById.Builder() + .id("d66662cc-aa23-4fe1-9987-858487a61f45") + .build(); + + // Construct an instance of the LoadBalancerDNSPrototype model + LoadBalancerDNSPrototype loadBalancerDnsPrototypeModel = new LoadBalancerDNSPrototype.Builder() + .instance(dnsInstanceIdentityModel) + .zone(dnsZoneIdentityModel) + .build(); + + // Construct an instance of the CertificateInstanceIdentityByCRN model + CertificateInstanceIdentityByCRN certificateInstanceIdentityModel = new CertificateInstanceIdentityByCRN.Builder() + .crn("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + .build(); + + // Construct an instance of the LoadBalancerPoolIdentityByName model + LoadBalancerPoolIdentityByName loadBalancerPoolIdentityByNameModel = new LoadBalancerPoolIdentityByName.Builder() + .name("my-load-balancer-pool") + .build(); + + // Construct an instance of the LoadBalancerListenerIdentityById model + LoadBalancerListenerIdentityById loadBalancerListenerIdentityModel = new LoadBalancerListenerIdentityById.Builder() + .id("r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091") + .build(); + + // Construct an instance of the LoadBalancerListenerHTTPSRedirectPrototype model + LoadBalancerListenerHTTPSRedirectPrototype loadBalancerListenerHttpsRedirectPrototypeModel = new LoadBalancerListenerHTTPSRedirectPrototype.Builder() + .httpStatusCode(Long.valueOf("301")) + .listener(loadBalancerListenerIdentityModel) + .uri("/example?doc=get") + .build(); + + // Construct an instance of the LoadBalancerListenerPrototypeLoadBalancerContext model + LoadBalancerListenerPrototypeLoadBalancerContext loadBalancerListenerPrototypeLoadBalancerContextModel = new LoadBalancerListenerPrototypeLoadBalancerContext.Builder() + .acceptProxyProtocol(true) + .certificateInstance(certificateInstanceIdentityModel) + .connectionLimit(Long.valueOf("2000")) + .defaultPool(loadBalancerPoolIdentityByNameModel) + .httpsRedirect(loadBalancerListenerHttpsRedirectPrototypeModel) + .idleConnectionTimeout(Long.valueOf("100")) + .port(Long.valueOf("443")) + .portMax(Long.valueOf("499")) + .portMin(Long.valueOf("443")) + .protocol("http") + .build(); + + // Construct an instance of the LoadBalancerLoggingDatapathPrototype model + LoadBalancerLoggingDatapathPrototype loadBalancerLoggingDatapathPrototypeModel = new LoadBalancerLoggingDatapathPrototype.Builder() + .active(true) + .build(); + + // Construct an instance of the LoadBalancerLoggingPrototype model + LoadBalancerLoggingPrototype loadBalancerLoggingPrototypeModel = new LoadBalancerLoggingPrototype.Builder() + .datapath(loadBalancerLoggingDatapathPrototypeModel) + .build(); + + // Construct an instance of the LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeTCPPrototype model + LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeTCPPrototype loadBalancerPoolHealthMonitorPrototypeModel = new LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeTCPPrototype.Builder() + .delay(Long.valueOf("5")) + .maxRetries(Long.valueOf("2")) + .port(Long.valueOf("22")) + .timeout(Long.valueOf("2")) + .type("tcp") + .build(); + + // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model + LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById loadBalancerPoolMemberTargetPrototypeModel = new LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById.Builder() + .id("0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0") + .build(); + + // Construct an instance of the LoadBalancerPoolMemberPrototype model + LoadBalancerPoolMemberPrototype loadBalancerPoolMemberPrototypeModel = new LoadBalancerPoolMemberPrototype.Builder() + .port(Long.valueOf("80")) + .target(loadBalancerPoolMemberTargetPrototypeModel) + .weight(Long.valueOf("50")) + .build(); + + // Construct an instance of the LoadBalancerPoolSessionPersistencePrototype model + LoadBalancerPoolSessionPersistencePrototype loadBalancerPoolSessionPersistencePrototypeModel = new LoadBalancerPoolSessionPersistencePrototype.Builder() + .cookieName("my-cookie-name") + .type("app_cookie") + .build(); + + // Construct an instance of the LoadBalancerPoolPrototypeLoadBalancerContext model + LoadBalancerPoolPrototypeLoadBalancerContext loadBalancerPoolPrototypeLoadBalancerContextModel = new LoadBalancerPoolPrototypeLoadBalancerContext.Builder() + .algorithm("least_connections") + .healthMonitor(loadBalancerPoolHealthMonitorPrototypeModel) + .members(java.util.Arrays.asList(loadBalancerPoolMemberPrototypeModel)) + .name("my-load-balancer-pool") + .protocol("http") + .proxyProtocol("disabled") + .sessionPersistence(loadBalancerPoolSessionPersistencePrototypeModel) + .build(); + + // Construct an instance of the LoadBalancerProfileIdentityByName model + LoadBalancerProfileIdentityByName loadBalancerProfileIdentityModel = new LoadBalancerProfileIdentityByName.Builder() + .name("network-fixed") .build(); // Construct an instance of the ResourceGroupIdentityById model @@ -14612,43 +16463,134 @@ public void testCreateBareMetalServerNetworkAttachmentWOptions() throws Throwabl .id("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") .build(); - // Construct an instance of the SubnetIdentityById model - SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() - .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") - .build(); - - // Construct an instance of the BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext model - BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext bareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceModel = new BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext.Builder() - .allowIpSpoofing(true) - .autoDelete(false) - .enableInfrastructureNat(true) - .ips(java.util.Arrays.asList(virtualNetworkInterfaceIpPrototypeModel)) - .name("my-virtual-network-interface") - .primaryIp(virtualNetworkInterfacePrimaryIpPrototypeModel) - .protocolStateFilteringMode("auto") + // Construct an instance of the CreateLoadBalancerOptions model + CreateLoadBalancerOptions createLoadBalancerOptionsModel = new CreateLoadBalancerOptions.Builder() + .isPublic(true) + .subnets(java.util.Arrays.asList(subnetIdentityModel)) + .dns(loadBalancerDnsPrototypeModel) + .isPrivatePath(true) + .listeners(java.util.Arrays.asList(loadBalancerListenerPrototypeLoadBalancerContextModel)) + .logging(loadBalancerLoggingPrototypeModel) + .name("my-load-balancer") + .pools(java.util.Arrays.asList(loadBalancerPoolPrototypeLoadBalancerContextModel)) + .profile(loadBalancerProfileIdentityModel) .resourceGroup(resourceGroupIdentityModel) + .routeMode(true) .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) - .subnet(subnetIdentityModel) .build(); - // Construct an instance of the BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype model - BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype bareMetalServerNetworkAttachmentPrototypeModel = new BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype.Builder() - .name("my-bare-metal-server-network-attachment") - .virtualNetworkInterface(bareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceModel) - .allowedVlans(java.util.Arrays.asList(Long.valueOf("4"))) - .interfaceType("pci") + // Invoke createLoadBalancer() with a valid options model and verify the result + Response response = vpcService.createLoadBalancer(createLoadBalancerOptionsModel).execute(); + assertNotNull(response); + LoadBalancer responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "POST"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, createLoadBalancerPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the createLoadBalancer operation with and without retries enabled + @Test + public void testCreateLoadBalancerWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testCreateLoadBalancerWOptions(); + + vpcService.disableRetries(); + testCreateLoadBalancerWOptions(); + } + + // Test the createLoadBalancer operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testCreateLoadBalancerNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.createLoadBalancer(null).execute(); + } + + // Test the createLoadBalancerListener operation with a valid options model parameter + @Test + public void testCreateLoadBalancerListenerWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"accept_proxy_protocol\": true, \"certificate_instance\": {\"crn\": \"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5\"}, \"connection_limit\": 2000, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"default_pool\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"https_redirect\": {\"http_status_code\": 301, \"listener\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"id\": \"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\"}, \"uri\": \"/example?doc=get\"}, \"id\": \"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"idle_connection_timeout\": 100, \"policies\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"id\": \"r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"name\": \"my-load-balancer-listener-policy\"}], \"port\": 443, \"port_max\": 499, \"port_min\": 443, \"protocol\": \"http\", \"provisioning_status\": \"active\"}"; + String createLoadBalancerListenerPath = "/load_balancers/testString/listeners"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(201) + .setBody(mockResponseBody)); + + // Construct an instance of the CertificateInstanceIdentityByCRN model + CertificateInstanceIdentityByCRN certificateInstanceIdentityModel = new CertificateInstanceIdentityByCRN.Builder() + .crn("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") .build(); - // Construct an instance of the CreateBareMetalServerNetworkAttachmentOptions model - CreateBareMetalServerNetworkAttachmentOptions createBareMetalServerNetworkAttachmentOptionsModel = new CreateBareMetalServerNetworkAttachmentOptions.Builder() - .bareMetalServerId("testString") - .bareMetalServerNetworkAttachmentPrototype(bareMetalServerNetworkAttachmentPrototypeModel) + // Construct an instance of the LoadBalancerPoolIdentityLoadBalancerPoolIdentityById model + LoadBalancerPoolIdentityLoadBalancerPoolIdentityById loadBalancerPoolIdentityModel = new LoadBalancerPoolIdentityLoadBalancerPoolIdentityById.Builder() + .id("r006-70294e14-4e61-11e8-bcf4-0242ac110004") .build(); - // Invoke createBareMetalServerNetworkAttachment() with a valid options model and verify the result - Response response = vpcService.createBareMetalServerNetworkAttachment(createBareMetalServerNetworkAttachmentOptionsModel).execute(); + // Construct an instance of the LoadBalancerListenerIdentityById model + LoadBalancerListenerIdentityById loadBalancerListenerIdentityModel = new LoadBalancerListenerIdentityById.Builder() + .id("r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091") + .build(); + + // Construct an instance of the LoadBalancerListenerHTTPSRedirectPrototype model + LoadBalancerListenerHTTPSRedirectPrototype loadBalancerListenerHttpsRedirectPrototypeModel = new LoadBalancerListenerHTTPSRedirectPrototype.Builder() + .httpStatusCode(Long.valueOf("301")) + .listener(loadBalancerListenerIdentityModel) + .uri("/example?doc=get") + .build(); + + // Construct an instance of the LoadBalancerListenerPolicyRulePrototype model + LoadBalancerListenerPolicyRulePrototype loadBalancerListenerPolicyRulePrototypeModel = new LoadBalancerListenerPolicyRulePrototype.Builder() + .condition("contains") + .field("MY-APP-HEADER") + .type("body") + .value("testString") + .build(); + + // Construct an instance of the LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById model + LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById loadBalancerListenerPolicyTargetPrototypeModel = new LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById.Builder() + .id("r006-70294e14-4e61-11e8-bcf4-0242ac110004") + .build(); + + // Construct an instance of the LoadBalancerListenerPolicyPrototype model + LoadBalancerListenerPolicyPrototype loadBalancerListenerPolicyPrototypeModel = new LoadBalancerListenerPolicyPrototype.Builder() + .action("forward_to_listener") + .name("my-load-balancer-listener-policy") + .priority(Long.valueOf("5")) + .rules(java.util.Arrays.asList(loadBalancerListenerPolicyRulePrototypeModel)) + .target(loadBalancerListenerPolicyTargetPrototypeModel) + .build(); + + // Construct an instance of the CreateLoadBalancerListenerOptions model + CreateLoadBalancerListenerOptions createLoadBalancerListenerOptionsModel = new CreateLoadBalancerListenerOptions.Builder() + .loadBalancerId("testString") + .protocol("http") + .acceptProxyProtocol(true) + .certificateInstance(certificateInstanceIdentityModel) + .connectionLimit(Long.valueOf("2000")) + .defaultPool(loadBalancerPoolIdentityModel) + .httpsRedirect(loadBalancerListenerHttpsRedirectPrototypeModel) + .idleConnectionTimeout(Long.valueOf("100")) + .policies(java.util.Arrays.asList(loadBalancerListenerPolicyPrototypeModel)) + .port(Long.valueOf("443")) + .portMax(Long.valueOf("499")) + .portMin(Long.valueOf("443")) + .build(); + + // Invoke createLoadBalancerListener() with a valid options model and verify the result + Response response = vpcService.createLoadBalancerListener(createLoadBalancerListenerOptionsModel).execute(); assertNotNull(response); - BareMetalServerNetworkAttachment responseObj = response.getResult(); + LoadBalancerListener responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -14657,421 +16599,394 @@ public void testCreateBareMetalServerNetworkAttachmentWOptions() throws Throwabl assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createBareMetalServerNetworkAttachmentPath); + assertEquals(parsedPath, createLoadBalancerListenerPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createBareMetalServerNetworkAttachment operation with and without retries enabled + // Test the createLoadBalancerListener operation with and without retries enabled @Test - public void testCreateBareMetalServerNetworkAttachmentWRetries() throws Throwable { + public void testCreateLoadBalancerListenerWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateBareMetalServerNetworkAttachmentWOptions(); + testCreateLoadBalancerListenerWOptions(); vpcService.disableRetries(); - testCreateBareMetalServerNetworkAttachmentWOptions(); + testCreateLoadBalancerListenerWOptions(); } - // Test the createBareMetalServerNetworkAttachment operation with a null options model (negative test) + // Test the createLoadBalancerListener operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateBareMetalServerNetworkAttachmentNoOptions() throws Throwable { + public void testCreateLoadBalancerListenerNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createBareMetalServerNetworkAttachment(null).execute(); + vpcService.createLoadBalancerListener(null).execute(); } - // Test the deleteBareMetalServerNetworkAttachment operation with a valid options model parameter + // Test the createLoadBalancerListenerPolicy operation with a valid options model parameter @Test - public void testDeleteBareMetalServerNetworkAttachmentWOptions() throws Throwable { + public void testCreateLoadBalancerListenerPolicyWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteBareMetalServerNetworkAttachmentPath = "/bare_metal_servers/testString/network_attachments/testString"; + String mockResponseBody = "{\"action\": \"forward_to_listener\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"id\": \"r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"name\": \"my-load-balancer-listener-policy\", \"priority\": 5, \"provisioning_status\": \"active\", \"rules\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\", \"id\": \"r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\"}], \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}}"; + String createLoadBalancerListenerPolicyPath = "/load_balancers/testString/listeners/testString/policies"; server.enqueue(new MockResponse() - .setResponseCode(202) + .setHeader("Content-type", "application/json") + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the DeleteBareMetalServerNetworkAttachmentOptions model - DeleteBareMetalServerNetworkAttachmentOptions deleteBareMetalServerNetworkAttachmentOptionsModel = new DeleteBareMetalServerNetworkAttachmentOptions.Builder() - .bareMetalServerId("testString") - .id("testString") + // Construct an instance of the LoadBalancerListenerPolicyRulePrototype model + LoadBalancerListenerPolicyRulePrototype loadBalancerListenerPolicyRulePrototypeModel = new LoadBalancerListenerPolicyRulePrototype.Builder() + .condition("contains") + .field("MY-APP-HEADER") + .type("body") + .value("testString") .build(); - // Invoke deleteBareMetalServerNetworkAttachment() with a valid options model and verify the result - Response response = vpcService.deleteBareMetalServerNetworkAttachment(deleteBareMetalServerNetworkAttachmentOptionsModel).execute(); + // Construct an instance of the LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById model + LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById loadBalancerListenerPolicyTargetPrototypeModel = new LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById.Builder() + .id("r006-70294e14-4e61-11e8-bcf4-0242ac110004") + .build(); + + // Construct an instance of the CreateLoadBalancerListenerPolicyOptions model + CreateLoadBalancerListenerPolicyOptions createLoadBalancerListenerPolicyOptionsModel = new CreateLoadBalancerListenerPolicyOptions.Builder() + .loadBalancerId("testString") + .listenerId("testString") + .action("forward_to_listener") + .priority(Long.valueOf("5")) + .name("my-load-balancer-listener-policy") + .rules(java.util.Arrays.asList(loadBalancerListenerPolicyRulePrototypeModel)) + .target(loadBalancerListenerPolicyTargetPrototypeModel) + .build(); + + // Invoke createLoadBalancerListenerPolicy() with a valid options model and verify the result + Response response = vpcService.createLoadBalancerListenerPolicy(createLoadBalancerListenerPolicyOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + LoadBalancerListenerPolicy 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(), "DELETE"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteBareMetalServerNetworkAttachmentPath); + assertEquals(parsedPath, createLoadBalancerListenerPolicyPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteBareMetalServerNetworkAttachment operation with and without retries enabled + // Test the createLoadBalancerListenerPolicy operation with and without retries enabled @Test - public void testDeleteBareMetalServerNetworkAttachmentWRetries() throws Throwable { + public void testCreateLoadBalancerListenerPolicyWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteBareMetalServerNetworkAttachmentWOptions(); + testCreateLoadBalancerListenerPolicyWOptions(); vpcService.disableRetries(); - testDeleteBareMetalServerNetworkAttachmentWOptions(); + testCreateLoadBalancerListenerPolicyWOptions(); } - // Test the deleteBareMetalServerNetworkAttachment operation with a null options model (negative test) + // Test the createLoadBalancerListenerPolicy operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteBareMetalServerNetworkAttachmentNoOptions() throws Throwable { + public void testCreateLoadBalancerListenerPolicyNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteBareMetalServerNetworkAttachment(null).execute(); + vpcService.createLoadBalancerListenerPolicy(null).execute(); } - // Test the getBareMetalServerNetworkAttachment operation with a valid options model parameter + // Test the createLoadBalancerListenerPolicyRule operation with a valid options model parameter @Test - public void testGetBareMetalServerNetworkAttachmentWOptions() throws Throwable { + public void testCreateLoadBalancerListenerPolicyRuleWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"lifecycle_state\": \"stable\", \"name\": \"my-bare-metal-server-network-attachment\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"bare_metal_server_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}, \"allowed_vlans\": [4], \"interface_type\": \"pci\"}"; - String getBareMetalServerNetworkAttachmentPath = "/bare_metal_servers/testString/network_attachments/testString"; + String mockResponseBody = "{\"condition\": \"contains\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"field\": \"MY-APP-HEADER\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\", \"id\": \"r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\", \"provisioning_status\": \"active\", \"type\": \"body\", \"value\": \"value\"}"; + String createLoadBalancerListenerPolicyRulePath = "/load_balancers/testString/listeners/testString/policies/testString/rules"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the GetBareMetalServerNetworkAttachmentOptions model - GetBareMetalServerNetworkAttachmentOptions getBareMetalServerNetworkAttachmentOptionsModel = new GetBareMetalServerNetworkAttachmentOptions.Builder() - .bareMetalServerId("testString") - .id("testString") + // Construct an instance of the CreateLoadBalancerListenerPolicyRuleOptions model + CreateLoadBalancerListenerPolicyRuleOptions createLoadBalancerListenerPolicyRuleOptionsModel = new CreateLoadBalancerListenerPolicyRuleOptions.Builder() + .loadBalancerId("testString") + .listenerId("testString") + .policyId("testString") + .condition("contains") + .type("body") + .value("testString") + .field("MY-APP-HEADER") .build(); - // Invoke getBareMetalServerNetworkAttachment() with a valid options model and verify the result - Response response = vpcService.getBareMetalServerNetworkAttachment(getBareMetalServerNetworkAttachmentOptionsModel).execute(); + // Invoke createLoadBalancerListenerPolicyRule() with a valid options model and verify the result + Response response = vpcService.createLoadBalancerListenerPolicyRule(createLoadBalancerListenerPolicyRuleOptionsModel).execute(); assertNotNull(response); - BareMetalServerNetworkAttachment responseObj = response.getResult(); + LoadBalancerListenerPolicyRule responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getBareMetalServerNetworkAttachmentPath); + assertEquals(parsedPath, createLoadBalancerListenerPolicyRulePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getBareMetalServerNetworkAttachment operation with and without retries enabled + // Test the createLoadBalancerListenerPolicyRule operation with and without retries enabled @Test - public void testGetBareMetalServerNetworkAttachmentWRetries() throws Throwable { + public void testCreateLoadBalancerListenerPolicyRuleWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetBareMetalServerNetworkAttachmentWOptions(); + testCreateLoadBalancerListenerPolicyRuleWOptions(); vpcService.disableRetries(); - testGetBareMetalServerNetworkAttachmentWOptions(); + testCreateLoadBalancerListenerPolicyRuleWOptions(); } - // Test the getBareMetalServerNetworkAttachment operation with a null options model (negative test) + // Test the createLoadBalancerListenerPolicyRule operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetBareMetalServerNetworkAttachmentNoOptions() throws Throwable { + public void testCreateLoadBalancerListenerPolicyRuleNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getBareMetalServerNetworkAttachment(null).execute(); + vpcService.createLoadBalancerListenerPolicyRule(null).execute(); } - // Test the updateBareMetalServerNetworkAttachment operation with a valid options model parameter + // Test the createLoadBalancerPool operation with a valid options model parameter @Test - public void testUpdateBareMetalServerNetworkAttachmentWOptions() throws Throwable { + public void testCreateLoadBalancerPoolWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"lifecycle_state\": \"stable\", \"name\": \"my-bare-metal-server-network-attachment\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"bare_metal_server_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}, \"allowed_vlans\": [4], \"interface_type\": \"pci\"}"; - String updateBareMetalServerNetworkAttachmentPath = "/bare_metal_servers/testString/network_attachments/testString"; + String mockResponseBody = "{\"algorithm\": \"least_connections\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"failsafe_policy\": {\"action\": \"forward\", \"healthy_member_threshold_count\": 0, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}}, \"health_monitor\": {\"delay\": 5, \"max_retries\": 2, \"port\": 22, \"timeout\": 2, \"type\": \"tcp\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"instance_group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"id\": \"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"name\": \"my-instance-group\"}, \"members\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}], \"name\": \"my-load-balancer-pool\", \"protocol\": \"http\", \"provisioning_status\": \"active\", \"proxy_protocol\": \"disabled\", \"session_persistence\": {\"cookie_name\": \"my-cookie-name\", \"type\": \"app_cookie\"}}"; + String createLoadBalancerPoolPath = "/load_balancers/testString/pools"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the BareMetalServerNetworkAttachmentPatch model - BareMetalServerNetworkAttachmentPatch bareMetalServerNetworkAttachmentPatchModel = new BareMetalServerNetworkAttachmentPatch.Builder() - .allowedVlans(java.util.Arrays.asList(Long.valueOf("4"))) - .name("my-bare-metal-server-network-attachment-updated") + // Construct an instance of the LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeTCPPrototype model + LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeTCPPrototype loadBalancerPoolHealthMonitorPrototypeModel = new LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeTCPPrototype.Builder() + .delay(Long.valueOf("5")) + .maxRetries(Long.valueOf("2")) + .port(Long.valueOf("22")) + .timeout(Long.valueOf("2")) + .type("tcp") .build(); - Map bareMetalServerNetworkAttachmentPatchModelAsPatch = bareMetalServerNetworkAttachmentPatchModel.asPatch(); - // Construct an instance of the UpdateBareMetalServerNetworkAttachmentOptions model - UpdateBareMetalServerNetworkAttachmentOptions updateBareMetalServerNetworkAttachmentOptionsModel = new UpdateBareMetalServerNetworkAttachmentOptions.Builder() - .bareMetalServerId("testString") - .id("testString") - .bareMetalServerNetworkAttachmentPatch(bareMetalServerNetworkAttachmentPatchModelAsPatch) + // Construct an instance of the LoadBalancerPoolIdentityLoadBalancerPoolIdentityById model + LoadBalancerPoolIdentityLoadBalancerPoolIdentityById loadBalancerPoolIdentityModel = new LoadBalancerPoolIdentityLoadBalancerPoolIdentityById.Builder() + .id("r006-70294e14-4e61-11e8-bcf4-0242ac110004") .build(); - // Invoke updateBareMetalServerNetworkAttachment() with a valid options model and verify the result - Response response = vpcService.updateBareMetalServerNetworkAttachment(updateBareMetalServerNetworkAttachmentOptionsModel).execute(); + // Construct an instance of the LoadBalancerPoolFailsafePolicyPrototype model + LoadBalancerPoolFailsafePolicyPrototype loadBalancerPoolFailsafePolicyPrototypeModel = new LoadBalancerPoolFailsafePolicyPrototype.Builder() + .action("forward") + .target(loadBalancerPoolIdentityModel) + .build(); + + // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model + LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById loadBalancerPoolMemberTargetPrototypeModel = new LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById.Builder() + .id("0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0") + .build(); + + // Construct an instance of the LoadBalancerPoolMemberPrototype model + LoadBalancerPoolMemberPrototype loadBalancerPoolMemberPrototypeModel = new LoadBalancerPoolMemberPrototype.Builder() + .port(Long.valueOf("80")) + .target(loadBalancerPoolMemberTargetPrototypeModel) + .weight(Long.valueOf("50")) + .build(); + + // Construct an instance of the LoadBalancerPoolSessionPersistencePrototype model + LoadBalancerPoolSessionPersistencePrototype loadBalancerPoolSessionPersistencePrototypeModel = new LoadBalancerPoolSessionPersistencePrototype.Builder() + .cookieName("my-cookie-name") + .type("app_cookie") + .build(); + + // Construct an instance of the CreateLoadBalancerPoolOptions model + CreateLoadBalancerPoolOptions createLoadBalancerPoolOptionsModel = new CreateLoadBalancerPoolOptions.Builder() + .loadBalancerId("testString") + .algorithm("least_connections") + .healthMonitor(loadBalancerPoolHealthMonitorPrototypeModel) + .protocol("http") + .failsafePolicy(loadBalancerPoolFailsafePolicyPrototypeModel) + .members(java.util.Arrays.asList(loadBalancerPoolMemberPrototypeModel)) + .name("my-load-balancer-pool") + .proxyProtocol("disabled") + .sessionPersistence(loadBalancerPoolSessionPersistencePrototypeModel) + .build(); + + // Invoke createLoadBalancerPool() with a valid options model and verify the result + Response response = vpcService.createLoadBalancerPool(createLoadBalancerPoolOptionsModel).execute(); assertNotNull(response); - BareMetalServerNetworkAttachment responseObj = response.getResult(); + LoadBalancerPool responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateBareMetalServerNetworkAttachmentPath); + assertEquals(parsedPath, createLoadBalancerPoolPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateBareMetalServerNetworkAttachment operation with and without retries enabled + // Test the createLoadBalancerPool operation with and without retries enabled @Test - public void testUpdateBareMetalServerNetworkAttachmentWRetries() throws Throwable { + public void testCreateLoadBalancerPoolWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateBareMetalServerNetworkAttachmentWOptions(); + testCreateLoadBalancerPoolWOptions(); vpcService.disableRetries(); - testUpdateBareMetalServerNetworkAttachmentWOptions(); + testCreateLoadBalancerPoolWOptions(); } - // Test the updateBareMetalServerNetworkAttachment operation with a null options model (negative test) + // Test the createLoadBalancerPool operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateBareMetalServerNetworkAttachmentNoOptions() throws Throwable { + public void testCreateLoadBalancerPoolNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateBareMetalServerNetworkAttachment(null).execute(); + vpcService.createLoadBalancerPool(null).execute(); } - // Test the listBareMetalServerNetworkInterfaces operation with a valid options model parameter + // Test the createLoadBalancerPoolMember operation with a valid options model parameter @Test - public void testListBareMetalServerNetworkInterfacesWOptions() throws Throwable { + public void testCreateLoadBalancerPoolMemberWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"network_interfaces\": [{\"allow_ip_spoofing\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"enable_infrastructure_nat\": true, \"floating_ips\": [{\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}], \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"mac_address\": \"02:00:04:00:C4:6A\", \"name\": \"my-bare-metal-server-network-interface\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"status\": \"available\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\", \"interface_type\": \"hipersocket\"}], \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listBareMetalServerNetworkInterfacesPath = "/bare_metal_servers/testString/network_interfaces"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"health\": \"faulted\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"port\": 80, \"provisioning_status\": \"active\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}, \"weight\": 50}"; + String createLoadBalancerPoolMemberPath = "/load_balancers/testString/pools/testString/members"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the ListBareMetalServerNetworkInterfacesOptions model - ListBareMetalServerNetworkInterfacesOptions listBareMetalServerNetworkInterfacesOptionsModel = new ListBareMetalServerNetworkInterfacesOptions.Builder() - .bareMetalServerId("testString") - .start("testString") - .limit(Long.valueOf("10")) + // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model + LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById loadBalancerPoolMemberTargetPrototypeModel = new LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById.Builder() + .id("0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0") .build(); - // Invoke listBareMetalServerNetworkInterfaces() with a valid options model and verify the result - Response response = vpcService.listBareMetalServerNetworkInterfaces(listBareMetalServerNetworkInterfacesOptionsModel).execute(); + // Construct an instance of the CreateLoadBalancerPoolMemberOptions model + CreateLoadBalancerPoolMemberOptions createLoadBalancerPoolMemberOptionsModel = new CreateLoadBalancerPoolMemberOptions.Builder() + .loadBalancerId("testString") + .poolId("testString") + .port(Long.valueOf("80")) + .target(loadBalancerPoolMemberTargetPrototypeModel) + .weight(Long.valueOf("50")) + .build(); + + // Invoke createLoadBalancerPoolMember() with a valid options model and verify the result + Response response = vpcService.createLoadBalancerPoolMember(createLoadBalancerPoolMemberOptionsModel).execute(); assertNotNull(response); - BareMetalServerNetworkInterfaceCollection responseObj = response.getResult(); + LoadBalancerPoolMember responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listBareMetalServerNetworkInterfacesPath); + assertEquals(parsedPath, createLoadBalancerPoolMemberPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the listBareMetalServerNetworkInterfaces operation with and without retries enabled + // Test the createLoadBalancerPoolMember operation with and without retries enabled @Test - public void testListBareMetalServerNetworkInterfacesWRetries() throws Throwable { + public void testCreateLoadBalancerPoolMemberWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListBareMetalServerNetworkInterfacesWOptions(); + testCreateLoadBalancerPoolMemberWOptions(); vpcService.disableRetries(); - testListBareMetalServerNetworkInterfacesWOptions(); + testCreateLoadBalancerPoolMemberWOptions(); } - // Test the listBareMetalServerNetworkInterfaces operation with a null options model (negative test) + // Test the createLoadBalancerPoolMember operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListBareMetalServerNetworkInterfacesNoOptions() throws Throwable { + public void testCreateLoadBalancerPoolMemberNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listBareMetalServerNetworkInterfaces(null).execute(); - } - - // Test the listBareMetalServerNetworkInterfaces operation using the BareMetalServerNetworkInterfacesPager.getNext() method - @Test - public void testListBareMetalServerNetworkInterfacesWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"network_interfaces\":[{\"allow_ip_spoofing\":true,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"enable_infrastructure_nat\":true,\"floating_ips\":[{\"address\":\"203.0.113.1\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\"}],\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"mac_address\":\"02:00:04:00:C4:6A\",\"name\":\"my-bare-metal-server-network-interface\",\"port_speed\":1000,\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"status\":\"available\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"type\":\"primary\",\"interface_type\":\"hipersocket\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"network_interfaces\":[{\"allow_ip_spoofing\":true,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"enable_infrastructure_nat\":true,\"floating_ips\":[{\"address\":\"203.0.113.1\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\"}],\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"mac_address\":\"02:00:04:00:C4:6A\",\"name\":\"my-bare-metal-server-network-interface\",\"port_speed\":1000,\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"status\":\"available\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"type\":\"primary\",\"interface_type\":\"hipersocket\"}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListBareMetalServerNetworkInterfacesOptions listBareMetalServerNetworkInterfacesOptions = new ListBareMetalServerNetworkInterfacesOptions.Builder() - .bareMetalServerId("testString") - .limit(Long.valueOf("10")) - .build(); - - List allResults = new ArrayList<>(); - BareMetalServerNetworkInterfacesPager pager = new BareMetalServerNetworkInterfacesPager(vpcService, listBareMetalServerNetworkInterfacesOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + vpcService.createLoadBalancerPoolMember(null).execute(); } - - // Test the listBareMetalServerNetworkInterfaces operation using the BareMetalServerNetworkInterfacesPager.getAll() method - @Test - public void testListBareMetalServerNetworkInterfacesWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"network_interfaces\":[{\"allow_ip_spoofing\":true,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"enable_infrastructure_nat\":true,\"floating_ips\":[{\"address\":\"203.0.113.1\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\"}],\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"mac_address\":\"02:00:04:00:C4:6A\",\"name\":\"my-bare-metal-server-network-interface\",\"port_speed\":1000,\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"status\":\"available\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"type\":\"primary\",\"interface_type\":\"hipersocket\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"network_interfaces\":[{\"allow_ip_spoofing\":true,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"enable_infrastructure_nat\":true,\"floating_ips\":[{\"address\":\"203.0.113.1\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\"}],\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"mac_address\":\"02:00:04:00:C4:6A\",\"name\":\"my-bare-metal-server-network-interface\",\"port_speed\":1000,\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"status\":\"available\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"type\":\"primary\",\"interface_type\":\"hipersocket\"}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListBareMetalServerNetworkInterfacesOptions listBareMetalServerNetworkInterfacesOptions = new ListBareMetalServerNetworkInterfacesOptions.Builder() - .bareMetalServerId("testString") - .limit(Long.valueOf("10")) - .build(); - BareMetalServerNetworkInterfacesPager pager = new BareMetalServerNetworkInterfacesPager(vpcService, listBareMetalServerNetworkInterfacesOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the createBareMetalServerNetworkInterface operation with a valid options model parameter + // Test the deleteLoadBalancer operation with a valid options model parameter @Test - public void testCreateBareMetalServerNetworkInterfaceWOptions() throws Throwable { + public void testDeleteLoadBalancerWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"allow_ip_spoofing\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"enable_infrastructure_nat\": true, \"floating_ips\": [{\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}], \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"mac_address\": \"02:00:04:00:C4:6A\", \"name\": \"my-bare-metal-server-network-interface\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"status\": \"available\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\", \"interface_type\": \"hipersocket\"}"; - String createBareMetalServerNetworkInterfacePath = "/bare_metal_servers/testString/network_interfaces"; + String mockResponseBody = ""; + String deleteLoadBalancerPath = "/load_balancers/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext model - NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext networkInterfaceIpPrototypeModel = new NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext.Builder() - .address("10.0.0.5") - .autoDelete(false) - .name("my-reserved-ip") - .build(); - - // Construct an instance of the SecurityGroupIdentityById model - SecurityGroupIdentityById securityGroupIdentityModel = new SecurityGroupIdentityById.Builder() - .id("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") - .build(); - - // Construct an instance of the SubnetIdentityById model - SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() - .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") - .build(); - - // Construct an instance of the BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype model - BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype bareMetalServerNetworkInterfacePrototypeModel = new BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype.Builder() - .allowIpSpoofing(true) - .enableInfrastructureNat(true) - .name("my-bare-metal-server-network-interface") - .primaryIp(networkInterfaceIpPrototypeModel) - .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) - .subnet(subnetIdentityModel) - .interfaceType("hipersocket") - .build(); - - // Construct an instance of the CreateBareMetalServerNetworkInterfaceOptions model - CreateBareMetalServerNetworkInterfaceOptions createBareMetalServerNetworkInterfaceOptionsModel = new CreateBareMetalServerNetworkInterfaceOptions.Builder() - .bareMetalServerId("testString") - .bareMetalServerNetworkInterfacePrototype(bareMetalServerNetworkInterfacePrototypeModel) + // Construct an instance of the DeleteLoadBalancerOptions model + DeleteLoadBalancerOptions deleteLoadBalancerOptionsModel = new DeleteLoadBalancerOptions.Builder() + .id("testString") + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke createBareMetalServerNetworkInterface() with a valid options model and verify the result - Response response = vpcService.createBareMetalServerNetworkInterface(createBareMetalServerNetworkInterfaceOptionsModel).execute(); + // Invoke deleteLoadBalancer() with a valid options model and verify the result + Response response = vpcService.deleteLoadBalancer(deleteLoadBalancerOptionsModel).execute(); assertNotNull(response); - BareMetalServerNetworkInterface responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createBareMetalServerNetworkInterfacePath); + assertEquals(parsedPath, deleteLoadBalancerPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createBareMetalServerNetworkInterface operation with and without retries enabled + // Test the deleteLoadBalancer operation with and without retries enabled @Test - public void testCreateBareMetalServerNetworkInterfaceWRetries() throws Throwable { + public void testDeleteLoadBalancerWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateBareMetalServerNetworkInterfaceWOptions(); + testDeleteLoadBalancerWOptions(); vpcService.disableRetries(); - testCreateBareMetalServerNetworkInterfaceWOptions(); + testDeleteLoadBalancerWOptions(); } - // Test the createBareMetalServerNetworkInterface operation with a null options model (negative test) + // Test the deleteLoadBalancer operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateBareMetalServerNetworkInterfaceNoOptions() throws Throwable { + public void testDeleteLoadBalancerNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createBareMetalServerNetworkInterface(null).execute(); + vpcService.deleteLoadBalancer(null).execute(); } - // Test the deleteBareMetalServerNetworkInterface operation with a valid options model parameter + // Test the deleteLoadBalancerListener operation with a valid options model parameter @Test - public void testDeleteBareMetalServerNetworkInterfaceWOptions() throws Throwable { + public void testDeleteLoadBalancerListenerWOptions() throws Throwable { // Register a mock response String mockResponseBody = ""; - String deleteBareMetalServerNetworkInterfacePath = "/bare_metal_servers/testString/network_interfaces/testString"; + String deleteLoadBalancerListenerPath = "/load_balancers/testString/listeners/testString"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the DeleteBareMetalServerNetworkInterfaceOptions model - DeleteBareMetalServerNetworkInterfaceOptions deleteBareMetalServerNetworkInterfaceOptionsModel = new DeleteBareMetalServerNetworkInterfaceOptions.Builder() - .bareMetalServerId("testString") + // Construct an instance of the DeleteLoadBalancerListenerOptions model + DeleteLoadBalancerListenerOptions deleteLoadBalancerListenerOptionsModel = new DeleteLoadBalancerListenerOptions.Builder() + .loadBalancerId("testString") .id("testString") .build(); - // Invoke deleteBareMetalServerNetworkInterface() with a valid options model and verify the result - Response response = vpcService.deleteBareMetalServerNetworkInterface(deleteBareMetalServerNetworkInterfaceOptionsModel).execute(); + // Invoke deleteLoadBalancerListener() with a valid options model and verify the result + Response response = vpcService.deleteLoadBalancerListener(deleteLoadBalancerListenerOptionsModel).execute(); assertNotNull(response); Void responseObj = response.getResult(); assertNull(responseObj); @@ -15082,222 +16997,212 @@ public void testDeleteBareMetalServerNetworkInterfaceWOptions() throws Throwable assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteBareMetalServerNetworkInterfacePath); + assertEquals(parsedPath, deleteLoadBalancerListenerPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteBareMetalServerNetworkInterface operation with and without retries enabled + // Test the deleteLoadBalancerListener operation with and without retries enabled @Test - public void testDeleteBareMetalServerNetworkInterfaceWRetries() throws Throwable { + public void testDeleteLoadBalancerListenerWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteBareMetalServerNetworkInterfaceWOptions(); + testDeleteLoadBalancerListenerWOptions(); vpcService.disableRetries(); - testDeleteBareMetalServerNetworkInterfaceWOptions(); + testDeleteLoadBalancerListenerWOptions(); } - // Test the deleteBareMetalServerNetworkInterface operation with a null options model (negative test) + // Test the deleteLoadBalancerListener operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteBareMetalServerNetworkInterfaceNoOptions() throws Throwable { + public void testDeleteLoadBalancerListenerNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteBareMetalServerNetworkInterface(null).execute(); + vpcService.deleteLoadBalancerListener(null).execute(); } - // Test the getBareMetalServerNetworkInterface operation with a valid options model parameter + // Test the deleteLoadBalancerListenerPolicy operation with a valid options model parameter @Test - public void testGetBareMetalServerNetworkInterfaceWOptions() throws Throwable { + public void testDeleteLoadBalancerListenerPolicyWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"allow_ip_spoofing\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"enable_infrastructure_nat\": true, \"floating_ips\": [{\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}], \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"mac_address\": \"02:00:04:00:C4:6A\", \"name\": \"my-bare-metal-server-network-interface\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"status\": \"available\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\", \"interface_type\": \"hipersocket\"}"; - String getBareMetalServerNetworkInterfacePath = "/bare_metal_servers/testString/network_interfaces/testString"; + String mockResponseBody = ""; + String deleteLoadBalancerListenerPolicyPath = "/load_balancers/testString/listeners/testString/policies/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the GetBareMetalServerNetworkInterfaceOptions model - GetBareMetalServerNetworkInterfaceOptions getBareMetalServerNetworkInterfaceOptionsModel = new GetBareMetalServerNetworkInterfaceOptions.Builder() - .bareMetalServerId("testString") + // Construct an instance of the DeleteLoadBalancerListenerPolicyOptions model + DeleteLoadBalancerListenerPolicyOptions deleteLoadBalancerListenerPolicyOptionsModel = new DeleteLoadBalancerListenerPolicyOptions.Builder() + .loadBalancerId("testString") + .listenerId("testString") .id("testString") .build(); - // Invoke getBareMetalServerNetworkInterface() with a valid options model and verify the result - Response response = vpcService.getBareMetalServerNetworkInterface(getBareMetalServerNetworkInterfaceOptionsModel).execute(); + // Invoke deleteLoadBalancerListenerPolicy() with a valid options model and verify the result + Response response = vpcService.deleteLoadBalancerListenerPolicy(deleteLoadBalancerListenerPolicyOptionsModel).execute(); assertNotNull(response); - BareMetalServerNetworkInterface responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getBareMetalServerNetworkInterfacePath); + assertEquals(parsedPath, deleteLoadBalancerListenerPolicyPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getBareMetalServerNetworkInterface operation with and without retries enabled + // Test the deleteLoadBalancerListenerPolicy operation with and without retries enabled @Test - public void testGetBareMetalServerNetworkInterfaceWRetries() throws Throwable { + public void testDeleteLoadBalancerListenerPolicyWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetBareMetalServerNetworkInterfaceWOptions(); + testDeleteLoadBalancerListenerPolicyWOptions(); vpcService.disableRetries(); - testGetBareMetalServerNetworkInterfaceWOptions(); + testDeleteLoadBalancerListenerPolicyWOptions(); } - // Test the getBareMetalServerNetworkInterface operation with a null options model (negative test) + // Test the deleteLoadBalancerListenerPolicy operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetBareMetalServerNetworkInterfaceNoOptions() throws Throwable { + public void testDeleteLoadBalancerListenerPolicyNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getBareMetalServerNetworkInterface(null).execute(); + vpcService.deleteLoadBalancerListenerPolicy(null).execute(); } - // Test the updateBareMetalServerNetworkInterface operation with a valid options model parameter + // Test the deleteLoadBalancerListenerPolicyRule operation with a valid options model parameter @Test - public void testUpdateBareMetalServerNetworkInterfaceWOptions() throws Throwable { + public void testDeleteLoadBalancerListenerPolicyRuleWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"allow_ip_spoofing\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"enable_infrastructure_nat\": true, \"floating_ips\": [{\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}], \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"mac_address\": \"02:00:04:00:C4:6A\", \"name\": \"my-bare-metal-server-network-interface\", \"port_speed\": 1000, \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"status\": \"available\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"type\": \"primary\", \"interface_type\": \"hipersocket\"}"; - String updateBareMetalServerNetworkInterfacePath = "/bare_metal_servers/testString/network_interfaces/testString"; + String mockResponseBody = ""; + String deleteLoadBalancerListenerPolicyRulePath = "/load_balancers/testString/listeners/testString/policies/testString/rules/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the BareMetalServerNetworkInterfacePatch model - BareMetalServerNetworkInterfacePatch bareMetalServerNetworkInterfacePatchModel = new BareMetalServerNetworkInterfacePatch.Builder() - .allowIpSpoofing(true) - .allowedVlans(java.util.Arrays.asList(Long.valueOf("4"))) - .enableInfrastructureNat(true) - .name("my-bare-metal-server-network-interface") - .build(); - Map bareMetalServerNetworkInterfacePatchModelAsPatch = bareMetalServerNetworkInterfacePatchModel.asPatch(); - - // Construct an instance of the UpdateBareMetalServerNetworkInterfaceOptions model - UpdateBareMetalServerNetworkInterfaceOptions updateBareMetalServerNetworkInterfaceOptionsModel = new UpdateBareMetalServerNetworkInterfaceOptions.Builder() - .bareMetalServerId("testString") + // Construct an instance of the DeleteLoadBalancerListenerPolicyRuleOptions model + DeleteLoadBalancerListenerPolicyRuleOptions deleteLoadBalancerListenerPolicyRuleOptionsModel = new DeleteLoadBalancerListenerPolicyRuleOptions.Builder() + .loadBalancerId("testString") + .listenerId("testString") + .policyId("testString") .id("testString") - .bareMetalServerNetworkInterfacePatch(bareMetalServerNetworkInterfacePatchModelAsPatch) .build(); - // Invoke updateBareMetalServerNetworkInterface() with a valid options model and verify the result - Response response = vpcService.updateBareMetalServerNetworkInterface(updateBareMetalServerNetworkInterfaceOptionsModel).execute(); + // Invoke deleteLoadBalancerListenerPolicyRule() with a valid options model and verify the result + Response response = vpcService.deleteLoadBalancerListenerPolicyRule(deleteLoadBalancerListenerPolicyRuleOptionsModel).execute(); assertNotNull(response); - BareMetalServerNetworkInterface responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateBareMetalServerNetworkInterfacePath); + assertEquals(parsedPath, deleteLoadBalancerListenerPolicyRulePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateBareMetalServerNetworkInterface operation with and without retries enabled + // Test the deleteLoadBalancerListenerPolicyRule operation with and without retries enabled @Test - public void testUpdateBareMetalServerNetworkInterfaceWRetries() throws Throwable { + public void testDeleteLoadBalancerListenerPolicyRuleWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateBareMetalServerNetworkInterfaceWOptions(); + testDeleteLoadBalancerListenerPolicyRuleWOptions(); vpcService.disableRetries(); - testUpdateBareMetalServerNetworkInterfaceWOptions(); + testDeleteLoadBalancerListenerPolicyRuleWOptions(); } - // Test the updateBareMetalServerNetworkInterface operation with a null options model (negative test) + // Test the deleteLoadBalancerListenerPolicyRule operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateBareMetalServerNetworkInterfaceNoOptions() throws Throwable { + public void testDeleteLoadBalancerListenerPolicyRuleNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateBareMetalServerNetworkInterface(null).execute(); + vpcService.deleteLoadBalancerListenerPolicyRule(null).execute(); } - // Test the listBareMetalServerNetworkInterfaceFloatingIps operation with a valid options model parameter + // Test the deleteLoadBalancerPool operation with a valid options model parameter @Test - public void testListBareMetalServerNetworkInterfaceFloatingIpsWOptions() throws Throwable { + public void testDeleteLoadBalancerPoolWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"floating_ips\": [{\"address\": \"203.0.113.1\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"available\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}]}"; - String listBareMetalServerNetworkInterfaceFloatingIpsPath = "/bare_metal_servers/testString/network_interfaces/testString/floating_ips"; + String mockResponseBody = ""; + String deleteLoadBalancerPoolPath = "/load_balancers/testString/pools/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the ListBareMetalServerNetworkInterfaceFloatingIpsOptions model - ListBareMetalServerNetworkInterfaceFloatingIpsOptions listBareMetalServerNetworkInterfaceFloatingIpsOptionsModel = new ListBareMetalServerNetworkInterfaceFloatingIpsOptions.Builder() - .bareMetalServerId("testString") - .networkInterfaceId("testString") + // Construct an instance of the DeleteLoadBalancerPoolOptions model + DeleteLoadBalancerPoolOptions deleteLoadBalancerPoolOptionsModel = new DeleteLoadBalancerPoolOptions.Builder() + .loadBalancerId("testString") + .id("testString") .build(); - // Invoke listBareMetalServerNetworkInterfaceFloatingIps() with a valid options model and verify the result - Response response = vpcService.listBareMetalServerNetworkInterfaceFloatingIps(listBareMetalServerNetworkInterfaceFloatingIpsOptionsModel).execute(); + // Invoke deleteLoadBalancerPool() with a valid options model and verify the result + Response response = vpcService.deleteLoadBalancerPool(deleteLoadBalancerPoolOptionsModel).execute(); assertNotNull(response); - FloatingIPUnpaginatedCollection responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listBareMetalServerNetworkInterfaceFloatingIpsPath); + assertEquals(parsedPath, deleteLoadBalancerPoolPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the listBareMetalServerNetworkInterfaceFloatingIps operation with and without retries enabled + // Test the deleteLoadBalancerPool operation with and without retries enabled @Test - public void testListBareMetalServerNetworkInterfaceFloatingIpsWRetries() throws Throwable { + public void testDeleteLoadBalancerPoolWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListBareMetalServerNetworkInterfaceFloatingIpsWOptions(); + testDeleteLoadBalancerPoolWOptions(); vpcService.disableRetries(); - testListBareMetalServerNetworkInterfaceFloatingIpsWOptions(); + testDeleteLoadBalancerPoolWOptions(); } - // Test the listBareMetalServerNetworkInterfaceFloatingIps operation with a null options model (negative test) + // Test the deleteLoadBalancerPool operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListBareMetalServerNetworkInterfaceFloatingIpsNoOptions() throws Throwable { + public void testDeleteLoadBalancerPoolNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listBareMetalServerNetworkInterfaceFloatingIps(null).execute(); + vpcService.deleteLoadBalancerPool(null).execute(); } - // Test the removeBareMetalServerNetworkInterfaceFloatingIp operation with a valid options model parameter + // Test the deleteLoadBalancerPoolMember operation with a valid options model parameter @Test - public void testRemoveBareMetalServerNetworkInterfaceFloatingIpWOptions() throws Throwable { + public void testDeleteLoadBalancerPoolMemberWOptions() throws Throwable { // Register a mock response String mockResponseBody = ""; - String removeBareMetalServerNetworkInterfaceFloatingIpPath = "/bare_metal_servers/testString/network_interfaces/testString/floating_ips/testString"; + String deleteLoadBalancerPoolMemberPath = "/load_balancers/testString/pools/testString/members/testString"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the RemoveBareMetalServerNetworkInterfaceFloatingIpOptions model - RemoveBareMetalServerNetworkInterfaceFloatingIpOptions removeBareMetalServerNetworkInterfaceFloatingIpOptionsModel = new RemoveBareMetalServerNetworkInterfaceFloatingIpOptions.Builder() - .bareMetalServerId("testString") - .networkInterfaceId("testString") + // Construct an instance of the DeleteLoadBalancerPoolMemberOptions model + DeleteLoadBalancerPoolMemberOptions deleteLoadBalancerPoolMemberOptionsModel = new DeleteLoadBalancerPoolMemberOptions.Builder() + .loadBalancerId("testString") + .poolId("testString") .id("testString") .build(); - // Invoke removeBareMetalServerNetworkInterfaceFloatingIp() with a valid options model and verify the result - Response response = vpcService.removeBareMetalServerNetworkInterfaceFloatingIp(removeBareMetalServerNetworkInterfaceFloatingIpOptionsModel).execute(); + // Invoke deleteLoadBalancerPoolMember() with a valid options model and verify the result + Response response = vpcService.deleteLoadBalancerPoolMember(deleteLoadBalancerPoolMemberOptionsModel).execute(); assertNotNull(response); Void responseObj = response.getResult(); assertNull(responseObj); @@ -15308,53 +17213,51 @@ public void testRemoveBareMetalServerNetworkInterfaceFloatingIpWOptions() throws assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, removeBareMetalServerNetworkInterfaceFloatingIpPath); + assertEquals(parsedPath, deleteLoadBalancerPoolMemberPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the removeBareMetalServerNetworkInterfaceFloatingIp operation with and without retries enabled + // Test the deleteLoadBalancerPoolMember operation with and without retries enabled @Test - public void testRemoveBareMetalServerNetworkInterfaceFloatingIpWRetries() throws Throwable { + public void testDeleteLoadBalancerPoolMemberWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testRemoveBareMetalServerNetworkInterfaceFloatingIpWOptions(); + testDeleteLoadBalancerPoolMemberWOptions(); vpcService.disableRetries(); - testRemoveBareMetalServerNetworkInterfaceFloatingIpWOptions(); + testDeleteLoadBalancerPoolMemberWOptions(); } - // Test the removeBareMetalServerNetworkInterfaceFloatingIp operation with a null options model (negative test) + // Test the deleteLoadBalancerPoolMember operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testRemoveBareMetalServerNetworkInterfaceFloatingIpNoOptions() throws Throwable { + public void testDeleteLoadBalancerPoolMemberNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.removeBareMetalServerNetworkInterfaceFloatingIp(null).execute(); + vpcService.deleteLoadBalancerPoolMember(null).execute(); } - // Test the getBareMetalServerNetworkInterfaceFloatingIp operation with a valid options model parameter + // Test the getLoadBalancer operation with a valid options model parameter @Test - public void testGetBareMetalServerNetworkInterfaceFloatingIpWOptions() throws Throwable { + public void testGetLoadBalancerWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"address\": \"203.0.113.1\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"available\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String getBareMetalServerNetworkInterfaceFloatingIpPath = "/bare_metal_servers/testString/network_interfaces/testString/floating_ips/testString"; + String mockResponseBody = "{\"access_mode\": \"private\", \"attached_load_balancer_pool_members\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}], \"availability\": \"region\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"dns\": {\"instance\": {\"crn\": \"crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::\"}, \"zone\": {\"id\": \"d66662cc-aa23-4fe1-9987-858487a61f45\"}}, \"failsafe_policy_actions\": [\"forward\"], \"hostname\": \"6b88d615-us-south.lb.appdomain.cloud\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"id\": \"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"instance_groups_supported\": true, \"is_private_path\": true, \"is_public\": true, \"listeners\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"id\": \"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\"}], \"logging\": {\"datapath\": {\"active\": true}}, \"name\": \"my-load-balancer\", \"operating_status\": \"offline\", \"pools\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}], \"private_ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"profile\": {\"family\": \"application\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\", \"name\": \"network-fixed\"}, \"provisioning_status\": \"active\", \"public_ips\": [{\"address\": \"192.168.3.4\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"load_balancer\", \"route_mode\": true, \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"security_groups_supported\": false, \"source_ip_session_persistence_supported\": true, \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"udp_supported\": true}"; + String getLoadBalancerPath = "/load_balancers/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetBareMetalServerNetworkInterfaceFloatingIpOptions model - GetBareMetalServerNetworkInterfaceFloatingIpOptions getBareMetalServerNetworkInterfaceFloatingIpOptionsModel = new GetBareMetalServerNetworkInterfaceFloatingIpOptions.Builder() - .bareMetalServerId("testString") - .networkInterfaceId("testString") + // Construct an instance of the GetLoadBalancerOptions model + GetLoadBalancerOptions getLoadBalancerOptionsModel = new GetLoadBalancerOptions.Builder() .id("testString") .build(); - // Invoke getBareMetalServerNetworkInterfaceFloatingIp() with a valid options model and verify the result - Response response = vpcService.getBareMetalServerNetworkInterfaceFloatingIp(getBareMetalServerNetworkInterfaceFloatingIpOptionsModel).execute(); + // Invoke getLoadBalancer() with a valid options model and verify the result + Response response = vpcService.getLoadBalancer(getLoadBalancerOptionsModel).execute(); assertNotNull(response); - FloatingIP responseObj = response.getResult(); + LoadBalancer responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -15363,107 +17266,107 @@ public void testGetBareMetalServerNetworkInterfaceFloatingIpWOptions() throws Th assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getBareMetalServerNetworkInterfaceFloatingIpPath); + assertEquals(parsedPath, getLoadBalancerPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getBareMetalServerNetworkInterfaceFloatingIp operation with and without retries enabled + // Test the getLoadBalancer operation with and without retries enabled @Test - public void testGetBareMetalServerNetworkInterfaceFloatingIpWRetries() throws Throwable { + public void testGetLoadBalancerWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetBareMetalServerNetworkInterfaceFloatingIpWOptions(); + testGetLoadBalancerWOptions(); vpcService.disableRetries(); - testGetBareMetalServerNetworkInterfaceFloatingIpWOptions(); + testGetLoadBalancerWOptions(); } - // Test the getBareMetalServerNetworkInterfaceFloatingIp operation with a null options model (negative test) + // Test the getLoadBalancer operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetBareMetalServerNetworkInterfaceFloatingIpNoOptions() throws Throwable { + public void testGetLoadBalancerNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getBareMetalServerNetworkInterfaceFloatingIp(null).execute(); + vpcService.getLoadBalancer(null).execute(); } - // Test the addBareMetalServerNetworkInterfaceFloatingIp operation with a valid options model parameter + // Test the getLoadBalancerListener operation with a valid options model parameter @Test - public void testAddBareMetalServerNetworkInterfaceFloatingIpWOptions() throws Throwable { + public void testGetLoadBalancerListenerWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"address\": \"203.0.113.1\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"available\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String addBareMetalServerNetworkInterfaceFloatingIpPath = "/bare_metal_servers/testString/network_interfaces/testString/floating_ips/testString"; + String mockResponseBody = "{\"accept_proxy_protocol\": true, \"certificate_instance\": {\"crn\": \"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5\"}, \"connection_limit\": 2000, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"default_pool\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"https_redirect\": {\"http_status_code\": 301, \"listener\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"id\": \"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\"}, \"uri\": \"/example?doc=get\"}, \"id\": \"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"idle_connection_timeout\": 100, \"policies\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"id\": \"r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"name\": \"my-load-balancer-listener-policy\"}], \"port\": 443, \"port_max\": 499, \"port_min\": 443, \"protocol\": \"http\", \"provisioning_status\": \"active\"}"; + String getLoadBalancerListenerPath = "/load_balancers/testString/listeners/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the AddBareMetalServerNetworkInterfaceFloatingIpOptions model - AddBareMetalServerNetworkInterfaceFloatingIpOptions addBareMetalServerNetworkInterfaceFloatingIpOptionsModel = new AddBareMetalServerNetworkInterfaceFloatingIpOptions.Builder() - .bareMetalServerId("testString") - .networkInterfaceId("testString") + // Construct an instance of the GetLoadBalancerListenerOptions model + GetLoadBalancerListenerOptions getLoadBalancerListenerOptionsModel = new GetLoadBalancerListenerOptions.Builder() + .loadBalancerId("testString") .id("testString") .build(); - // Invoke addBareMetalServerNetworkInterfaceFloatingIp() with a valid options model and verify the result - Response response = vpcService.addBareMetalServerNetworkInterfaceFloatingIp(addBareMetalServerNetworkInterfaceFloatingIpOptionsModel).execute(); + // Invoke getLoadBalancerListener() with a valid options model and verify the result + Response response = vpcService.getLoadBalancerListener(getLoadBalancerListenerOptionsModel).execute(); assertNotNull(response); - FloatingIP responseObj = response.getResult(); + LoadBalancerListener 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"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, addBareMetalServerNetworkInterfaceFloatingIpPath); + assertEquals(parsedPath, getLoadBalancerListenerPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the addBareMetalServerNetworkInterfaceFloatingIp operation with and without retries enabled + // Test the getLoadBalancerListener operation with and without retries enabled @Test - public void testAddBareMetalServerNetworkInterfaceFloatingIpWRetries() throws Throwable { + public void testGetLoadBalancerListenerWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testAddBareMetalServerNetworkInterfaceFloatingIpWOptions(); + testGetLoadBalancerListenerWOptions(); vpcService.disableRetries(); - testAddBareMetalServerNetworkInterfaceFloatingIpWOptions(); + testGetLoadBalancerListenerWOptions(); } - // Test the addBareMetalServerNetworkInterfaceFloatingIp operation with a null options model (negative test) + // Test the getLoadBalancerListener operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testAddBareMetalServerNetworkInterfaceFloatingIpNoOptions() throws Throwable { + public void testGetLoadBalancerListenerNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.addBareMetalServerNetworkInterfaceFloatingIp(null).execute(); + vpcService.getLoadBalancerListener(null).execute(); } - // Test the listBareMetalServerNetworkInterfaceIps operation with a valid options model parameter + // Test the getLoadBalancerListenerPolicy operation with a valid options model parameter @Test - public void testListBareMetalServerNetworkInterfaceIpsWOptions() throws Throwable { + public void testGetLoadBalancerListenerPolicyWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"ips\": [{\"address\": \"192.168.3.4\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"lifecycle_state\": \"stable\", \"name\": \"my-reserved-ip\", \"owner\": \"provider\", \"resource_type\": \"subnet_reserved_ip\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"resource_type\": \"endpoint_gateway\"}}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listBareMetalServerNetworkInterfaceIpsPath = "/bare_metal_servers/testString/network_interfaces/testString/ips"; + String mockResponseBody = "{\"action\": \"forward_to_listener\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"id\": \"r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"name\": \"my-load-balancer-listener-policy\", \"priority\": 5, \"provisioning_status\": \"active\", \"rules\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\", \"id\": \"r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\"}], \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}}"; + String getLoadBalancerListenerPolicyPath = "/load_balancers/testString/listeners/testString/policies/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListBareMetalServerNetworkInterfaceIpsOptions model - ListBareMetalServerNetworkInterfaceIpsOptions listBareMetalServerNetworkInterfaceIpsOptionsModel = new ListBareMetalServerNetworkInterfaceIpsOptions.Builder() - .bareMetalServerId("testString") - .networkInterfaceId("testString") + // Construct an instance of the GetLoadBalancerListenerPolicyOptions model + GetLoadBalancerListenerPolicyOptions getLoadBalancerListenerPolicyOptionsModel = new GetLoadBalancerListenerPolicyOptions.Builder() + .loadBalancerId("testString") + .listenerId("testString") + .id("testString") .build(); - // Invoke listBareMetalServerNetworkInterfaceIps() with a valid options model and verify the result - Response response = vpcService.listBareMetalServerNetworkInterfaceIps(listBareMetalServerNetworkInterfaceIpsOptionsModel).execute(); + // Invoke getLoadBalancerListenerPolicy() with a valid options model and verify the result + Response response = vpcService.getLoadBalancerListenerPolicy(getLoadBalancerListenerPolicyOptionsModel).execute(); assertNotNull(response); - ReservedIPCollectionBareMetalServerNetworkInterfaceContext responseObj = response.getResult(); + LoadBalancerListenerPolicy responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -15472,53 +17375,54 @@ public void testListBareMetalServerNetworkInterfaceIpsWOptions() throws Throwabl assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listBareMetalServerNetworkInterfaceIpsPath); + assertEquals(parsedPath, getLoadBalancerListenerPolicyPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the listBareMetalServerNetworkInterfaceIps operation with and without retries enabled + // Test the getLoadBalancerListenerPolicy operation with and without retries enabled @Test - public void testListBareMetalServerNetworkInterfaceIpsWRetries() throws Throwable { + public void testGetLoadBalancerListenerPolicyWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListBareMetalServerNetworkInterfaceIpsWOptions(); + testGetLoadBalancerListenerPolicyWOptions(); vpcService.disableRetries(); - testListBareMetalServerNetworkInterfaceIpsWOptions(); + testGetLoadBalancerListenerPolicyWOptions(); } - // Test the listBareMetalServerNetworkInterfaceIps operation with a null options model (negative test) + // Test the getLoadBalancerListenerPolicy operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListBareMetalServerNetworkInterfaceIpsNoOptions() throws Throwable { + public void testGetLoadBalancerListenerPolicyNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listBareMetalServerNetworkInterfaceIps(null).execute(); + vpcService.getLoadBalancerListenerPolicy(null).execute(); } - // Test the getBareMetalServerNetworkInterfaceIp operation with a valid options model parameter + // Test the getLoadBalancerListenerPolicyRule operation with a valid options model parameter @Test - public void testGetBareMetalServerNetworkInterfaceIpWOptions() throws Throwable { + public void testGetLoadBalancerListenerPolicyRuleWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"address\": \"192.168.3.4\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"lifecycle_state\": \"stable\", \"name\": \"my-reserved-ip\", \"owner\": \"provider\", \"resource_type\": \"subnet_reserved_ip\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"resource_type\": \"endpoint_gateway\"}}"; - String getBareMetalServerNetworkInterfaceIpPath = "/bare_metal_servers/testString/network_interfaces/testString/ips/testString"; + String mockResponseBody = "{\"condition\": \"contains\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"field\": \"MY-APP-HEADER\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\", \"id\": \"r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\", \"provisioning_status\": \"active\", \"type\": \"body\", \"value\": \"value\"}"; + String getLoadBalancerListenerPolicyRulePath = "/load_balancers/testString/listeners/testString/policies/testString/rules/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetBareMetalServerNetworkInterfaceIpOptions model - GetBareMetalServerNetworkInterfaceIpOptions getBareMetalServerNetworkInterfaceIpOptionsModel = new GetBareMetalServerNetworkInterfaceIpOptions.Builder() - .bareMetalServerId("testString") - .networkInterfaceId("testString") + // Construct an instance of the GetLoadBalancerListenerPolicyRuleOptions model + GetLoadBalancerListenerPolicyRuleOptions getLoadBalancerListenerPolicyRuleOptionsModel = new GetLoadBalancerListenerPolicyRuleOptions.Builder() + .loadBalancerId("testString") + .listenerId("testString") + .policyId("testString") .id("testString") .build(); - // Invoke getBareMetalServerNetworkInterfaceIp() with a valid options model and verify the result - Response response = vpcService.getBareMetalServerNetworkInterfaceIp(getBareMetalServerNetworkInterfaceIpOptionsModel).execute(); + // Invoke getLoadBalancerListenerPolicyRule() with a valid options model and verify the result + Response response = vpcService.getLoadBalancerListenerPolicyRule(getLoadBalancerListenerPolicyRuleOptionsModel).execute(); assertNotNull(response); - ReservedIP responseObj = response.getResult(); + LoadBalancerListenerPolicyRule responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -15527,103 +17431,107 @@ public void testGetBareMetalServerNetworkInterfaceIpWOptions() throws Throwable assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getBareMetalServerNetworkInterfaceIpPath); + assertEquals(parsedPath, getLoadBalancerListenerPolicyRulePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getBareMetalServerNetworkInterfaceIp operation with and without retries enabled + // Test the getLoadBalancerListenerPolicyRule operation with and without retries enabled @Test - public void testGetBareMetalServerNetworkInterfaceIpWRetries() throws Throwable { + public void testGetLoadBalancerListenerPolicyRuleWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetBareMetalServerNetworkInterfaceIpWOptions(); + testGetLoadBalancerListenerPolicyRuleWOptions(); vpcService.disableRetries(); - testGetBareMetalServerNetworkInterfaceIpWOptions(); + testGetLoadBalancerListenerPolicyRuleWOptions(); } - // Test the getBareMetalServerNetworkInterfaceIp operation with a null options model (negative test) + // Test the getLoadBalancerListenerPolicyRule operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetBareMetalServerNetworkInterfaceIpNoOptions() throws Throwable { + public void testGetLoadBalancerListenerPolicyRuleNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getBareMetalServerNetworkInterfaceIp(null).execute(); + vpcService.getLoadBalancerListenerPolicyRule(null).execute(); } - // Test the deleteBareMetalServer operation with a valid options model parameter + // Test the getLoadBalancerPool operation with a valid options model parameter @Test - public void testDeleteBareMetalServerWOptions() throws Throwable { + public void testGetLoadBalancerPoolWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteBareMetalServerPath = "/bare_metal_servers/testString"; + String mockResponseBody = "{\"algorithm\": \"least_connections\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"failsafe_policy\": {\"action\": \"forward\", \"healthy_member_threshold_count\": 0, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}}, \"health_monitor\": {\"delay\": 5, \"max_retries\": 2, \"port\": 22, \"timeout\": 2, \"type\": \"tcp\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"instance_group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"id\": \"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"name\": \"my-instance-group\"}, \"members\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}], \"name\": \"my-load-balancer-pool\", \"protocol\": \"http\", \"provisioning_status\": \"active\", \"proxy_protocol\": \"disabled\", \"session_persistence\": {\"cookie_name\": \"my-cookie-name\", \"type\": \"app_cookie\"}}"; + String getLoadBalancerPoolPath = "/load_balancers/testString/pools/testString"; server.enqueue(new MockResponse() - .setResponseCode(202) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteBareMetalServerOptions model - DeleteBareMetalServerOptions deleteBareMetalServerOptionsModel = new DeleteBareMetalServerOptions.Builder() + // Construct an instance of the GetLoadBalancerPoolOptions model + GetLoadBalancerPoolOptions getLoadBalancerPoolOptionsModel = new GetLoadBalancerPoolOptions.Builder() + .loadBalancerId("testString") .id("testString") .build(); - // Invoke deleteBareMetalServer() with a valid options model and verify the result - Response response = vpcService.deleteBareMetalServer(deleteBareMetalServerOptionsModel).execute(); + // Invoke getLoadBalancerPool() with a valid options model and verify the result + Response response = vpcService.getLoadBalancerPool(getLoadBalancerPoolOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + LoadBalancerPool 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteBareMetalServerPath); + assertEquals(parsedPath, getLoadBalancerPoolPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteBareMetalServer operation with and without retries enabled + // Test the getLoadBalancerPool operation with and without retries enabled @Test - public void testDeleteBareMetalServerWRetries() throws Throwable { + public void testGetLoadBalancerPoolWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteBareMetalServerWOptions(); + testGetLoadBalancerPoolWOptions(); vpcService.disableRetries(); - testDeleteBareMetalServerWOptions(); + testGetLoadBalancerPoolWOptions(); } - // Test the deleteBareMetalServer operation with a null options model (negative test) + // Test the getLoadBalancerPool operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteBareMetalServerNoOptions() throws Throwable { + public void testGetLoadBalancerPoolNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteBareMetalServer(null).execute(); + vpcService.getLoadBalancerPool(null).execute(); } - // Test the getBareMetalServer operation with a valid options model parameter + // Test the getLoadBalancerPoolMember operation with a valid options model parameter @Test - public void testGetBareMetalServerWOptions() throws Throwable { + public void testGetLoadBalancerPoolMemberWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"bandwidth\": 20000, \"boot_target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"id\": \"0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"name\": \"my-bare-metal-server-disk\", \"resource_type\": \"bare_metal_server_disk\"}, \"cpu\": {\"architecture\": \"amd64\", \"core_count\": 80, \"socket_count\": 4, \"threads_per_core\": 2}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\", \"disks\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"id\": \"0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"interface_type\": \"fcp\", \"name\": \"my-bare-metal-server-disk\", \"resource_type\": \"bare_metal_server_disk\", \"size\": 100}], \"enable_secure_boot\": false, \"firmware\": {\"update\": \"none\"}, \"health_reasons\": [{\"code\": \"reservation_expired\", \"message\": \"The reservation cannot be used because it has expired.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\", \"id\": \"0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"memory\": 1536, \"name\": \"my-bare-metal-server\", \"network_attachments\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"bare_metal_server_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}], \"network_interfaces\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}], \"primary_network_attachment\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"bare_metal_server_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}, \"primary_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\", \"name\": \"bx2-metal-192x768\", \"resource_type\": \"bare_metal_server_profile\"}, \"reservation\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}, \"reservation_affinity\": {\"policy\": \"automatic\", \"pool\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}]}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"bare_metal_server\", \"status\": \"deleting\", \"status_reasons\": [{\"code\": \"cannot_start_capacity\", \"message\": \"The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.\", \"more_info\": \"https://console.bluemix.net/docs/iaas/bare_metal_server.html\"}], \"trusted_platform_module\": {\"enabled\": true, \"mode\": \"disabled\", \"supported_modes\": [\"disabled\"]}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String getBareMetalServerPath = "/bare_metal_servers/testString"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"health\": \"faulted\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"port\": 80, \"provisioning_status\": \"active\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}, \"weight\": 50}"; + String getLoadBalancerPoolMemberPath = "/load_balancers/testString/pools/testString/members/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetBareMetalServerOptions model - GetBareMetalServerOptions getBareMetalServerOptionsModel = new GetBareMetalServerOptions.Builder() + // Construct an instance of the GetLoadBalancerPoolMemberOptions model + GetLoadBalancerPoolMemberOptions getLoadBalancerPoolMemberOptionsModel = new GetLoadBalancerPoolMemberOptions.Builder() + .loadBalancerId("testString") + .poolId("testString") .id("testString") .build(); - // Invoke getBareMetalServer() with a valid options model and verify the result - Response response = vpcService.getBareMetalServer(getBareMetalServerOptionsModel).execute(); + // Invoke getLoadBalancerPoolMember() with a valid options model and verify the result + Response response = vpcService.getLoadBalancerPoolMember(getLoadBalancerPoolMemberOptionsModel).execute(); assertNotNull(response); - BareMetalServer responseObj = response.getResult(); + LoadBalancerPoolMember responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -15632,184 +17540,158 @@ public void testGetBareMetalServerWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getBareMetalServerPath); + assertEquals(parsedPath, getLoadBalancerPoolMemberPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getBareMetalServer operation with and without retries enabled + // Test the getLoadBalancerPoolMember operation with and without retries enabled @Test - public void testGetBareMetalServerWRetries() throws Throwable { + public void testGetLoadBalancerPoolMemberWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetBareMetalServerWOptions(); + testGetLoadBalancerPoolMemberWOptions(); vpcService.disableRetries(); - testGetBareMetalServerWOptions(); + testGetLoadBalancerPoolMemberWOptions(); } - // Test the getBareMetalServer operation with a null options model (negative test) + // Test the getLoadBalancerPoolMember operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetBareMetalServerNoOptions() throws Throwable { + public void testGetLoadBalancerPoolMemberNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getBareMetalServer(null).execute(); + vpcService.getLoadBalancerPoolMember(null).execute(); } - // Test the updateBareMetalServer operation with a valid options model parameter + // Test the getLoadBalancerProfile operation with a valid options model parameter @Test - public void testUpdateBareMetalServerWOptions() throws Throwable { + public void testGetLoadBalancerProfileWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"bandwidth\": 20000, \"boot_target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"id\": \"0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"name\": \"my-bare-metal-server-disk\", \"resource_type\": \"bare_metal_server_disk\"}, \"cpu\": {\"architecture\": \"amd64\", \"core_count\": 80, \"socket_count\": 4, \"threads_per_core\": 2}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\", \"disks\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"id\": \"0717-3744f199-6ccc-4698-8772-bb3937348c96\", \"interface_type\": \"fcp\", \"name\": \"my-bare-metal-server-disk\", \"resource_type\": \"bare_metal_server_disk\", \"size\": 100}], \"enable_secure_boot\": false, \"firmware\": {\"update\": \"none\"}, \"health_reasons\": [{\"code\": \"reservation_expired\", \"message\": \"The reservation cannot be used because it has expired.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\", \"id\": \"0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"memory\": 1536, \"name\": \"my-bare-metal-server\", \"network_attachments\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"bare_metal_server_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}], \"network_interfaces\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}], \"primary_network_attachment\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-attachment\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"bare_metal_server_network_attachment\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}}, \"primary_network_interface\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768\", \"name\": \"bx2-metal-192x768\", \"resource_type\": \"bare_metal_server_profile\"}, \"reservation\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}, \"reservation_affinity\": {\"policy\": \"automatic\", \"pool\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"name\": \"my-reservation\", \"resource_type\": \"reservation\"}]}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"bare_metal_server\", \"status\": \"deleting\", \"status_reasons\": [{\"code\": \"cannot_start_capacity\", \"message\": \"The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.\", \"more_info\": \"https://console.bluemix.net/docs/iaas/bare_metal_server.html\"}], \"trusted_platform_module\": {\"enabled\": true, \"mode\": \"disabled\", \"supported_modes\": [\"disabled\"]}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String updateBareMetalServerPath = "/bare_metal_servers/testString"; + String mockResponseBody = "{\"access_modes\": {\"type\": \"enum\", \"values\": [\"private\"]}, \"availability\": {\"type\": \"fixed\", \"value\": \"region\"}, \"failsafe_policy_actions\": {\"default\": \"fail\", \"type\": \"enum\", \"values\": [\"forward\"]}, \"family\": \"application\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\", \"instance_groups_supported\": {\"type\": \"fixed\", \"value\": true}, \"logging_supported\": {\"type\": \"fixed\", \"value\": [\"datapath\"]}, \"name\": \"network-fixed\", \"route_mode_supported\": {\"type\": \"fixed\", \"value\": true}, \"security_groups_supported\": {\"type\": \"fixed\", \"value\": true}, \"source_ip_session_persistence_supported\": {\"type\": \"fixed\", \"value\": true}, \"targetable_load_balancer_profiles\": [{\"family\": \"application\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\", \"name\": \"network-fixed\"}], \"targetable_resource_types\": {\"type\": \"enum\", \"values\": [\"instance\"]}, \"udp_supported\": {\"type\": \"fixed\", \"value\": true}}"; + String getLoadBalancerProfilePath = "/load_balancer/profiles/network-fixed"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ReservationIdentityById model - ReservationIdentityById reservationIdentityModel = new ReservationIdentityById.Builder() - .id("0717-ba49df72-37b8-43ac-98da-f8e029de0e63") - .build(); - - // Construct an instance of the BareMetalServerReservationAffinityPatch model - BareMetalServerReservationAffinityPatch bareMetalServerReservationAffinityPatchModel = new BareMetalServerReservationAffinityPatch.Builder() - .policy("automatic") - .pool(java.util.Arrays.asList(reservationIdentityModel)) - .build(); - - // Construct an instance of the BareMetalServerTrustedPlatformModulePatch model - BareMetalServerTrustedPlatformModulePatch bareMetalServerTrustedPlatformModulePatchModel = new BareMetalServerTrustedPlatformModulePatch.Builder() - .mode("disabled") - .build(); - - // Construct an instance of the BareMetalServerPatch model - BareMetalServerPatch bareMetalServerPatchModel = new BareMetalServerPatch.Builder() - .bandwidth(Long.valueOf("20000")) - .enableSecureBoot(false) - .name("my-bare-metal-server") - .reservationAffinity(bareMetalServerReservationAffinityPatchModel) - .trustedPlatformModule(bareMetalServerTrustedPlatformModulePatchModel) - .build(); - Map bareMetalServerPatchModelAsPatch = bareMetalServerPatchModel.asPatch(); - - // Construct an instance of the UpdateBareMetalServerOptions model - UpdateBareMetalServerOptions updateBareMetalServerOptionsModel = new UpdateBareMetalServerOptions.Builder() - .id("testString") - .bareMetalServerPatch(bareMetalServerPatchModelAsPatch) + // Construct an instance of the GetLoadBalancerProfileOptions model + GetLoadBalancerProfileOptions getLoadBalancerProfileOptionsModel = new GetLoadBalancerProfileOptions.Builder() + .name("network-fixed") .build(); - // Invoke updateBareMetalServer() with a valid options model and verify the result - Response response = vpcService.updateBareMetalServer(updateBareMetalServerOptionsModel).execute(); + // Invoke getLoadBalancerProfile() with a valid options model and verify the result + Response response = vpcService.getLoadBalancerProfile(getLoadBalancerProfileOptionsModel).execute(); assertNotNull(response); - BareMetalServer responseObj = response.getResult(); + LoadBalancerProfile responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateBareMetalServerPath); + assertEquals(parsedPath, getLoadBalancerProfilePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateBareMetalServer operation with and without retries enabled + // Test the getLoadBalancerProfile operation with and without retries enabled @Test - public void testUpdateBareMetalServerWRetries() throws Throwable { + public void testGetLoadBalancerProfileWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateBareMetalServerWOptions(); + testGetLoadBalancerProfileWOptions(); vpcService.disableRetries(); - testUpdateBareMetalServerWOptions(); + testGetLoadBalancerProfileWOptions(); } - // Test the updateBareMetalServer operation with a null options model (negative test) + // Test the getLoadBalancerProfile operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateBareMetalServerNoOptions() throws Throwable { + public void testGetLoadBalancerProfileNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateBareMetalServer(null).execute(); + vpcService.getLoadBalancerProfile(null).execute(); } - // Test the updateFirmwareForBareMetalServer operation with a valid options model parameter + // Test the getLoadBalancerStatistics operation with a valid options model parameter @Test - public void testUpdateFirmwareForBareMetalServerWOptions() throws Throwable { + public void testGetLoadBalancerStatisticsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String updateFirmwareForBareMetalServerPath = "/bare_metal_servers/testString/firmware/update"; + String mockResponseBody = "{\"active_connections\": 797, \"connection_rate\": 91.121, \"data_processed_this_month\": 10093173145, \"throughput\": 167.278}"; + String getLoadBalancerStatisticsPath = "/load_balancers/testString/statistics"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the UpdateFirmwareForBareMetalServerOptions model - UpdateFirmwareForBareMetalServerOptions updateFirmwareForBareMetalServerOptionsModel = new UpdateFirmwareForBareMetalServerOptions.Builder() + // Construct an instance of the GetLoadBalancerStatisticsOptions model + GetLoadBalancerStatisticsOptions getLoadBalancerStatisticsOptionsModel = new GetLoadBalancerStatisticsOptions.Builder() .id("testString") - .autoStart(true) .build(); - // Invoke updateFirmwareForBareMetalServer() with a valid options model and verify the result - Response response = vpcService.updateFirmwareForBareMetalServer(updateFirmwareForBareMetalServerOptionsModel).execute(); + // Invoke getLoadBalancerStatistics() with a valid options model and verify the result + Response response = vpcService.getLoadBalancerStatistics(getLoadBalancerStatisticsOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + LoadBalancerStatistics responseObj = response.getResult(); + assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateFirmwareForBareMetalServerPath); + assertEquals(parsedPath, getLoadBalancerStatisticsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateFirmwareForBareMetalServer operation with and without retries enabled + // Test the getLoadBalancerStatistics operation with and without retries enabled @Test - public void testUpdateFirmwareForBareMetalServerWRetries() throws Throwable { + public void testGetLoadBalancerStatisticsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateFirmwareForBareMetalServerWOptions(); + testGetLoadBalancerStatisticsWOptions(); vpcService.disableRetries(); - testUpdateFirmwareForBareMetalServerWOptions(); + testGetLoadBalancerStatisticsWOptions(); } - // Test the updateFirmwareForBareMetalServer operation with a null options model (negative test) + // Test the getLoadBalancerStatistics operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateFirmwareForBareMetalServerNoOptions() throws Throwable { + public void testGetLoadBalancerStatisticsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateFirmwareForBareMetalServer(null).execute(); + vpcService.getLoadBalancerStatistics(null).execute(); } - // Test the getBareMetalServerInitialization operation with a valid options model parameter + // Test the listLoadBalancerListenerPolicies operation with a valid options model parameter @Test - public void testGetBareMetalServerInitializationWOptions() throws Throwable { + public void testListLoadBalancerListenerPoliciesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"keys\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"fingerprint\": \"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"name\": \"my-key-1\"}], \"user_accounts\": [{\"encrypted_password\": \"qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"fingerprint\": \"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"name\": \"my-key-1\"}, \"resource_type\": \"host_user_account\", \"username\": \"Administrator\"}]}"; - String getBareMetalServerInitializationPath = "/bare_metal_servers/testString/initialization"; + String mockResponseBody = "{\"policies\": [{\"action\": \"forward_to_listener\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"id\": \"r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"name\": \"my-load-balancer-listener-policy\", \"priority\": 5, \"provisioning_status\": \"active\", \"rules\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\", \"id\": \"r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\"}], \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}}]}"; + String listLoadBalancerListenerPoliciesPath = "/load_balancers/testString/listeners/testString/policies"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetBareMetalServerInitializationOptions model - GetBareMetalServerInitializationOptions getBareMetalServerInitializationOptionsModel = new GetBareMetalServerInitializationOptions.Builder() - .id("testString") + // Construct an instance of the ListLoadBalancerListenerPoliciesOptions model + ListLoadBalancerListenerPoliciesOptions listLoadBalancerListenerPoliciesOptionsModel = new ListLoadBalancerListenerPoliciesOptions.Builder() + .loadBalancerId("testString") + .listenerId("testString") .build(); - // Invoke getBareMetalServerInitialization() with a valid options model and verify the result - Response response = vpcService.getBareMetalServerInitialization(getBareMetalServerInitializationOptionsModel).execute(); + // Invoke listLoadBalancerListenerPolicies() with a valid options model and verify the result + Response response = vpcService.listLoadBalancerListenerPolicies(listLoadBalancerListenerPoliciesOptionsModel).execute(); assertNotNull(response); - BareMetalServerInitialization responseObj = response.getResult(); + LoadBalancerListenerPolicyCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -15818,275 +17700,267 @@ public void testGetBareMetalServerInitializationWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getBareMetalServerInitializationPath); + assertEquals(parsedPath, listLoadBalancerListenerPoliciesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getBareMetalServerInitialization operation with and without retries enabled + // Test the listLoadBalancerListenerPolicies operation with and without retries enabled @Test - public void testGetBareMetalServerInitializationWRetries() throws Throwable { + public void testListLoadBalancerListenerPoliciesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetBareMetalServerInitializationWOptions(); + testListLoadBalancerListenerPoliciesWOptions(); vpcService.disableRetries(); - testGetBareMetalServerInitializationWOptions(); + testListLoadBalancerListenerPoliciesWOptions(); } - // Test the getBareMetalServerInitialization operation with a null options model (negative test) + // Test the listLoadBalancerListenerPolicies operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetBareMetalServerInitializationNoOptions() throws Throwable { + public void testListLoadBalancerListenerPoliciesNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getBareMetalServerInitialization(null).execute(); + vpcService.listLoadBalancerListenerPolicies(null).execute(); } - // Test the replaceBareMetalServerInitialization operation with a valid options model parameter + // Test the listLoadBalancerListenerPolicyRules operation with a valid options model parameter @Test - public void testReplaceBareMetalServerInitializationWOptions() throws Throwable { + public void testListLoadBalancerListenerPolicyRulesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"keys\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"fingerprint\": \"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"name\": \"my-key-1\"}], \"user_accounts\": [{\"encrypted_password\": \"qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"fingerprint\": \"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"id\": \"r006-82679077-ac3b-4c10-be16-63e9c21f0f45\", \"name\": \"my-key-1\"}, \"resource_type\": \"host_user_account\", \"username\": \"Administrator\"}]}"; - String replaceBareMetalServerInitializationPath = "/bare_metal_servers/testString/initialization"; + String mockResponseBody = "{\"rules\": [{\"condition\": \"contains\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"field\": \"MY-APP-HEADER\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\", \"id\": \"r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\", \"provisioning_status\": \"active\", \"type\": \"body\", \"value\": \"value\"}]}"; + String listLoadBalancerListenerPolicyRulesPath = "/load_balancers/testString/listeners/testString/policies/testString/rules"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ImageIdentityById model - ImageIdentityById imageIdentityModel = new ImageIdentityById.Builder() - .id("r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") - .build(); - - // Construct an instance of the KeyIdentityById model - KeyIdentityById keyIdentityModel = new KeyIdentityById.Builder() - .id("r006-82679077-ac3b-4c10-be16-63e9c21f0f45") - .build(); - - // Construct an instance of the ReplaceBareMetalServerInitializationOptions model - ReplaceBareMetalServerInitializationOptions replaceBareMetalServerInitializationOptionsModel = new ReplaceBareMetalServerInitializationOptions.Builder() - .id("testString") - .image(imageIdentityModel) - .keys(java.util.Arrays.asList(keyIdentityModel)) - .userData("testString") + // Construct an instance of the ListLoadBalancerListenerPolicyRulesOptions model + ListLoadBalancerListenerPolicyRulesOptions listLoadBalancerListenerPolicyRulesOptionsModel = new ListLoadBalancerListenerPolicyRulesOptions.Builder() + .loadBalancerId("testString") + .listenerId("testString") + .policyId("testString") .build(); - // Invoke replaceBareMetalServerInitialization() with a valid options model and verify the result - Response response = vpcService.replaceBareMetalServerInitialization(replaceBareMetalServerInitializationOptionsModel).execute(); + // Invoke listLoadBalancerListenerPolicyRules() with a valid options model and verify the result + Response response = vpcService.listLoadBalancerListenerPolicyRules(listLoadBalancerListenerPolicyRulesOptionsModel).execute(); assertNotNull(response); - BareMetalServerInitialization responseObj = response.getResult(); + LoadBalancerListenerPolicyRuleCollection 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"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, replaceBareMetalServerInitializationPath); + assertEquals(parsedPath, listLoadBalancerListenerPolicyRulesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the replaceBareMetalServerInitialization operation with and without retries enabled + // Test the listLoadBalancerListenerPolicyRules operation with and without retries enabled @Test - public void testReplaceBareMetalServerInitializationWRetries() throws Throwable { + public void testListLoadBalancerListenerPolicyRulesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testReplaceBareMetalServerInitializationWOptions(); + testListLoadBalancerListenerPolicyRulesWOptions(); vpcService.disableRetries(); - testReplaceBareMetalServerInitializationWOptions(); + testListLoadBalancerListenerPolicyRulesWOptions(); } - // Test the replaceBareMetalServerInitialization operation with a null options model (negative test) + // Test the listLoadBalancerListenerPolicyRules operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testReplaceBareMetalServerInitializationNoOptions() throws Throwable { + public void testListLoadBalancerListenerPolicyRulesNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.replaceBareMetalServerInitialization(null).execute(); + vpcService.listLoadBalancerListenerPolicyRules(null).execute(); } - // Test the restartBareMetalServer operation with a valid options model parameter + // Test the listLoadBalancerListeners operation with a valid options model parameter @Test - public void testRestartBareMetalServerWOptions() throws Throwable { + public void testListLoadBalancerListenersWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String restartBareMetalServerPath = "/bare_metal_servers/testString/restart"; + String mockResponseBody = "{\"listeners\": [{\"accept_proxy_protocol\": true, \"certificate_instance\": {\"crn\": \"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5\"}, \"connection_limit\": 2000, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"default_pool\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"https_redirect\": {\"http_status_code\": 301, \"listener\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"id\": \"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\"}, \"uri\": \"/example?doc=get\"}, \"id\": \"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"idle_connection_timeout\": 100, \"policies\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"id\": \"r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"name\": \"my-load-balancer-listener-policy\"}], \"port\": 443, \"port_max\": 499, \"port_min\": 443, \"protocol\": \"http\", \"provisioning_status\": \"active\"}]}"; + String listLoadBalancerListenersPath = "/load_balancers/testString/listeners"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the RestartBareMetalServerOptions model - RestartBareMetalServerOptions restartBareMetalServerOptionsModel = new RestartBareMetalServerOptions.Builder() - .id("testString") + // Construct an instance of the ListLoadBalancerListenersOptions model + ListLoadBalancerListenersOptions listLoadBalancerListenersOptionsModel = new ListLoadBalancerListenersOptions.Builder() + .loadBalancerId("testString") .build(); - // Invoke restartBareMetalServer() with a valid options model and verify the result - Response response = vpcService.restartBareMetalServer(restartBareMetalServerOptionsModel).execute(); + // Invoke listLoadBalancerListeners() with a valid options model and verify the result + Response response = vpcService.listLoadBalancerListeners(listLoadBalancerListenersOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + LoadBalancerListenerCollection responseObj = response.getResult(); + assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, restartBareMetalServerPath); + assertEquals(parsedPath, listLoadBalancerListenersPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the restartBareMetalServer operation with and without retries enabled + // Test the listLoadBalancerListeners operation with and without retries enabled @Test - public void testRestartBareMetalServerWRetries() throws Throwable { + public void testListLoadBalancerListenersWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testRestartBareMetalServerWOptions(); + testListLoadBalancerListenersWOptions(); vpcService.disableRetries(); - testRestartBareMetalServerWOptions(); + testListLoadBalancerListenersWOptions(); } - // Test the restartBareMetalServer operation with a null options model (negative test) + // Test the listLoadBalancerListeners operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testRestartBareMetalServerNoOptions() throws Throwable { + public void testListLoadBalancerListenersNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.restartBareMetalServer(null).execute(); + vpcService.listLoadBalancerListeners(null).execute(); } - // Test the startBareMetalServer operation with a valid options model parameter + // Test the listLoadBalancerPoolMembers operation with a valid options model parameter @Test - public void testStartBareMetalServerWOptions() throws Throwable { + public void testListLoadBalancerPoolMembersWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String startBareMetalServerPath = "/bare_metal_servers/testString/start"; + String mockResponseBody = "{\"members\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"health\": \"faulted\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"port\": 80, \"provisioning_status\": \"active\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}, \"weight\": 50}]}"; + String listLoadBalancerPoolMembersPath = "/load_balancers/testString/pools/testString/members"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the StartBareMetalServerOptions model - StartBareMetalServerOptions startBareMetalServerOptionsModel = new StartBareMetalServerOptions.Builder() - .id("testString") + // Construct an instance of the ListLoadBalancerPoolMembersOptions model + ListLoadBalancerPoolMembersOptions listLoadBalancerPoolMembersOptionsModel = new ListLoadBalancerPoolMembersOptions.Builder() + .loadBalancerId("testString") + .poolId("testString") .build(); - // Invoke startBareMetalServer() with a valid options model and verify the result - Response response = vpcService.startBareMetalServer(startBareMetalServerOptionsModel).execute(); + // Invoke listLoadBalancerPoolMembers() with a valid options model and verify the result + Response response = vpcService.listLoadBalancerPoolMembers(listLoadBalancerPoolMembersOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + LoadBalancerPoolMemberCollection responseObj = response.getResult(); + assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, startBareMetalServerPath); + assertEquals(parsedPath, listLoadBalancerPoolMembersPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the startBareMetalServer operation with and without retries enabled + // Test the listLoadBalancerPoolMembers operation with and without retries enabled @Test - public void testStartBareMetalServerWRetries() throws Throwable { + public void testListLoadBalancerPoolMembersWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testStartBareMetalServerWOptions(); + testListLoadBalancerPoolMembersWOptions(); vpcService.disableRetries(); - testStartBareMetalServerWOptions(); + testListLoadBalancerPoolMembersWOptions(); } - // Test the startBareMetalServer operation with a null options model (negative test) + // Test the listLoadBalancerPoolMembers operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testStartBareMetalServerNoOptions() throws Throwable { + public void testListLoadBalancerPoolMembersNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.startBareMetalServer(null).execute(); + vpcService.listLoadBalancerPoolMembers(null).execute(); } - // Test the stopBareMetalServer operation with a valid options model parameter + // Test the listLoadBalancerPools operation with a valid options model parameter @Test - public void testStopBareMetalServerWOptions() throws Throwable { + public void testListLoadBalancerPoolsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String stopBareMetalServerPath = "/bare_metal_servers/testString/stop"; + String mockResponseBody = "{\"pools\": [{\"algorithm\": \"least_connections\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"failsafe_policy\": {\"action\": \"forward\", \"healthy_member_threshold_count\": 0, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}}, \"health_monitor\": {\"delay\": 5, \"max_retries\": 2, \"port\": 22, \"timeout\": 2, \"type\": \"tcp\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"instance_group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"id\": \"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"name\": \"my-instance-group\"}, \"members\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}], \"name\": \"my-load-balancer-pool\", \"protocol\": \"http\", \"provisioning_status\": \"active\", \"proxy_protocol\": \"disabled\", \"session_persistence\": {\"cookie_name\": \"my-cookie-name\", \"type\": \"app_cookie\"}}]}"; + String listLoadBalancerPoolsPath = "/load_balancers/testString/pools"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the StopBareMetalServerOptions model - StopBareMetalServerOptions stopBareMetalServerOptionsModel = new StopBareMetalServerOptions.Builder() - .id("testString") - .type("hard") + // Construct an instance of the ListLoadBalancerPoolsOptions model + ListLoadBalancerPoolsOptions listLoadBalancerPoolsOptionsModel = new ListLoadBalancerPoolsOptions.Builder() + .loadBalancerId("testString") .build(); - // Invoke stopBareMetalServer() with a valid options model and verify the result - Response response = vpcService.stopBareMetalServer(stopBareMetalServerOptionsModel).execute(); + // Invoke listLoadBalancerPools() with a valid options model and verify the result + Response response = vpcService.listLoadBalancerPools(listLoadBalancerPoolsOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + LoadBalancerPoolCollection responseObj = response.getResult(); + assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, stopBareMetalServerPath); + assertEquals(parsedPath, listLoadBalancerPoolsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the stopBareMetalServer operation with and without retries enabled + // Test the listLoadBalancerPools operation with and without retries enabled @Test - public void testStopBareMetalServerWRetries() throws Throwable { + public void testListLoadBalancerPoolsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testStopBareMetalServerWOptions(); + testListLoadBalancerPoolsWOptions(); vpcService.disableRetries(); - testStopBareMetalServerWOptions(); + testListLoadBalancerPoolsWOptions(); } - // Test the stopBareMetalServer operation with a null options model (negative test) + // Test the listLoadBalancerPools operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testStopBareMetalServerNoOptions() throws Throwable { + public void testListLoadBalancerPoolsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.stopBareMetalServer(null).execute(); + vpcService.listLoadBalancerPools(null).execute(); } - // Test the listVolumeProfiles operation with a valid options model parameter + // Test the listLoadBalancerProfiles operation with a valid options model parameter @Test - public void testListVolumeProfilesWOptions() throws Throwable { + public void testListLoadBalancerProfilesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"profiles\": [{\"adjustable_capacity_states\": {\"type\": \"enum\", \"values\": [\"attached\"]}, \"adjustable_iops_states\": {\"type\": \"enum\", \"values\": [\"attached\"]}, \"bandwidth\": {\"type\": \"fixed\", \"value\": 4000}, \"boot_capacity\": {\"type\": \"fixed\", \"value\": 4800}, \"capacity\": {\"type\": \"fixed\", \"value\": 4800}, \"family\": \"tiered\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\", \"iops\": {\"type\": \"fixed\", \"value\": 4000}, \"name\": \"general-purpose\", \"storage_generation\": {\"type\": \"fixed\", \"value\": 1}}], \"total_count\": 132}"; - String listVolumeProfilesPath = "/volume/profiles"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"profiles\": [{\"access_modes\": {\"type\": \"enum\", \"values\": [\"private\"]}, \"availability\": {\"type\": \"fixed\", \"value\": \"region\"}, \"failsafe_policy_actions\": {\"default\": \"fail\", \"type\": \"enum\", \"values\": [\"forward\"]}, \"family\": \"application\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\", \"instance_groups_supported\": {\"type\": \"fixed\", \"value\": true}, \"logging_supported\": {\"type\": \"fixed\", \"value\": [\"datapath\"]}, \"name\": \"network-fixed\", \"route_mode_supported\": {\"type\": \"fixed\", \"value\": true}, \"security_groups_supported\": {\"type\": \"fixed\", \"value\": true}, \"source_ip_session_persistence_supported\": {\"type\": \"fixed\", \"value\": true}, \"targetable_load_balancer_profiles\": [{\"family\": \"application\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\", \"name\": \"network-fixed\"}], \"targetable_resource_types\": {\"type\": \"enum\", \"values\": [\"instance\"]}, \"udp_supported\": {\"type\": \"fixed\", \"value\": true}}], \"total_count\": 132}"; + String listLoadBalancerProfilesPath = "/load_balancer/profiles"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListVolumeProfilesOptions model - ListVolumeProfilesOptions listVolumeProfilesOptionsModel = new ListVolumeProfilesOptions.Builder() + // Construct an instance of the ListLoadBalancerProfilesOptions model + ListLoadBalancerProfilesOptions listLoadBalancerProfilesOptionsModel = new ListLoadBalancerProfilesOptions.Builder() .start("testString") .limit(Long.valueOf("10")) .build(); - // Invoke listVolumeProfiles() with a valid options model and verify the result - Response response = vpcService.listVolumeProfiles(listVolumeProfilesOptionsModel).execute(); + // Invoke listLoadBalancerProfiles() with a valid options model and verify the result + Response response = vpcService.listLoadBalancerProfiles(listLoadBalancerProfilesOptionsModel).execute(); assertNotNull(response); - VolumeProfileCollection responseObj = response.getResult(); + LoadBalancerProfileCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -16095,32 +17969,32 @@ public void testListVolumeProfilesWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listVolumeProfilesPath); + assertEquals(parsedPath, listLoadBalancerProfilesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the listVolumeProfiles operation with and without retries enabled + // Test the listLoadBalancerProfiles operation with and without retries enabled @Test - public void testListVolumeProfilesWRetries() throws Throwable { + public void testListLoadBalancerProfilesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListVolumeProfilesWOptions(); + testListLoadBalancerProfilesWOptions(); vpcService.disableRetries(); - testListVolumeProfilesWOptions(); + testListLoadBalancerProfilesWOptions(); } - // Test the listVolumeProfiles operation using the VolumeProfilesPager.getNext() method + // Test the listLoadBalancerProfiles operation using the LoadBalancerProfilesPager.getNext() method @Test - public void testListVolumeProfilesWithPagerGetNext() throws Throwable { + public void testListLoadBalancerProfilesWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"profiles\":[{\"adjustable_capacity_states\":{\"type\":\"enum\",\"values\":[\"attached\"]},\"adjustable_iops_states\":{\"type\":\"enum\",\"values\":[\"attached\"]},\"bandwidth\":{\"type\":\"fixed\",\"value\":4000},\"boot_capacity\":{\"type\":\"fixed\",\"value\":4800},\"capacity\":{\"type\":\"fixed\",\"value\":4800},\"family\":\"tiered\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\",\"iops\":{\"type\":\"fixed\",\"value\":4000},\"name\":\"general-purpose\",\"storage_generation\":{\"type\":\"fixed\",\"value\":1}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"profiles\":[{\"adjustable_capacity_states\":{\"type\":\"enum\",\"values\":[\"attached\"]},\"adjustable_iops_states\":{\"type\":\"enum\",\"values\":[\"attached\"]},\"bandwidth\":{\"type\":\"fixed\",\"value\":4000},\"boot_capacity\":{\"type\":\"fixed\",\"value\":4800},\"capacity\":{\"type\":\"fixed\",\"value\":4800},\"family\":\"tiered\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\",\"iops\":{\"type\":\"fixed\",\"value\":4000},\"name\":\"general-purpose\",\"storage_generation\":{\"type\":\"fixed\",\"value\":1}}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"profiles\":[{\"access_modes\":{\"type\":\"enum\",\"values\":[\"private\"]},\"availability\":{\"type\":\"fixed\",\"value\":\"region\"},\"failsafe_policy_actions\":{\"default\":\"fail\",\"type\":\"enum\",\"values\":[\"forward\"]},\"family\":\"application\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\",\"instance_groups_supported\":{\"type\":\"fixed\",\"value\":true},\"logging_supported\":{\"type\":\"fixed\",\"value\":[\"datapath\"]},\"name\":\"network-fixed\",\"route_mode_supported\":{\"type\":\"fixed\",\"value\":true},\"security_groups_supported\":{\"type\":\"fixed\",\"value\":true},\"source_ip_session_persistence_supported\":{\"type\":\"fixed\",\"value\":true},\"targetable_load_balancer_profiles\":[{\"family\":\"application\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\",\"name\":\"network-fixed\"}],\"targetable_resource_types\":{\"type\":\"enum\",\"values\":[\"instance\"]},\"udp_supported\":{\"type\":\"fixed\",\"value\":true}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"profiles\":[{\"access_modes\":{\"type\":\"enum\",\"values\":[\"private\"]},\"availability\":{\"type\":\"fixed\",\"value\":\"region\"},\"failsafe_policy_actions\":{\"default\":\"fail\",\"type\":\"enum\",\"values\":[\"forward\"]},\"family\":\"application\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\",\"instance_groups_supported\":{\"type\":\"fixed\",\"value\":true},\"logging_supported\":{\"type\":\"fixed\",\"value\":[\"datapath\"]},\"name\":\"network-fixed\",\"route_mode_supported\":{\"type\":\"fixed\",\"value\":true},\"security_groups_supported\":{\"type\":\"fixed\",\"value\":true},\"source_ip_session_persistence_supported\":{\"type\":\"fixed\",\"value\":true},\"targetable_load_balancer_profiles\":[{\"family\":\"application\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\",\"name\":\"network-fixed\"}],\"targetable_resource_types\":{\"type\":\"enum\",\"values\":[\"instance\"]},\"udp_supported\":{\"type\":\"fixed\",\"value\":true}}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -16134,26 +18008,26 @@ public void testListVolumeProfilesWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListVolumeProfilesOptions listVolumeProfilesOptions = new ListVolumeProfilesOptions.Builder() + ListLoadBalancerProfilesOptions listLoadBalancerProfilesOptions = new ListLoadBalancerProfilesOptions.Builder() .limit(Long.valueOf("10")) .build(); - List allResults = new ArrayList<>(); - VolumeProfilesPager pager = new VolumeProfilesPager(vpcService, listVolumeProfilesOptions); + List allResults = new ArrayList<>(); + LoadBalancerProfilesPager pager = new LoadBalancerProfilesPager(vpcService, listLoadBalancerProfilesOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listVolumeProfiles operation using the VolumeProfilesPager.getAll() method + // Test the listLoadBalancerProfiles operation using the LoadBalancerProfilesPager.getAll() method @Test - public void testListVolumeProfilesWithPagerGetAll() throws Throwable { + public void testListLoadBalancerProfilesWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"profiles\":[{\"adjustable_capacity_states\":{\"type\":\"enum\",\"values\":[\"attached\"]},\"adjustable_iops_states\":{\"type\":\"enum\",\"values\":[\"attached\"]},\"bandwidth\":{\"type\":\"fixed\",\"value\":4000},\"boot_capacity\":{\"type\":\"fixed\",\"value\":4800},\"capacity\":{\"type\":\"fixed\",\"value\":4800},\"family\":\"tiered\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\",\"iops\":{\"type\":\"fixed\",\"value\":4000},\"name\":\"general-purpose\",\"storage_generation\":{\"type\":\"fixed\",\"value\":1}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"profiles\":[{\"adjustable_capacity_states\":{\"type\":\"enum\",\"values\":[\"attached\"]},\"adjustable_iops_states\":{\"type\":\"enum\",\"values\":[\"attached\"]},\"bandwidth\":{\"type\":\"fixed\",\"value\":4000},\"boot_capacity\":{\"type\":\"fixed\",\"value\":4800},\"capacity\":{\"type\":\"fixed\",\"value\":4800},\"family\":\"tiered\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\",\"iops\":{\"type\":\"fixed\",\"value\":4000},\"name\":\"general-purpose\",\"storage_generation\":{\"type\":\"fixed\",\"value\":1}}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"profiles\":[{\"access_modes\":{\"type\":\"enum\",\"values\":[\"private\"]},\"availability\":{\"type\":\"fixed\",\"value\":\"region\"},\"failsafe_policy_actions\":{\"default\":\"fail\",\"type\":\"enum\",\"values\":[\"forward\"]},\"family\":\"application\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\",\"instance_groups_supported\":{\"type\":\"fixed\",\"value\":true},\"logging_supported\":{\"type\":\"fixed\",\"value\":[\"datapath\"]},\"name\":\"network-fixed\",\"route_mode_supported\":{\"type\":\"fixed\",\"value\":true},\"security_groups_supported\":{\"type\":\"fixed\",\"value\":true},\"source_ip_session_persistence_supported\":{\"type\":\"fixed\",\"value\":true},\"targetable_load_balancer_profiles\":[{\"family\":\"application\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\",\"name\":\"network-fixed\"}],\"targetable_resource_types\":{\"type\":\"enum\",\"values\":[\"instance\"]},\"udp_supported\":{\"type\":\"fixed\",\"value\":true}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"profiles\":[{\"access_modes\":{\"type\":\"enum\",\"values\":[\"private\"]},\"availability\":{\"type\":\"fixed\",\"value\":\"region\"},\"failsafe_policy_actions\":{\"default\":\"fail\",\"type\":\"enum\",\"values\":[\"forward\"]},\"family\":\"application\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\",\"instance_groups_supported\":{\"type\":\"fixed\",\"value\":true},\"logging_supported\":{\"type\":\"fixed\",\"value\":[\"datapath\"]},\"name\":\"network-fixed\",\"route_mode_supported\":{\"type\":\"fixed\",\"value\":true},\"security_groups_supported\":{\"type\":\"fixed\",\"value\":true},\"source_ip_session_persistence_supported\":{\"type\":\"fixed\",\"value\":true},\"targetable_load_balancer_profiles\":[{\"family\":\"application\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\",\"name\":\"network-fixed\"}],\"targetable_resource_types\":{\"type\":\"enum\",\"values\":[\"instance\"]},\"udp_supported\":{\"type\":\"fixed\",\"value\":true}}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -16167,97 +18041,37 @@ public void testListVolumeProfilesWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListVolumeProfilesOptions listVolumeProfilesOptions = new ListVolumeProfilesOptions.Builder() + ListLoadBalancerProfilesOptions listLoadBalancerProfilesOptions = new ListLoadBalancerProfilesOptions.Builder() .limit(Long.valueOf("10")) .build(); - VolumeProfilesPager pager = new VolumeProfilesPager(vpcService, listVolumeProfilesOptions); - List allResults = pager.getAll(); + LoadBalancerProfilesPager pager = new LoadBalancerProfilesPager(vpcService, listLoadBalancerProfilesOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the getVolumeProfile operation with a valid options model parameter - @Test - public void testGetVolumeProfileWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"adjustable_capacity_states\": {\"type\": \"enum\", \"values\": [\"attached\"]}, \"adjustable_iops_states\": {\"type\": \"enum\", \"values\": [\"attached\"]}, \"bandwidth\": {\"type\": \"fixed\", \"value\": 4000}, \"boot_capacity\": {\"type\": \"fixed\", \"value\": 4800}, \"capacity\": {\"type\": \"fixed\", \"value\": 4800}, \"family\": \"tiered\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\", \"iops\": {\"type\": \"fixed\", \"value\": 4000}, \"name\": \"general-purpose\", \"storage_generation\": {\"type\": \"fixed\", \"value\": 1}}"; - String getVolumeProfilePath = "/volume/profiles/10iops-tier"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the GetVolumeProfileOptions model - GetVolumeProfileOptions getVolumeProfileOptionsModel = new GetVolumeProfileOptions.Builder() - .name("10iops-tier") - .build(); - - // Invoke getVolumeProfile() with a valid options model and verify the result - Response response = vpcService.getVolumeProfile(getVolumeProfileOptionsModel).execute(); - assertNotNull(response); - VolumeProfile responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getVolumeProfilePath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - } - - // Test the getVolumeProfile operation with and without retries enabled - @Test - public void testGetVolumeProfileWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testGetVolumeProfileWOptions(); - - vpcService.disableRetries(); - testGetVolumeProfileWOptions(); - } - - // Test the getVolumeProfile operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetVolumeProfileNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.getVolumeProfile(null).execute(); - } - - // Test the listVolumes operation with a valid options model parameter + // Test the listLoadBalancers operation with a valid options model parameter @Test - public void testListVolumesWOptions() throws Throwable { + public void testListLoadBalancersWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132, \"volumes\": [{\"active\": true, \"adjustable_capacity_states\": [\"attached\"], \"adjustable_iops_states\": [\"attached\"], \"attachment_state\": \"attached\", \"bandwidth\": 100, \"busy\": true, \"capacity\": 1000, \"catalog_offering\": {\"plan\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}}, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"health_reasons\": [{\"code\": \"initializing_from_snapshot\", \"message\": \"Performance will be degraded while this volume is being initialized from its snapshot\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"iops\": 10000, \"name\": \"my-volume\", \"operating_system\": {\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\", \"name\": \"general-purpose\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"volume\", \"source_image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}, \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"storage_generation\": 1, \"user_tags\": [\"userTags\"], \"volume_attachments\": [{\"delete_volume_on_instance_delete\": true, \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"instance\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}, \"name\": \"my-volume-attachment\", \"type\": \"boot\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}]}"; - String listVolumesPath = "/volumes"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"load_balancers\": [{\"access_mode\": \"private\", \"attached_load_balancer_pool_members\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}], \"availability\": \"region\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"dns\": {\"instance\": {\"crn\": \"crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::\"}, \"zone\": {\"id\": \"d66662cc-aa23-4fe1-9987-858487a61f45\"}}, \"failsafe_policy_actions\": [\"forward\"], \"hostname\": \"6b88d615-us-south.lb.appdomain.cloud\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"id\": \"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"instance_groups_supported\": true, \"is_private_path\": true, \"is_public\": true, \"listeners\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"id\": \"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\"}], \"logging\": {\"datapath\": {\"active\": true}}, \"name\": \"my-load-balancer\", \"operating_status\": \"offline\", \"pools\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}], \"private_ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"profile\": {\"family\": \"application\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\", \"name\": \"network-fixed\"}, \"provisioning_status\": \"active\", \"public_ips\": [{\"address\": \"192.168.3.4\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"load_balancer\", \"route_mode\": true, \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"security_groups_supported\": false, \"source_ip_session_persistence_supported\": true, \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"udp_supported\": true}], \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listLoadBalancersPath = "/load_balancers"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListVolumesOptions model - ListVolumesOptions listVolumesOptionsModel = new ListVolumesOptions.Builder() + // Construct an instance of the ListLoadBalancersOptions model + ListLoadBalancersOptions listLoadBalancersOptionsModel = new ListLoadBalancersOptions.Builder() .start("testString") .limit(Long.valueOf("10")) - .attachmentState("attached") - .encryption("provider_managed") - .name("my-name") - .operatingSystemFamily("Ubuntu Server") - .operatingSystemArchitecture("amd64") - .tag("testString") - .zoneName("us-south-1") .build(); - // Invoke listVolumes() with a valid options model and verify the result - Response response = vpcService.listVolumes(listVolumesOptionsModel).execute(); + // Invoke listLoadBalancers() with a valid options model and verify the result + Response response = vpcService.listLoadBalancers(listLoadBalancersOptionsModel).execute(); assertNotNull(response); - VolumeCollection responseObj = response.getResult(); + LoadBalancerCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -16266,39 +18080,32 @@ public void testListVolumesWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listVolumesPath); + assertEquals(parsedPath, listLoadBalancersPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("attachment_state"), "attached"); - assertEquals(query.get("encryption"), "provider_managed"); - assertEquals(query.get("name"), "my-name"); - assertEquals(query.get("operating_system.family"), "Ubuntu Server"); - assertEquals(query.get("operating_system.architecture"), "amd64"); - assertEquals(query.get("tag"), "testString"); - assertEquals(query.get("zone.name"), "us-south-1"); } - // Test the listVolumes operation with and without retries enabled + // Test the listLoadBalancers operation with and without retries enabled @Test - public void testListVolumesWRetries() throws Throwable { + public void testListLoadBalancersWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListVolumesWOptions(); + testListLoadBalancersWOptions(); vpcService.disableRetries(); - testListVolumesWOptions(); + testListLoadBalancersWOptions(); } - // Test the listVolumes operation using the VolumesPager.getNext() method + // Test the listLoadBalancers operation using the LoadBalancersPager.getNext() method @Test - public void testListVolumesWithPagerGetNext() throws Throwable { + public void testListLoadBalancersWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"volumes\":[{\"active\":true,\"adjustable_capacity_states\":[\"attached\"],\"adjustable_iops_states\":[\"attached\"],\"attachment_state\":\"attached\",\"bandwidth\":100,\"busy\":true,\"capacity\":1000,\"catalog_offering\":{\"plan\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}},\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"encryption\":\"provider_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"health_reasons\":[{\"code\":\"initializing_from_snapshot\",\"message\":\"Performance will be degraded while this volume is being initialized from its snapshot\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"iops\":10000,\"name\":\"my-volume\",\"operating_system\":{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\",\"name\":\"general-purpose\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"volume\",\"source_image\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"name\":\"my-image\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"image\"},\"source_snapshot\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"},\"status\":\"available\",\"status_reasons\":[{\"code\":\"encryption_key_deleted\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"storage_generation\":1,\"user_tags\":[\"userTags\"],\"volume_attachments\":[{\"delete_volume_on_instance_delete\":true,\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"device\":{\"id\":\"id\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"id\":\"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"instance\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"name\":\"my-instance\"},\"name\":\"my-volume-attachment\",\"type\":\"boot\"}],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"volumes\":[{\"active\":true,\"adjustable_capacity_states\":[\"attached\"],\"adjustable_iops_states\":[\"attached\"],\"attachment_state\":\"attached\",\"bandwidth\":100,\"busy\":true,\"capacity\":1000,\"catalog_offering\":{\"plan\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}},\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"encryption\":\"provider_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"health_reasons\":[{\"code\":\"initializing_from_snapshot\",\"message\":\"Performance will be degraded while this volume is being initialized from its snapshot\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"iops\":10000,\"name\":\"my-volume\",\"operating_system\":{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\",\"name\":\"general-purpose\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"volume\",\"source_image\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"name\":\"my-image\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"image\"},\"source_snapshot\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"},\"status\":\"available\",\"status_reasons\":[{\"code\":\"encryption_key_deleted\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"storage_generation\":1,\"user_tags\":[\"userTags\"],\"volume_attachments\":[{\"delete_volume_on_instance_delete\":true,\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"device\":{\"id\":\"id\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"id\":\"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"instance\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"name\":\"my-instance\"},\"name\":\"my-volume-attachment\",\"type\":\"boot\"}],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"load_balancers\":[{\"access_mode\":\"private\",\"attached_load_balancer_pool_members\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\",\"id\":\"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}],\"availability\":\"region\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"dns\":{\"instance\":{\"crn\":\"crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::\"},\"zone\":{\"id\":\"d66662cc-aa23-4fe1-9987-858487a61f45\"}},\"failsafe_policy_actions\":[\"forward\"],\"hostname\":\"6b88d615-us-south.lb.appdomain.cloud\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"id\":\"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"instance_groups_supported\":true,\"is_private_path\":true,\"is_public\":true,\"listeners\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\",\"id\":\"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\"}],\"logging\":{\"datapath\":{\"active\":true}},\"name\":\"my-load-balancer\",\"operating_status\":\"offline\",\"pools\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"id\":\"r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"name\":\"my-load-balancer-pool\"}],\"private_ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"profile\":{\"family\":\"application\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\",\"name\":\"network-fixed\"},\"provisioning_status\":\"active\",\"public_ips\":[{\"address\":\"192.168.3.4\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"load_balancer\",\"route_mode\":true,\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"security_groups_supported\":false,\"source_ip_session_persistence_supported\":true,\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"udp_supported\":true}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"load_balancers\":[{\"access_mode\":\"private\",\"attached_load_balancer_pool_members\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\",\"id\":\"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}],\"availability\":\"region\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"dns\":{\"instance\":{\"crn\":\"crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::\"},\"zone\":{\"id\":\"d66662cc-aa23-4fe1-9987-858487a61f45\"}},\"failsafe_policy_actions\":[\"forward\"],\"hostname\":\"6b88d615-us-south.lb.appdomain.cloud\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"id\":\"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"instance_groups_supported\":true,\"is_private_path\":true,\"is_public\":true,\"listeners\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\",\"id\":\"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\"}],\"logging\":{\"datapath\":{\"active\":true}},\"name\":\"my-load-balancer\",\"operating_status\":\"offline\",\"pools\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"id\":\"r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"name\":\"my-load-balancer-pool\"}],\"private_ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"profile\":{\"family\":\"application\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\",\"name\":\"network-fixed\"},\"provisioning_status\":\"active\",\"public_ips\":[{\"address\":\"192.168.3.4\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"load_balancer\",\"route_mode\":true,\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"security_groups_supported\":false,\"source_ip_session_persistence_supported\":true,\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"udp_supported\":true}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -16312,33 +18119,26 @@ public void testListVolumesWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListVolumesOptions listVolumesOptions = new ListVolumesOptions.Builder() + ListLoadBalancersOptions listLoadBalancersOptions = new ListLoadBalancersOptions.Builder() .limit(Long.valueOf("10")) - .attachmentState("attached") - .encryption("provider_managed") - .name("my-name") - .operatingSystemFamily("Ubuntu Server") - .operatingSystemArchitecture("amd64") - .tag("testString") - .zoneName("us-south-1") .build(); - List allResults = new ArrayList<>(); - VolumesPager pager = new VolumesPager(vpcService, listVolumesOptions); + List allResults = new ArrayList<>(); + LoadBalancersPager pager = new LoadBalancersPager(vpcService, listLoadBalancersOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listVolumes operation using the VolumesPager.getAll() method + // Test the listLoadBalancers operation using the LoadBalancersPager.getAll() method @Test - public void testListVolumesWithPagerGetAll() throws Throwable { + public void testListLoadBalancersWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"volumes\":[{\"active\":true,\"adjustable_capacity_states\":[\"attached\"],\"adjustable_iops_states\":[\"attached\"],\"attachment_state\":\"attached\",\"bandwidth\":100,\"busy\":true,\"capacity\":1000,\"catalog_offering\":{\"plan\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}},\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"encryption\":\"provider_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"health_reasons\":[{\"code\":\"initializing_from_snapshot\",\"message\":\"Performance will be degraded while this volume is being initialized from its snapshot\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"iops\":10000,\"name\":\"my-volume\",\"operating_system\":{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\",\"name\":\"general-purpose\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"volume\",\"source_image\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"name\":\"my-image\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"image\"},\"source_snapshot\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"},\"status\":\"available\",\"status_reasons\":[{\"code\":\"encryption_key_deleted\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"storage_generation\":1,\"user_tags\":[\"userTags\"],\"volume_attachments\":[{\"delete_volume_on_instance_delete\":true,\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"device\":{\"id\":\"id\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"id\":\"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"instance\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"name\":\"my-instance\"},\"name\":\"my-volume-attachment\",\"type\":\"boot\"}],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"volumes\":[{\"active\":true,\"adjustable_capacity_states\":[\"attached\"],\"adjustable_iops_states\":[\"attached\"],\"attachment_state\":\"attached\",\"bandwidth\":100,\"busy\":true,\"capacity\":1000,\"catalog_offering\":{\"plan\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}},\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"encryption\":\"provider_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"health_reasons\":[{\"code\":\"initializing_from_snapshot\",\"message\":\"Performance will be degraded while this volume is being initialized from its snapshot\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"iops\":10000,\"name\":\"my-volume\",\"operating_system\":{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\",\"name\":\"general-purpose\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"volume\",\"source_image\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"name\":\"my-image\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"image\"},\"source_snapshot\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"},\"status\":\"available\",\"status_reasons\":[{\"code\":\"encryption_key_deleted\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"storage_generation\":1,\"user_tags\":[\"userTags\"],\"volume_attachments\":[{\"delete_volume_on_instance_delete\":true,\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"device\":{\"id\":\"id\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"id\":\"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"instance\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"name\":\"my-instance\"},\"name\":\"my-volume-attachment\",\"type\":\"boot\"}],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"load_balancers\":[{\"access_mode\":\"private\",\"attached_load_balancer_pool_members\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\",\"id\":\"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}],\"availability\":\"region\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"dns\":{\"instance\":{\"crn\":\"crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::\"},\"zone\":{\"id\":\"d66662cc-aa23-4fe1-9987-858487a61f45\"}},\"failsafe_policy_actions\":[\"forward\"],\"hostname\":\"6b88d615-us-south.lb.appdomain.cloud\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"id\":\"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"instance_groups_supported\":true,\"is_private_path\":true,\"is_public\":true,\"listeners\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\",\"id\":\"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\"}],\"logging\":{\"datapath\":{\"active\":true}},\"name\":\"my-load-balancer\",\"operating_status\":\"offline\",\"pools\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"id\":\"r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"name\":\"my-load-balancer-pool\"}],\"private_ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"profile\":{\"family\":\"application\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\",\"name\":\"network-fixed\"},\"provisioning_status\":\"active\",\"public_ips\":[{\"address\":\"192.168.3.4\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"load_balancer\",\"route_mode\":true,\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"security_groups_supported\":false,\"source_ip_session_persistence_supported\":true,\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"udp_supported\":true}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"load_balancers\":[{\"access_mode\":\"private\",\"attached_load_balancer_pool_members\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\",\"id\":\"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}],\"availability\":\"region\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"dns\":{\"instance\":{\"crn\":\"crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::\"},\"zone\":{\"id\":\"d66662cc-aa23-4fe1-9987-858487a61f45\"}},\"failsafe_policy_actions\":[\"forward\"],\"hostname\":\"6b88d615-us-south.lb.appdomain.cloud\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"id\":\"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"instance_groups_supported\":true,\"is_private_path\":true,\"is_public\":true,\"listeners\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\",\"id\":\"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\"}],\"logging\":{\"datapath\":{\"active\":true}},\"name\":\"my-load-balancer\",\"operating_status\":\"offline\",\"pools\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"id\":\"r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"name\":\"my-load-balancer-pool\"}],\"private_ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"profile\":{\"family\":\"application\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\",\"name\":\"network-fixed\"},\"provisioning_status\":\"active\",\"public_ips\":[{\"address\":\"192.168.3.4\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"load_balancer\",\"route_mode\":true,\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"security_groups_supported\":false,\"source_ip_session_persistence_supported\":true,\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"udp_supported\":true}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -16352,253 +18152,535 @@ public void testListVolumesWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListVolumesOptions listVolumesOptions = new ListVolumesOptions.Builder() + ListLoadBalancersOptions listLoadBalancersOptions = new ListLoadBalancersOptions.Builder() .limit(Long.valueOf("10")) - .attachmentState("attached") - .encryption("provider_managed") - .name("my-name") - .operatingSystemFamily("Ubuntu Server") - .operatingSystemArchitecture("amd64") - .tag("testString") - .zoneName("us-south-1") .build(); - VolumesPager pager = new VolumesPager(vpcService, listVolumesOptions); - List allResults = pager.getAll(); + LoadBalancersPager pager = new LoadBalancersPager(vpcService, listLoadBalancersOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the createVolume operation with a valid options model parameter + // Test the replaceLoadBalancerPoolMembers operation with a valid options model parameter @Test - public void testCreateVolumeWOptions() throws Throwable { + public void testReplaceLoadBalancerPoolMembersWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"active\": true, \"adjustable_capacity_states\": [\"attached\"], \"adjustable_iops_states\": [\"attached\"], \"attachment_state\": \"attached\", \"bandwidth\": 100, \"busy\": true, \"capacity\": 1000, \"catalog_offering\": {\"plan\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}}, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"health_reasons\": [{\"code\": \"initializing_from_snapshot\", \"message\": \"Performance will be degraded while this volume is being initialized from its snapshot\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"iops\": 10000, \"name\": \"my-volume\", \"operating_system\": {\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\", \"name\": \"general-purpose\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"volume\", \"source_image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}, \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"storage_generation\": 1, \"user_tags\": [\"userTags\"], \"volume_attachments\": [{\"delete_volume_on_instance_delete\": true, \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"instance\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}, \"name\": \"my-volume-attachment\", \"type\": \"boot\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String createVolumePath = "/volumes"; + String mockResponseBody = "{\"members\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"health\": \"faulted\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"port\": 80, \"provisioning_status\": \"active\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}, \"weight\": 50}]}"; + String replaceLoadBalancerPoolMembersPath = "/load_balancers/testString/pools/testString/members"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the VolumeProfileIdentityByName model - VolumeProfileIdentityByName volumeProfileIdentityModel = new VolumeProfileIdentityByName.Builder() - .name("custom") + // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model + LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById loadBalancerPoolMemberTargetPrototypeModel = new LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById.Builder() + .id("0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0") .build(); - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") + // Construct an instance of the LoadBalancerPoolMemberPrototype model + LoadBalancerPoolMemberPrototype loadBalancerPoolMemberPrototypeModel = new LoadBalancerPoolMemberPrototype.Builder() + .port(Long.valueOf("80")) + .target(loadBalancerPoolMemberTargetPrototypeModel) + .weight(Long.valueOf("50")) .build(); - // Construct an instance of the ZoneIdentityByName model - ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() - .name("us-south-1") + // Construct an instance of the ReplaceLoadBalancerPoolMembersOptions model + ReplaceLoadBalancerPoolMembersOptions replaceLoadBalancerPoolMembersOptionsModel = new ReplaceLoadBalancerPoolMembersOptions.Builder() + .loadBalancerId("testString") + .poolId("testString") + .members(java.util.Arrays.asList(loadBalancerPoolMemberPrototypeModel)) .build(); - // Construct an instance of the EncryptionKeyIdentityByCRN model - EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() - .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + // Invoke replaceLoadBalancerPoolMembers() with a valid options model and verify the result + Response response = vpcService.replaceLoadBalancerPoolMembers(replaceLoadBalancerPoolMembersOptionsModel).execute(); + assertNotNull(response); + LoadBalancerPoolMemberCollection 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, replaceLoadBalancerPoolMembersPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the replaceLoadBalancerPoolMembers operation with and without retries enabled + @Test + public void testReplaceLoadBalancerPoolMembersWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testReplaceLoadBalancerPoolMembersWOptions(); + + vpcService.disableRetries(); + testReplaceLoadBalancerPoolMembersWOptions(); + } + + // Test the replaceLoadBalancerPoolMembers operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testReplaceLoadBalancerPoolMembersNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.replaceLoadBalancerPoolMembers(null).execute(); + } + + // Test the updateLoadBalancer operation with a valid options model parameter + @Test + public void testUpdateLoadBalancerWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"access_mode\": \"private\", \"attached_load_balancer_pool_members\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}], \"availability\": \"region\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"dns\": {\"instance\": {\"crn\": \"crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::\"}, \"zone\": {\"id\": \"d66662cc-aa23-4fe1-9987-858487a61f45\"}}, \"failsafe_policy_actions\": [\"forward\"], \"hostname\": \"6b88d615-us-south.lb.appdomain.cloud\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"id\": \"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"instance_groups_supported\": true, \"is_private_path\": true, \"is_public\": true, \"listeners\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"id\": \"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\"}], \"logging\": {\"datapath\": {\"active\": true}}, \"name\": \"my-load-balancer\", \"operating_status\": \"offline\", \"pools\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}], \"private_ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"profile\": {\"family\": \"application\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\", \"name\": \"network-fixed\"}, \"provisioning_status\": \"active\", \"public_ips\": [{\"address\": \"192.168.3.4\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"load_balancer\", \"route_mode\": true, \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"security_groups_supported\": false, \"source_ip_session_persistence_supported\": true, \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"udp_supported\": true}"; + String updateLoadBalancerPath = "/load_balancers/testString"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the DNSInstanceIdentityByCRN model + DNSInstanceIdentityByCRN dnsInstanceIdentityModel = new DNSInstanceIdentityByCRN.Builder() + .crn("crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::") + .build(); + + // Construct an instance of the DNSZoneIdentityById model + DNSZoneIdentityById dnsZoneIdentityModel = new DNSZoneIdentityById.Builder() + .id("d66662cc-aa23-4fe1-9987-858487a61f45") + .build(); + + // Construct an instance of the LoadBalancerDNSPatch model + LoadBalancerDNSPatch loadBalancerDnsPatchModel = new LoadBalancerDNSPatch.Builder() + .instance(dnsInstanceIdentityModel) + .zone(dnsZoneIdentityModel) + .build(); + + // Construct an instance of the LoadBalancerLoggingDatapathPatch model + LoadBalancerLoggingDatapathPatch loadBalancerLoggingDatapathPatchModel = new LoadBalancerLoggingDatapathPatch.Builder() + .active(true) + .build(); + + // Construct an instance of the LoadBalancerLoggingPatch model + LoadBalancerLoggingPatch loadBalancerLoggingPatchModel = new LoadBalancerLoggingPatch.Builder() + .datapath(loadBalancerLoggingDatapathPatchModel) + .build(); + + // Construct an instance of the SubnetIdentityById model + SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() + .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + .build(); + + // Construct an instance of the LoadBalancerPatch model + LoadBalancerPatch loadBalancerPatchModel = new LoadBalancerPatch.Builder() + .dns(loadBalancerDnsPatchModel) + .logging(loadBalancerLoggingPatchModel) + .name("my-load-balancer") + .subnets(java.util.Arrays.asList(subnetIdentityModel)) + .build(); + Map loadBalancerPatchModelAsPatch = loadBalancerPatchModel.asPatch(); + + // Construct an instance of the UpdateLoadBalancerOptions model + UpdateLoadBalancerOptions updateLoadBalancerOptionsModel = new UpdateLoadBalancerOptions.Builder() + .id("testString") + .loadBalancerPatch(loadBalancerPatchModelAsPatch) + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") + .build(); + + // Invoke updateLoadBalancer() with a valid options model and verify the result + Response response = vpcService.updateLoadBalancer(updateLoadBalancerOptionsModel).execute(); + assertNotNull(response); + LoadBalancer responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "PATCH"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, updateLoadBalancerPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the updateLoadBalancer operation with and without retries enabled + @Test + public void testUpdateLoadBalancerWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testUpdateLoadBalancerWOptions(); + + vpcService.disableRetries(); + testUpdateLoadBalancerWOptions(); + } + + // Test the updateLoadBalancer operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testUpdateLoadBalancerNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.updateLoadBalancer(null).execute(); + } + + // Test the updateLoadBalancerListener operation with a valid options model parameter + @Test + public void testUpdateLoadBalancerListenerWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"accept_proxy_protocol\": true, \"certificate_instance\": {\"crn\": \"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5\"}, \"connection_limit\": 2000, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"default_pool\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"https_redirect\": {\"http_status_code\": 301, \"listener\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"id\": \"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\"}, \"uri\": \"/example?doc=get\"}, \"id\": \"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"idle_connection_timeout\": 100, \"policies\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"id\": \"r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"name\": \"my-load-balancer-listener-policy\"}], \"port\": 443, \"port_max\": 499, \"port_min\": 443, \"protocol\": \"http\", \"provisioning_status\": \"active\"}"; + String updateLoadBalancerListenerPath = "/load_balancers/testString/listeners/testString"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the CertificateInstanceIdentityByCRN model + CertificateInstanceIdentityByCRN certificateInstanceIdentityModel = new CertificateInstanceIdentityByCRN.Builder() + .crn("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + .build(); + + // Construct an instance of the LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById model + LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById loadBalancerListenerDefaultPoolPatchModel = new LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById.Builder() + .id("r006-70294e14-4e61-11e8-bcf4-0242ac110004") + .build(); + + // Construct an instance of the LoadBalancerListenerIdentityById model + LoadBalancerListenerIdentityById loadBalancerListenerIdentityModel = new LoadBalancerListenerIdentityById.Builder() + .id("r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091") + .build(); + + // Construct an instance of the LoadBalancerListenerHTTPSRedirectPatch model + LoadBalancerListenerHTTPSRedirectPatch loadBalancerListenerHttpsRedirectPatchModel = new LoadBalancerListenerHTTPSRedirectPatch.Builder() + .httpStatusCode(Long.valueOf("301")) + .listener(loadBalancerListenerIdentityModel) + .uri("/example?doc=get") + .build(); + + // Construct an instance of the LoadBalancerListenerPatch model + LoadBalancerListenerPatch loadBalancerListenerPatchModel = new LoadBalancerListenerPatch.Builder() + .acceptProxyProtocol(true) + .certificateInstance(certificateInstanceIdentityModel) + .connectionLimit(Long.valueOf("2000")) + .defaultPool(loadBalancerListenerDefaultPoolPatchModel) + .httpsRedirect(loadBalancerListenerHttpsRedirectPatchModel) + .idleConnectionTimeout(Long.valueOf("100")) + .port(Long.valueOf("443")) + .portMax(Long.valueOf("499")) + .portMin(Long.valueOf("443")) + .protocol("http") + .build(); + Map loadBalancerListenerPatchModelAsPatch = loadBalancerListenerPatchModel.asPatch(); + + // Construct an instance of the UpdateLoadBalancerListenerOptions model + UpdateLoadBalancerListenerOptions updateLoadBalancerListenerOptionsModel = new UpdateLoadBalancerListenerOptions.Builder() + .loadBalancerId("testString") + .id("testString") + .loadBalancerListenerPatch(loadBalancerListenerPatchModelAsPatch) + .build(); + + // Invoke updateLoadBalancerListener() with a valid options model and verify the result + Response response = vpcService.updateLoadBalancerListener(updateLoadBalancerListenerOptionsModel).execute(); + assertNotNull(response); + LoadBalancerListener responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "PATCH"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, updateLoadBalancerListenerPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the updateLoadBalancerListener operation with and without retries enabled + @Test + public void testUpdateLoadBalancerListenerWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testUpdateLoadBalancerListenerWOptions(); + + vpcService.disableRetries(); + testUpdateLoadBalancerListenerWOptions(); + } + + // Test the updateLoadBalancerListener operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testUpdateLoadBalancerListenerNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.updateLoadBalancerListener(null).execute(); + } + + // Test the updateLoadBalancerListenerPolicy operation with a valid options model parameter + @Test + public void testUpdateLoadBalancerListenerPolicyWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"action\": \"forward_to_listener\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"id\": \"r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"name\": \"my-load-balancer-listener-policy\", \"priority\": 5, \"provisioning_status\": \"active\", \"rules\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\", \"id\": \"r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\"}], \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}}"; + String updateLoadBalancerListenerPolicyPath = "/load_balancers/testString/listeners/testString/policies/testString"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById model + LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById loadBalancerListenerPolicyTargetPatchModel = new LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById.Builder() + .id("r006-70294e14-4e61-11e8-bcf4-0242ac110004") .build(); - // Construct an instance of the VolumePrototypeVolumeByCapacity model - VolumePrototypeVolumeByCapacity volumePrototypeModel = new VolumePrototypeVolumeByCapacity.Builder() - .bandwidth(Long.valueOf("1000")) - .iops(Long.valueOf("10000")) - .name("my-volume") - .profile(volumeProfileIdentityModel) - .resourceGroup(resourceGroupIdentityModel) - .userTags(java.util.Arrays.asList()) - .zone(zoneIdentityModel) - .capacity(Long.valueOf("100")) - .encryptionKey(encryptionKeyIdentityModel) + // Construct an instance of the LoadBalancerListenerPolicyPatch model + LoadBalancerListenerPolicyPatch loadBalancerListenerPolicyPatchModel = new LoadBalancerListenerPolicyPatch.Builder() + .name("my-load-balancer-listener-policy-updated") + .priority(Long.valueOf("5")) + .target(loadBalancerListenerPolicyTargetPatchModel) .build(); + Map loadBalancerListenerPolicyPatchModelAsPatch = loadBalancerListenerPolicyPatchModel.asPatch(); - // Construct an instance of the CreateVolumeOptions model - CreateVolumeOptions createVolumeOptionsModel = new CreateVolumeOptions.Builder() - .volumePrototype(volumePrototypeModel) + // Construct an instance of the UpdateLoadBalancerListenerPolicyOptions model + UpdateLoadBalancerListenerPolicyOptions updateLoadBalancerListenerPolicyOptionsModel = new UpdateLoadBalancerListenerPolicyOptions.Builder() + .loadBalancerId("testString") + .listenerId("testString") + .id("testString") + .loadBalancerListenerPolicyPatch(loadBalancerListenerPolicyPatchModelAsPatch) .build(); - // Invoke createVolume() with a valid options model and verify the result - Response response = vpcService.createVolume(createVolumeOptionsModel).execute(); + // Invoke updateLoadBalancerListenerPolicy() with a valid options model and verify the result + Response response = vpcService.updateLoadBalancerListenerPolicy(updateLoadBalancerListenerPolicyOptionsModel).execute(); assertNotNull(response); - Volume responseObj = response.getResult(); + LoadBalancerListenerPolicy responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createVolumePath); + assertEquals(parsedPath, updateLoadBalancerListenerPolicyPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createVolume operation with and without retries enabled + // Test the updateLoadBalancerListenerPolicy operation with and without retries enabled @Test - public void testCreateVolumeWRetries() throws Throwable { + public void testUpdateLoadBalancerListenerPolicyWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateVolumeWOptions(); + testUpdateLoadBalancerListenerPolicyWOptions(); vpcService.disableRetries(); - testCreateVolumeWOptions(); + testUpdateLoadBalancerListenerPolicyWOptions(); } - // Test the createVolume operation with a null options model (negative test) + // Test the updateLoadBalancerListenerPolicy operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateVolumeNoOptions() throws Throwable { + public void testUpdateLoadBalancerListenerPolicyNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createVolume(null).execute(); + vpcService.updateLoadBalancerListenerPolicy(null).execute(); } - // Test the deleteVolume operation with a valid options model parameter + // Test the updateLoadBalancerListenerPolicyRule operation with a valid options model parameter @Test - public void testDeleteVolumeWOptions() throws Throwable { + public void testUpdateLoadBalancerListenerPolicyRuleWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteVolumePath = "/volumes/testString"; + String mockResponseBody = "{\"condition\": \"contains\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"field\": \"MY-APP-HEADER\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\", \"id\": \"r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\", \"provisioning_status\": \"active\", \"type\": \"body\", \"value\": \"value\"}"; + String updateLoadBalancerListenerPolicyRulePath = "/load_balancers/testString/listeners/testString/policies/testString/rules/testString"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteVolumeOptions model - DeleteVolumeOptions deleteVolumeOptionsModel = new DeleteVolumeOptions.Builder() + // Construct an instance of the LoadBalancerListenerPolicyRulePatch model + LoadBalancerListenerPolicyRulePatch loadBalancerListenerPolicyRulePatchModel = new LoadBalancerListenerPolicyRulePatch.Builder() + .condition("contains") + .field("MY-APP-HEADER") + .type("body") + .value("my-example-hostname-updated") + .build(); + Map loadBalancerListenerPolicyRulePatchModelAsPatch = loadBalancerListenerPolicyRulePatchModel.asPatch(); + + // Construct an instance of the UpdateLoadBalancerListenerPolicyRuleOptions model + UpdateLoadBalancerListenerPolicyRuleOptions updateLoadBalancerListenerPolicyRuleOptionsModel = new UpdateLoadBalancerListenerPolicyRuleOptions.Builder() + .loadBalancerId("testString") + .listenerId("testString") + .policyId("testString") .id("testString") - .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") + .loadBalancerListenerPolicyRulePatch(loadBalancerListenerPolicyRulePatchModelAsPatch) .build(); - // Invoke deleteVolume() with a valid options model and verify the result - Response response = vpcService.deleteVolume(deleteVolumeOptionsModel).execute(); + // Invoke updateLoadBalancerListenerPolicyRule() with a valid options model and verify the result + Response response = vpcService.updateLoadBalancerListenerPolicyRule(updateLoadBalancerListenerPolicyRuleOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + LoadBalancerListenerPolicyRule 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(), "DELETE"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteVolumePath); + assertEquals(parsedPath, updateLoadBalancerListenerPolicyRulePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteVolume operation with and without retries enabled + // Test the updateLoadBalancerListenerPolicyRule operation with and without retries enabled @Test - public void testDeleteVolumeWRetries() throws Throwable { + public void testUpdateLoadBalancerListenerPolicyRuleWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteVolumeWOptions(); + testUpdateLoadBalancerListenerPolicyRuleWOptions(); vpcService.disableRetries(); - testDeleteVolumeWOptions(); + testUpdateLoadBalancerListenerPolicyRuleWOptions(); } - // Test the deleteVolume operation with a null options model (negative test) + // Test the updateLoadBalancerListenerPolicyRule operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteVolumeNoOptions() throws Throwable { + public void testUpdateLoadBalancerListenerPolicyRuleNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteVolume(null).execute(); + vpcService.updateLoadBalancerListenerPolicyRule(null).execute(); } - // Test the getVolume operation with a valid options model parameter + // Test the updateLoadBalancerPool operation with a valid options model parameter @Test - public void testGetVolumeWOptions() throws Throwable { + public void testUpdateLoadBalancerPoolWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"active\": true, \"adjustable_capacity_states\": [\"attached\"], \"adjustable_iops_states\": [\"attached\"], \"attachment_state\": \"attached\", \"bandwidth\": 100, \"busy\": true, \"capacity\": 1000, \"catalog_offering\": {\"plan\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}}, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"health_reasons\": [{\"code\": \"initializing_from_snapshot\", \"message\": \"Performance will be degraded while this volume is being initialized from its snapshot\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"iops\": 10000, \"name\": \"my-volume\", \"operating_system\": {\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\", \"name\": \"general-purpose\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"volume\", \"source_image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}, \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"storage_generation\": 1, \"user_tags\": [\"userTags\"], \"volume_attachments\": [{\"delete_volume_on_instance_delete\": true, \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"instance\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}, \"name\": \"my-volume-attachment\", \"type\": \"boot\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String getVolumePath = "/volumes/testString"; + String mockResponseBody = "{\"algorithm\": \"least_connections\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"failsafe_policy\": {\"action\": \"forward\", \"healthy_member_threshold_count\": 0, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}}, \"health_monitor\": {\"delay\": 5, \"max_retries\": 2, \"port\": 22, \"timeout\": 2, \"type\": \"tcp\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"instance_group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"id\": \"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"name\": \"my-instance-group\"}, \"members\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}], \"name\": \"my-load-balancer-pool\", \"protocol\": \"http\", \"provisioning_status\": \"active\", \"proxy_protocol\": \"disabled\", \"session_persistence\": {\"cookie_name\": \"my-cookie-name\", \"type\": \"app_cookie\"}}"; + String updateLoadBalancerPoolPath = "/load_balancers/testString/pools/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetVolumeOptions model - GetVolumeOptions getVolumeOptionsModel = new GetVolumeOptions.Builder() + // Construct an instance of the LoadBalancerPoolFailsafePolicyTargetPatchLoadBalancerPoolIdentityById model + LoadBalancerPoolFailsafePolicyTargetPatchLoadBalancerPoolIdentityById loadBalancerPoolFailsafePolicyTargetPatchModel = new LoadBalancerPoolFailsafePolicyTargetPatchLoadBalancerPoolIdentityById.Builder() + .id("r006-70294e14-4e61-11e8-bcf4-0242ac110004") + .build(); + + // Construct an instance of the LoadBalancerPoolFailsafePolicyPatch model + LoadBalancerPoolFailsafePolicyPatch loadBalancerPoolFailsafePolicyPatchModel = new LoadBalancerPoolFailsafePolicyPatch.Builder() + .action("forward") + .target(loadBalancerPoolFailsafePolicyTargetPatchModel) + .build(); + + // Construct an instance of the LoadBalancerPoolHealthMonitorPatch model + LoadBalancerPoolHealthMonitorPatch loadBalancerPoolHealthMonitorPatchModel = new LoadBalancerPoolHealthMonitorPatch.Builder() + .delay(Long.valueOf("5")) + .maxRetries(Long.valueOf("2")) + .port(Long.valueOf("22")) + .timeout(Long.valueOf("2")) + .type("http") + .urlPath("/") + .build(); + + // Construct an instance of the LoadBalancerPoolSessionPersistencePatch model + LoadBalancerPoolSessionPersistencePatch loadBalancerPoolSessionPersistencePatchModel = new LoadBalancerPoolSessionPersistencePatch.Builder() + .cookieName("my-cookie-name") + .type("app_cookie") + .build(); + + // Construct an instance of the LoadBalancerPoolPatch model + LoadBalancerPoolPatch loadBalancerPoolPatchModel = new LoadBalancerPoolPatch.Builder() + .algorithm("weighted_round_robin") + .failsafePolicy(loadBalancerPoolFailsafePolicyPatchModel) + .healthMonitor(loadBalancerPoolHealthMonitorPatchModel) + .name("my-load-balancer-pool") + .protocol("http") + .proxyProtocol("disabled") + .sessionPersistence(loadBalancerPoolSessionPersistencePatchModel) + .build(); + Map loadBalancerPoolPatchModelAsPatch = loadBalancerPoolPatchModel.asPatch(); + + // Construct an instance of the UpdateLoadBalancerPoolOptions model + UpdateLoadBalancerPoolOptions updateLoadBalancerPoolOptionsModel = new UpdateLoadBalancerPoolOptions.Builder() + .loadBalancerId("testString") .id("testString") + .loadBalancerPoolPatch(loadBalancerPoolPatchModelAsPatch) .build(); - // Invoke getVolume() with a valid options model and verify the result - Response response = vpcService.getVolume(getVolumeOptionsModel).execute(); + // Invoke updateLoadBalancerPool() with a valid options model and verify the result + Response response = vpcService.updateLoadBalancerPool(updateLoadBalancerPoolOptionsModel).execute(); assertNotNull(response); - Volume responseObj = response.getResult(); + LoadBalancerPool responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getVolumePath); + assertEquals(parsedPath, updateLoadBalancerPoolPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getVolume operation with and without retries enabled + // Test the updateLoadBalancerPool operation with and without retries enabled @Test - public void testGetVolumeWRetries() throws Throwable { + public void testUpdateLoadBalancerPoolWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetVolumeWOptions(); + testUpdateLoadBalancerPoolWOptions(); vpcService.disableRetries(); - testGetVolumeWOptions(); + testUpdateLoadBalancerPoolWOptions(); } - // Test the getVolume operation with a null options model (negative test) + // Test the updateLoadBalancerPool operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetVolumeNoOptions() throws Throwable { + public void testUpdateLoadBalancerPoolNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getVolume(null).execute(); + vpcService.updateLoadBalancerPool(null).execute(); } - // Test the updateVolume operation with a valid options model parameter + // Test the updateLoadBalancerPoolMember operation with a valid options model parameter @Test - public void testUpdateVolumeWOptions() throws Throwable { + public void testUpdateLoadBalancerPoolMemberWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"active\": true, \"adjustable_capacity_states\": [\"attached\"], \"adjustable_iops_states\": [\"attached\"], \"attachment_state\": \"attached\", \"bandwidth\": 100, \"busy\": true, \"capacity\": 1000, \"catalog_offering\": {\"plan\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}}, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"health_reasons\": [{\"code\": \"initializing_from_snapshot\", \"message\": \"Performance will be degraded while this volume is being initialized from its snapshot\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"iops\": 10000, \"name\": \"my-volume\", \"operating_system\": {\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\", \"name\": \"general-purpose\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"volume\", \"source_image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}, \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"storage_generation\": 1, \"user_tags\": [\"userTags\"], \"volume_attachments\": [{\"delete_volume_on_instance_delete\": true, \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"instance\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}, \"name\": \"my-volume-attachment\", \"type\": \"boot\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String updateVolumePath = "/volumes/testString"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"health\": \"faulted\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"port\": 80, \"provisioning_status\": \"active\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}, \"weight\": 50}"; + String updateLoadBalancerPoolMemberPath = "/load_balancers/testString/pools/testString/members/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the VolumeProfileIdentityByName model - VolumeProfileIdentityByName volumeProfileIdentityModel = new VolumeProfileIdentityByName.Builder() - .name("general-purpose") + // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model + LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById loadBalancerPoolMemberTargetPrototypeModel = new LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById.Builder() + .id("0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0") .build(); - // Construct an instance of the VolumePatch model - VolumePatch volumePatchModel = new VolumePatch.Builder() - .bandwidth(Long.valueOf("1000")) - .capacity(Long.valueOf("100")) - .iops(Long.valueOf("10000")) - .name("my-volume") - .profile(volumeProfileIdentityModel) - .userTags(java.util.Arrays.asList("testString")) + // Construct an instance of the LoadBalancerPoolMemberPatch model + LoadBalancerPoolMemberPatch loadBalancerPoolMemberPatchModel = new LoadBalancerPoolMemberPatch.Builder() + .port(Long.valueOf("80")) + .target(loadBalancerPoolMemberTargetPrototypeModel) + .weight(Long.valueOf("99")) .build(); - Map volumePatchModelAsPatch = volumePatchModel.asPatch(); + Map loadBalancerPoolMemberPatchModelAsPatch = loadBalancerPoolMemberPatchModel.asPatch(); - // Construct an instance of the UpdateVolumeOptions model - UpdateVolumeOptions updateVolumeOptionsModel = new UpdateVolumeOptions.Builder() + // Construct an instance of the UpdateLoadBalancerPoolMemberOptions model + UpdateLoadBalancerPoolMemberOptions updateLoadBalancerPoolMemberOptionsModel = new UpdateLoadBalancerPoolMemberOptions.Builder() + .loadBalancerId("testString") + .poolId("testString") .id("testString") - .volumePatch(volumePatchModelAsPatch) - .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") + .loadBalancerPoolMemberPatch(loadBalancerPoolMemberPatchModelAsPatch) .build(); - // Invoke updateVolume() with a valid options model and verify the result - Response response = vpcService.updateVolume(updateVolumeOptionsModel).execute(); + // Invoke updateLoadBalancerPoolMember() with a valid options model and verify the result + Response response = vpcService.updateLoadBalancerPoolMember(updateLoadBalancerPoolMemberOptionsModel).execute(); assertNotNull(response); - Volume responseObj = response.getResult(); + LoadBalancerPoolMember responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -16607,203 +18689,151 @@ public void testUpdateVolumeWOptions() throws Throwable { assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateVolumePath); + assertEquals(parsedPath, updateLoadBalancerPoolMemberPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateVolume operation with and without retries enabled + // Test the updateLoadBalancerPoolMember operation with and without retries enabled @Test - public void testUpdateVolumeWRetries() throws Throwable { + public void testUpdateLoadBalancerPoolMemberWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateVolumeWOptions(); + testUpdateLoadBalancerPoolMemberWOptions(); vpcService.disableRetries(); - testUpdateVolumeWOptions(); + testUpdateLoadBalancerPoolMemberWOptions(); } - // Test the updateVolume operation with a null options model (negative test) + // Test the updateLoadBalancerPoolMember operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateVolumeNoOptions() throws Throwable { + public void testUpdateLoadBalancerPoolMemberNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateVolume(null).execute(); + vpcService.updateLoadBalancerPoolMember(null).execute(); } - // Test the listSnapshotConsistencyGroups operation with a valid options model parameter + // Test the createNetworkAcl operation with a valid options model parameter @Test - public void testListSnapshotConsistencyGroupsWOptions() throws Throwable { + public void testCreateNetworkAclWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"snapshot_consistency_groups\": [{\"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"delete_snapshots_on_delete\": false, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"lifecycle_state\": \"stable\", \"name\": \"my-snapshot-consistency-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"snapshot_consistency_group\", \"service_tags\": [\"serviceTags\"], \"snapshots\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}]}], \"total_count\": 132}"; - String listSnapshotConsistencyGroupsPath = "/snapshot_consistency_groups"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"rules\": [{\"action\": \"allow\", \"before\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"name\": \"my-network-acl-rule\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"ip_version\": \"ipv4\", \"name\": \"my-network-acl-rule\", \"source\": \"192.168.3.0/24\", \"protocol\": \"all\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String createNetworkAclPath = "/network_acls"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the ListSnapshotConsistencyGroupsOptions model - ListSnapshotConsistencyGroupsOptions listSnapshotConsistencyGroupsOptionsModel = new ListSnapshotConsistencyGroupsOptions.Builder() - .start("testString") - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .name("my-name") - .sort("name") - .backupPolicyPlanId("testString") + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") .build(); - // Invoke listSnapshotConsistencyGroups() with a valid options model and verify the result - Response response = vpcService.listSnapshotConsistencyGroups(listSnapshotConsistencyGroupsOptionsModel).execute(); + // Construct an instance of the VPCIdentityById model + VPCIdentityById vpcIdentityModel = new VPCIdentityById.Builder() + .id("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .build(); + + // Construct an instance of the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype model + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype networkAclRulePrototypeNetworkAclContextModel = new NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype.Builder() + .action("allow") + .destination("192.168.3.2/32") + .direction("inbound") + .ipVersion("ipv4") + .name("my-network-acl-rule") + .source("192.168.3.2/32") + .protocol("all") + .build(); + + // Construct an instance of the NetworkACLPrototypeNetworkACLByRules model + NetworkACLPrototypeNetworkACLByRules networkAclPrototypeModel = new NetworkACLPrototypeNetworkACLByRules.Builder() + .name("my-network-acl") + .resourceGroup(resourceGroupIdentityModel) + .vpc(vpcIdentityModel) + .rules(java.util.Arrays.asList(networkAclRulePrototypeNetworkAclContextModel)) + .build(); + + // Construct an instance of the CreateNetworkAclOptions model + CreateNetworkAclOptions createNetworkAclOptionsModel = new CreateNetworkAclOptions.Builder() + .networkAclPrototype(networkAclPrototypeModel) + .build(); + + // Invoke createNetworkAcl() with a valid options model and verify the result + Response response = vpcService.createNetworkAcl(createNetworkAclOptionsModel).execute(); assertNotNull(response); - SnapshotConsistencyGroupCollection responseObj = response.getResult(); + NetworkACL responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listSnapshotConsistencyGroupsPath); + assertEquals(parsedPath, createNetworkAclPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("resource_group.id"), "testString"); - assertEquals(query.get("name"), "my-name"); - assertEquals(query.get("sort"), "name"); - assertEquals(query.get("backup_policy_plan.id"), "testString"); } - // Test the listSnapshotConsistencyGroups operation with and without retries enabled + // Test the createNetworkAcl operation with and without retries enabled @Test - public void testListSnapshotConsistencyGroupsWRetries() throws Throwable { + public void testCreateNetworkAclWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListSnapshotConsistencyGroupsWOptions(); + testCreateNetworkAclWOptions(); vpcService.disableRetries(); - testListSnapshotConsistencyGroupsWOptions(); + testCreateNetworkAclWOptions(); } - // Test the listSnapshotConsistencyGroups operation using the SnapshotConsistencyGroupsPager.getNext() method - @Test - public void testListSnapshotConsistencyGroupsWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"snapshot_consistency_groups\":[{\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"delete_snapshots_on_delete\":false,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"lifecycle_state\":\"stable\",\"name\":\"my-snapshot-consistency-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"snapshot_consistency_group\",\"service_tags\":[\"serviceTags\"],\"snapshots\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"}]}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"snapshot_consistency_groups\":[{\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"delete_snapshots_on_delete\":false,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"lifecycle_state\":\"stable\",\"name\":\"my-snapshot-consistency-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"snapshot_consistency_group\",\"service_tags\":[\"serviceTags\"],\"snapshots\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"}]}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListSnapshotConsistencyGroupsOptions listSnapshotConsistencyGroupsOptions = new ListSnapshotConsistencyGroupsOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .name("my-name") - .sort("name") - .backupPolicyPlanId("testString") - .build(); - - List allResults = new ArrayList<>(); - SnapshotConsistencyGroupsPager pager = new SnapshotConsistencyGroupsPager(vpcService, listSnapshotConsistencyGroupsOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + // Test the createNetworkAcl operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testCreateNetworkAclNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.createNetworkAcl(null).execute(); } - - // Test the listSnapshotConsistencyGroups operation using the SnapshotConsistencyGroupsPager.getAll() method - @Test - public void testListSnapshotConsistencyGroupsWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"snapshot_consistency_groups\":[{\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"delete_snapshots_on_delete\":false,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"lifecycle_state\":\"stable\",\"name\":\"my-snapshot-consistency-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"snapshot_consistency_group\",\"service_tags\":[\"serviceTags\"],\"snapshots\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"}]}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"snapshot_consistency_groups\":[{\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"delete_snapshots_on_delete\":false,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"lifecycle_state\":\"stable\",\"name\":\"my-snapshot-consistency-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"snapshot_consistency_group\",\"service_tags\":[\"serviceTags\"],\"snapshots\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"}]}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListSnapshotConsistencyGroupsOptions listSnapshotConsistencyGroupsOptions = new ListSnapshotConsistencyGroupsOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .name("my-name") - .sort("name") - .backupPolicyPlanId("testString") - .build(); - SnapshotConsistencyGroupsPager pager = new SnapshotConsistencyGroupsPager(vpcService, listSnapshotConsistencyGroupsOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the createSnapshotConsistencyGroup operation with a valid options model parameter + // Test the createNetworkAclRule operation with a valid options model parameter @Test - public void testCreateSnapshotConsistencyGroupWOptions() throws Throwable { + public void testCreateNetworkAclRuleWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"delete_snapshots_on_delete\": false, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"lifecycle_state\": \"stable\", \"name\": \"my-snapshot-consistency-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"snapshot_consistency_group\", \"service_tags\": [\"serviceTags\"], \"snapshots\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}]}"; - String createSnapshotConsistencyGroupPath = "/snapshot_consistency_groups"; + String mockResponseBody = "{\"action\": \"allow\", \"before\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"name\": \"my-network-acl-rule\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"ip_version\": \"ipv4\", \"name\": \"my-network-acl-rule\", \"source\": \"192.168.3.0/24\", \"protocol\": \"all\"}"; + String createNetworkAclRulePath = "/network_acls/testString/rules"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); - - // Construct an instance of the VolumeIdentityById model - VolumeIdentityById volumeIdentityModel = new VolumeIdentityById.Builder() - .id("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") - .build(); - - // Construct an instance of the SnapshotPrototypeSnapshotConsistencyGroupContext model - SnapshotPrototypeSnapshotConsistencyGroupContext snapshotPrototypeSnapshotConsistencyGroupContextModel = new SnapshotPrototypeSnapshotConsistencyGroupContext.Builder() - .name("my-snapshot") - .sourceVolume(volumeIdentityModel) - .userTags(java.util.Arrays.asList("testString")) + // Construct an instance of the NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById model + NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById networkAclRuleBeforePrototypeModel = new NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById.Builder() + .id("r006-8daca77a-4980-4d33-8f3e-7038797be8f9") .build(); - // Construct an instance of the SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots model - SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots snapshotConsistencyGroupPrototypeModel = new SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots.Builder() - .deleteSnapshotsOnDelete(true) - .name("my-snapshot-consistency-group") - .resourceGroup(resourceGroupIdentityModel) - .snapshots(java.util.Arrays.asList(snapshotPrototypeSnapshotConsistencyGroupContextModel)) + // Construct an instance of the NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype model + NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype networkAclRulePrototypeModel = new NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype.Builder() + .action("allow") + .before(networkAclRuleBeforePrototypeModel) + .destination("192.168.3.2/32") + .direction("inbound") + .ipVersion("ipv4") + .name("my-network-acl-rule") + .source("192.168.3.2/32") + .protocol("all") .build(); - // Construct an instance of the CreateSnapshotConsistencyGroupOptions model - CreateSnapshotConsistencyGroupOptions createSnapshotConsistencyGroupOptionsModel = new CreateSnapshotConsistencyGroupOptions.Builder() - .snapshotConsistencyGroupPrototype(snapshotConsistencyGroupPrototypeModel) + // Construct an instance of the CreateNetworkAclRuleOptions model + CreateNetworkAclRuleOptions createNetworkAclRuleOptionsModel = new CreateNetworkAclRuleOptions.Builder() + .networkAclId("testString") + .networkAclRulePrototype(networkAclRulePrototypeModel) .build(); - // Invoke createSnapshotConsistencyGroup() with a valid options model and verify the result - Response response = vpcService.createSnapshotConsistencyGroup(createSnapshotConsistencyGroupOptionsModel).execute(); + // Invoke createNetworkAclRule() with a valid options model and verify the result + Response response = vpcService.createNetworkAclRule(createNetworkAclRuleOptionsModel).execute(); assertNotNull(response); - SnapshotConsistencyGroup responseObj = response.getResult(); + NetworkACLRule responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -16812,52 +18842,51 @@ public void testCreateSnapshotConsistencyGroupWOptions() throws Throwable { assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createSnapshotConsistencyGroupPath); + assertEquals(parsedPath, createNetworkAclRulePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createSnapshotConsistencyGroup operation with and without retries enabled + // Test the createNetworkAclRule operation with and without retries enabled @Test - public void testCreateSnapshotConsistencyGroupWRetries() throws Throwable { + public void testCreateNetworkAclRuleWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateSnapshotConsistencyGroupWOptions(); + testCreateNetworkAclRuleWOptions(); vpcService.disableRetries(); - testCreateSnapshotConsistencyGroupWOptions(); + testCreateNetworkAclRuleWOptions(); } - // Test the createSnapshotConsistencyGroup operation with a null options model (negative test) + // Test the createNetworkAclRule operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateSnapshotConsistencyGroupNoOptions() throws Throwable { + public void testCreateNetworkAclRuleNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createSnapshotConsistencyGroup(null).execute(); + vpcService.createNetworkAclRule(null).execute(); } - // Test the deleteSnapshotConsistencyGroup operation with a valid options model parameter + // Test the deleteNetworkAcl operation with a valid options model parameter @Test - public void testDeleteSnapshotConsistencyGroupWOptions() throws Throwable { + public void testDeleteNetworkAclWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"delete_snapshots_on_delete\": false, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"lifecycle_state\": \"stable\", \"name\": \"my-snapshot-consistency-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"snapshot_consistency_group\", \"service_tags\": [\"serviceTags\"], \"snapshots\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}]}"; - String deleteSnapshotConsistencyGroupPath = "/snapshot_consistency_groups/testString"; + String mockResponseBody = ""; + String deleteNetworkAclPath = "/network_acls/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(202) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the DeleteSnapshotConsistencyGroupOptions model - DeleteSnapshotConsistencyGroupOptions deleteSnapshotConsistencyGroupOptionsModel = new DeleteSnapshotConsistencyGroupOptions.Builder() + // Construct an instance of the DeleteNetworkAclOptions model + DeleteNetworkAclOptions deleteNetworkAclOptionsModel = new DeleteNetworkAclOptions.Builder() .id("testString") .build(); - // Invoke deleteSnapshotConsistencyGroup() with a valid options model and verify the result - Response response = vpcService.deleteSnapshotConsistencyGroup(deleteSnapshotConsistencyGroupOptionsModel).execute(); + // Invoke deleteNetworkAcl() with a valid options model and verify the result + Response response = vpcService.deleteNetworkAcl(deleteNetworkAclOptionsModel).execute(); assertNotNull(response); - SnapshotConsistencyGroup responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); @@ -16865,240 +18894,214 @@ public void testDeleteSnapshotConsistencyGroupWOptions() throws Throwable { assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteSnapshotConsistencyGroupPath); + assertEquals(parsedPath, deleteNetworkAclPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteSnapshotConsistencyGroup operation with and without retries enabled + // Test the deleteNetworkAcl operation with and without retries enabled @Test - public void testDeleteSnapshotConsistencyGroupWRetries() throws Throwable { + public void testDeleteNetworkAclWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteSnapshotConsistencyGroupWOptions(); + testDeleteNetworkAclWOptions(); vpcService.disableRetries(); - testDeleteSnapshotConsistencyGroupWOptions(); + testDeleteNetworkAclWOptions(); } - // Test the deleteSnapshotConsistencyGroup operation with a null options model (negative test) + // Test the deleteNetworkAcl operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteSnapshotConsistencyGroupNoOptions() throws Throwable { + public void testDeleteNetworkAclNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteSnapshotConsistencyGroup(null).execute(); + vpcService.deleteNetworkAcl(null).execute(); } - // Test the getSnapshotConsistencyGroup operation with a valid options model parameter + // Test the deleteNetworkAclRule operation with a valid options model parameter @Test - public void testGetSnapshotConsistencyGroupWOptions() throws Throwable { + public void testDeleteNetworkAclRuleWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"delete_snapshots_on_delete\": false, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"lifecycle_state\": \"stable\", \"name\": \"my-snapshot-consistency-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"snapshot_consistency_group\", \"service_tags\": [\"serviceTags\"], \"snapshots\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}]}"; - String getSnapshotConsistencyGroupPath = "/snapshot_consistency_groups/testString"; + String mockResponseBody = ""; + String deleteNetworkAclRulePath = "/network_acls/testString/rules/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the GetSnapshotConsistencyGroupOptions model - GetSnapshotConsistencyGroupOptions getSnapshotConsistencyGroupOptionsModel = new GetSnapshotConsistencyGroupOptions.Builder() + // Construct an instance of the DeleteNetworkAclRuleOptions model + DeleteNetworkAclRuleOptions deleteNetworkAclRuleOptionsModel = new DeleteNetworkAclRuleOptions.Builder() + .networkAclId("testString") .id("testString") .build(); - // Invoke getSnapshotConsistencyGroup() with a valid options model and verify the result - Response response = vpcService.getSnapshotConsistencyGroup(getSnapshotConsistencyGroupOptionsModel).execute(); + // Invoke deleteNetworkAclRule() with a valid options model and verify the result + Response response = vpcService.deleteNetworkAclRule(deleteNetworkAclRuleOptionsModel).execute(); assertNotNull(response); - SnapshotConsistencyGroup responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getSnapshotConsistencyGroupPath); + assertEquals(parsedPath, deleteNetworkAclRulePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getSnapshotConsistencyGroup operation with and without retries enabled + // Test the deleteNetworkAclRule operation with and without retries enabled @Test - public void testGetSnapshotConsistencyGroupWRetries() throws Throwable { + public void testDeleteNetworkAclRuleWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetSnapshotConsistencyGroupWOptions(); + testDeleteNetworkAclRuleWOptions(); vpcService.disableRetries(); - testGetSnapshotConsistencyGroupWOptions(); + testDeleteNetworkAclRuleWOptions(); } - // Test the getSnapshotConsistencyGroup operation with a null options model (negative test) + // Test the deleteNetworkAclRule operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetSnapshotConsistencyGroupNoOptions() throws Throwable { + public void testDeleteNetworkAclRuleNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getSnapshotConsistencyGroup(null).execute(); + vpcService.deleteNetworkAclRule(null).execute(); } - // Test the updateSnapshotConsistencyGroup operation with a valid options model parameter + // Test the getNetworkAcl operation with a valid options model parameter @Test - public void testUpdateSnapshotConsistencyGroupWOptions() throws Throwable { + public void testGetNetworkAclWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"delete_snapshots_on_delete\": false, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"lifecycle_state\": \"stable\", \"name\": \"my-snapshot-consistency-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"snapshot_consistency_group\", \"service_tags\": [\"serviceTags\"], \"snapshots\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}]}"; - String updateSnapshotConsistencyGroupPath = "/snapshot_consistency_groups/testString"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"rules\": [{\"action\": \"allow\", \"before\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"name\": \"my-network-acl-rule\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"ip_version\": \"ipv4\", \"name\": \"my-network-acl-rule\", \"source\": \"192.168.3.0/24\", \"protocol\": \"all\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String getNetworkAclPath = "/network_acls/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the SnapshotConsistencyGroupPatch model - SnapshotConsistencyGroupPatch snapshotConsistencyGroupPatchModel = new SnapshotConsistencyGroupPatch.Builder() - .deleteSnapshotsOnDelete(false) - .name("my-snapshot-consistency-group") - .build(); - Map snapshotConsistencyGroupPatchModelAsPatch = snapshotConsistencyGroupPatchModel.asPatch(); - - // Construct an instance of the UpdateSnapshotConsistencyGroupOptions model - UpdateSnapshotConsistencyGroupOptions updateSnapshotConsistencyGroupOptionsModel = new UpdateSnapshotConsistencyGroupOptions.Builder() + // Construct an instance of the GetNetworkAclOptions model + GetNetworkAclOptions getNetworkAclOptionsModel = new GetNetworkAclOptions.Builder() .id("testString") - .snapshotConsistencyGroupPatch(snapshotConsistencyGroupPatchModelAsPatch) - .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke updateSnapshotConsistencyGroup() with a valid options model and verify the result - Response response = vpcService.updateSnapshotConsistencyGroup(updateSnapshotConsistencyGroupOptionsModel).execute(); + // Invoke getNetworkAcl() with a valid options model and verify the result + Response response = vpcService.getNetworkAcl(getNetworkAclOptionsModel).execute(); assertNotNull(response); - SnapshotConsistencyGroup responseObj = response.getResult(); + NetworkACL responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateSnapshotConsistencyGroupPath); + assertEquals(parsedPath, getNetworkAclPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateSnapshotConsistencyGroup operation with and without retries enabled + // Test the getNetworkAcl operation with and without retries enabled @Test - public void testUpdateSnapshotConsistencyGroupWRetries() throws Throwable { + public void testGetNetworkAclWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateSnapshotConsistencyGroupWOptions(); + testGetNetworkAclWOptions(); vpcService.disableRetries(); - testUpdateSnapshotConsistencyGroupWOptions(); + testGetNetworkAclWOptions(); } - // Test the updateSnapshotConsistencyGroup operation with a null options model (negative test) + // Test the getNetworkAcl operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateSnapshotConsistencyGroupNoOptions() throws Throwable { + public void testGetNetworkAclNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateSnapshotConsistencyGroup(null).execute(); + vpcService.getNetworkAcl(null).execute(); } - // Test the deleteSnapshots operation with a valid options model parameter + // Test the getNetworkAclRule operation with a valid options model parameter @Test - public void testDeleteSnapshotsWOptions() throws Throwable { + public void testGetNetworkAclRuleWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteSnapshotsPath = "/snapshots"; + String mockResponseBody = "{\"action\": \"allow\", \"before\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"name\": \"my-network-acl-rule\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"ip_version\": \"ipv4\", \"name\": \"my-network-acl-rule\", \"source\": \"192.168.3.0/24\", \"protocol\": \"all\"}"; + String getNetworkAclRulePath = "/network_acls/testString/rules/testString"; server.enqueue(new MockResponse() - .setResponseCode(202) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteSnapshotsOptions model - DeleteSnapshotsOptions deleteSnapshotsOptionsModel = new DeleteSnapshotsOptions.Builder() - .sourceVolumeId("testString") + // Construct an instance of the GetNetworkAclRuleOptions model + GetNetworkAclRuleOptions getNetworkAclRuleOptionsModel = new GetNetworkAclRuleOptions.Builder() + .networkAclId("testString") + .id("testString") .build(); - // Invoke deleteSnapshots() with a valid options model and verify the result - Response response = vpcService.deleteSnapshots(deleteSnapshotsOptionsModel).execute(); + // Invoke getNetworkAclRule() with a valid options model and verify the result + Response response = vpcService.getNetworkAclRule(getNetworkAclRuleOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + NetworkACLRule 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteSnapshotsPath); + assertEquals(parsedPath, getNetworkAclRulePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("source_volume.id"), "testString"); } - // Test the deleteSnapshots operation with and without retries enabled + // Test the getNetworkAclRule operation with and without retries enabled @Test - public void testDeleteSnapshotsWRetries() throws Throwable { + public void testGetNetworkAclRuleWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteSnapshotsWOptions(); + testGetNetworkAclRuleWOptions(); vpcService.disableRetries(); - testDeleteSnapshotsWOptions(); + testGetNetworkAclRuleWOptions(); } - // Test the deleteSnapshots operation with a null options model (negative test) + // Test the getNetworkAclRule operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteSnapshotsNoOptions() throws Throwable { + public void testGetNetworkAclRuleNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteSnapshots(null).execute(); + vpcService.getNetworkAclRule(null).execute(); } - // Test the listSnapshots operation with a valid options model parameter + // Test the listNetworkAclRules operation with a valid options model parameter @Test - public void testListSnapshotsWOptions() throws Throwable { + public void testListNetworkAclRulesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"snapshots\": [{\"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"bootable\": true, \"captured_at\": \"2019-01-01T12:00:00.000Z\", \"catalog_offering\": {\"plan\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}}, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"clones\": [{\"available\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"copies\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deletable\": false, \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"lifecycle_state\": \"stable\", \"minimum_capacity\": 1, \"name\": \"my-snapshot\", \"operating_system\": {\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}, \"progress\": 55, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"snapshot\", \"service_tags\": [\"serviceTags\"], \"size\": 1, \"snapshot_consistency_group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot-consistency-group\", \"resource_type\": \"snapshot_consistency_group\"}, \"source_image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}, \"source_volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"volume\"}, \"storage_generation\": 1, \"user_tags\": [\"userTags\"]}], \"total_count\": 132}"; - String listSnapshotsPath = "/snapshots"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"rules\": [{\"action\": \"allow\", \"before\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"name\": \"my-network-acl-rule\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"ip_version\": \"ipv4\", \"name\": \"my-network-acl-rule\", \"source\": \"192.168.3.0/24\", \"protocol\": \"all\"}], \"total_count\": 132}"; + String listNetworkAclRulesPath = "/network_acls/testString/rules"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListSnapshotsOptions model - ListSnapshotsOptions listSnapshotsOptionsModel = new ListSnapshotsOptions.Builder() + // Construct an instance of the ListNetworkAclRulesOptions model + ListNetworkAclRulesOptions listNetworkAclRulesOptionsModel = new ListNetworkAclRulesOptions.Builder() + .networkAclId("testString") .start("testString") .limit(Long.valueOf("10")) - .tag("testString") - .resourceGroupId("testString") - .name("my-name") - .sourceVolumeId("testString") - .sourceVolumeCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") - .sourceImageId("testString") - .sourceImageCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") - .sort("name") - .backupPolicyPlanId("testString") - .copiesId("testString") - .copiesName("my-snapshot-copy") - .copiesCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263") - .copiesRemoteRegionName("us-south") - .sourceSnapshotId("testString") - .sourceSnapshotRemoteRegionName("us-south") - .sourceVolumeRemoteRegionName("us-east") - .sourceImageRemoteRegionName("us-south") - .clonesZoneName("us-south-1") - .snapshotConsistencyGroupId("testString") - .snapshotConsistencyGroupCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263") + .direction("inbound") .build(); - // Invoke listSnapshots() with a valid options model and verify the result - Response response = vpcService.listSnapshots(listSnapshotsOptionsModel).execute(); + // Invoke listNetworkAclRules() with a valid options model and verify the result + Response response = vpcService.listNetworkAclRules(listNetworkAclRulesOptionsModel).execute(); assertNotNull(response); - SnapshotCollection responseObj = response.getResult(); + NetworkACLRuleCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -17107,52 +19110,40 @@ public void testListSnapshotsWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listSnapshotsPath); + assertEquals(parsedPath, listNetworkAclRulesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("tag"), "testString"); - assertEquals(query.get("resource_group.id"), "testString"); - assertEquals(query.get("name"), "my-name"); - assertEquals(query.get("source_volume.id"), "testString"); - assertEquals(query.get("source_volume.crn"), "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"); - assertEquals(query.get("source_image.id"), "testString"); - assertEquals(query.get("source_image.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"); - assertEquals(query.get("sort"), "name"); - assertEquals(query.get("backup_policy_plan.id"), "testString"); - assertEquals(query.get("copies[].id"), "testString"); - assertEquals(query.get("copies[].name"), "my-snapshot-copy"); - assertEquals(query.get("copies[].crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263"); - assertEquals(query.get("copies[].remote.region.name"), "us-south"); - assertEquals(query.get("source_snapshot.id"), "testString"); - assertEquals(query.get("source_snapshot.remote.region.name"), "us-south"); - assertEquals(query.get("source_volume.remote.region.name"), "us-east"); - assertEquals(query.get("source_image.remote.region.name"), "us-south"); - assertEquals(query.get("clones[].zone.name"), "us-south-1"); - assertEquals(query.get("snapshot_consistency_group.id"), "testString"); - assertEquals(query.get("snapshot_consistency_group.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263"); + assertEquals(query.get("direction"), "inbound"); } - // Test the listSnapshots operation with and without retries enabled + // Test the listNetworkAclRules operation with and without retries enabled @Test - public void testListSnapshotsWRetries() throws Throwable { + public void testListNetworkAclRulesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListSnapshotsWOptions(); + testListNetworkAclRulesWOptions(); vpcService.disableRetries(); - testListSnapshotsWOptions(); + testListNetworkAclRulesWOptions(); } - // Test the listSnapshots operation using the SnapshotsPager.getNext() method + // Test the listNetworkAclRules operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testListNetworkAclRulesNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.listNetworkAclRules(null).execute(); + } + + // Test the listNetworkAclRules operation using the NetworkAclRulesPager.getNext() method @Test - public void testListSnapshotsWithPagerGetNext() throws Throwable { + public void testListNetworkAclRulesWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"snapshots\":[{\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"bootable\":true,\"captured_at\":\"2019-01-01T12:00:00.000Z\",\"catalog_offering\":{\"plan\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}},\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"clones\":[{\"available\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"copies\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deletable\":false,\"encryption\":\"provider_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"lifecycle_state\":\"stable\",\"minimum_capacity\":1,\"name\":\"my-snapshot\",\"operating_system\":{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"},\"progress\":55,\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"snapshot\",\"service_tags\":[\"serviceTags\"],\"size\":1,\"snapshot_consistency_group\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot-consistency-group\",\"resource_type\":\"snapshot_consistency_group\"},\"source_image\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"name\":\"my-image\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"image\"},\"source_snapshot\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"},\"source_volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"volume\"},\"storage_generation\":1,\"user_tags\":[\"userTags\"]}],\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"snapshots\":[{\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"bootable\":true,\"captured_at\":\"2019-01-01T12:00:00.000Z\",\"catalog_offering\":{\"plan\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}},\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"clones\":[{\"available\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"copies\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deletable\":false,\"encryption\":\"provider_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"lifecycle_state\":\"stable\",\"minimum_capacity\":1,\"name\":\"my-snapshot\",\"operating_system\":{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"},\"progress\":55,\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"snapshot\",\"service_tags\":[\"serviceTags\"],\"size\":1,\"snapshot_consistency_group\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot-consistency-group\",\"resource_type\":\"snapshot_consistency_group\"},\"source_image\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"name\":\"my-image\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"image\"},\"source_snapshot\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"},\"source_volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"volume\"},\"storage_generation\":1,\"user_tags\":[\"userTags\"]}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"rules\":[{\"action\":\"allow\",\"before\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"name\":\"my-network-acl-rule\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"destination\":\"192.168.3.0/24\",\"direction\":\"inbound\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"ip_version\":\"ipv4\",\"name\":\"my-network-acl-rule\",\"source\":\"192.168.3.0/24\",\"protocol\":\"all\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"rules\":[{\"action\":\"allow\",\"before\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"name\":\"my-network-acl-rule\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"destination\":\"192.168.3.0/24\",\"direction\":\"inbound\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"ip_version\":\"ipv4\",\"name\":\"my-network-acl-rule\",\"source\":\"192.168.3.0/24\",\"protocol\":\"all\"}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -17166,46 +19157,28 @@ public void testListSnapshotsWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListSnapshotsOptions listSnapshotsOptions = new ListSnapshotsOptions.Builder() + ListNetworkAclRulesOptions listNetworkAclRulesOptions = new ListNetworkAclRulesOptions.Builder() + .networkAclId("testString") .limit(Long.valueOf("10")) - .tag("testString") - .resourceGroupId("testString") - .name("my-name") - .sourceVolumeId("testString") - .sourceVolumeCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") - .sourceImageId("testString") - .sourceImageCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") - .sort("name") - .backupPolicyPlanId("testString") - .copiesId("testString") - .copiesName("my-snapshot-copy") - .copiesCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263") - .copiesRemoteRegionName("us-south") - .sourceSnapshotId("testString") - .sourceSnapshotRemoteRegionName("us-south") - .sourceVolumeRemoteRegionName("us-east") - .sourceImageRemoteRegionName("us-south") - .clonesZoneName("us-south-1") - .snapshotConsistencyGroupId("testString") - .snapshotConsistencyGroupCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263") + .direction("inbound") .build(); - List allResults = new ArrayList<>(); - SnapshotsPager pager = new SnapshotsPager(vpcService, listSnapshotsOptions); + List allResults = new ArrayList<>(); + NetworkAclRulesPager pager = new NetworkAclRulesPager(vpcService, listNetworkAclRulesOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listSnapshots operation using the SnapshotsPager.getAll() method + // Test the listNetworkAclRules operation using the NetworkAclRulesPager.getAll() method @Test - public void testListSnapshotsWithPagerGetAll() throws Throwable { + public void testListNetworkAclRulesWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"snapshots\":[{\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"bootable\":true,\"captured_at\":\"2019-01-01T12:00:00.000Z\",\"catalog_offering\":{\"plan\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}},\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"clones\":[{\"available\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"copies\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deletable\":false,\"encryption\":\"provider_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"lifecycle_state\":\"stable\",\"minimum_capacity\":1,\"name\":\"my-snapshot\",\"operating_system\":{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"},\"progress\":55,\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"snapshot\",\"service_tags\":[\"serviceTags\"],\"size\":1,\"snapshot_consistency_group\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot-consistency-group\",\"resource_type\":\"snapshot_consistency_group\"},\"source_image\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"name\":\"my-image\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"image\"},\"source_snapshot\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"},\"source_volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"volume\"},\"storage_generation\":1,\"user_tags\":[\"userTags\"]}],\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"snapshots\":[{\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"bootable\":true,\"captured_at\":\"2019-01-01T12:00:00.000Z\",\"catalog_offering\":{\"plan\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}},\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"clones\":[{\"available\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"copies\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deletable\":false,\"encryption\":\"provider_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"lifecycle_state\":\"stable\",\"minimum_capacity\":1,\"name\":\"my-snapshot\",\"operating_system\":{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"},\"progress\":55,\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"snapshot\",\"service_tags\":[\"serviceTags\"],\"size\":1,\"snapshot_consistency_group\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot-consistency-group\",\"resource_type\":\"snapshot_consistency_group\"},\"source_image\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"name\":\"my-image\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"image\"},\"source_snapshot\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"},\"source_volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"volume\"},\"storage_generation\":1,\"user_tags\":[\"userTags\"]}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"rules\":[{\"action\":\"allow\",\"before\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"name\":\"my-network-acl-rule\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"destination\":\"192.168.3.0/24\",\"direction\":\"inbound\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"ip_version\":\"ipv4\",\"name\":\"my-network-acl-rule\",\"source\":\"192.168.3.0/24\",\"protocol\":\"all\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"rules\":[{\"action\":\"allow\",\"before\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"name\":\"my-network-acl-rule\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"destination\":\"192.168.3.0/24\",\"direction\":\"inbound\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"ip_version\":\"ipv4\",\"name\":\"my-network-acl-rule\",\"source\":\"192.168.3.0/24\",\"protocol\":\"all\"}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -17219,253 +19192,160 @@ public void testListSnapshotsWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListSnapshotsOptions listSnapshotsOptions = new ListSnapshotsOptions.Builder() + ListNetworkAclRulesOptions listNetworkAclRulesOptions = new ListNetworkAclRulesOptions.Builder() + .networkAclId("testString") .limit(Long.valueOf("10")) - .tag("testString") - .resourceGroupId("testString") - .name("my-name") - .sourceVolumeId("testString") - .sourceVolumeCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") - .sourceImageId("testString") - .sourceImageCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") - .sort("name") - .backupPolicyPlanId("testString") - .copiesId("testString") - .copiesName("my-snapshot-copy") - .copiesCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263") - .copiesRemoteRegionName("us-south") - .sourceSnapshotId("testString") - .sourceSnapshotRemoteRegionName("us-south") - .sourceVolumeRemoteRegionName("us-east") - .sourceImageRemoteRegionName("us-south") - .clonesZoneName("us-south-1") - .snapshotConsistencyGroupId("testString") - .snapshotConsistencyGroupCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263") + .direction("inbound") .build(); - SnapshotsPager pager = new SnapshotsPager(vpcService, listSnapshotsOptions); - List allResults = pager.getAll(); + NetworkAclRulesPager pager = new NetworkAclRulesPager(vpcService, listNetworkAclRulesOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the createSnapshot operation with a valid options model parameter + // Test the listNetworkAcls operation with a valid options model parameter @Test - public void testCreateSnapshotWOptions() throws Throwable { + public void testListNetworkAclsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"bootable\": true, \"captured_at\": \"2019-01-01T12:00:00.000Z\", \"catalog_offering\": {\"plan\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}}, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"clones\": [{\"available\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"copies\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deletable\": false, \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"lifecycle_state\": \"stable\", \"minimum_capacity\": 1, \"name\": \"my-snapshot\", \"operating_system\": {\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}, \"progress\": 55, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"snapshot\", \"service_tags\": [\"serviceTags\"], \"size\": 1, \"snapshot_consistency_group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot-consistency-group\", \"resource_type\": \"snapshot_consistency_group\"}, \"source_image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}, \"source_volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"volume\"}, \"storage_generation\": 1, \"user_tags\": [\"userTags\"]}"; - String createSnapshotPath = "/snapshots"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"network_acls\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"rules\": [{\"action\": \"allow\", \"before\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"name\": \"my-network-acl-rule\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"ip_version\": \"ipv4\", \"name\": \"my-network-acl-rule\", \"source\": \"192.168.3.0/24\", \"protocol\": \"all\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}], \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listNetworkAclsPath = "/network_acls"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ZoneIdentityByName model - ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() - .name("us-south-1") - .build(); - - // Construct an instance of the SnapshotClonePrototype model - SnapshotClonePrototype snapshotClonePrototypeModel = new SnapshotClonePrototype.Builder() - .zone(zoneIdentityModel) - .build(); - - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); - - // Construct an instance of the VolumeIdentityById model - VolumeIdentityById volumeIdentityModel = new VolumeIdentityById.Builder() - .id("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") - .build(); - - // Construct an instance of the SnapshotPrototypeSnapshotBySourceVolume model - SnapshotPrototypeSnapshotBySourceVolume snapshotPrototypeModel = new SnapshotPrototypeSnapshotBySourceVolume.Builder() - .clones(java.util.Arrays.asList(snapshotClonePrototypeModel)) - .name("my-snapshot") - .resourceGroup(resourceGroupIdentityModel) - .userTags(java.util.Arrays.asList()) - .sourceVolume(volumeIdentityModel) - .build(); - - // Construct an instance of the CreateSnapshotOptions model - CreateSnapshotOptions createSnapshotOptionsModel = new CreateSnapshotOptions.Builder() - .snapshotPrototype(snapshotPrototypeModel) + // Construct an instance of the ListNetworkAclsOptions model + ListNetworkAclsOptions listNetworkAclsOptionsModel = new ListNetworkAclsOptions.Builder() + .start("testString") + .limit(Long.valueOf("10")) + .resourceGroupId("testString") .build(); - // Invoke createSnapshot() with a valid options model and verify the result - Response response = vpcService.createSnapshot(createSnapshotOptionsModel).execute(); + // Invoke listNetworkAcls() with a valid options model and verify the result + Response response = vpcService.listNetworkAcls(listNetworkAclsOptionsModel).execute(); assertNotNull(response); - Snapshot responseObj = response.getResult(); + NetworkACLCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createSnapshotPath); + assertEquals(parsedPath, listNetworkAclsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("resource_group.id"), "testString"); } - // Test the createSnapshot operation with and without retries enabled + // Test the listNetworkAcls operation with and without retries enabled @Test - public void testCreateSnapshotWRetries() throws Throwable { + public void testListNetworkAclsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateSnapshotWOptions(); + testListNetworkAclsWOptions(); vpcService.disableRetries(); - testCreateSnapshotWOptions(); - } - - // Test the createSnapshot operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateSnapshotNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.createSnapshot(null).execute(); + testListNetworkAclsWOptions(); } - // Test the deleteSnapshot operation with a valid options model parameter + // Test the listNetworkAcls operation using the NetworkAclsPager.getNext() method @Test - public void testDeleteSnapshotWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = ""; - String deleteSnapshotPath = "/snapshots/testString"; + public void testListNetworkAclsWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"network_acls\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"id\":\"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"name\":\"my-network-acl\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"rules\":[{\"action\":\"allow\",\"before\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"name\":\"my-network-acl-rule\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"destination\":\"192.168.3.0/24\",\"direction\":\"inbound\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"ip_version\":\"ipv4\",\"name\":\"my-network-acl-rule\",\"source\":\"192.168.3.0/24\",\"protocol\":\"all\"}],\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"network_acls\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"id\":\"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"name\":\"my-network-acl\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"rules\":[{\"action\":\"allow\",\"before\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"name\":\"my-network-acl-rule\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"destination\":\"192.168.3.0/24\",\"direction\":\"inbound\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"ip_version\":\"ipv4\",\"name\":\"my-network-acl-rule\",\"source\":\"192.168.3.0/24\",\"protocol\":\"all\"}],\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() - .setResponseCode(202) - .setBody(mockResponseBody)); + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the DeleteSnapshotOptions model - DeleteSnapshotOptions deleteSnapshotOptionsModel = new DeleteSnapshotOptions.Builder() - .id("testString") - .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") + ListNetworkAclsOptions listNetworkAclsOptions = new ListNetworkAclsOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") .build(); - // Invoke deleteSnapshot() with a valid options model and verify the result - Response response = vpcService.deleteSnapshot(deleteSnapshotOptionsModel).execute(); - assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteSnapshotPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - } - - // Test the deleteSnapshot operation with and without retries enabled - @Test - public void testDeleteSnapshotWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testDeleteSnapshotWOptions(); - - vpcService.disableRetries(); - testDeleteSnapshotWOptions(); - } - - // Test the deleteSnapshot operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteSnapshotNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.deleteSnapshot(null).execute(); + List allResults = new ArrayList<>(); + NetworkAclsPager pager = new NetworkAclsPager(vpcService, listNetworkAclsOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } - - // Test the getSnapshot operation with a valid options model parameter + + // Test the listNetworkAcls operation using the NetworkAclsPager.getAll() method @Test - public void testGetSnapshotWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"bootable\": true, \"captured_at\": \"2019-01-01T12:00:00.000Z\", \"catalog_offering\": {\"plan\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}}, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"clones\": [{\"available\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"copies\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deletable\": false, \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"lifecycle_state\": \"stable\", \"minimum_capacity\": 1, \"name\": \"my-snapshot\", \"operating_system\": {\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}, \"progress\": 55, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"snapshot\", \"service_tags\": [\"serviceTags\"], \"size\": 1, \"snapshot_consistency_group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot-consistency-group\", \"resource_type\": \"snapshot_consistency_group\"}, \"source_image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}, \"source_volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"volume\"}, \"storage_generation\": 1, \"user_tags\": [\"userTags\"]}"; - String getSnapshotPath = "/snapshots/testString"; + public void testListNetworkAclsWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"network_acls\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"id\":\"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"name\":\"my-network-acl\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"rules\":[{\"action\":\"allow\",\"before\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"name\":\"my-network-acl-rule\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"destination\":\"192.168.3.0/24\",\"direction\":\"inbound\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"ip_version\":\"ipv4\",\"name\":\"my-network-acl-rule\",\"source\":\"192.168.3.0/24\",\"protocol\":\"all\"}],\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"network_acls\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"id\":\"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"name\":\"my-network-acl\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"rules\":[{\"action\":\"allow\",\"before\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"name\":\"my-network-acl-rule\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"destination\":\"192.168.3.0/24\",\"direction\":\"inbound\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"ip_version\":\"ipv4\",\"name\":\"my-network-acl-rule\",\"source\":\"192.168.3.0/24\",\"protocol\":\"all\"}],\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) - .setBody(mockResponseBody)); + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the GetSnapshotOptions model - GetSnapshotOptions getSnapshotOptionsModel = new GetSnapshotOptions.Builder() - .id("testString") + ListNetworkAclsOptions listNetworkAclsOptions = new ListNetworkAclsOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") .build(); - // Invoke getSnapshot() with a valid options model and verify the result - Response response = vpcService.getSnapshot(getSnapshotOptionsModel).execute(); - assertNotNull(response); - Snapshot responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getSnapshotPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - } - - // Test the getSnapshot operation with and without retries enabled - @Test - public void testGetSnapshotWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testGetSnapshotWOptions(); - - vpcService.disableRetries(); - testGetSnapshotWOptions(); - } - - // Test the getSnapshot operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetSnapshotNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.getSnapshot(null).execute(); + NetworkAclsPager pager = new NetworkAclsPager(vpcService, listNetworkAclsOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); } - - // Test the updateSnapshot operation with a valid options model parameter + + // Test the updateNetworkAcl operation with a valid options model parameter @Test - public void testUpdateSnapshotWOptions() throws Throwable { + public void testUpdateNetworkAclWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"bootable\": true, \"captured_at\": \"2019-01-01T12:00:00.000Z\", \"catalog_offering\": {\"plan\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}}, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"clones\": [{\"available\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"copies\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deletable\": false, \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"lifecycle_state\": \"stable\", \"minimum_capacity\": 1, \"name\": \"my-snapshot\", \"operating_system\": {\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}, \"progress\": 55, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"snapshot\", \"service_tags\": [\"serviceTags\"], \"size\": 1, \"snapshot_consistency_group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot-consistency-group\", \"resource_type\": \"snapshot_consistency_group\"}, \"source_image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}, \"source_volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"volume\"}, \"storage_generation\": 1, \"user_tags\": [\"userTags\"]}"; - String updateSnapshotPath = "/snapshots/testString"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"rules\": [{\"action\": \"allow\", \"before\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"name\": \"my-network-acl-rule\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"ip_version\": \"ipv4\", \"name\": \"my-network-acl-rule\", \"source\": \"192.168.3.0/24\", \"protocol\": \"all\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String updateNetworkAclPath = "/network_acls/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the SnapshotPatch model - SnapshotPatch snapshotPatchModel = new SnapshotPatch.Builder() - .name("my-snapshot-updated") - .userTags(java.util.Arrays.asList("testString")) + // Construct an instance of the NetworkACLPatch model + NetworkACLPatch networkAclPatchModel = new NetworkACLPatch.Builder() + .name("my-network-acl-updated") .build(); - Map snapshotPatchModelAsPatch = snapshotPatchModel.asPatch(); + Map networkAclPatchModelAsPatch = networkAclPatchModel.asPatch(); - // Construct an instance of the UpdateSnapshotOptions model - UpdateSnapshotOptions updateSnapshotOptionsModel = new UpdateSnapshotOptions.Builder() + // Construct an instance of the UpdateNetworkAclOptions model + UpdateNetworkAclOptions updateNetworkAclOptionsModel = new UpdateNetworkAclOptions.Builder() .id("testString") - .snapshotPatch(snapshotPatchModelAsPatch) - .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") + .networkAclPatch(networkAclPatchModelAsPatch) .build(); - // Invoke updateSnapshot() with a valid options model and verify the result - Response response = vpcService.updateSnapshot(updateSnapshotOptionsModel).execute(); + // Invoke updateNetworkAcl() with a valid options model and verify the result + Response response = vpcService.updateNetworkAcl(updateNetworkAclOptionsModel).execute(); assertNotNull(response); - Snapshot responseObj = response.getResult(); + NetworkACL responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -17474,267 +19354,294 @@ public void testUpdateSnapshotWOptions() throws Throwable { assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateSnapshotPath); + assertEquals(parsedPath, updateNetworkAclPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateSnapshot operation with and without retries enabled + // Test the updateNetworkAcl operation with and without retries enabled @Test - public void testUpdateSnapshotWRetries() throws Throwable { + public void testUpdateNetworkAclWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateSnapshotWOptions(); + testUpdateNetworkAclWOptions(); vpcService.disableRetries(); - testUpdateSnapshotWOptions(); + testUpdateNetworkAclWOptions(); } - // Test the updateSnapshot operation with a null options model (negative test) + // Test the updateNetworkAcl operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateSnapshotNoOptions() throws Throwable { + public void testUpdateNetworkAclNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateSnapshot(null).execute(); + vpcService.updateNetworkAcl(null).execute(); } - // Test the listSnapshotClones operation with a valid options model parameter + // Test the updateNetworkAclRule operation with a valid options model parameter @Test - public void testListSnapshotClonesWOptions() throws Throwable { + public void testUpdateNetworkAclRuleWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"clones\": [{\"available\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}]}"; - String listSnapshotClonesPath = "/snapshots/testString/clones"; + String mockResponseBody = "{\"action\": \"allow\", \"before\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"name\": \"my-network-acl-rule\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"ip_version\": \"ipv4\", \"name\": \"my-network-acl-rule\", \"source\": \"192.168.3.0/24\", \"protocol\": \"all\"}"; + String updateNetworkAclRulePath = "/network_acls/testString/rules/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListSnapshotClonesOptions model - ListSnapshotClonesOptions listSnapshotClonesOptionsModel = new ListSnapshotClonesOptions.Builder() + // Construct an instance of the NetworkACLRuleBeforePatchNetworkACLRuleIdentityById model + NetworkACLRuleBeforePatchNetworkACLRuleIdentityById networkAclRuleBeforePatchModel = new NetworkACLRuleBeforePatchNetworkACLRuleIdentityById.Builder() + .id("r006-8daca77a-4980-4d33-8f3e-7038797be8f9") + .build(); + + // Construct an instance of the NetworkACLRulePatch model + NetworkACLRulePatch networkAclRulePatchModel = new NetworkACLRulePatch.Builder() + .action("allow") + .before(networkAclRuleBeforePatchModel) + .code(Long.valueOf("0")) + .destination("192.168.3.2/32") + .destinationPortMax(Long.valueOf("22")) + .destinationPortMin(Long.valueOf("22")) + .direction("inbound") + .name("my-network-acl-rule") + .source("10.0.0.0/0") + .sourcePortMax(Long.valueOf("65535")) + .sourcePortMin(Long.valueOf("49152")) + .type(Long.valueOf("8")) + .build(); + Map networkAclRulePatchModelAsPatch = networkAclRulePatchModel.asPatch(); + + // Construct an instance of the UpdateNetworkAclRuleOptions model + UpdateNetworkAclRuleOptions updateNetworkAclRuleOptionsModel = new UpdateNetworkAclRuleOptions.Builder() + .networkAclId("testString") .id("testString") + .networkAclRulePatch(networkAclRulePatchModelAsPatch) .build(); - // Invoke listSnapshotClones() with a valid options model and verify the result - Response response = vpcService.listSnapshotClones(listSnapshotClonesOptionsModel).execute(); + // Invoke updateNetworkAclRule() with a valid options model and verify the result + Response response = vpcService.updateNetworkAclRule(updateNetworkAclRuleOptionsModel).execute(); assertNotNull(response); - SnapshotCloneCollection responseObj = response.getResult(); + NetworkACLRule responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listSnapshotClonesPath); + assertEquals(parsedPath, updateNetworkAclRulePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the listSnapshotClones operation with and without retries enabled + // Test the updateNetworkAclRule operation with and without retries enabled @Test - public void testListSnapshotClonesWRetries() throws Throwable { + public void testUpdateNetworkAclRuleWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListSnapshotClonesWOptions(); + testUpdateNetworkAclRuleWOptions(); vpcService.disableRetries(); - testListSnapshotClonesWOptions(); + testUpdateNetworkAclRuleWOptions(); } - // Test the listSnapshotClones operation with a null options model (negative test) + // Test the updateNetworkAclRule operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListSnapshotClonesNoOptions() throws Throwable { + public void testUpdateNetworkAclRuleNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listSnapshotClones(null).execute(); + vpcService.updateNetworkAclRule(null).execute(); } - // Test the deleteSnapshotClone operation with a valid options model parameter + // Test the createPlacementGroup operation with a valid options model parameter @Test - public void testDeleteSnapshotCloneWOptions() throws Throwable { + public void testCreatePlacementGroupWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteSnapshotClonePath = "/snapshots/testString/clones/us-south-1"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r006-418fe842-a3e9-47b9-a938-1aa5bd632871\", \"id\": \"r006-418fe842-a3e9-47b9-a938-1aa5bd632871\", \"lifecycle_state\": \"stable\", \"name\": \"my-placement-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"placement_group\", \"strategy\": \"host_spread\"}"; + String createPlacementGroupPath = "/placement_groups"; server.enqueue(new MockResponse() - .setResponseCode(202) + .setHeader("Content-type", "application/json") + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the DeleteSnapshotCloneOptions model - DeleteSnapshotCloneOptions deleteSnapshotCloneOptionsModel = new DeleteSnapshotCloneOptions.Builder() - .id("testString") - .zoneName("us-south-1") + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") .build(); - // Invoke deleteSnapshotClone() with a valid options model and verify the result - Response response = vpcService.deleteSnapshotClone(deleteSnapshotCloneOptionsModel).execute(); + // Construct an instance of the CreatePlacementGroupOptions model + CreatePlacementGroupOptions createPlacementGroupOptionsModel = new CreatePlacementGroupOptions.Builder() + .strategy("host_spread") + .name("my-placement-group") + .resourceGroup(resourceGroupIdentityModel) + .build(); + + // Invoke createPlacementGroup() with a valid options model and verify the result + Response response = vpcService.createPlacementGroup(createPlacementGroupOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + PlacementGroup 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(), "DELETE"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteSnapshotClonePath); + assertEquals(parsedPath, createPlacementGroupPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteSnapshotClone operation with and without retries enabled + // Test the createPlacementGroup operation with and without retries enabled @Test - public void testDeleteSnapshotCloneWRetries() throws Throwable { + public void testCreatePlacementGroupWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteSnapshotCloneWOptions(); + testCreatePlacementGroupWOptions(); vpcService.disableRetries(); - testDeleteSnapshotCloneWOptions(); + testCreatePlacementGroupWOptions(); } - // Test the deleteSnapshotClone operation with a null options model (negative test) + // Test the createPlacementGroup operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteSnapshotCloneNoOptions() throws Throwable { + public void testCreatePlacementGroupNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteSnapshotClone(null).execute(); + vpcService.createPlacementGroup(null).execute(); } - // Test the getSnapshotClone operation with a valid options model parameter + // Test the deletePlacementGroup operation with a valid options model parameter @Test - public void testGetSnapshotCloneWOptions() throws Throwable { + public void testDeletePlacementGroupWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"available\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String getSnapshotClonePath = "/snapshots/testString/clones/us-south-1"; + String mockResponseBody = ""; + String deletePlacementGroupPath = "/placement_groups/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the GetSnapshotCloneOptions model - GetSnapshotCloneOptions getSnapshotCloneOptionsModel = new GetSnapshotCloneOptions.Builder() + // Construct an instance of the DeletePlacementGroupOptions model + DeletePlacementGroupOptions deletePlacementGroupOptionsModel = new DeletePlacementGroupOptions.Builder() .id("testString") - .zoneName("us-south-1") .build(); - // Invoke getSnapshotClone() with a valid options model and verify the result - Response response = vpcService.getSnapshotClone(getSnapshotCloneOptionsModel).execute(); + // Invoke deletePlacementGroup() with a valid options model and verify the result + Response response = vpcService.deletePlacementGroup(deletePlacementGroupOptionsModel).execute(); assertNotNull(response); - SnapshotClone responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getSnapshotClonePath); + assertEquals(parsedPath, deletePlacementGroupPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getSnapshotClone operation with and without retries enabled + // Test the deletePlacementGroup operation with and without retries enabled @Test - public void testGetSnapshotCloneWRetries() throws Throwable { + public void testDeletePlacementGroupWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetSnapshotCloneWOptions(); + testDeletePlacementGroupWOptions(); vpcService.disableRetries(); - testGetSnapshotCloneWOptions(); + testDeletePlacementGroupWOptions(); } - // Test the getSnapshotClone operation with a null options model (negative test) + // Test the deletePlacementGroup operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetSnapshotCloneNoOptions() throws Throwable { + public void testDeletePlacementGroupNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getSnapshotClone(null).execute(); + vpcService.deletePlacementGroup(null).execute(); } - // Test the createSnapshotClone operation with a valid options model parameter + // Test the getPlacementGroup operation with a valid options model parameter @Test - public void testCreateSnapshotCloneWOptions() throws Throwable { + public void testGetPlacementGroupWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"available\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String createSnapshotClonePath = "/snapshots/testString/clones/us-south-1"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r006-418fe842-a3e9-47b9-a938-1aa5bd632871\", \"id\": \"r006-418fe842-a3e9-47b9-a938-1aa5bd632871\", \"lifecycle_state\": \"stable\", \"name\": \"my-placement-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"placement_group\", \"strategy\": \"host_spread\"}"; + String getPlacementGroupPath = "/placement_groups/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the CreateSnapshotCloneOptions model - CreateSnapshotCloneOptions createSnapshotCloneOptionsModel = new CreateSnapshotCloneOptions.Builder() + // Construct an instance of the GetPlacementGroupOptions model + GetPlacementGroupOptions getPlacementGroupOptionsModel = new GetPlacementGroupOptions.Builder() .id("testString") - .zoneName("us-south-1") .build(); - // Invoke createSnapshotClone() with a valid options model and verify the result - Response response = vpcService.createSnapshotClone(createSnapshotCloneOptionsModel).execute(); + // Invoke getPlacementGroup() with a valid options model and verify the result + Response response = vpcService.getPlacementGroup(getPlacementGroupOptionsModel).execute(); assertNotNull(response); - SnapshotClone responseObj = response.getResult(); + PlacementGroup 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"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createSnapshotClonePath); + assertEquals(parsedPath, getPlacementGroupPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createSnapshotClone operation with and without retries enabled + // Test the getPlacementGroup operation with and without retries enabled @Test - public void testCreateSnapshotCloneWRetries() throws Throwable { + public void testGetPlacementGroupWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateSnapshotCloneWOptions(); + testGetPlacementGroupWOptions(); vpcService.disableRetries(); - testCreateSnapshotCloneWOptions(); + testGetPlacementGroupWOptions(); } - // Test the createSnapshotClone operation with a null options model (negative test) + // Test the getPlacementGroup operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateSnapshotCloneNoOptions() throws Throwable { + public void testGetPlacementGroupNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createSnapshotClone(null).execute(); + vpcService.getPlacementGroup(null).execute(); } - // Test the listShareProfiles operation with a valid options model parameter + // Test the listPlacementGroups operation with a valid options model parameter @Test - public void testListShareProfilesWOptions() throws Throwable { + public void testListPlacementGroupsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"profiles\": [{\"capacity\": {\"type\": \"fixed\", \"value\": 4800}, \"family\": \"defined_performance\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\", \"iops\": {\"type\": \"fixed\", \"value\": 4000}, \"name\": \"tier-3iops\", \"resource_type\": \"share_profile\"}], \"total_count\": 132}"; - String listShareProfilesPath = "/share/profiles"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"placement_groups\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r006-418fe842-a3e9-47b9-a938-1aa5bd632871\", \"id\": \"r006-418fe842-a3e9-47b9-a938-1aa5bd632871\", \"lifecycle_state\": \"stable\", \"name\": \"my-placement-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"placement_group\", \"strategy\": \"host_spread\"}], \"total_count\": 132}"; + String listPlacementGroupsPath = "/placement_groups"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListShareProfilesOptions model - ListShareProfilesOptions listShareProfilesOptionsModel = new ListShareProfilesOptions.Builder() + // Construct an instance of the ListPlacementGroupsOptions model + ListPlacementGroupsOptions listPlacementGroupsOptionsModel = new ListPlacementGroupsOptions.Builder() .start("testString") .limit(Long.valueOf("10")) - .sort("name") .build(); - // Invoke listShareProfiles() with a valid options model and verify the result - Response response = vpcService.listShareProfiles(listShareProfilesOptionsModel).execute(); + // Invoke listPlacementGroups() with a valid options model and verify the result + Response response = vpcService.listPlacementGroups(listPlacementGroupsOptionsModel).execute(); assertNotNull(response); - ShareProfileCollection responseObj = response.getResult(); + PlacementGroupCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -17743,33 +19650,32 @@ public void testListShareProfilesWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listShareProfilesPath); + assertEquals(parsedPath, listPlacementGroupsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("sort"), "name"); } - // Test the listShareProfiles operation with and without retries enabled + // Test the listPlacementGroups operation with and without retries enabled @Test - public void testListShareProfilesWRetries() throws Throwable { + public void testListPlacementGroupsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListShareProfilesWOptions(); + testListPlacementGroupsWOptions(); vpcService.disableRetries(); - testListShareProfilesWOptions(); + testListPlacementGroupsWOptions(); } - // Test the listShareProfiles operation using the ShareProfilesPager.getNext() method + // Test the listPlacementGroups operation using the PlacementGroupsPager.getNext() method @Test - public void testListShareProfilesWithPagerGetNext() throws Throwable { + public void testListPlacementGroupsWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"profiles\":[{\"capacity\":{\"type\":\"fixed\",\"value\":4800},\"family\":\"defined_performance\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\",\"iops\":{\"type\":\"fixed\",\"value\":4000},\"name\":\"tier-3iops\",\"resource_type\":\"share_profile\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"profiles\":[{\"capacity\":{\"type\":\"fixed\",\"value\":4800},\"family\":\"defined_performance\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\",\"iops\":{\"type\":\"fixed\",\"value\":4000},\"name\":\"tier-3iops\",\"resource_type\":\"share_profile\"}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"placement_groups\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r006-418fe842-a3e9-47b9-a938-1aa5bd632871\",\"id\":\"r006-418fe842-a3e9-47b9-a938-1aa5bd632871\",\"lifecycle_state\":\"stable\",\"name\":\"my-placement-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"placement_group\",\"strategy\":\"host_spread\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"placement_groups\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r006-418fe842-a3e9-47b9-a938-1aa5bd632871\",\"id\":\"r006-418fe842-a3e9-47b9-a938-1aa5bd632871\",\"lifecycle_state\":\"stable\",\"name\":\"my-placement-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"placement_group\",\"strategy\":\"host_spread\"}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -17783,27 +19689,26 @@ public void testListShareProfilesWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListShareProfilesOptions listShareProfilesOptions = new ListShareProfilesOptions.Builder() + ListPlacementGroupsOptions listPlacementGroupsOptions = new ListPlacementGroupsOptions.Builder() .limit(Long.valueOf("10")) - .sort("name") .build(); - List allResults = new ArrayList<>(); - ShareProfilesPager pager = new ShareProfilesPager(vpcService, listShareProfilesOptions); + List allResults = new ArrayList<>(); + PlacementGroupsPager pager = new PlacementGroupsPager(vpcService, listPlacementGroupsOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listShareProfiles operation using the ShareProfilesPager.getAll() method + // Test the listPlacementGroups operation using the PlacementGroupsPager.getAll() method @Test - public void testListShareProfilesWithPagerGetAll() throws Throwable { + public void testListPlacementGroupsWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"profiles\":[{\"capacity\":{\"type\":\"fixed\",\"value\":4800},\"family\":\"defined_performance\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\",\"iops\":{\"type\":\"fixed\",\"value\":4000},\"name\":\"tier-3iops\",\"resource_type\":\"share_profile\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"profiles\":[{\"capacity\":{\"type\":\"fixed\",\"value\":4800},\"family\":\"defined_performance\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\",\"iops\":{\"type\":\"fixed\",\"value\":4000},\"name\":\"tier-3iops\",\"resource_type\":\"share_profile\"}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"placement_groups\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r006-418fe842-a3e9-47b9-a938-1aa5bd632871\",\"id\":\"r006-418fe842-a3e9-47b9-a938-1aa5bd632871\",\"lifecycle_state\":\"stable\",\"name\":\"my-placement-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"placement_group\",\"strategy\":\"host_spread\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"placement_groups\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r006-418fe842-a3e9-47b9-a938-1aa5bd632871\",\"id\":\"r006-418fe842-a3e9-47b9-a938-1aa5bd632871\",\"lifecycle_state\":\"stable\",\"name\":\"my-placement-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"placement_group\",\"strategy\":\"host_spread\"}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -17817,318 +19722,111 @@ public void testListShareProfilesWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListShareProfilesOptions listShareProfilesOptions = new ListShareProfilesOptions.Builder() + ListPlacementGroupsOptions listPlacementGroupsOptions = new ListPlacementGroupsOptions.Builder() .limit(Long.valueOf("10")) - .sort("name") .build(); - ShareProfilesPager pager = new ShareProfilesPager(vpcService, listShareProfilesOptions); - List allResults = pager.getAll(); + PlacementGroupsPager pager = new PlacementGroupsPager(vpcService, listPlacementGroupsOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the getShareProfile operation with a valid options model parameter + // Test the updatePlacementGroup operation with a valid options model parameter @Test - public void testGetShareProfileWOptions() throws Throwable { + public void testUpdatePlacementGroupWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"capacity\": {\"type\": \"fixed\", \"value\": 4800}, \"family\": \"defined_performance\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\", \"iops\": {\"type\": \"fixed\", \"value\": 4000}, \"name\": \"tier-3iops\", \"resource_type\": \"share_profile\"}"; - String getShareProfilePath = "/share/profiles/dp2"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r006-418fe842-a3e9-47b9-a938-1aa5bd632871\", \"id\": \"r006-418fe842-a3e9-47b9-a938-1aa5bd632871\", \"lifecycle_state\": \"stable\", \"name\": \"my-placement-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"placement_group\", \"strategy\": \"host_spread\"}"; + String updatePlacementGroupPath = "/placement_groups/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetShareProfileOptions model - GetShareProfileOptions getShareProfileOptionsModel = new GetShareProfileOptions.Builder() - .name("dp2") + // Construct an instance of the PlacementGroupPatch model + PlacementGroupPatch placementGroupPatchModel = new PlacementGroupPatch.Builder() + .name("my-placement-group-updated") .build(); + Map placementGroupPatchModelAsPatch = placementGroupPatchModel.asPatch(); - // Invoke getShareProfile() with a valid options model and verify the result - Response response = vpcService.getShareProfile(getShareProfileOptionsModel).execute(); - assertNotNull(response); - ShareProfile responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getShareProfilePath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - } - - // Test the getShareProfile operation with and without retries enabled - @Test - public void testGetShareProfileWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testGetShareProfileWOptions(); - - vpcService.disableRetries(); - testGetShareProfileWOptions(); - } - - // Test the getShareProfile operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetShareProfileNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.getShareProfile(null).execute(); - } - - // Test the listShares operation with a valid options model parameter - @Test - public void testListSharesWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"shares\": [{\"access_control_mode\": \"security_group\", \"accessor_binding_role\": \"accessor\", \"accessor_bindings\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\", \"id\": \"r006-ce9dac18-dea0-4392-841c-142d3300674f\", \"resource_type\": \"share_accessor_binding\"}], \"allowed_transit_encryption_modes\": [\"none\"], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"initial_owner\": {\"gid\": 50, \"uid\": 50}, \"iops\": 100, \"latest_job\": {\"status\": \"cancelled\", \"status_reasons\": [{\"code\": \"cannot_reach_source_share\", \"message\": \"The replication failover failed because the source share cannot be reached.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}], \"type\": \"replication_failover\"}, \"latest_sync\": {\"completed_at\": \"2019-01-01T12:00:00.000Z\", \"data_transferred\": 0, \"started_at\": \"2019-01-01T12:00:00.000Z\"}, \"lifecycle_reasons\": [{\"code\": \"cloning_in_progress\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"mount_targets\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"name\": \"my-share-mount-target\", \"resource_type\": \"share_mount_target\"}], \"name\": \"my-share\", \"origin_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\", \"name\": \"tier-3iops\", \"resource_type\": \"share_profile\"}, \"replica_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"replication_cron_spec\": \"0 */5 * * *\", \"replication_role\": \"none\", \"replication_status\": \"active\", \"replication_status_reasons\": [{\"code\": \"cannot_reach_source_share\", \"message\": \"The replication failover failed because the source share cannot be reached.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"share\", \"size\": 200, \"snapshot_count\": 0, \"snapshot_size\": 0, \"source_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"id\": \"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"name\": \"my-share-snapshot\", \"resource_type\": \"share_snapshot\"}, \"user_tags\": [\"userTags\"], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"total_count\": 132}"; - String listSharesPath = "/shares"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the ListSharesOptions model - ListSharesOptions listSharesOptionsModel = new ListSharesOptions.Builder() - .start("testString") - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .name("my-name") - .sort("name") - .replicationRole("none") + // Construct an instance of the UpdatePlacementGroupOptions model + UpdatePlacementGroupOptions updatePlacementGroupOptionsModel = new UpdatePlacementGroupOptions.Builder() + .id("testString") + .placementGroupPatch(placementGroupPatchModelAsPatch) .build(); - // Invoke listShares() with a valid options model and verify the result - Response response = vpcService.listShares(listSharesOptionsModel).execute(); + // Invoke updatePlacementGroup() with a valid options model and verify the result + Response response = vpcService.updatePlacementGroup(updatePlacementGroupOptionsModel).execute(); assertNotNull(response); - ShareCollection responseObj = response.getResult(); + PlacementGroup responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listSharesPath); + assertEquals(parsedPath, updatePlacementGroupPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("resource_group.id"), "testString"); - assertEquals(query.get("name"), "my-name"); - assertEquals(query.get("sort"), "name"); - assertEquals(query.get("replication_role"), "none"); } - // Test the listShares operation with and without retries enabled + // Test the updatePlacementGroup operation with and without retries enabled @Test - public void testListSharesWRetries() throws Throwable { + public void testUpdatePlacementGroupWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListSharesWOptions(); + testUpdatePlacementGroupWOptions(); vpcService.disableRetries(); - testListSharesWOptions(); + testUpdatePlacementGroupWOptions(); } - // Test the listShares operation using the SharesPager.getNext() method - @Test - public void testListSharesWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"shares\":[{\"access_control_mode\":\"security_group\",\"accessor_binding_role\":\"accessor\",\"accessor_bindings\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\",\"id\":\"r006-ce9dac18-dea0-4392-841c-142d3300674f\",\"resource_type\":\"share_accessor_binding\"}],\"allowed_transit_encryption_modes\":[\"none\"],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"encryption\":\"provider_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"initial_owner\":{\"gid\":50,\"uid\":50},\"iops\":100,\"latest_job\":{\"status\":\"cancelled\",\"status_reasons\":[{\"code\":\"cannot_reach_source_share\",\"message\":\"The replication failover failed because the source share cannot be reached.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}],\"type\":\"replication_failover\"},\"latest_sync\":{\"completed_at\":\"2019-01-01T12:00:00.000Z\",\"data_transferred\":0,\"started_at\":\"2019-01-01T12:00:00.000Z\"},\"lifecycle_reasons\":[{\"code\":\"cloning_in_progress\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"mount_targets\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"id\":\"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"name\":\"my-share-mount-target\",\"resource_type\":\"share_mount_target\"}],\"name\":\"my-share\",\"origin_share\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\",\"name\":\"tier-3iops\",\"resource_type\":\"share_profile\"},\"replica_share\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"replication_cron_spec\":\"0 */5 * * *\",\"replication_role\":\"none\",\"replication_status\":\"active\",\"replication_status_reasons\":[{\"code\":\"cannot_reach_source_share\",\"message\":\"The replication failover failed because the source share cannot be reached.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"share\",\"size\":200,\"snapshot_count\":0,\"snapshot_size\":0,\"source_share\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"source_snapshot\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"id\":\"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"name\":\"my-share-snapshot\",\"resource_type\":\"share_snapshot\"},\"user_tags\":[\"userTags\"],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"shares\":[{\"access_control_mode\":\"security_group\",\"accessor_binding_role\":\"accessor\",\"accessor_bindings\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\",\"id\":\"r006-ce9dac18-dea0-4392-841c-142d3300674f\",\"resource_type\":\"share_accessor_binding\"}],\"allowed_transit_encryption_modes\":[\"none\"],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"encryption\":\"provider_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"initial_owner\":{\"gid\":50,\"uid\":50},\"iops\":100,\"latest_job\":{\"status\":\"cancelled\",\"status_reasons\":[{\"code\":\"cannot_reach_source_share\",\"message\":\"The replication failover failed because the source share cannot be reached.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}],\"type\":\"replication_failover\"},\"latest_sync\":{\"completed_at\":\"2019-01-01T12:00:00.000Z\",\"data_transferred\":0,\"started_at\":\"2019-01-01T12:00:00.000Z\"},\"lifecycle_reasons\":[{\"code\":\"cloning_in_progress\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"mount_targets\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"id\":\"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"name\":\"my-share-mount-target\",\"resource_type\":\"share_mount_target\"}],\"name\":\"my-share\",\"origin_share\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\",\"name\":\"tier-3iops\",\"resource_type\":\"share_profile\"},\"replica_share\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"replication_cron_spec\":\"0 */5 * * *\",\"replication_role\":\"none\",\"replication_status\":\"active\",\"replication_status_reasons\":[{\"code\":\"cannot_reach_source_share\",\"message\":\"The replication failover failed because the source share cannot be reached.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"share\",\"size\":200,\"snapshot_count\":0,\"snapshot_size\":0,\"source_share\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"source_snapshot\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"id\":\"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"name\":\"my-share-snapshot\",\"resource_type\":\"share_snapshot\"},\"user_tags\":[\"userTags\"],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListSharesOptions listSharesOptions = new ListSharesOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .name("my-name") - .sort("name") - .replicationRole("none") - .build(); - - List allResults = new ArrayList<>(); - SharesPager pager = new SharesPager(vpcService, listSharesOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + // Test the updatePlacementGroup operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testUpdatePlacementGroupNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.updatePlacementGroup(null).execute(); } - - // Test the listShares operation using the SharesPager.getAll() method - @Test - public void testListSharesWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"shares\":[{\"access_control_mode\":\"security_group\",\"accessor_binding_role\":\"accessor\",\"accessor_bindings\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\",\"id\":\"r006-ce9dac18-dea0-4392-841c-142d3300674f\",\"resource_type\":\"share_accessor_binding\"}],\"allowed_transit_encryption_modes\":[\"none\"],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"encryption\":\"provider_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"initial_owner\":{\"gid\":50,\"uid\":50},\"iops\":100,\"latest_job\":{\"status\":\"cancelled\",\"status_reasons\":[{\"code\":\"cannot_reach_source_share\",\"message\":\"The replication failover failed because the source share cannot be reached.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}],\"type\":\"replication_failover\"},\"latest_sync\":{\"completed_at\":\"2019-01-01T12:00:00.000Z\",\"data_transferred\":0,\"started_at\":\"2019-01-01T12:00:00.000Z\"},\"lifecycle_reasons\":[{\"code\":\"cloning_in_progress\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"mount_targets\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"id\":\"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"name\":\"my-share-mount-target\",\"resource_type\":\"share_mount_target\"}],\"name\":\"my-share\",\"origin_share\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\",\"name\":\"tier-3iops\",\"resource_type\":\"share_profile\"},\"replica_share\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"replication_cron_spec\":\"0 */5 * * *\",\"replication_role\":\"none\",\"replication_status\":\"active\",\"replication_status_reasons\":[{\"code\":\"cannot_reach_source_share\",\"message\":\"The replication failover failed because the source share cannot be reached.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"share\",\"size\":200,\"snapshot_count\":0,\"snapshot_size\":0,\"source_share\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"source_snapshot\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"id\":\"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"name\":\"my-share-snapshot\",\"resource_type\":\"share_snapshot\"},\"user_tags\":[\"userTags\"],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"shares\":[{\"access_control_mode\":\"security_group\",\"accessor_binding_role\":\"accessor\",\"accessor_bindings\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\",\"id\":\"r006-ce9dac18-dea0-4392-841c-142d3300674f\",\"resource_type\":\"share_accessor_binding\"}],\"allowed_transit_encryption_modes\":[\"none\"],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"encryption\":\"provider_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"initial_owner\":{\"gid\":50,\"uid\":50},\"iops\":100,\"latest_job\":{\"status\":\"cancelled\",\"status_reasons\":[{\"code\":\"cannot_reach_source_share\",\"message\":\"The replication failover failed because the source share cannot be reached.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}],\"type\":\"replication_failover\"},\"latest_sync\":{\"completed_at\":\"2019-01-01T12:00:00.000Z\",\"data_transferred\":0,\"started_at\":\"2019-01-01T12:00:00.000Z\"},\"lifecycle_reasons\":[{\"code\":\"cloning_in_progress\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"mount_targets\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"id\":\"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"name\":\"my-share-mount-target\",\"resource_type\":\"share_mount_target\"}],\"name\":\"my-share\",\"origin_share\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\",\"name\":\"tier-3iops\",\"resource_type\":\"share_profile\"},\"replica_share\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"replication_cron_spec\":\"0 */5 * * *\",\"replication_role\":\"none\",\"replication_status\":\"active\",\"replication_status_reasons\":[{\"code\":\"cannot_reach_source_share\",\"message\":\"The replication failover failed because the source share cannot be reached.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"share\",\"size\":200,\"snapshot_count\":0,\"snapshot_size\":0,\"source_share\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"source_snapshot\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"id\":\"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"name\":\"my-share-snapshot\",\"resource_type\":\"share_snapshot\"},\"user_tags\":[\"userTags\"],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListSharesOptions listSharesOptions = new ListSharesOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .name("my-name") - .sort("name") - .replicationRole("none") - .build(); - SharesPager pager = new SharesPager(vpcService, listSharesOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the createShare operation with a valid options model parameter + // Test the createPrivatePathServiceGateway operation with a valid options model parameter @Test - public void testCreateShareWOptions() throws Throwable { + public void testCreatePrivatePathServiceGatewayWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"access_control_mode\": \"security_group\", \"accessor_binding_role\": \"accessor\", \"accessor_bindings\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\", \"id\": \"r006-ce9dac18-dea0-4392-841c-142d3300674f\", \"resource_type\": \"share_accessor_binding\"}], \"allowed_transit_encryption_modes\": [\"none\"], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"initial_owner\": {\"gid\": 50, \"uid\": 50}, \"iops\": 100, \"latest_job\": {\"status\": \"cancelled\", \"status_reasons\": [{\"code\": \"cannot_reach_source_share\", \"message\": \"The replication failover failed because the source share cannot be reached.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}], \"type\": \"replication_failover\"}, \"latest_sync\": {\"completed_at\": \"2019-01-01T12:00:00.000Z\", \"data_transferred\": 0, \"started_at\": \"2019-01-01T12:00:00.000Z\"}, \"lifecycle_reasons\": [{\"code\": \"cloning_in_progress\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"mount_targets\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"name\": \"my-share-mount-target\", \"resource_type\": \"share_mount_target\"}], \"name\": \"my-share\", \"origin_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\", \"name\": \"tier-3iops\", \"resource_type\": \"share_profile\"}, \"replica_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"replication_cron_spec\": \"0 */5 * * *\", \"replication_role\": \"none\", \"replication_status\": \"active\", \"replication_status_reasons\": [{\"code\": \"cannot_reach_source_share\", \"message\": \"The replication failover failed because the source share cannot be reached.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"share\", \"size\": 200, \"snapshot_count\": 0, \"snapshot_size\": 0, \"source_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"id\": \"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"name\": \"my-share-snapshot\", \"resource_type\": \"share_snapshot\"}, \"user_tags\": [\"userTags\"], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String createSharePath = "/shares"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"default_access_policy\": \"deny\", \"endpoint_gateway_binding_auto_delete\": true, \"endpoint_gateway_binding_auto_delete_timeout\": 1, \"endpoint_gateway_count\": 0, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"id\": \"r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"lifecycle_state\": \"stable\", \"load_balancer\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"id\": \"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"name\": \"my-load-balancer\", \"resource_type\": \"load_balancer\"}, \"name\": \"my-private-path-service-gateway\", \"published\": false, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"private_path_service_gateway\", \"service_endpoints\": [\"*.example.com\"], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zonal_affinity\": false}"; + String createPrivatePathServiceGatewayPath = "/private_path_service_gateways"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext model - VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtualNetworkInterfaceIpPrototypeModel = new VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext.Builder() - .address("10.0.0.5") - .autoDelete(false) - .name("my-reserved-ip") - .build(); - - // Construct an instance of the VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model - VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext virtualNetworkInterfacePrimaryIpPrototypeModel = new VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext.Builder() - .address("10.0.0.5") - .autoDelete(false) - .name("my-reserved-ip") + // Construct an instance of the LoadBalancerIdentityById model + LoadBalancerIdentityById loadBalancerIdentityModel = new LoadBalancerIdentityById.Builder() + .id("r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727") .build(); // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); - - // Construct an instance of the SecurityGroupIdentityById model - SecurityGroupIdentityById securityGroupIdentityModel = new SecurityGroupIdentityById.Builder() - .id("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") - .build(); - - // Construct an instance of the SubnetIdentityById model - SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() - .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") - .build(); - - // Construct an instance of the ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext model - ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext shareMountTargetVirtualNetworkInterfacePrototypeModel = new ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext.Builder() - .allowIpSpoofing(true) - .autoDelete(false) - .enableInfrastructureNat(true) - .ips(java.util.Arrays.asList(virtualNetworkInterfaceIpPrototypeModel)) - .name("my-virtual-network-interface") - .primaryIp(virtualNetworkInterfacePrimaryIpPrototypeModel) - .protocolStateFilteringMode("auto") - .resourceGroup(resourceGroupIdentityModel) - .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) - .subnet(subnetIdentityModel) - .build(); - - // Construct an instance of the ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup model - ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup shareMountTargetPrototypeModel = new ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.Builder() - .name("my-share-mount-target") - .transitEncryption("none") - .virtualNetworkInterface(shareMountTargetVirtualNetworkInterfacePrototypeModel) - .build(); - - // Construct an instance of the ShareProfileIdentityByName model - ShareProfileIdentityByName shareProfileIdentityModel = new ShareProfileIdentityByName.Builder() - .name("tier-3iops") - .build(); - - // Construct an instance of the ZoneIdentityByName model - ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() - .name("us-south-1") - .build(); - - // Construct an instance of the SharePrototypeShareContext model - SharePrototypeShareContext sharePrototypeShareContextModel = new SharePrototypeShareContext.Builder() - .allowedTransitEncryptionModes(java.util.Arrays.asList("none")) - .iops(Long.valueOf("100")) - .mountTargets(java.util.Arrays.asList(shareMountTargetPrototypeModel)) - .name("my-share") - .profile(shareProfileIdentityModel) - .replicationCronSpec("0 */5 * * *") - .resourceGroup(resourceGroupIdentityModel) - .userTags(java.util.Arrays.asList()) - .zone(zoneIdentityModel) - .build(); - - // Construct an instance of the EncryptionKeyIdentityByCRN model - EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() - .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") - .build(); - - // Construct an instance of the ShareInitialOwner model - ShareInitialOwner shareInitialOwnerModel = new ShareInitialOwner.Builder() - .gid(Long.valueOf("50")) - .uid(Long.valueOf("50")) + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") .build(); - // Construct an instance of the SharePrototypeShareBySize model - SharePrototypeShareBySize sharePrototypeModel = new SharePrototypeShareBySize.Builder() - .allowedTransitEncryptionModes(java.util.Arrays.asList("none")) - .mountTargets(java.util.Arrays.asList(shareMountTargetPrototypeModel)) - .name("my-share") - .replicaShare(sharePrototypeShareContextModel) - .userTags(java.util.Arrays.asList()) - .accessControlMode("security_group") - .encryptionKey(encryptionKeyIdentityModel) - .initialOwner(shareInitialOwnerModel) - .iops(Long.valueOf("100")) - .profile(shareProfileIdentityModel) + // Construct an instance of the CreatePrivatePathServiceGatewayOptions model + CreatePrivatePathServiceGatewayOptions createPrivatePathServiceGatewayOptionsModel = new CreatePrivatePathServiceGatewayOptions.Builder() + .loadBalancer(loadBalancerIdentityModel) + .serviceEndpoints(java.util.Arrays.asList("*.example.com")) + .defaultAccessPolicy("deny") + .name("my-private-path-service-gateway") .resourceGroup(resourceGroupIdentityModel) - .size(Long.valueOf("200")) - .zone(zoneIdentityModel) - .build(); - - // Construct an instance of the CreateShareOptions model - CreateShareOptions createShareOptionsModel = new CreateShareOptions.Builder() - .sharePrototype(sharePrototypeModel) + .zonalAffinity(false) .build(); - // Invoke createShare() with a valid options model and verify the result - Response response = vpcService.createShare(createShareOptionsModel).execute(); + // Invoke createPrivatePathServiceGateway() with a valid options model and verify the result + Response response = vpcService.createPrivatePathServiceGateway(createPrivatePathServiceGatewayOptionsModel).execute(); assertNotNull(response); - Share responseObj = response.getResult(); + PrivatePathServiceGateway responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -18137,406 +19835,378 @@ public void testCreateShareWOptions() throws Throwable { assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createSharePath); + assertEquals(parsedPath, createPrivatePathServiceGatewayPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createShare operation with and without retries enabled + // Test the createPrivatePathServiceGateway operation with and without retries enabled @Test - public void testCreateShareWRetries() throws Throwable { + public void testCreatePrivatePathServiceGatewayWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateShareWOptions(); + testCreatePrivatePathServiceGatewayWOptions(); vpcService.disableRetries(); - testCreateShareWOptions(); + testCreatePrivatePathServiceGatewayWOptions(); } - // Test the createShare operation with a null options model (negative test) + // Test the createPrivatePathServiceGateway operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateShareNoOptions() throws Throwable { + public void testCreatePrivatePathServiceGatewayNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createShare(null).execute(); + vpcService.createPrivatePathServiceGateway(null).execute(); } - // Test the deleteShare operation with a valid options model parameter + // Test the createPrivatePathServiceGatewayAccountPolicy operation with a valid options model parameter @Test - public void testDeleteShareWOptions() throws Throwable { + public void testCreatePrivatePathServiceGatewayAccountPolicyWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"access_control_mode\": \"security_group\", \"accessor_binding_role\": \"accessor\", \"accessor_bindings\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\", \"id\": \"r006-ce9dac18-dea0-4392-841c-142d3300674f\", \"resource_type\": \"share_accessor_binding\"}], \"allowed_transit_encryption_modes\": [\"none\"], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"initial_owner\": {\"gid\": 50, \"uid\": 50}, \"iops\": 100, \"latest_job\": {\"status\": \"cancelled\", \"status_reasons\": [{\"code\": \"cannot_reach_source_share\", \"message\": \"The replication failover failed because the source share cannot be reached.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}], \"type\": \"replication_failover\"}, \"latest_sync\": {\"completed_at\": \"2019-01-01T12:00:00.000Z\", \"data_transferred\": 0, \"started_at\": \"2019-01-01T12:00:00.000Z\"}, \"lifecycle_reasons\": [{\"code\": \"cloning_in_progress\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"mount_targets\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"name\": \"my-share-mount-target\", \"resource_type\": \"share_mount_target\"}], \"name\": \"my-share\", \"origin_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\", \"name\": \"tier-3iops\", \"resource_type\": \"share_profile\"}, \"replica_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"replication_cron_spec\": \"0 */5 * * *\", \"replication_role\": \"none\", \"replication_status\": \"active\", \"replication_status_reasons\": [{\"code\": \"cannot_reach_source_share\", \"message\": \"The replication failover failed because the source share cannot be reached.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"share\", \"size\": 200, \"snapshot_count\": 0, \"snapshot_size\": 0, \"source_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"id\": \"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"name\": \"my-share-snapshot\", \"resource_type\": \"share_snapshot\"}, \"user_tags\": [\"userTags\"], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String deleteSharePath = "/shares/testString"; + String mockResponseBody = "{\"access_policy\": \"deny\", \"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c\", \"id\": \"r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"resource_type\": \"private_path_service_gateway_account_policy\"}"; + String createPrivatePathServiceGatewayAccountPolicyPath = "/private_path_service_gateways/testString/account_policies"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(202) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the DeleteShareOptions model - DeleteShareOptions deleteShareOptionsModel = new DeleteShareOptions.Builder() - .id("testString") - .ifMatch("W/96d225c4-56bd-43d9-98fc-d7148e5c5028") + // Construct an instance of the AccountIdentityById model + AccountIdentityById accountIdentityModel = new AccountIdentityById.Builder() + .id("bb1b52262f7441a586f49068482f1e60") .build(); - // Invoke deleteShare() with a valid options model and verify the result - Response response = vpcService.deleteShare(deleteShareOptionsModel).execute(); + // Construct an instance of the CreatePrivatePathServiceGatewayAccountPolicyOptions model + CreatePrivatePathServiceGatewayAccountPolicyOptions createPrivatePathServiceGatewayAccountPolicyOptionsModel = new CreatePrivatePathServiceGatewayAccountPolicyOptions.Builder() + .privatePathServiceGatewayId("testString") + .accessPolicy("deny") + .account(accountIdentityModel) + .build(); + + // Invoke createPrivatePathServiceGatewayAccountPolicy() with a valid options model and verify the result + Response response = vpcService.createPrivatePathServiceGatewayAccountPolicy(createPrivatePathServiceGatewayAccountPolicyOptionsModel).execute(); assertNotNull(response); - Share responseObj = response.getResult(); + PrivatePathServiceGatewayAccountPolicy 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(), "DELETE"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteSharePath); + assertEquals(parsedPath, createPrivatePathServiceGatewayAccountPolicyPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteShare operation with and without retries enabled + // Test the createPrivatePathServiceGatewayAccountPolicy operation with and without retries enabled @Test - public void testDeleteShareWRetries() throws Throwable { + public void testCreatePrivatePathServiceGatewayAccountPolicyWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteShareWOptions(); + testCreatePrivatePathServiceGatewayAccountPolicyWOptions(); vpcService.disableRetries(); - testDeleteShareWOptions(); + testCreatePrivatePathServiceGatewayAccountPolicyWOptions(); } - // Test the deleteShare operation with a null options model (negative test) + // Test the createPrivatePathServiceGatewayAccountPolicy operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteShareNoOptions() throws Throwable { + public void testCreatePrivatePathServiceGatewayAccountPolicyNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteShare(null).execute(); + vpcService.createPrivatePathServiceGatewayAccountPolicy(null).execute(); } - // Test the getShare operation with a valid options model parameter + // Test the deletePrivatePathServiceGateway operation with a valid options model parameter @Test - public void testGetShareWOptions() throws Throwable { + public void testDeletePrivatePathServiceGatewayWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"access_control_mode\": \"security_group\", \"accessor_binding_role\": \"accessor\", \"accessor_bindings\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\", \"id\": \"r006-ce9dac18-dea0-4392-841c-142d3300674f\", \"resource_type\": \"share_accessor_binding\"}], \"allowed_transit_encryption_modes\": [\"none\"], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"initial_owner\": {\"gid\": 50, \"uid\": 50}, \"iops\": 100, \"latest_job\": {\"status\": \"cancelled\", \"status_reasons\": [{\"code\": \"cannot_reach_source_share\", \"message\": \"The replication failover failed because the source share cannot be reached.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}], \"type\": \"replication_failover\"}, \"latest_sync\": {\"completed_at\": \"2019-01-01T12:00:00.000Z\", \"data_transferred\": 0, \"started_at\": \"2019-01-01T12:00:00.000Z\"}, \"lifecycle_reasons\": [{\"code\": \"cloning_in_progress\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"mount_targets\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"name\": \"my-share-mount-target\", \"resource_type\": \"share_mount_target\"}], \"name\": \"my-share\", \"origin_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\", \"name\": \"tier-3iops\", \"resource_type\": \"share_profile\"}, \"replica_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"replication_cron_spec\": \"0 */5 * * *\", \"replication_role\": \"none\", \"replication_status\": \"active\", \"replication_status_reasons\": [{\"code\": \"cannot_reach_source_share\", \"message\": \"The replication failover failed because the source share cannot be reached.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"share\", \"size\": 200, \"snapshot_count\": 0, \"snapshot_size\": 0, \"source_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"id\": \"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"name\": \"my-share-snapshot\", \"resource_type\": \"share_snapshot\"}, \"user_tags\": [\"userTags\"], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String getSharePath = "/shares/testString"; + String mockResponseBody = ""; + String deletePrivatePathServiceGatewayPath = "/private_path_service_gateways/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the GetShareOptions model - GetShareOptions getShareOptionsModel = new GetShareOptions.Builder() + // Construct an instance of the DeletePrivatePathServiceGatewayOptions model + DeletePrivatePathServiceGatewayOptions deletePrivatePathServiceGatewayOptionsModel = new DeletePrivatePathServiceGatewayOptions.Builder() .id("testString") .build(); - // Invoke getShare() with a valid options model and verify the result - Response response = vpcService.getShare(getShareOptionsModel).execute(); + // Invoke deletePrivatePathServiceGateway() with a valid options model and verify the result + Response response = vpcService.deletePrivatePathServiceGateway(deletePrivatePathServiceGatewayOptionsModel).execute(); assertNotNull(response); - Share responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getSharePath); + assertEquals(parsedPath, deletePrivatePathServiceGatewayPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getShare operation with and without retries enabled + // Test the deletePrivatePathServiceGateway operation with and without retries enabled @Test - public void testGetShareWRetries() throws Throwable { + public void testDeletePrivatePathServiceGatewayWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetShareWOptions(); + testDeletePrivatePathServiceGatewayWOptions(); vpcService.disableRetries(); - testGetShareWOptions(); + testDeletePrivatePathServiceGatewayWOptions(); } - // Test the getShare operation with a null options model (negative test) + // Test the deletePrivatePathServiceGateway operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetShareNoOptions() throws Throwable { + public void testDeletePrivatePathServiceGatewayNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getShare(null).execute(); + vpcService.deletePrivatePathServiceGateway(null).execute(); } - // Test the updateShare operation with a valid options model parameter + // Test the deletePrivatePathServiceGatewayAccountPolicy operation with a valid options model parameter @Test - public void testUpdateShareWOptions() throws Throwable { + public void testDeletePrivatePathServiceGatewayAccountPolicyWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"access_control_mode\": \"security_group\", \"accessor_binding_role\": \"accessor\", \"accessor_bindings\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\", \"id\": \"r006-ce9dac18-dea0-4392-841c-142d3300674f\", \"resource_type\": \"share_accessor_binding\"}], \"allowed_transit_encryption_modes\": [\"none\"], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"initial_owner\": {\"gid\": 50, \"uid\": 50}, \"iops\": 100, \"latest_job\": {\"status\": \"cancelled\", \"status_reasons\": [{\"code\": \"cannot_reach_source_share\", \"message\": \"The replication failover failed because the source share cannot be reached.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}], \"type\": \"replication_failover\"}, \"latest_sync\": {\"completed_at\": \"2019-01-01T12:00:00.000Z\", \"data_transferred\": 0, \"started_at\": \"2019-01-01T12:00:00.000Z\"}, \"lifecycle_reasons\": [{\"code\": \"cloning_in_progress\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"mount_targets\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"name\": \"my-share-mount-target\", \"resource_type\": \"share_mount_target\"}], \"name\": \"my-share\", \"origin_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\", \"name\": \"tier-3iops\", \"resource_type\": \"share_profile\"}, \"replica_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"replication_cron_spec\": \"0 */5 * * *\", \"replication_role\": \"none\", \"replication_status\": \"active\", \"replication_status_reasons\": [{\"code\": \"cannot_reach_source_share\", \"message\": \"The replication failover failed because the source share cannot be reached.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"share\", \"size\": 200, \"snapshot_count\": 0, \"snapshot_size\": 0, \"source_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"id\": \"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"name\": \"my-share-snapshot\", \"resource_type\": \"share_snapshot\"}, \"user_tags\": [\"userTags\"], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String updateSharePath = "/shares/testString"; + String mockResponseBody = ""; + String deletePrivatePathServiceGatewayAccountPolicyPath = "/private_path_service_gateways/testString/account_policies/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the ShareProfileIdentityByName model - ShareProfileIdentityByName shareProfileIdentityModel = new ShareProfileIdentityByName.Builder() - .name("tier-3iops") - .build(); - - // Construct an instance of the SharePatch model - SharePatch sharePatchModel = new SharePatch.Builder() - .accessControlMode("security_group") - .allowedTransitEncryptionModes(java.util.Arrays.asList("none")) - .iops(Long.valueOf("100")) - .name("my-share") - .profile(shareProfileIdentityModel) - .replicationCronSpec("0 */5 * * *") - .size(Long.valueOf("8000")) - .userTags(java.util.Arrays.asList("testString")) - .build(); - Map sharePatchModelAsPatch = sharePatchModel.asPatch(); - - // Construct an instance of the UpdateShareOptions model - UpdateShareOptions updateShareOptionsModel = new UpdateShareOptions.Builder() + // Construct an instance of the DeletePrivatePathServiceGatewayAccountPolicyOptions model + DeletePrivatePathServiceGatewayAccountPolicyOptions deletePrivatePathServiceGatewayAccountPolicyOptionsModel = new DeletePrivatePathServiceGatewayAccountPolicyOptions.Builder() + .privatePathServiceGatewayId("testString") .id("testString") - .sharePatch(sharePatchModelAsPatch) - .ifMatch("W/96d225c4-56bd-43d9-98fc-d7148e5c5028") .build(); - // Invoke updateShare() with a valid options model and verify the result - Response response = vpcService.updateShare(updateShareOptionsModel).execute(); + // Invoke deletePrivatePathServiceGatewayAccountPolicy() with a valid options model and verify the result + Response response = vpcService.deletePrivatePathServiceGatewayAccountPolicy(deletePrivatePathServiceGatewayAccountPolicyOptionsModel).execute(); assertNotNull(response); - Share responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateSharePath); + assertEquals(parsedPath, deletePrivatePathServiceGatewayAccountPolicyPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateShare operation with and without retries enabled + // Test the deletePrivatePathServiceGatewayAccountPolicy operation with and without retries enabled @Test - public void testUpdateShareWRetries() throws Throwable { + public void testDeletePrivatePathServiceGatewayAccountPolicyWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateShareWOptions(); + testDeletePrivatePathServiceGatewayAccountPolicyWOptions(); vpcService.disableRetries(); - testUpdateShareWOptions(); + testDeletePrivatePathServiceGatewayAccountPolicyWOptions(); } - // Test the updateShare operation with a null options model (negative test) + // Test the deletePrivatePathServiceGatewayAccountPolicy operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateShareNoOptions() throws Throwable { + public void testDeletePrivatePathServiceGatewayAccountPolicyNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateShare(null).execute(); + vpcService.deletePrivatePathServiceGatewayAccountPolicy(null).execute(); } - // Test the listShareAccessorBindings operation with a valid options model parameter + // Test the denyPrivatePathServiceGatewayEndpointGatewayBinding operation with a valid options model parameter @Test - public void testListShareAccessorBindingsWOptions() throws Throwable { + public void testDenyPrivatePathServiceGatewayEndpointGatewayBindingWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"accessor_bindings\": [{\"accessor\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\", \"id\": \"r006-ce9dac18-dea0-4392-841c-142d3300674f\", \"lifecycle_state\": \"stable\", \"resource_type\": \"share_accessor_binding\"}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listShareAccessorBindingsPath = "/shares/testString/accessor_bindings"; + String mockResponseBody = ""; + String denyPrivatePathServiceGatewayEndpointGatewayBindingPath = "/private_path_service_gateways/testString/endpoint_gateway_bindings/testString/deny"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the ListShareAccessorBindingsOptions model - ListShareAccessorBindingsOptions listShareAccessorBindingsOptionsModel = new ListShareAccessorBindingsOptions.Builder() + // Construct an instance of the DenyPrivatePathServiceGatewayEndpointGatewayBindingOptions model + DenyPrivatePathServiceGatewayEndpointGatewayBindingOptions denyPrivatePathServiceGatewayEndpointGatewayBindingOptionsModel = new DenyPrivatePathServiceGatewayEndpointGatewayBindingOptions.Builder() + .privatePathServiceGatewayId("testString") .id("testString") - .start("testString") - .limit(Long.valueOf("10")) + .setAccountPolicy(true) .build(); - // Invoke listShareAccessorBindings() with a valid options model and verify the result - Response response = vpcService.listShareAccessorBindings(listShareAccessorBindingsOptionsModel).execute(); + // Invoke denyPrivatePathServiceGatewayEndpointGatewayBinding() with a valid options model and verify the result + Response response = vpcService.denyPrivatePathServiceGatewayEndpointGatewayBinding(denyPrivatePathServiceGatewayEndpointGatewayBindingOptionsModel).execute(); assertNotNull(response); - ShareAccessorBindingCollection responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listShareAccessorBindingsPath); + assertEquals(parsedPath, denyPrivatePathServiceGatewayEndpointGatewayBindingPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the listShareAccessorBindings operation with and without retries enabled + // Test the denyPrivatePathServiceGatewayEndpointGatewayBinding operation with and without retries enabled @Test - public void testListShareAccessorBindingsWRetries() throws Throwable { + public void testDenyPrivatePathServiceGatewayEndpointGatewayBindingWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListShareAccessorBindingsWOptions(); + testDenyPrivatePathServiceGatewayEndpointGatewayBindingWOptions(); vpcService.disableRetries(); - testListShareAccessorBindingsWOptions(); + testDenyPrivatePathServiceGatewayEndpointGatewayBindingWOptions(); } - // Test the listShareAccessorBindings operation with a null options model (negative test) + // Test the denyPrivatePathServiceGatewayEndpointGatewayBinding operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListShareAccessorBindingsNoOptions() throws Throwable { + public void testDenyPrivatePathServiceGatewayEndpointGatewayBindingNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listShareAccessorBindings(null).execute(); + vpcService.denyPrivatePathServiceGatewayEndpointGatewayBinding(null).execute(); } - // Test the listShareAccessorBindings operation using the ShareAccessorBindingsPager.getNext() method + // Test the getPrivatePathServiceGateway operation with a valid options model parameter @Test - public void testListShareAccessorBindingsWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"accessor_bindings\":[{\"accessor\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\",\"id\":\"r006-ce9dac18-dea0-4392-841c-142d3300674f\",\"lifecycle_state\":\"stable\",\"resource_type\":\"share_accessor_binding\"}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"accessor_bindings\":[{\"accessor\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\",\"id\":\"r006-ce9dac18-dea0-4392-841c-142d3300674f\",\"lifecycle_state\":\"stable\",\"resource_type\":\"share_accessor_binding\"}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); + public void testGetPrivatePathServiceGatewayWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"default_access_policy\": \"deny\", \"endpoint_gateway_binding_auto_delete\": true, \"endpoint_gateway_binding_auto_delete_timeout\": 1, \"endpoint_gateway_count\": 0, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"id\": \"r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"lifecycle_state\": \"stable\", \"load_balancer\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"id\": \"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"name\": \"my-load-balancer\", \"resource_type\": \"load_balancer\"}, \"name\": \"my-private-path-service-gateway\", \"published\": false, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"private_path_service_gateway\", \"service_endpoints\": [\"*.example.com\"], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zonal_affinity\": false}"; + String getPrivatePathServiceGatewayPath = "/private_path_service_gateways/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); + .setBody(mockResponseBody)); - ListShareAccessorBindingsOptions listShareAccessorBindingsOptions = new ListShareAccessorBindingsOptions.Builder() + // Construct an instance of the GetPrivatePathServiceGatewayOptions model + GetPrivatePathServiceGatewayOptions getPrivatePathServiceGatewayOptionsModel = new GetPrivatePathServiceGatewayOptions.Builder() .id("testString") - .limit(Long.valueOf("10")) .build(); - List allResults = new ArrayList<>(); - ShareAccessorBindingsPager pager = new ShareAccessorBindingsPager(vpcService, listShareAccessorBindingsOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + // Invoke getPrivatePathServiceGateway() with a valid options model and verify the result + Response response = vpcService.getPrivatePathServiceGateway(getPrivatePathServiceGatewayOptionsModel).execute(); + assertNotNull(response); + PrivatePathServiceGateway responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "GET"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, getPrivatePathServiceGatewayPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - - // Test the listShareAccessorBindings operation using the ShareAccessorBindingsPager.getAll() method + + // Test the getPrivatePathServiceGateway operation with and without retries enabled @Test - public void testListShareAccessorBindingsWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"accessor_bindings\":[{\"accessor\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\",\"id\":\"r006-ce9dac18-dea0-4392-841c-142d3300674f\",\"lifecycle_state\":\"stable\",\"resource_type\":\"share_accessor_binding\"}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"accessor_bindings\":[{\"accessor\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\",\"id\":\"r006-ce9dac18-dea0-4392-841c-142d3300674f\",\"lifecycle_state\":\"stable\",\"resource_type\":\"share_accessor_binding\"}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); + public void testGetPrivatePathServiceGatewayWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testGetPrivatePathServiceGatewayWOptions(); - ListShareAccessorBindingsOptions listShareAccessorBindingsOptions = new ListShareAccessorBindingsOptions.Builder() - .id("testString") - .limit(Long.valueOf("10")) - .build(); + vpcService.disableRetries(); + testGetPrivatePathServiceGatewayWOptions(); + } - ShareAccessorBindingsPager pager = new ShareAccessorBindingsPager(vpcService, listShareAccessorBindingsOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); + // Test the getPrivatePathServiceGateway operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testGetPrivatePathServiceGatewayNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.getPrivatePathServiceGateway(null).execute(); } - - // Test the deleteShareAccessorBinding operation with a valid options model parameter + + // Test the getPrivatePathServiceGatewayAccountPolicy operation with a valid options model parameter @Test - public void testDeleteShareAccessorBindingWOptions() throws Throwable { + public void testGetPrivatePathServiceGatewayAccountPolicyWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteShareAccessorBindingPath = "/shares/testString/accessor_bindings/testString"; + String mockResponseBody = "{\"access_policy\": \"deny\", \"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c\", \"id\": \"r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"resource_type\": \"private_path_service_gateway_account_policy\"}"; + String getPrivatePathServiceGatewayAccountPolicyPath = "/private_path_service_gateways/testString/account_policies/testString"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteShareAccessorBindingOptions model - DeleteShareAccessorBindingOptions deleteShareAccessorBindingOptionsModel = new DeleteShareAccessorBindingOptions.Builder() - .shareId("testString") + // Construct an instance of the GetPrivatePathServiceGatewayAccountPolicyOptions model + GetPrivatePathServiceGatewayAccountPolicyOptions getPrivatePathServiceGatewayAccountPolicyOptionsModel = new GetPrivatePathServiceGatewayAccountPolicyOptions.Builder() + .privatePathServiceGatewayId("testString") .id("testString") .build(); - // Invoke deleteShareAccessorBinding() with a valid options model and verify the result - Response response = vpcService.deleteShareAccessorBinding(deleteShareAccessorBindingOptionsModel).execute(); + // Invoke getPrivatePathServiceGatewayAccountPolicy() with a valid options model and verify the result + Response response = vpcService.getPrivatePathServiceGatewayAccountPolicy(getPrivatePathServiceGatewayAccountPolicyOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + PrivatePathServiceGatewayAccountPolicy 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteShareAccessorBindingPath); + assertEquals(parsedPath, getPrivatePathServiceGatewayAccountPolicyPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteShareAccessorBinding operation with and without retries enabled + // Test the getPrivatePathServiceGatewayAccountPolicy operation with and without retries enabled @Test - public void testDeleteShareAccessorBindingWRetries() throws Throwable { + public void testGetPrivatePathServiceGatewayAccountPolicyWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteShareAccessorBindingWOptions(); + testGetPrivatePathServiceGatewayAccountPolicyWOptions(); vpcService.disableRetries(); - testDeleteShareAccessorBindingWOptions(); + testGetPrivatePathServiceGatewayAccountPolicyWOptions(); } - // Test the deleteShareAccessorBinding operation with a null options model (negative test) + // Test the getPrivatePathServiceGatewayAccountPolicy operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteShareAccessorBindingNoOptions() throws Throwable { + public void testGetPrivatePathServiceGatewayAccountPolicyNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteShareAccessorBinding(null).execute(); + vpcService.getPrivatePathServiceGatewayAccountPolicy(null).execute(); } - // Test the getShareAccessorBinding operation with a valid options model parameter + // Test the getPrivatePathServiceGatewayEndpointGatewayBinding operation with a valid options model parameter @Test - public void testGetShareAccessorBindingWOptions() throws Throwable { + public void testGetPrivatePathServiceGatewayEndpointGatewayBindingWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"accessor\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\", \"id\": \"r006-ce9dac18-dea0-4392-841c-142d3300674f\", \"lifecycle_state\": \"stable\", \"resource_type\": \"share_accessor_binding\"}"; - String getShareAccessorBindingPath = "/shares/testString/accessor_bindings/testString"; + String mockResponseBody = "{\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"expiration_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/endpoint_gateway_bindings/r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0\", \"id\": \"r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0\", \"lifecycle_state\": \"stable\", \"resource_type\": \"private_path_service_gateway_endpoint_gateway_binding\", \"status\": \"abandoned\"}"; + String getPrivatePathServiceGatewayEndpointGatewayBindingPath = "/private_path_service_gateways/testString/endpoint_gateway_bindings/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetShareAccessorBindingOptions model - GetShareAccessorBindingOptions getShareAccessorBindingOptionsModel = new GetShareAccessorBindingOptions.Builder() - .shareId("testString") + // Construct an instance of the GetPrivatePathServiceGatewayEndpointGatewayBindingOptions model + GetPrivatePathServiceGatewayEndpointGatewayBindingOptions getPrivatePathServiceGatewayEndpointGatewayBindingOptionsModel = new GetPrivatePathServiceGatewayEndpointGatewayBindingOptions.Builder() + .privatePathServiceGatewayId("testString") .id("testString") .build(); - // Invoke getShareAccessorBinding() with a valid options model and verify the result - Response response = vpcService.getShareAccessorBinding(getShareAccessorBindingOptionsModel).execute(); + // Invoke getPrivatePathServiceGatewayEndpointGatewayBinding() with a valid options model and verify the result + Response response = vpcService.getPrivatePathServiceGatewayEndpointGatewayBinding(getPrivatePathServiceGatewayEndpointGatewayBindingOptionsModel).execute(); assertNotNull(response); - ShareAccessorBinding responseObj = response.getResult(); + PrivatePathServiceGatewayEndpointGatewayBinding responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -18545,108 +20215,180 @@ public void testGetShareAccessorBindingWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getShareAccessorBindingPath); + assertEquals(parsedPath, getPrivatePathServiceGatewayEndpointGatewayBindingPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getShareAccessorBinding operation with and without retries enabled + // Test the getPrivatePathServiceGatewayEndpointGatewayBinding operation with and without retries enabled @Test - public void testGetShareAccessorBindingWRetries() throws Throwable { + public void testGetPrivatePathServiceGatewayEndpointGatewayBindingWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetShareAccessorBindingWOptions(); + testGetPrivatePathServiceGatewayEndpointGatewayBindingWOptions(); vpcService.disableRetries(); - testGetShareAccessorBindingWOptions(); + testGetPrivatePathServiceGatewayEndpointGatewayBindingWOptions(); } - // Test the getShareAccessorBinding operation with a null options model (negative test) + // Test the getPrivatePathServiceGatewayEndpointGatewayBinding operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetShareAccessorBindingNoOptions() throws Throwable { + public void testGetPrivatePathServiceGatewayEndpointGatewayBindingNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getShareAccessorBinding(null).execute(); + vpcService.getPrivatePathServiceGatewayEndpointGatewayBinding(null).execute(); } - // Test the failoverShare operation with a valid options model parameter + // Test the listPrivatePathServiceGatewayAccountPolicies operation with a valid options model parameter @Test - public void testFailoverShareWOptions() throws Throwable { + public void testListPrivatePathServiceGatewayAccountPoliciesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String failoverSharePath = "/shares/testString/failover"; + String mockResponseBody = "{\"account_policies\": [{\"access_policy\": \"deny\", \"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c\", \"id\": \"r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"resource_type\": \"private_path_service_gateway_account_policy\"}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listPrivatePathServiceGatewayAccountPoliciesPath = "/private_path_service_gateways/testString/account_policies"; server.enqueue(new MockResponse() - .setResponseCode(202) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the FailoverShareOptions model - FailoverShareOptions failoverShareOptionsModel = new FailoverShareOptions.Builder() - .shareId("testString") - .fallbackPolicy("fail") - .timeout(Long.valueOf("600")) + // Construct an instance of the ListPrivatePathServiceGatewayAccountPoliciesOptions model + ListPrivatePathServiceGatewayAccountPoliciesOptions listPrivatePathServiceGatewayAccountPoliciesOptionsModel = new ListPrivatePathServiceGatewayAccountPoliciesOptions.Builder() + .privatePathServiceGatewayId("testString") + .start("testString") + .limit(Long.valueOf("10")) + .accountId("bb1b52262f7441a586f49068482f1e60") .build(); - // Invoke failoverShare() with a valid options model and verify the result - Response response = vpcService.failoverShare(failoverShareOptionsModel).execute(); + // Invoke listPrivatePathServiceGatewayAccountPolicies() with a valid options model and verify the result + Response response = vpcService.listPrivatePathServiceGatewayAccountPolicies(listPrivatePathServiceGatewayAccountPoliciesOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + PrivatePathServiceGatewayAccountPolicyCollection responseObj = response.getResult(); + assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, failoverSharePath); + assertEquals(parsedPath, listPrivatePathServiceGatewayAccountPoliciesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("account.id"), "bb1b52262f7441a586f49068482f1e60"); } - // Test the failoverShare operation with and without retries enabled + // Test the listPrivatePathServiceGatewayAccountPolicies operation with and without retries enabled @Test - public void testFailoverShareWRetries() throws Throwable { + public void testListPrivatePathServiceGatewayAccountPoliciesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testFailoverShareWOptions(); + testListPrivatePathServiceGatewayAccountPoliciesWOptions(); + + vpcService.disableRetries(); + testListPrivatePathServiceGatewayAccountPoliciesWOptions(); + } + + // Test the listPrivatePathServiceGatewayAccountPolicies operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testListPrivatePathServiceGatewayAccountPoliciesNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.listPrivatePathServiceGatewayAccountPolicies(null).execute(); + } + + // Test the listPrivatePathServiceGatewayAccountPolicies operation using the PrivatePathServiceGatewayAccountPoliciesPager.getNext() method + @Test + public void testListPrivatePathServiceGatewayAccountPoliciesWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"account_policies\":[{\"access_policy\":\"deny\",\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c\",\"id\":\"r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"resource_type\":\"private_path_service_gateway_account_policy\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"account_policies\":[{\"access_policy\":\"deny\",\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c\",\"id\":\"r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"resource_type\":\"private_path_service_gateway_account_policy\"}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListPrivatePathServiceGatewayAccountPoliciesOptions listPrivatePathServiceGatewayAccountPoliciesOptions = new ListPrivatePathServiceGatewayAccountPoliciesOptions.Builder() + .privatePathServiceGatewayId("testString") + .limit(Long.valueOf("10")) + .accountId("bb1b52262f7441a586f49068482f1e60") + .build(); + + List allResults = new ArrayList<>(); + PrivatePathServiceGatewayAccountPoliciesPager pager = new PrivatePathServiceGatewayAccountPoliciesPager(vpcService, listPrivatePathServiceGatewayAccountPoliciesOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); + } + + // Test the listPrivatePathServiceGatewayAccountPolicies operation using the PrivatePathServiceGatewayAccountPoliciesPager.getAll() method + @Test + public void testListPrivatePathServiceGatewayAccountPoliciesWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"account_policies\":[{\"access_policy\":\"deny\",\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c\",\"id\":\"r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"resource_type\":\"private_path_service_gateway_account_policy\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"account_policies\":[{\"access_policy\":\"deny\",\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c\",\"id\":\"r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"resource_type\":\"private_path_service_gateway_account_policy\"}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - vpcService.disableRetries(); - testFailoverShareWOptions(); - } + ListPrivatePathServiceGatewayAccountPoliciesOptions listPrivatePathServiceGatewayAccountPoliciesOptions = new ListPrivatePathServiceGatewayAccountPoliciesOptions.Builder() + .privatePathServiceGatewayId("testString") + .limit(Long.valueOf("10")) + .accountId("bb1b52262f7441a586f49068482f1e60") + .build(); - // Test the failoverShare operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testFailoverShareNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.failoverShare(null).execute(); + PrivatePathServiceGatewayAccountPoliciesPager pager = new PrivatePathServiceGatewayAccountPoliciesPager(vpcService, listPrivatePathServiceGatewayAccountPoliciesOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); } - - // Test the listShareMountTargets operation with a valid options model parameter + + // Test the listPrivatePathServiceGatewayEndpointGatewayBindings operation with a valid options model parameter @Test - public void testListShareMountTargetsWOptions() throws Throwable { + public void testListPrivatePathServiceGatewayEndpointGatewayBindingsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"mount_targets\": [{\"access_control_mode\": \"security_group\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"lifecycle_state\": \"stable\", \"mount_path\": \"10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e\", \"name\": \"my-share-mount-target\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"share_mount_target\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"transit_encryption\": \"none\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}], \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listShareMountTargetsPath = "/shares/testString/mount_targets"; + String mockResponseBody = "{\"endpoint_gateway_bindings\": [{\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"expiration_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/endpoint_gateway_bindings/r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0\", \"id\": \"r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0\", \"lifecycle_state\": \"stable\", \"resource_type\": \"private_path_service_gateway_endpoint_gateway_binding\", \"status\": \"abandoned\"}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listPrivatePathServiceGatewayEndpointGatewayBindingsPath = "/private_path_service_gateways/testString/endpoint_gateway_bindings"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListShareMountTargetsOptions model - ListShareMountTargetsOptions listShareMountTargetsOptionsModel = new ListShareMountTargetsOptions.Builder() - .shareId("testString") - .name("my-name") + // Construct an instance of the ListPrivatePathServiceGatewayEndpointGatewayBindingsOptions model + ListPrivatePathServiceGatewayEndpointGatewayBindingsOptions listPrivatePathServiceGatewayEndpointGatewayBindingsOptionsModel = new ListPrivatePathServiceGatewayEndpointGatewayBindingsOptions.Builder() + .privatePathServiceGatewayId("testString") .start("testString") .limit(Long.valueOf("10")) + .status("abandoned") + .accountId("bb1b52262f7441a586f49068482f1e60") .build(); - // Invoke listShareMountTargets() with a valid options model and verify the result - Response response = vpcService.listShareMountTargets(listShareMountTargetsOptionsModel).execute(); + // Invoke listPrivatePathServiceGatewayEndpointGatewayBindings() with a valid options model and verify the result + Response response = vpcService.listPrivatePathServiceGatewayEndpointGatewayBindings(listPrivatePathServiceGatewayEndpointGatewayBindingsOptionsModel).execute(); assertNotNull(response); - ShareMountTargetCollection responseObj = response.getResult(); + PrivatePathServiceGatewayEndpointGatewayBindingCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -18655,40 +20397,41 @@ public void testListShareMountTargetsWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listShareMountTargetsPath); + assertEquals(parsedPath, listPrivatePathServiceGatewayEndpointGatewayBindingsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("name"), "my-name"); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("status"), "abandoned"); + assertEquals(query.get("account.id"), "bb1b52262f7441a586f49068482f1e60"); } - // Test the listShareMountTargets operation with and without retries enabled + // Test the listPrivatePathServiceGatewayEndpointGatewayBindings operation with and without retries enabled @Test - public void testListShareMountTargetsWRetries() throws Throwable { + public void testListPrivatePathServiceGatewayEndpointGatewayBindingsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListShareMountTargetsWOptions(); + testListPrivatePathServiceGatewayEndpointGatewayBindingsWOptions(); vpcService.disableRetries(); - testListShareMountTargetsWOptions(); + testListPrivatePathServiceGatewayEndpointGatewayBindingsWOptions(); } - // Test the listShareMountTargets operation with a null options model (negative test) + // Test the listPrivatePathServiceGatewayEndpointGatewayBindings operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListShareMountTargetsNoOptions() throws Throwable { + public void testListPrivatePathServiceGatewayEndpointGatewayBindingsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listShareMountTargets(null).execute(); + vpcService.listPrivatePathServiceGatewayEndpointGatewayBindings(null).execute(); } - // Test the listShareMountTargets operation using the ShareMountTargetsPager.getNext() method + // Test the listPrivatePathServiceGatewayEndpointGatewayBindings operation using the PrivatePathServiceGatewayEndpointGatewayBindingsPager.getNext() method @Test - public void testListShareMountTargetsWithPagerGetNext() throws Throwable { + public void testListPrivatePathServiceGatewayEndpointGatewayBindingsWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"mount_targets\":[{\"access_control_mode\":\"security_group\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"id\":\"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"lifecycle_state\":\"stable\",\"mount_path\":\"10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e\",\"name\":\"my-share-mount-target\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"share_mount_target\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"transit_encryption\":\"none\",\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"mount_targets\":[{\"access_control_mode\":\"security_group\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"id\":\"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"lifecycle_state\":\"stable\",\"mount_path\":\"10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e\",\"name\":\"my-share-mount-target\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"share_mount_target\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"transit_encryption\":\"none\",\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"endpoint_gateway_bindings\":[{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"expiration_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/endpoint_gateway_bindings/r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0\",\"id\":\"r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0\",\"lifecycle_state\":\"stable\",\"resource_type\":\"private_path_service_gateway_endpoint_gateway_binding\",\"status\":\"abandoned\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"endpoint_gateway_bindings\":[{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"expiration_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/endpoint_gateway_bindings/r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0\",\"id\":\"r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0\",\"lifecycle_state\":\"stable\",\"resource_type\":\"private_path_service_gateway_endpoint_gateway_binding\",\"status\":\"abandoned\"}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -18702,28 +20445,29 @@ public void testListShareMountTargetsWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListShareMountTargetsOptions listShareMountTargetsOptions = new ListShareMountTargetsOptions.Builder() - .shareId("testString") - .name("my-name") + ListPrivatePathServiceGatewayEndpointGatewayBindingsOptions listPrivatePathServiceGatewayEndpointGatewayBindingsOptions = new ListPrivatePathServiceGatewayEndpointGatewayBindingsOptions.Builder() + .privatePathServiceGatewayId("testString") .limit(Long.valueOf("10")) + .status("abandoned") + .accountId("bb1b52262f7441a586f49068482f1e60") .build(); - List allResults = new ArrayList<>(); - ShareMountTargetsPager pager = new ShareMountTargetsPager(vpcService, listShareMountTargetsOptions); + List allResults = new ArrayList<>(); + PrivatePathServiceGatewayEndpointGatewayBindingsPager pager = new PrivatePathServiceGatewayEndpointGatewayBindingsPager(vpcService, listPrivatePathServiceGatewayEndpointGatewayBindingsOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listShareMountTargets operation using the ShareMountTargetsPager.getAll() method + // Test the listPrivatePathServiceGatewayEndpointGatewayBindings operation using the PrivatePathServiceGatewayEndpointGatewayBindingsPager.getAll() method @Test - public void testListShareMountTargetsWithPagerGetAll() throws Throwable { + public void testListPrivatePathServiceGatewayEndpointGatewayBindingsWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"mount_targets\":[{\"access_control_mode\":\"security_group\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"id\":\"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"lifecycle_state\":\"stable\",\"mount_path\":\"10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e\",\"name\":\"my-share-mount-target\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"share_mount_target\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"transit_encryption\":\"none\",\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"mount_targets\":[{\"access_control_mode\":\"security_group\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"id\":\"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"lifecycle_state\":\"stable\",\"mount_path\":\"10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e\",\"name\":\"my-share-mount-target\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"share_mount_target\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"transit_encryption\":\"none\",\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"endpoint_gateway_bindings\":[{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"expiration_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/endpoint_gateway_bindings/r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0\",\"id\":\"r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0\",\"lifecycle_state\":\"stable\",\"resource_type\":\"private_path_service_gateway_endpoint_gateway_binding\",\"status\":\"abandoned\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"endpoint_gateway_bindings\":[{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"expiration_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/endpoint_gateway_bindings/r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0\",\"id\":\"r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0\",\"lifecycle_state\":\"stable\",\"resource_type\":\"private_path_service_gateway_endpoint_gateway_binding\",\"status\":\"abandoned\"}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -18737,447 +20481,318 @@ public void testListShareMountTargetsWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListShareMountTargetsOptions listShareMountTargetsOptions = new ListShareMountTargetsOptions.Builder() - .shareId("testString") - .name("my-name") + ListPrivatePathServiceGatewayEndpointGatewayBindingsOptions listPrivatePathServiceGatewayEndpointGatewayBindingsOptions = new ListPrivatePathServiceGatewayEndpointGatewayBindingsOptions.Builder() + .privatePathServiceGatewayId("testString") .limit(Long.valueOf("10")) + .status("abandoned") + .accountId("bb1b52262f7441a586f49068482f1e60") .build(); - ShareMountTargetsPager pager = new ShareMountTargetsPager(vpcService, listShareMountTargetsOptions); - List allResults = pager.getAll(); + PrivatePathServiceGatewayEndpointGatewayBindingsPager pager = new PrivatePathServiceGatewayEndpointGatewayBindingsPager(vpcService, listPrivatePathServiceGatewayEndpointGatewayBindingsOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the createShareMountTarget operation with a valid options model parameter + // Test the listPrivatePathServiceGateways operation with a valid options model parameter @Test - public void testCreateShareMountTargetWOptions() throws Throwable { + public void testListPrivatePathServiceGatewaysWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"access_control_mode\": \"security_group\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"lifecycle_state\": \"stable\", \"mount_path\": \"10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e\", \"name\": \"my-share-mount-target\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"share_mount_target\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"transit_encryption\": \"none\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String createShareMountTargetPath = "/shares/testString/mount_targets"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"private_path_service_gateways\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"default_access_policy\": \"deny\", \"endpoint_gateway_binding_auto_delete\": true, \"endpoint_gateway_binding_auto_delete_timeout\": 1, \"endpoint_gateway_count\": 0, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"id\": \"r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"lifecycle_state\": \"stable\", \"load_balancer\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"id\": \"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"name\": \"my-load-balancer\", \"resource_type\": \"load_balancer\"}, \"name\": \"my-private-path-service-gateway\", \"published\": false, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"private_path_service_gateway\", \"service_endpoints\": [\"*.example.com\"], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zonal_affinity\": false}], \"total_count\": 132}"; + String listPrivatePathServiceGatewaysPath = "/private_path_service_gateways"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext model - VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtualNetworkInterfaceIpPrototypeModel = new VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext.Builder() - .address("10.0.0.5") - .autoDelete(false) - .name("my-reserved-ip") - .build(); - - // Construct an instance of the VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model - VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext virtualNetworkInterfacePrimaryIpPrototypeModel = new VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext.Builder() - .address("10.0.0.5") - .autoDelete(false) - .name("my-reserved-ip") - .build(); - - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); - - // Construct an instance of the SecurityGroupIdentityById model - SecurityGroupIdentityById securityGroupIdentityModel = new SecurityGroupIdentityById.Builder() - .id("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") - .build(); - - // Construct an instance of the SubnetIdentityById model - SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() - .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") - .build(); - - // Construct an instance of the ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext model - ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext shareMountTargetVirtualNetworkInterfacePrototypeModel = new ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext.Builder() - .allowIpSpoofing(true) - .autoDelete(false) - .enableInfrastructureNat(true) - .ips(java.util.Arrays.asList(virtualNetworkInterfaceIpPrototypeModel)) - .name("my-virtual-network-interface") - .primaryIp(virtualNetworkInterfacePrimaryIpPrototypeModel) - .protocolStateFilteringMode("auto") - .resourceGroup(resourceGroupIdentityModel) - .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) - .subnet(subnetIdentityModel) - .build(); - - // Construct an instance of the ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup model - ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup shareMountTargetPrototypeModel = new ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.Builder() - .name("my-share-mount-target") - .transitEncryption("none") - .virtualNetworkInterface(shareMountTargetVirtualNetworkInterfacePrototypeModel) - .build(); - - // Construct an instance of the CreateShareMountTargetOptions model - CreateShareMountTargetOptions createShareMountTargetOptionsModel = new CreateShareMountTargetOptions.Builder() - .shareId("testString") - .shareMountTargetPrototype(shareMountTargetPrototypeModel) + // Construct an instance of the ListPrivatePathServiceGatewaysOptions model + ListPrivatePathServiceGatewaysOptions listPrivatePathServiceGatewaysOptionsModel = new ListPrivatePathServiceGatewaysOptions.Builder() + .start("testString") + .limit(Long.valueOf("10")) + .resourceGroupId("testString") .build(); - // Invoke createShareMountTarget() with a valid options model and verify the result - Response response = vpcService.createShareMountTarget(createShareMountTargetOptionsModel).execute(); + // Invoke listPrivatePathServiceGateways() with a valid options model and verify the result + Response response = vpcService.listPrivatePathServiceGateways(listPrivatePathServiceGatewaysOptionsModel).execute(); assertNotNull(response); - ShareMountTarget responseObj = response.getResult(); + PrivatePathServiceGatewayCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createShareMountTargetPath); + assertEquals(parsedPath, listPrivatePathServiceGatewaysPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("resource_group.id"), "testString"); } - // Test the createShareMountTarget operation with and without retries enabled + // Test the listPrivatePathServiceGateways operation with and without retries enabled @Test - public void testCreateShareMountTargetWRetries() throws Throwable { + public void testListPrivatePathServiceGatewaysWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateShareMountTargetWOptions(); + testListPrivatePathServiceGatewaysWOptions(); vpcService.disableRetries(); - testCreateShareMountTargetWOptions(); - } - - // Test the createShareMountTarget operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateShareMountTargetNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.createShareMountTarget(null).execute(); + testListPrivatePathServiceGatewaysWOptions(); } - // Test the deleteShareMountTarget operation with a valid options model parameter + // Test the listPrivatePathServiceGateways operation using the PrivatePathServiceGatewaysPager.getNext() method @Test - public void testDeleteShareMountTargetWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"access_control_mode\": \"security_group\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"lifecycle_state\": \"stable\", \"mount_path\": \"10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e\", \"name\": \"my-share-mount-target\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"share_mount_target\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"transit_encryption\": \"none\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String deleteShareMountTargetPath = "/shares/testString/mount_targets/testString"; + public void testListPrivatePathServiceGatewaysWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"private_path_service_gateways\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"default_access_policy\":\"deny\",\"endpoint_gateway_binding_auto_delete\":true,\"endpoint_gateway_binding_auto_delete_timeout\":1,\"endpoint_gateway_count\":0,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"id\":\"r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"lifecycle_state\":\"stable\",\"load_balancer\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"id\":\"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"name\":\"my-load-balancer\",\"resource_type\":\"load_balancer\"},\"name\":\"my-private-path-service-gateway\",\"published\":false,\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"private_path_service_gateway\",\"service_endpoints\":[\"*.example.com\"],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zonal_affinity\":false}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"private_path_service_gateways\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"default_access_policy\":\"deny\",\"endpoint_gateway_binding_auto_delete\":true,\"endpoint_gateway_binding_auto_delete_timeout\":1,\"endpoint_gateway_count\":0,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"id\":\"r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"lifecycle_state\":\"stable\",\"load_balancer\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"id\":\"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"name\":\"my-load-balancer\",\"resource_type\":\"load_balancer\"},\"name\":\"my-private-path-service-gateway\",\"published\":false,\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"private_path_service_gateway\",\"service_endpoints\":[\"*.example.com\"],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zonal_affinity\":false}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(202) - .setBody(mockResponseBody)); + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the DeleteShareMountTargetOptions model - DeleteShareMountTargetOptions deleteShareMountTargetOptionsModel = new DeleteShareMountTargetOptions.Builder() - .shareId("testString") - .id("testString") + ListPrivatePathServiceGatewaysOptions listPrivatePathServiceGatewaysOptions = new ListPrivatePathServiceGatewaysOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") .build(); - // Invoke deleteShareMountTarget() with a valid options model and verify the result - Response response = vpcService.deleteShareMountTarget(deleteShareMountTargetOptionsModel).execute(); - assertNotNull(response); - ShareMountTarget 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(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteShareMountTargetPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + List allResults = new ArrayList<>(); + PrivatePathServiceGatewaysPager pager = new PrivatePathServiceGatewaysPager(vpcService, listPrivatePathServiceGatewaysOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } - - // Test the deleteShareMountTarget operation with and without retries enabled + + // Test the listPrivatePathServiceGateways operation using the PrivatePathServiceGatewaysPager.getAll() method @Test - public void testDeleteShareMountTargetWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testDeleteShareMountTargetWOptions(); + public void testListPrivatePathServiceGatewaysWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"private_path_service_gateways\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"default_access_policy\":\"deny\",\"endpoint_gateway_binding_auto_delete\":true,\"endpoint_gateway_binding_auto_delete_timeout\":1,\"endpoint_gateway_count\":0,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"id\":\"r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"lifecycle_state\":\"stable\",\"load_balancer\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"id\":\"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"name\":\"my-load-balancer\",\"resource_type\":\"load_balancer\"},\"name\":\"my-private-path-service-gateway\",\"published\":false,\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"private_path_service_gateway\",\"service_endpoints\":[\"*.example.com\"],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zonal_affinity\":false}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"private_path_service_gateways\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"default_access_policy\":\"deny\",\"endpoint_gateway_binding_auto_delete\":true,\"endpoint_gateway_binding_auto_delete_timeout\":1,\"endpoint_gateway_count\":0,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"id\":\"r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"lifecycle_state\":\"stable\",\"load_balancer\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"id\":\"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"name\":\"my-load-balancer\",\"resource_type\":\"load_balancer\"},\"name\":\"my-private-path-service-gateway\",\"published\":false,\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"private_path_service_gateway\",\"service_endpoints\":[\"*.example.com\"],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zonal_affinity\":false}],\"total_count\":2,\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - vpcService.disableRetries(); - testDeleteShareMountTargetWOptions(); - } + ListPrivatePathServiceGatewaysOptions listPrivatePathServiceGatewaysOptions = new ListPrivatePathServiceGatewaysOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .build(); - // Test the deleteShareMountTarget operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteShareMountTargetNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.deleteShareMountTarget(null).execute(); + PrivatePathServiceGatewaysPager pager = new PrivatePathServiceGatewaysPager(vpcService, listPrivatePathServiceGatewaysOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); } - - // Test the getShareMountTarget operation with a valid options model parameter + + // Test the permitPrivatePathServiceGatewayEndpointGatewayBinding operation with a valid options model parameter @Test - public void testGetShareMountTargetWOptions() throws Throwable { + public void testPermitPrivatePathServiceGatewayEndpointGatewayBindingWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"access_control_mode\": \"security_group\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"lifecycle_state\": \"stable\", \"mount_path\": \"10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e\", \"name\": \"my-share-mount-target\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"share_mount_target\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"transit_encryption\": \"none\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String getShareMountTargetPath = "/shares/testString/mount_targets/testString"; + String mockResponseBody = ""; + String permitPrivatePathServiceGatewayEndpointGatewayBindingPath = "/private_path_service_gateways/testString/endpoint_gateway_bindings/testString/permit"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the GetShareMountTargetOptions model - GetShareMountTargetOptions getShareMountTargetOptionsModel = new GetShareMountTargetOptions.Builder() - .shareId("testString") + // Construct an instance of the PermitPrivatePathServiceGatewayEndpointGatewayBindingOptions model + PermitPrivatePathServiceGatewayEndpointGatewayBindingOptions permitPrivatePathServiceGatewayEndpointGatewayBindingOptionsModel = new PermitPrivatePathServiceGatewayEndpointGatewayBindingOptions.Builder() + .privatePathServiceGatewayId("testString") .id("testString") + .setAccountPolicy(true) .build(); - // Invoke getShareMountTarget() with a valid options model and verify the result - Response response = vpcService.getShareMountTarget(getShareMountTargetOptionsModel).execute(); + // Invoke permitPrivatePathServiceGatewayEndpointGatewayBinding() with a valid options model and verify the result + Response response = vpcService.permitPrivatePathServiceGatewayEndpointGatewayBinding(permitPrivatePathServiceGatewayEndpointGatewayBindingOptionsModel).execute(); assertNotNull(response); - ShareMountTarget responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getShareMountTargetPath); + assertEquals(parsedPath, permitPrivatePathServiceGatewayEndpointGatewayBindingPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getShareMountTarget operation with and without retries enabled + // Test the permitPrivatePathServiceGatewayEndpointGatewayBinding operation with and without retries enabled @Test - public void testGetShareMountTargetWRetries() throws Throwable { + public void testPermitPrivatePathServiceGatewayEndpointGatewayBindingWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetShareMountTargetWOptions(); + testPermitPrivatePathServiceGatewayEndpointGatewayBindingWOptions(); vpcService.disableRetries(); - testGetShareMountTargetWOptions(); + testPermitPrivatePathServiceGatewayEndpointGatewayBindingWOptions(); } - // Test the getShareMountTarget operation with a null options model (negative test) + // Test the permitPrivatePathServiceGatewayEndpointGatewayBinding operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetShareMountTargetNoOptions() throws Throwable { + public void testPermitPrivatePathServiceGatewayEndpointGatewayBindingNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getShareMountTarget(null).execute(); + vpcService.permitPrivatePathServiceGatewayEndpointGatewayBinding(null).execute(); } - // Test the updateShareMountTarget operation with a valid options model parameter + // Test the publishPrivatePathServiceGateway operation with a valid options model parameter @Test - public void testUpdateShareMountTargetWOptions() throws Throwable { + public void testPublishPrivatePathServiceGatewayWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"access_control_mode\": \"security_group\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"lifecycle_state\": \"stable\", \"mount_path\": \"10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e\", \"name\": \"my-share-mount-target\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"share_mount_target\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"transit_encryption\": \"none\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String updateShareMountTargetPath = "/shares/testString/mount_targets/testString"; + String mockResponseBody = ""; + String publishPrivatePathServiceGatewayPath = "/private_path_service_gateways/testString/publish"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the ShareMountTargetPatch model - ShareMountTargetPatch shareMountTargetPatchModel = new ShareMountTargetPatch.Builder() - .name("my-share-mount-target") - .build(); - Map shareMountTargetPatchModelAsPatch = shareMountTargetPatchModel.asPatch(); - - // Construct an instance of the UpdateShareMountTargetOptions model - UpdateShareMountTargetOptions updateShareMountTargetOptionsModel = new UpdateShareMountTargetOptions.Builder() - .shareId("testString") - .id("testString") - .shareMountTargetPatch(shareMountTargetPatchModelAsPatch) + // Construct an instance of the PublishPrivatePathServiceGatewayOptions model + PublishPrivatePathServiceGatewayOptions publishPrivatePathServiceGatewayOptionsModel = new PublishPrivatePathServiceGatewayOptions.Builder() + .privatePathServiceGatewayId("testString") .build(); - // Invoke updateShareMountTarget() with a valid options model and verify the result - Response response = vpcService.updateShareMountTarget(updateShareMountTargetOptionsModel).execute(); + // Invoke publishPrivatePathServiceGateway() with a valid options model and verify the result + Response response = vpcService.publishPrivatePathServiceGateway(publishPrivatePathServiceGatewayOptionsModel).execute(); assertNotNull(response); - ShareMountTarget responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateShareMountTargetPath); + assertEquals(parsedPath, publishPrivatePathServiceGatewayPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateShareMountTarget operation with and without retries enabled + // Test the publishPrivatePathServiceGateway operation with and without retries enabled @Test - public void testUpdateShareMountTargetWRetries() throws Throwable { + public void testPublishPrivatePathServiceGatewayWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateShareMountTargetWOptions(); + testPublishPrivatePathServiceGatewayWOptions(); vpcService.disableRetries(); - testUpdateShareMountTargetWOptions(); + testPublishPrivatePathServiceGatewayWOptions(); } - // Test the updateShareMountTarget operation with a null options model (negative test) + // Test the publishPrivatePathServiceGateway operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateShareMountTargetNoOptions() throws Throwable { + public void testPublishPrivatePathServiceGatewayNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateShareMountTarget(null).execute(); + vpcService.publishPrivatePathServiceGateway(null).execute(); } - // Test the listShareSnapshots operation with a valid options model parameter + // Test the revokeAccountForPrivatePathServiceGateway operation with a valid options model parameter @Test - public void testListShareSnapshotsWOptions() throws Throwable { + public void testRevokeAccountForPrivatePathServiceGatewayWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"snapshots\": [{\"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"captured_at\": \"2019-01-01T12:00:00.000Z\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"fingerprint\": \"7abc3aef-c2bc-4f65-a296-2928e534d498\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"id\": \"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"minimum_size\": 10, \"name\": \"my-share-snapshot\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"share_snapshot\", \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"user_tags\": [\"userTags\"], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"total_count\": 132}"; - String listShareSnapshotsPath = "/shares/testString/snapshots"; + String mockResponseBody = ""; + String revokeAccountForPrivatePathServiceGatewayPath = "/private_path_service_gateways/testString/revoke_account"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the ListShareSnapshotsOptions model - ListShareSnapshotsOptions listShareSnapshotsOptionsModel = new ListShareSnapshotsOptions.Builder() - .shareId("testString") - .backupPolicyPlanId("testString") - .name("my-name") - .start("testString") - .limit(Long.valueOf("10")) - .sort("name") + // Construct an instance of the AccountIdentityById model + AccountIdentityById accountIdentityModel = new AccountIdentityById.Builder() + .id("bb1b52262f7441a586f49068482f1e60") .build(); - // Invoke listShareSnapshots() with a valid options model and verify the result - Response response = vpcService.listShareSnapshots(listShareSnapshotsOptionsModel).execute(); + // Construct an instance of the RevokeAccountForPrivatePathServiceGatewayOptions model + RevokeAccountForPrivatePathServiceGatewayOptions revokeAccountForPrivatePathServiceGatewayOptionsModel = new RevokeAccountForPrivatePathServiceGatewayOptions.Builder() + .privatePathServiceGatewayId("testString") + .account(accountIdentityModel) + .build(); + + // Invoke revokeAccountForPrivatePathServiceGateway() with a valid options model and verify the result + Response response = vpcService.revokeAccountForPrivatePathServiceGateway(revokeAccountForPrivatePathServiceGatewayOptionsModel).execute(); assertNotNull(response); - ShareSnapshotCollection responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listShareSnapshotsPath); + assertEquals(parsedPath, revokeAccountForPrivatePathServiceGatewayPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("backup_policy_plan.id"), "testString"); - assertEquals(query.get("name"), "my-name"); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("sort"), "name"); - } - - // Test the listShareSnapshots operation with and without retries enabled - @Test - public void testListShareSnapshotsWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testListShareSnapshotsWOptions(); - - vpcService.disableRetries(); - testListShareSnapshotsWOptions(); - } - - // Test the listShareSnapshots operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListShareSnapshotsNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.listShareSnapshots(null).execute(); } - // Test the listShareSnapshots operation using the ShareSnapshotsPager.getNext() method - @Test - public void testListShareSnapshotsWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"snapshots\":[{\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"captured_at\":\"2019-01-01T12:00:00.000Z\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"fingerprint\":\"7abc3aef-c2bc-4f65-a296-2928e534d498\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"id\":\"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"minimum_size\":10,\"name\":\"my-share-snapshot\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"share_snapshot\",\"status\":\"available\",\"status_reasons\":[{\"code\":\"encryption_key_deleted\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"user_tags\":[\"userTags\"],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"snapshots\":[{\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"captured_at\":\"2019-01-01T12:00:00.000Z\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"fingerprint\":\"7abc3aef-c2bc-4f65-a296-2928e534d498\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"id\":\"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"minimum_size\":10,\"name\":\"my-share-snapshot\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"share_snapshot\",\"status\":\"available\",\"status_reasons\":[{\"code\":\"encryption_key_deleted\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"user_tags\":[\"userTags\"],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListShareSnapshotsOptions listShareSnapshotsOptions = new ListShareSnapshotsOptions.Builder() - .shareId("testString") - .backupPolicyPlanId("testString") - .name("my-name") - .limit(Long.valueOf("10")) - .sort("name") - .build(); - - List allResults = new ArrayList<>(); - ShareSnapshotsPager pager = new ShareSnapshotsPager(vpcService, listShareSnapshotsOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); - } - - // Test the listShareSnapshots operation using the ShareSnapshotsPager.getAll() method + // Test the revokeAccountForPrivatePathServiceGateway operation with and without retries enabled @Test - public void testListShareSnapshotsWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"snapshots\":[{\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"captured_at\":\"2019-01-01T12:00:00.000Z\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"fingerprint\":\"7abc3aef-c2bc-4f65-a296-2928e534d498\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"id\":\"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"minimum_size\":10,\"name\":\"my-share-snapshot\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"share_snapshot\",\"status\":\"available\",\"status_reasons\":[{\"code\":\"encryption_key_deleted\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"user_tags\":[\"userTags\"],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"snapshots\":[{\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"captured_at\":\"2019-01-01T12:00:00.000Z\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"fingerprint\":\"7abc3aef-c2bc-4f65-a296-2928e534d498\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"id\":\"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"minimum_size\":10,\"name\":\"my-share-snapshot\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"share_snapshot\",\"status\":\"available\",\"status_reasons\":[{\"code\":\"encryption_key_deleted\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"user_tags\":[\"userTags\"],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListShareSnapshotsOptions listShareSnapshotsOptions = new ListShareSnapshotsOptions.Builder() - .shareId("testString") - .backupPolicyPlanId("testString") - .name("my-name") - .limit(Long.valueOf("10")) - .sort("name") - .build(); + public void testRevokeAccountForPrivatePathServiceGatewayWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testRevokeAccountForPrivatePathServiceGatewayWOptions(); - ShareSnapshotsPager pager = new ShareSnapshotsPager(vpcService, listShareSnapshotsOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); + vpcService.disableRetries(); + testRevokeAccountForPrivatePathServiceGatewayWOptions(); } - - // Test the createShareSnapshot operation with a valid options model parameter + + // Test the revokeAccountForPrivatePathServiceGateway operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testRevokeAccountForPrivatePathServiceGatewayNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.revokeAccountForPrivatePathServiceGateway(null).execute(); + } + + // Test the unpublishPrivatePathServiceGateway operation with a valid options model parameter @Test - public void testCreateShareSnapshotWOptions() throws Throwable { + public void testUnpublishPrivatePathServiceGatewayWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"captured_at\": \"2019-01-01T12:00:00.000Z\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"fingerprint\": \"7abc3aef-c2bc-4f65-a296-2928e534d498\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"id\": \"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"minimum_size\": 10, \"name\": \"my-share-snapshot\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"share_snapshot\", \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"user_tags\": [\"userTags\"], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String createShareSnapshotPath = "/shares/testString/snapshots"; + String mockResponseBody = ""; + String unpublishPrivatePathServiceGatewayPath = "/private_path_service_gateways/testString/unpublish"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the CreateShareSnapshotOptions model - CreateShareSnapshotOptions createShareSnapshotOptionsModel = new CreateShareSnapshotOptions.Builder() - .shareId("testString") - .name("my-share-snapshot") - .userTags(java.util.Arrays.asList("testString")) + // Construct an instance of the UnpublishPrivatePathServiceGatewayOptions model + UnpublishPrivatePathServiceGatewayOptions unpublishPrivatePathServiceGatewayOptionsModel = new UnpublishPrivatePathServiceGatewayOptions.Builder() + .privatePathServiceGatewayId("testString") .build(); - // Invoke createShareSnapshot() with a valid options model and verify the result - Response response = vpcService.createShareSnapshot(createShareSnapshotOptionsModel).execute(); + // Invoke unpublishPrivatePathServiceGateway() with a valid options model and verify the result + Response response = vpcService.unpublishPrivatePathServiceGateway(unpublishPrivatePathServiceGatewayOptionsModel).execute(); assertNotNull(response); - ShareSnapshot responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); @@ -19185,221 +20800,258 @@ public void testCreateShareSnapshotWOptions() throws Throwable { assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createShareSnapshotPath); + assertEquals(parsedPath, unpublishPrivatePathServiceGatewayPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createShareSnapshot operation with and without retries enabled + // Test the unpublishPrivatePathServiceGateway operation with and without retries enabled @Test - public void testCreateShareSnapshotWRetries() throws Throwable { + public void testUnpublishPrivatePathServiceGatewayWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateShareSnapshotWOptions(); + testUnpublishPrivatePathServiceGatewayWOptions(); vpcService.disableRetries(); - testCreateShareSnapshotWOptions(); + testUnpublishPrivatePathServiceGatewayWOptions(); } - // Test the createShareSnapshot operation with a null options model (negative test) + // Test the unpublishPrivatePathServiceGateway operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateShareSnapshotNoOptions() throws Throwable { + public void testUnpublishPrivatePathServiceGatewayNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createShareSnapshot(null).execute(); + vpcService.unpublishPrivatePathServiceGateway(null).execute(); } - // Test the deleteShareSnapshot operation with a valid options model parameter + // Test the updatePrivatePathServiceGateway operation with a valid options model parameter @Test - public void testDeleteShareSnapshotWOptions() throws Throwable { + public void testUpdatePrivatePathServiceGatewayWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"captured_at\": \"2019-01-01T12:00:00.000Z\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"fingerprint\": \"7abc3aef-c2bc-4f65-a296-2928e534d498\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"id\": \"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"minimum_size\": 10, \"name\": \"my-share-snapshot\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"share_snapshot\", \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"user_tags\": [\"userTags\"], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String deleteShareSnapshotPath = "/shares/testString/snapshots/testString"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"default_access_policy\": \"deny\", \"endpoint_gateway_binding_auto_delete\": true, \"endpoint_gateway_binding_auto_delete_timeout\": 1, \"endpoint_gateway_count\": 0, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"id\": \"r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"lifecycle_state\": \"stable\", \"load_balancer\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"id\": \"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"name\": \"my-load-balancer\", \"resource_type\": \"load_balancer\"}, \"name\": \"my-private-path-service-gateway\", \"published\": false, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"private_path_service_gateway\", \"service_endpoints\": [\"*.example.com\"], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zonal_affinity\": false}"; + String updatePrivatePathServiceGatewayPath = "/private_path_service_gateways/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(202) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteShareSnapshotOptions model - DeleteShareSnapshotOptions deleteShareSnapshotOptionsModel = new DeleteShareSnapshotOptions.Builder() - .shareId("testString") + // Construct an instance of the LoadBalancerIdentityById model + LoadBalancerIdentityById loadBalancerIdentityModel = new LoadBalancerIdentityById.Builder() + .id("r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + .build(); + + // Construct an instance of the PrivatePathServiceGatewayPatch model + PrivatePathServiceGatewayPatch privatePathServiceGatewayPatchModel = new PrivatePathServiceGatewayPatch.Builder() + .defaultAccessPolicy("deny") + .loadBalancer(loadBalancerIdentityModel) + .name("my-private-path-service-gateway") + .zonalAffinity(true) + .build(); + Map privatePathServiceGatewayPatchModelAsPatch = privatePathServiceGatewayPatchModel.asPatch(); + + // Construct an instance of the UpdatePrivatePathServiceGatewayOptions model + UpdatePrivatePathServiceGatewayOptions updatePrivatePathServiceGatewayOptionsModel = new UpdatePrivatePathServiceGatewayOptions.Builder() .id("testString") + .privatePathServiceGatewayPatch(privatePathServiceGatewayPatchModelAsPatch) .build(); - // Invoke deleteShareSnapshot() with a valid options model and verify the result - Response response = vpcService.deleteShareSnapshot(deleteShareSnapshotOptionsModel).execute(); + // Invoke updatePrivatePathServiceGateway() with a valid options model and verify the result + Response response = vpcService.updatePrivatePathServiceGateway(updatePrivatePathServiceGatewayOptionsModel).execute(); assertNotNull(response); - ShareSnapshot responseObj = response.getResult(); + PrivatePathServiceGateway 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(), "DELETE"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteShareSnapshotPath); + assertEquals(parsedPath, updatePrivatePathServiceGatewayPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteShareSnapshot operation with and without retries enabled + // Test the updatePrivatePathServiceGateway operation with and without retries enabled @Test - public void testDeleteShareSnapshotWRetries() throws Throwable { + public void testUpdatePrivatePathServiceGatewayWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteShareSnapshotWOptions(); + testUpdatePrivatePathServiceGatewayWOptions(); vpcService.disableRetries(); - testDeleteShareSnapshotWOptions(); + testUpdatePrivatePathServiceGatewayWOptions(); } - // Test the deleteShareSnapshot operation with a null options model (negative test) + // Test the updatePrivatePathServiceGateway operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteShareSnapshotNoOptions() throws Throwable { + public void testUpdatePrivatePathServiceGatewayNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteShareSnapshot(null).execute(); + vpcService.updatePrivatePathServiceGateway(null).execute(); } - // Test the getShareSnapshot operation with a valid options model parameter + // Test the updatePrivatePathServiceGatewayAccountPolicy operation with a valid options model parameter @Test - public void testGetShareSnapshotWOptions() throws Throwable { + public void testUpdatePrivatePathServiceGatewayAccountPolicyWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"captured_at\": \"2019-01-01T12:00:00.000Z\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"fingerprint\": \"7abc3aef-c2bc-4f65-a296-2928e534d498\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"id\": \"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"minimum_size\": 10, \"name\": \"my-share-snapshot\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"share_snapshot\", \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"user_tags\": [\"userTags\"], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String getShareSnapshotPath = "/shares/testString/snapshots/testString"; + String mockResponseBody = "{\"access_policy\": \"deny\", \"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c\", \"id\": \"r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"resource_type\": \"private_path_service_gateway_account_policy\"}"; + String updatePrivatePathServiceGatewayAccountPolicyPath = "/private_path_service_gateways/testString/account_policies/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetShareSnapshotOptions model - GetShareSnapshotOptions getShareSnapshotOptionsModel = new GetShareSnapshotOptions.Builder() - .shareId("testString") + // Construct an instance of the PrivatePathServiceGatewayAccountPolicyPatch model + PrivatePathServiceGatewayAccountPolicyPatch privatePathServiceGatewayAccountPolicyPatchModel = new PrivatePathServiceGatewayAccountPolicyPatch.Builder() + .accessPolicy("review") + .build(); + Map privatePathServiceGatewayAccountPolicyPatchModelAsPatch = privatePathServiceGatewayAccountPolicyPatchModel.asPatch(); + + // Construct an instance of the UpdatePrivatePathServiceGatewayAccountPolicyOptions model + UpdatePrivatePathServiceGatewayAccountPolicyOptions updatePrivatePathServiceGatewayAccountPolicyOptionsModel = new UpdatePrivatePathServiceGatewayAccountPolicyOptions.Builder() + .privatePathServiceGatewayId("testString") .id("testString") + .privatePathServiceGatewayAccountPolicyPatch(privatePathServiceGatewayAccountPolicyPatchModelAsPatch) .build(); - // Invoke getShareSnapshot() with a valid options model and verify the result - Response response = vpcService.getShareSnapshot(getShareSnapshotOptionsModel).execute(); + // Invoke updatePrivatePathServiceGatewayAccountPolicy() with a valid options model and verify the result + Response response = vpcService.updatePrivatePathServiceGatewayAccountPolicy(updatePrivatePathServiceGatewayAccountPolicyOptionsModel).execute(); assertNotNull(response); - ShareSnapshot responseObj = response.getResult(); + PrivatePathServiceGatewayAccountPolicy responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getShareSnapshotPath); + assertEquals(parsedPath, updatePrivatePathServiceGatewayAccountPolicyPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getShareSnapshot operation with and without retries enabled + // Test the updatePrivatePathServiceGatewayAccountPolicy operation with and without retries enabled @Test - public void testGetShareSnapshotWRetries() throws Throwable { + public void testUpdatePrivatePathServiceGatewayAccountPolicyWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetShareSnapshotWOptions(); + testUpdatePrivatePathServiceGatewayAccountPolicyWOptions(); vpcService.disableRetries(); - testGetShareSnapshotWOptions(); + testUpdatePrivatePathServiceGatewayAccountPolicyWOptions(); } - // Test the getShareSnapshot operation with a null options model (negative test) + // Test the updatePrivatePathServiceGatewayAccountPolicy operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetShareSnapshotNoOptions() throws Throwable { + public void testUpdatePrivatePathServiceGatewayAccountPolicyNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getShareSnapshot(null).execute(); + vpcService.updatePrivatePathServiceGatewayAccountPolicy(null).execute(); } - // Test the updateShareSnapshot operation with a valid options model parameter + // Test the createPublicAddressRange operation with a valid options model parameter @Test - public void testUpdateShareSnapshotWOptions() throws Throwable { + public void testCreatePublicAddressRangeWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"captured_at\": \"2019-01-01T12:00:00.000Z\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"fingerprint\": \"7abc3aef-c2bc-4f65-a296-2928e534d498\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"id\": \"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"minimum_size\": 10, \"name\": \"my-share-snapshot\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"share_snapshot\", \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"user_tags\": [\"userTags\"], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String updateShareSnapshotPath = "/shares/testString/snapshots/testString"; + String mockResponseBody = "{\"cidr\": \"192.168.3.0/24\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"id\": \"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"ipv4_address_count\": 8, \"lifecycle_state\": \"stable\", \"name\": \"my-public-address-range\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"public_address_range\", \"target\": {\"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}}"; + String createPublicAddressRangePath = "/public_address_ranges"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the ShareSnapshotPatch model - ShareSnapshotPatch shareSnapshotPatchModel = new ShareSnapshotPatch.Builder() - .userTags(java.util.Arrays.asList("testString")) + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") .build(); - Map shareSnapshotPatchModelAsPatch = shareSnapshotPatchModel.asPatch(); - // Construct an instance of the UpdateShareSnapshotOptions model - UpdateShareSnapshotOptions updateShareSnapshotOptionsModel = new UpdateShareSnapshotOptions.Builder() - .shareId("testString") - .id("testString") - .shareSnapshotPatch(shareSnapshotPatchModelAsPatch) - .ifMatch("W/96d225c4-56bd-43d9-98fc-d7148e5c5028") + // Construct an instance of the VPCIdentityById model + VPCIdentityById vpcIdentityModel = new VPCIdentityById.Builder() + .id("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") .build(); - // Invoke updateShareSnapshot() with a valid options model and verify the result - Response response = vpcService.updateShareSnapshot(updateShareSnapshotOptionsModel).execute(); + // Construct an instance of the ZoneIdentityByName model + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() + .name("us-south-1") + .build(); + + // Construct an instance of the PublicAddressRangeTargetPrototype model + PublicAddressRangeTargetPrototype publicAddressRangeTargetPrototypeModel = new PublicAddressRangeTargetPrototype.Builder() + .vpc(vpcIdentityModel) + .zone(zoneIdentityModel) + .build(); + + // Construct an instance of the CreatePublicAddressRangeOptions model + CreatePublicAddressRangeOptions createPublicAddressRangeOptionsModel = new CreatePublicAddressRangeOptions.Builder() + .ipv4AddressCount(Long.valueOf("8")) + .name("my-public-address-range") + .resourceGroup(resourceGroupIdentityModel) + .target(publicAddressRangeTargetPrototypeModel) + .build(); + + // Invoke createPublicAddressRange() with a valid options model and verify the result + Response response = vpcService.createPublicAddressRange(createPublicAddressRangeOptionsModel).execute(); assertNotNull(response); - ShareSnapshot responseObj = response.getResult(); + PublicAddressRange responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateShareSnapshotPath); + assertEquals(parsedPath, createPublicAddressRangePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateShareSnapshot operation with and without retries enabled + // Test the createPublicAddressRange operation with and without retries enabled @Test - public void testUpdateShareSnapshotWRetries() throws Throwable { + public void testCreatePublicAddressRangeWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateShareSnapshotWOptions(); + testCreatePublicAddressRangeWOptions(); vpcService.disableRetries(); - testUpdateShareSnapshotWOptions(); + testCreatePublicAddressRangeWOptions(); } - // Test the updateShareSnapshot operation with a null options model (negative test) + // Test the createPublicAddressRange operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateShareSnapshotNoOptions() throws Throwable { + public void testCreatePublicAddressRangeNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateShareSnapshot(null).execute(); + vpcService.createPublicAddressRange(null).execute(); } - // Test the deleteShareSource operation with a valid options model parameter + // Test the deletePublicAddressRange operation with a valid options model parameter @Test - public void testDeleteShareSourceWOptions() throws Throwable { + public void testDeletePublicAddressRangeWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteShareSourcePath = "/shares/testString/source"; + String mockResponseBody = "{\"cidr\": \"192.168.3.0/24\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"id\": \"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"ipv4_address_count\": 8, \"lifecycle_state\": \"stable\", \"name\": \"my-public-address-range\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"public_address_range\", \"target\": {\"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}}"; + String deletePublicAddressRangePath = "/public_address_ranges/testString"; server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the DeleteShareSourceOptions model - DeleteShareSourceOptions deleteShareSourceOptionsModel = new DeleteShareSourceOptions.Builder() - .shareId("testString") + // Construct an instance of the DeletePublicAddressRangeOptions model + DeletePublicAddressRangeOptions deletePublicAddressRangeOptionsModel = new DeletePublicAddressRangeOptions.Builder() + .id("testString") .build(); - // Invoke deleteShareSource() with a valid options model and verify the result - Response response = vpcService.deleteShareSource(deleteShareSourceOptionsModel).execute(); + // Invoke deletePublicAddressRange() with a valid options model and verify the result + Response response = vpcService.deletePublicAddressRange(deletePublicAddressRangeOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + PublicAddressRange responseObj = response.getResult(); + assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); @@ -19407,51 +21059,51 @@ public void testDeleteShareSourceWOptions() throws Throwable { assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteShareSourcePath); + assertEquals(parsedPath, deletePublicAddressRangePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteShareSource operation with and without retries enabled + // Test the deletePublicAddressRange operation with and without retries enabled @Test - public void testDeleteShareSourceWRetries() throws Throwable { + public void testDeletePublicAddressRangeWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteShareSourceWOptions(); + testDeletePublicAddressRangeWOptions(); vpcService.disableRetries(); - testDeleteShareSourceWOptions(); + testDeletePublicAddressRangeWOptions(); } - // Test the deleteShareSource operation with a null options model (negative test) + // Test the deletePublicAddressRange operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteShareSourceNoOptions() throws Throwable { + public void testDeletePublicAddressRangeNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteShareSource(null).execute(); + vpcService.deletePublicAddressRange(null).execute(); } - // Test the getShareSource operation with a valid options model parameter + // Test the getPublicAddressRange operation with a valid options model parameter @Test - public void testGetShareSourceWOptions() throws Throwable { + public void testGetPublicAddressRangeWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}"; - String getShareSourcePath = "/shares/testString/source"; + String mockResponseBody = "{\"cidr\": \"192.168.3.0/24\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"id\": \"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"ipv4_address_count\": 8, \"lifecycle_state\": \"stable\", \"name\": \"my-public-address-range\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"public_address_range\", \"target\": {\"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}}"; + String getPublicAddressRangePath = "/public_address_ranges/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetShareSourceOptions model - GetShareSourceOptions getShareSourceOptionsModel = new GetShareSourceOptions.Builder() - .shareId("testString") + // Construct an instance of the GetPublicAddressRangeOptions model + GetPublicAddressRangeOptions getPublicAddressRangeOptionsModel = new GetPublicAddressRangeOptions.Builder() + .id("testString") .build(); - // Invoke getShareSource() with a valid options model and verify the result - Response response = vpcService.getShareSource(getShareSourceOptionsModel).execute(); + // Invoke getPublicAddressRange() with a valid options model and verify the result + Response response = vpcService.getPublicAddressRange(getPublicAddressRangeOptionsModel).execute(); assertNotNull(response); - ShareReference responseObj = response.getResult(); + PublicAddressRange responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -19460,55 +21112,53 @@ public void testGetShareSourceWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getShareSourcePath); + assertEquals(parsedPath, getPublicAddressRangePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getShareSource operation with and without retries enabled + // Test the getPublicAddressRange operation with and without retries enabled @Test - public void testGetShareSourceWRetries() throws Throwable { + public void testGetPublicAddressRangeWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetShareSourceWOptions(); + testGetPublicAddressRangeWOptions(); vpcService.disableRetries(); - testGetShareSourceWOptions(); + testGetPublicAddressRangeWOptions(); } - // Test the getShareSource operation with a null options model (negative test) + // Test the getPublicAddressRange operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetShareSourceNoOptions() throws Throwable { + public void testGetPublicAddressRangeNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getShareSource(null).execute(); + vpcService.getPublicAddressRange(null).execute(); } - // Test the listBackupPolicies operation with a valid options model parameter + // Test the listPublicAddressRanges operation with a valid options model parameter @Test - public void testListBackupPoliciesWOptions() throws Throwable { + public void testListPublicAddressRangesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"backup_policies\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"health_reasons\": [{\"code\": \"missing_service_authorization_policies\", \"message\": \"One or more accounts are missing service authorization policies\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"id\": \"r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"last_job_completed_at\": \"2019-01-01T12:00:00.000Z\", \"lifecycle_state\": \"stable\", \"match_user_tags\": [\"matchUserTags\"], \"name\": \"my-backup-policy\", \"plans\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"backup_policy\", \"scope\": {\"crn\": \"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce\", \"id\": \"ebc2b430240943458b9e91e1432cfcce\", \"resource_type\": \"enterprise\"}, \"included_content\": [\"data_volumes\"], \"match_resource_type\": \"instance\"}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listBackupPoliciesPath = "/backup_policies"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"public_address_ranges\": [{\"cidr\": \"192.168.3.0/24\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"id\": \"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"ipv4_address_count\": 8, \"lifecycle_state\": \"stable\", \"name\": \"my-public-address-range\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"public_address_range\", \"target\": {\"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}}], \"total_count\": 132}"; + String listPublicAddressRangesPath = "/public_address_ranges"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListBackupPoliciesOptions model - ListBackupPoliciesOptions listBackupPoliciesOptionsModel = new ListBackupPoliciesOptions.Builder() + // Construct an instance of the ListPublicAddressRangesOptions model + ListPublicAddressRangesOptions listPublicAddressRangesOptionsModel = new ListPublicAddressRangesOptions.Builder() .start("testString") .limit(Long.valueOf("10")) .resourceGroupId("testString") - .name("my-name") - .tag("testString") .build(); - // Invoke listBackupPolicies() with a valid options model and verify the result - Response response = vpcService.listBackupPolicies(listBackupPoliciesOptionsModel).execute(); + // Invoke listPublicAddressRanges() with a valid options model and verify the result + Response response = vpcService.listPublicAddressRanges(listPublicAddressRangesOptionsModel).execute(); assertNotNull(response); - BackupPolicyCollection responseObj = response.getResult(); + PublicAddressRangeCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -19517,35 +21167,33 @@ public void testListBackupPoliciesWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listBackupPoliciesPath); + assertEquals(parsedPath, listPublicAddressRangesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); assertEquals(query.get("resource_group.id"), "testString"); - assertEquals(query.get("name"), "my-name"); - assertEquals(query.get("tag"), "testString"); } - // Test the listBackupPolicies operation with and without retries enabled + // Test the listPublicAddressRanges operation with and without retries enabled @Test - public void testListBackupPoliciesWRetries() throws Throwable { + public void testListPublicAddressRangesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListBackupPoliciesWOptions(); + testListPublicAddressRangesWOptions(); vpcService.disableRetries(); - testListBackupPoliciesWOptions(); + testListPublicAddressRangesWOptions(); } - // Test the listBackupPolicies operation using the BackupPoliciesPager.getNext() method + // Test the listPublicAddressRanges operation using the PublicAddressRangesPager.getNext() method @Test - public void testListBackupPoliciesWithPagerGetNext() throws Throwable { + public void testListPublicAddressRangesWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"backup_policies\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6\",\"health_reasons\":[{\"code\":\"missing_service_authorization_policies\",\"message\":\"One or more accounts are missing service authorization policies\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6\",\"id\":\"r006-076191ba-49c2-4763-94fd-c70de73ee2e6\",\"last_job_completed_at\":\"2019-01-01T12:00:00.000Z\",\"lifecycle_state\":\"stable\",\"match_user_tags\":[\"matchUserTags\"],\"name\":\"my-backup-policy\",\"plans\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"backup_policy\",\"scope\":{\"crn\":\"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce\",\"id\":\"ebc2b430240943458b9e91e1432cfcce\",\"resource_type\":\"enterprise\"},\"included_content\":[\"data_volumes\"],\"match_resource_type\":\"instance\"}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"backup_policies\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6\",\"health_reasons\":[{\"code\":\"missing_service_authorization_policies\",\"message\":\"One or more accounts are missing service authorization policies\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6\",\"id\":\"r006-076191ba-49c2-4763-94fd-c70de73ee2e6\",\"last_job_completed_at\":\"2019-01-01T12:00:00.000Z\",\"lifecycle_state\":\"stable\",\"match_user_tags\":[\"matchUserTags\"],\"name\":\"my-backup-policy\",\"plans\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"backup_policy\",\"scope\":{\"crn\":\"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce\",\"id\":\"ebc2b430240943458b9e91e1432cfcce\",\"resource_type\":\"enterprise\"},\"included_content\":[\"data_volumes\"],\"match_resource_type\":\"instance\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"public_address_ranges\":[{\"cidr\":\"192.168.3.0/24\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"id\":\"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"ipv4_address_count\":8,\"lifecycle_state\":\"stable\",\"name\":\"my-public-address-range\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"public_address_range\",\"target\":{\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"public_address_ranges\":[{\"cidr\":\"192.168.3.0/24\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"id\":\"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"ipv4_address_count\":8,\"lifecycle_state\":\"stable\",\"name\":\"my-public-address-range\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"public_address_range\",\"target\":{\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -19559,29 +21207,27 @@ public void testListBackupPoliciesWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListBackupPoliciesOptions listBackupPoliciesOptions = new ListBackupPoliciesOptions.Builder() + ListPublicAddressRangesOptions listPublicAddressRangesOptions = new ListPublicAddressRangesOptions.Builder() .limit(Long.valueOf("10")) .resourceGroupId("testString") - .name("my-name") - .tag("testString") .build(); - List allResults = new ArrayList<>(); - BackupPoliciesPager pager = new BackupPoliciesPager(vpcService, listBackupPoliciesOptions); + List allResults = new ArrayList<>(); + PublicAddressRangesPager pager = new PublicAddressRangesPager(vpcService, listPublicAddressRangesOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listBackupPolicies operation using the BackupPoliciesPager.getAll() method + // Test the listPublicAddressRanges operation using the PublicAddressRangesPager.getAll() method @Test - public void testListBackupPoliciesWithPagerGetAll() throws Throwable { + public void testListPublicAddressRangesWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"backup_policies\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6\",\"health_reasons\":[{\"code\":\"missing_service_authorization_policies\",\"message\":\"One or more accounts are missing service authorization policies\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6\",\"id\":\"r006-076191ba-49c2-4763-94fd-c70de73ee2e6\",\"last_job_completed_at\":\"2019-01-01T12:00:00.000Z\",\"lifecycle_state\":\"stable\",\"match_user_tags\":[\"matchUserTags\"],\"name\":\"my-backup-policy\",\"plans\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"backup_policy\",\"scope\":{\"crn\":\"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce\",\"id\":\"ebc2b430240943458b9e91e1432cfcce\",\"resource_type\":\"enterprise\"},\"included_content\":[\"data_volumes\"],\"match_resource_type\":\"instance\"}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"backup_policies\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6\",\"health_reasons\":[{\"code\":\"missing_service_authorization_policies\",\"message\":\"One or more accounts are missing service authorization policies\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6\",\"id\":\"r006-076191ba-49c2-4763-94fd-c70de73ee2e6\",\"last_job_completed_at\":\"2019-01-01T12:00:00.000Z\",\"lifecycle_state\":\"stable\",\"match_user_tags\":[\"matchUserTags\"],\"name\":\"my-backup-policy\",\"plans\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"backup_policy\",\"scope\":{\"crn\":\"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce\",\"id\":\"ebc2b430240943458b9e91e1432cfcce\",\"resource_type\":\"enterprise\"},\"included_content\":[\"data_volumes\"],\"match_resource_type\":\"instance\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"public_address_ranges\":[{\"cidr\":\"192.168.3.0/24\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"id\":\"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"ipv4_address_count\":8,\"lifecycle_state\":\"stable\",\"name\":\"my-public-address-range\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"public_address_range\",\"target\":{\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"public_address_ranges\":[{\"cidr\":\"192.168.3.0/24\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"id\":\"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"ipv4_address_count\":8,\"lifecycle_state\":\"stable\",\"name\":\"my-public-address-range\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"public_address_range\",\"target\":{\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -19595,166 +21241,298 @@ public void testListBackupPoliciesWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListBackupPoliciesOptions listBackupPoliciesOptions = new ListBackupPoliciesOptions.Builder() + ListPublicAddressRangesOptions listPublicAddressRangesOptions = new ListPublicAddressRangesOptions.Builder() .limit(Long.valueOf("10")) .resourceGroupId("testString") - .name("my-name") - .tag("testString") .build(); - BackupPoliciesPager pager = new BackupPoliciesPager(vpcService, listBackupPoliciesOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); + PublicAddressRangesPager pager = new PublicAddressRangesPager(vpcService, listPublicAddressRangesOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); + } + + // Test the updatePublicAddressRange operation with a valid options model parameter + @Test + public void testUpdatePublicAddressRangeWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"cidr\": \"192.168.3.0/24\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"id\": \"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"ipv4_address_count\": 8, \"lifecycle_state\": \"stable\", \"name\": \"my-public-address-range\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"public_address_range\", \"target\": {\"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}}"; + String updatePublicAddressRangePath = "/public_address_ranges/testString"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the VPCIdentityById model + VPCIdentityById vpcIdentityModel = new VPCIdentityById.Builder() + .id("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .build(); + + // Construct an instance of the ZoneIdentityByName model + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() + .name("us-south-1") + .build(); + + // Construct an instance of the PublicAddressRangeTargetPatch model + PublicAddressRangeTargetPatch publicAddressRangeTargetPatchModel = new PublicAddressRangeTargetPatch.Builder() + .vpc(vpcIdentityModel) + .zone(zoneIdentityModel) + .build(); + + // Construct an instance of the PublicAddressRangePatch model + PublicAddressRangePatch publicAddressRangePatchModel = new PublicAddressRangePatch.Builder() + .name("my-public-address-range-updated") + .target(publicAddressRangeTargetPatchModel) + .build(); + Map publicAddressRangePatchModelAsPatch = publicAddressRangePatchModel.asPatch(); + + // Construct an instance of the UpdatePublicAddressRangeOptions model + UpdatePublicAddressRangeOptions updatePublicAddressRangeOptionsModel = new UpdatePublicAddressRangeOptions.Builder() + .id("testString") + .publicAddressRangePatch(publicAddressRangePatchModelAsPatch) + .build(); + + // Invoke updatePublicAddressRange() with a valid options model and verify the result + Response response = vpcService.updatePublicAddressRange(updatePublicAddressRangeOptionsModel).execute(); + assertNotNull(response); + PublicAddressRange responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "PATCH"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, updatePublicAddressRangePath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the updatePublicAddressRange operation with and without retries enabled + @Test + public void testUpdatePublicAddressRangeWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testUpdatePublicAddressRangeWOptions(); + + vpcService.disableRetries(); + testUpdatePublicAddressRangeWOptions(); + } + + // Test the updatePublicAddressRange operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testUpdatePublicAddressRangeNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.updatePublicAddressRange(null).execute(); + } + + // Test the createPublicGateway operation with a valid options model parameter + @Test + public void testCreatePublicGatewayWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"floating_ip\": {\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"id\": \"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"name\": \"my-public-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"public_gateway\", \"status\": \"available\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String createPublicGatewayPath = "/public_gateways"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(201) + .setBody(mockResponseBody)); + + // Construct an instance of the VPCIdentityById model + VPCIdentityById vpcIdentityModel = new VPCIdentityById.Builder() + .id("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .build(); + + // Construct an instance of the ZoneIdentityByName model + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() + .name("us-south-1") + .build(); + + // Construct an instance of the PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById model + PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById publicGatewayFloatingIpPrototypeModel = new PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById.Builder() + .id("r006-f45e0d90-12a8-4460-8210-290ff2ab75cd") + .build(); + + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") + .build(); + + // Construct an instance of the CreatePublicGatewayOptions model + CreatePublicGatewayOptions createPublicGatewayOptionsModel = new CreatePublicGatewayOptions.Builder() + .vpc(vpcIdentityModel) + .zone(zoneIdentityModel) + .floatingIp(publicGatewayFloatingIpPrototypeModel) + .name("my-public-gateway") + .resourceGroup(resourceGroupIdentityModel) + .build(); + + // Invoke createPublicGateway() with a valid options model and verify the result + Response response = vpcService.createPublicGateway(createPublicGatewayOptionsModel).execute(); + assertNotNull(response); + PublicGateway responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "POST"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, createPublicGatewayPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the createPublicGateway operation with and without retries enabled + @Test + public void testCreatePublicGatewayWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testCreatePublicGatewayWOptions(); + + vpcService.disableRetries(); + testCreatePublicGatewayWOptions(); } - - // Test the createBackupPolicy operation with a valid options model parameter + + // Test the createPublicGateway operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testCreatePublicGatewayNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.createPublicGateway(null).execute(); + } + + // Test the deletePublicGateway operation with a valid options model parameter @Test - public void testCreateBackupPolicyWOptions() throws Throwable { + public void testDeletePublicGatewayWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"health_reasons\": [{\"code\": \"missing_service_authorization_policies\", \"message\": \"One or more accounts are missing service authorization policies\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"id\": \"r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"last_job_completed_at\": \"2019-01-01T12:00:00.000Z\", \"lifecycle_state\": \"stable\", \"match_user_tags\": [\"matchUserTags\"], \"name\": \"my-backup-policy\", \"plans\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"backup_policy\", \"scope\": {\"crn\": \"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce\", \"id\": \"ebc2b430240943458b9e91e1432cfcce\", \"resource_type\": \"enterprise\"}, \"included_content\": [\"data_volumes\"], \"match_resource_type\": \"instance\"}"; - String createBackupPolicyPath = "/backup_policies"; + String mockResponseBody = ""; + String deletePublicGatewayPath = "/public_gateways/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the ZoneIdentityByName model - ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() - .name("us-south-1") - .build(); - - // Construct an instance of the BackupPolicyPlanClonePolicyPrototype model - BackupPolicyPlanClonePolicyPrototype backupPolicyPlanClonePolicyPrototypeModel = new BackupPolicyPlanClonePolicyPrototype.Builder() - .maxSnapshots(Long.valueOf("5")) - .zones(java.util.Arrays.asList(zoneIdentityModel)) - .build(); - - // Construct an instance of the BackupPolicyPlanDeletionTriggerPrototype model - BackupPolicyPlanDeletionTriggerPrototype backupPolicyPlanDeletionTriggerPrototypeModel = new BackupPolicyPlanDeletionTriggerPrototype.Builder() - .deleteAfter(Long.valueOf("20")) - .deleteOverCount(Long.valueOf("20")) - .build(); - - // Construct an instance of the EncryptionKeyIdentityByCRN model - EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() - .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + // Construct an instance of the DeletePublicGatewayOptions model + DeletePublicGatewayOptions deletePublicGatewayOptionsModel = new DeletePublicGatewayOptions.Builder() + .id("testString") .build(); - // Construct an instance of the RegionIdentityByName model - RegionIdentityByName regionIdentityModel = new RegionIdentityByName.Builder() - .name("us-south") - .build(); + // Invoke deletePublicGateway() with a valid options model and verify the result + Response response = vpcService.deletePublicGateway(deletePublicGatewayOptionsModel).execute(); + assertNotNull(response); + Void responseObj = response.getResult(); + assertNull(responseObj); - // Construct an instance of the BackupPolicyPlanRemoteRegionPolicyPrototype model - BackupPolicyPlanRemoteRegionPolicyPrototype backupPolicyPlanRemoteRegionPolicyPrototypeModel = new BackupPolicyPlanRemoteRegionPolicyPrototype.Builder() - .deleteOverCount(Long.valueOf("5")) - .encryptionKey(encryptionKeyIdentityModel) - .region(regionIdentityModel) - .build(); + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "DELETE"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, deletePublicGatewayPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } - // Construct an instance of the BackupPolicyPlanPrototype model - BackupPolicyPlanPrototype backupPolicyPlanPrototypeModel = new BackupPolicyPlanPrototype.Builder() - .active(true) - .attachUserTags(java.util.Arrays.asList("my-daily-backup-plan")) - .clonePolicy(backupPolicyPlanClonePolicyPrototypeModel) - .copyUserTags(true) - .cronSpec("30 */2 * * 1-5") - .deletionTrigger(backupPolicyPlanDeletionTriggerPrototypeModel) - .name("my-policy-plan") - .remoteRegionPolicies(java.util.Arrays.asList(backupPolicyPlanRemoteRegionPolicyPrototypeModel)) - .build(); + // Test the deletePublicGateway operation with and without retries enabled + @Test + public void testDeletePublicGatewayWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testDeletePublicGatewayWOptions(); - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); + vpcService.disableRetries(); + testDeletePublicGatewayWOptions(); + } - // Construct an instance of the BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN model - BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN backupPolicyScopePrototypeModel = new BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN.Builder() - .crn("crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce") - .build(); + // Test the deletePublicGateway operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testDeletePublicGatewayNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.deletePublicGateway(null).execute(); + } - // Construct an instance of the BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype model - BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype backupPolicyPrototypeModel = new BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype.Builder() - .matchUserTags(java.util.Arrays.asList("my-daily-backup-policy")) - .name("my-backup-policy") - .plans(java.util.Arrays.asList(backupPolicyPlanPrototypeModel)) - .resourceGroup(resourceGroupIdentityModel) - .scope(backupPolicyScopePrototypeModel) - .matchResourceType("volume") - .build(); + // Test the getPublicGateway operation with a valid options model parameter + @Test + public void testGetPublicGatewayWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"floating_ip\": {\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"id\": \"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"name\": \"my-public-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"public_gateway\", \"status\": \"available\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String getPublicGatewayPath = "/public_gateways/testString"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); - // Construct an instance of the CreateBackupPolicyOptions model - CreateBackupPolicyOptions createBackupPolicyOptionsModel = new CreateBackupPolicyOptions.Builder() - .backupPolicyPrototype(backupPolicyPrototypeModel) + // Construct an instance of the GetPublicGatewayOptions model + GetPublicGatewayOptions getPublicGatewayOptionsModel = new GetPublicGatewayOptions.Builder() + .id("testString") .build(); - // Invoke createBackupPolicy() with a valid options model and verify the result - Response response = vpcService.createBackupPolicy(createBackupPolicyOptionsModel).execute(); + // Invoke getPublicGateway() with a valid options model and verify the result + Response response = vpcService.getPublicGateway(getPublicGatewayOptionsModel).execute(); assertNotNull(response); - BackupPolicy responseObj = response.getResult(); + PublicGateway responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createBackupPolicyPath); + assertEquals(parsedPath, getPublicGatewayPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createBackupPolicy operation with and without retries enabled + // Test the getPublicGateway operation with and without retries enabled @Test - public void testCreateBackupPolicyWRetries() throws Throwable { + public void testGetPublicGatewayWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateBackupPolicyWOptions(); + testGetPublicGatewayWOptions(); vpcService.disableRetries(); - testCreateBackupPolicyWOptions(); + testGetPublicGatewayWOptions(); } - // Test the createBackupPolicy operation with a null options model (negative test) + // Test the getPublicGateway operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateBackupPolicyNoOptions() throws Throwable { + public void testGetPublicGatewayNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createBackupPolicy(null).execute(); + vpcService.getPublicGateway(null).execute(); } - // Test the listBackupPolicyJobs operation with a valid options model parameter + // Test the listPublicGateways operation with a valid options model parameter @Test - public void testListBackupPolicyJobsWOptions() throws Throwable { + public void testListPublicGatewaysWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"jobs\": [{\"auto_delete\": true, \"auto_delete_after\": 90, \"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"completed_at\": \"2019-01-01T12:00:00.000Z\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/jobs/r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90\", \"id\": \"r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90\", \"job_type\": \"creation\", \"resource_type\": \"backup_policy_job\", \"source\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"volume\"}, \"status\": \"failed\", \"status_reasons\": [{\"code\": \"source_volume_busy\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot\"}], \"target_snapshots\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}]}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listBackupPolicyJobsPath = "/backup_policies/testString/jobs"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"public_gateways\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"floating_ip\": {\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"id\": \"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"name\": \"my-public-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"public_gateway\", \"status\": \"available\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"total_count\": 132}"; + String listPublicGatewaysPath = "/public_gateways"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListBackupPolicyJobsOptions model - ListBackupPolicyJobsOptions listBackupPolicyJobsOptionsModel = new ListBackupPolicyJobsOptions.Builder() - .backupPolicyId("testString") - .status("failed") - .backupPolicyPlanId("testString") + // Construct an instance of the ListPublicGatewaysOptions model + ListPublicGatewaysOptions listPublicGatewaysOptionsModel = new ListPublicGatewaysOptions.Builder() .start("testString") .limit(Long.valueOf("10")) - .sort("name") - .sourceId("testString") - .targetSnapshotsId("testString") - .targetSnapshotsCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263") + .resourceGroupId("testString") .build(); - // Invoke listBackupPolicyJobs() with a valid options model and verify the result - Response response = vpcService.listBackupPolicyJobs(listBackupPolicyJobsOptionsModel).execute(); + // Invoke listPublicGateways() with a valid options model and verify the result + Response response = vpcService.listPublicGateways(listPublicGatewaysOptionsModel).execute(); assertNotNull(response); - BackupPolicyJobCollection responseObj = response.getResult(); + PublicGatewayCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -19763,45 +21541,33 @@ public void testListBackupPolicyJobsWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listBackupPolicyJobsPath); + assertEquals(parsedPath, listPublicGatewaysPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("status"), "failed"); - assertEquals(query.get("backup_policy_plan.id"), "testString"); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("sort"), "name"); - assertEquals(query.get("source.id"), "testString"); - assertEquals(query.get("target_snapshots[].id"), "testString"); - assertEquals(query.get("target_snapshots[].crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263"); + assertEquals(query.get("resource_group.id"), "testString"); } - // Test the listBackupPolicyJobs operation with and without retries enabled + // Test the listPublicGateways operation with and without retries enabled @Test - public void testListBackupPolicyJobsWRetries() throws Throwable { + public void testListPublicGatewaysWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListBackupPolicyJobsWOptions(); + testListPublicGatewaysWOptions(); vpcService.disableRetries(); - testListBackupPolicyJobsWOptions(); - } - - // Test the listBackupPolicyJobs operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListBackupPolicyJobsNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.listBackupPolicyJobs(null).execute(); + testListPublicGatewaysWOptions(); } - // Test the listBackupPolicyJobs operation using the BackupPolicyJobsPager.getNext() method + // Test the listPublicGateways operation using the PublicGatewaysPager.getNext() method @Test - public void testListBackupPolicyJobsWithPagerGetNext() throws Throwable { + public void testListPublicGatewaysWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"jobs\":[{\"auto_delete\":true,\"auto_delete_after\":90,\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"completed_at\":\"2019-01-01T12:00:00.000Z\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/jobs/r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90\",\"id\":\"r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90\",\"job_type\":\"creation\",\"resource_type\":\"backup_policy_job\",\"source\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"volume\"},\"status\":\"failed\",\"status_reasons\":[{\"code\":\"source_volume_busy\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot\"}],\"target_snapshots\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"}]}],\"limit\":1}"; - String mockResponsePage2 = "{\"total_count\":2,\"jobs\":[{\"auto_delete\":true,\"auto_delete_after\":90,\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"completed_at\":\"2019-01-01T12:00:00.000Z\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/jobs/r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90\",\"id\":\"r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90\",\"job_type\":\"creation\",\"resource_type\":\"backup_policy_job\",\"source\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"volume\"},\"status\":\"failed\",\"status_reasons\":[{\"code\":\"source_volume_busy\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot\"}],\"target_snapshots\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"}]}],\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"public_gateways\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"floating_ip\":{\"address\":\"203.0.113.1\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"id\":\"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"name\":\"my-public-gateway\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"public_gateway\",\"status\":\"available\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"public_gateways\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"floating_ip\":{\"address\":\"203.0.113.1\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"id\":\"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"name\":\"my-public-gateway\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"public_gateway\",\"status\":\"available\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -19815,33 +21581,27 @@ public void testListBackupPolicyJobsWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListBackupPolicyJobsOptions listBackupPolicyJobsOptions = new ListBackupPolicyJobsOptions.Builder() - .backupPolicyId("testString") - .status("failed") - .backupPolicyPlanId("testString") + ListPublicGatewaysOptions listPublicGatewaysOptions = new ListPublicGatewaysOptions.Builder() .limit(Long.valueOf("10")) - .sort("name") - .sourceId("testString") - .targetSnapshotsId("testString") - .targetSnapshotsCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263") + .resourceGroupId("testString") .build(); - List allResults = new ArrayList<>(); - BackupPolicyJobsPager pager = new BackupPolicyJobsPager(vpcService, listBackupPolicyJobsOptions); + List allResults = new ArrayList<>(); + PublicGatewaysPager pager = new PublicGatewaysPager(vpcService, listPublicGatewaysOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listBackupPolicyJobs operation using the BackupPolicyJobsPager.getAll() method + // Test the listPublicGateways operation using the PublicGatewaysPager.getAll() method @Test - public void testListBackupPolicyJobsWithPagerGetAll() throws Throwable { + public void testListPublicGatewaysWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"jobs\":[{\"auto_delete\":true,\"auto_delete_after\":90,\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"completed_at\":\"2019-01-01T12:00:00.000Z\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/jobs/r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90\",\"id\":\"r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90\",\"job_type\":\"creation\",\"resource_type\":\"backup_policy_job\",\"source\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"volume\"},\"status\":\"failed\",\"status_reasons\":[{\"code\":\"source_volume_busy\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot\"}],\"target_snapshots\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"}]}],\"limit\":1}"; - String mockResponsePage2 = "{\"total_count\":2,\"jobs\":[{\"auto_delete\":true,\"auto_delete_after\":90,\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"completed_at\":\"2019-01-01T12:00:00.000Z\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/jobs/r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90\",\"id\":\"r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90\",\"job_type\":\"creation\",\"resource_type\":\"backup_policy_job\",\"source\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"volume\"},\"status\":\"failed\",\"status_reasons\":[{\"code\":\"source_volume_busy\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot\"}],\"target_snapshots\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"}]}],\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"public_gateways\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"floating_ip\":{\"address\":\"203.0.113.1\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"id\":\"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"name\":\"my-public-gateway\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"public_gateway\",\"status\":\"available\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"public_gateways\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"floating_ip\":{\"address\":\"203.0.113.1\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"id\":\"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"name\":\"my-public-gateway\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"public_gateway\",\"status\":\"available\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -19855,194 +21615,182 @@ public void testListBackupPolicyJobsWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListBackupPolicyJobsOptions listBackupPolicyJobsOptions = new ListBackupPolicyJobsOptions.Builder() - .backupPolicyId("testString") - .status("failed") - .backupPolicyPlanId("testString") + ListPublicGatewaysOptions listPublicGatewaysOptions = new ListPublicGatewaysOptions.Builder() .limit(Long.valueOf("10")) - .sort("name") - .sourceId("testString") - .targetSnapshotsId("testString") - .targetSnapshotsCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263") + .resourceGroupId("testString") .build(); - BackupPolicyJobsPager pager = new BackupPolicyJobsPager(vpcService, listBackupPolicyJobsOptions); - List allResults = pager.getAll(); + PublicGatewaysPager pager = new PublicGatewaysPager(vpcService, listPublicGatewaysOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the getBackupPolicyJob operation with a valid options model parameter + // Test the updatePublicGateway operation with a valid options model parameter @Test - public void testGetBackupPolicyJobWOptions() throws Throwable { + public void testUpdatePublicGatewayWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"auto_delete\": true, \"auto_delete_after\": 90, \"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"completed_at\": \"2019-01-01T12:00:00.000Z\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/jobs/r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90\", \"id\": \"r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90\", \"job_type\": \"creation\", \"resource_type\": \"backup_policy_job\", \"source\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"volume\"}, \"status\": \"failed\", \"status_reasons\": [{\"code\": \"source_volume_busy\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot\"}], \"target_snapshots\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}]}"; - String getBackupPolicyJobPath = "/backup_policies/testString/jobs/testString"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"floating_ip\": {\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"id\": \"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"name\": \"my-public-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"public_gateway\", \"status\": \"available\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String updatePublicGatewayPath = "/public_gateways/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetBackupPolicyJobOptions model - GetBackupPolicyJobOptions getBackupPolicyJobOptionsModel = new GetBackupPolicyJobOptions.Builder() - .backupPolicyId("testString") + // Construct an instance of the PublicGatewayPatch model + PublicGatewayPatch publicGatewayPatchModel = new PublicGatewayPatch.Builder() + .name("my-public-gateway-updated") + .build(); + Map publicGatewayPatchModelAsPatch = publicGatewayPatchModel.asPatch(); + + // Construct an instance of the UpdatePublicGatewayOptions model + UpdatePublicGatewayOptions updatePublicGatewayOptionsModel = new UpdatePublicGatewayOptions.Builder() .id("testString") + .publicGatewayPatch(publicGatewayPatchModelAsPatch) .build(); - // Invoke getBackupPolicyJob() with a valid options model and verify the result - Response response = vpcService.getBackupPolicyJob(getBackupPolicyJobOptionsModel).execute(); + // Invoke updatePublicGateway() with a valid options model and verify the result + Response response = vpcService.updatePublicGateway(updatePublicGatewayOptionsModel).execute(); assertNotNull(response); - BackupPolicyJob responseObj = response.getResult(); + PublicGateway responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getBackupPolicyJobPath); + assertEquals(parsedPath, updatePublicGatewayPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getBackupPolicyJob operation with and without retries enabled + // Test the updatePublicGateway operation with and without retries enabled @Test - public void testGetBackupPolicyJobWRetries() throws Throwable { + public void testUpdatePublicGatewayWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetBackupPolicyJobWOptions(); + testUpdatePublicGatewayWOptions(); vpcService.disableRetries(); - testGetBackupPolicyJobWOptions(); + testUpdatePublicGatewayWOptions(); } - // Test the getBackupPolicyJob operation with a null options model (negative test) + // Test the updatePublicGateway operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetBackupPolicyJobNoOptions() throws Throwable { + public void testUpdatePublicGatewayNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getBackupPolicyJob(null).execute(); + vpcService.updatePublicGateway(null).execute(); } - // Test the listBackupPolicyPlans operation with a valid options model parameter + // Test the activateReservation operation with a valid options model parameter @Test - public void testListBackupPolicyPlansWOptions() throws Throwable { + public void testActivateReservationWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"plans\": [{\"active\": true, \"attach_user_tags\": [\"attachUserTags\"], \"clone_policy\": {\"max_snapshots\": 1, \"zones\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}]}, \"copy_user_tags\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"cron_spec\": \"30 */2 * * 1-5\", \"deletion_trigger\": {\"delete_after\": 20, \"delete_over_count\": 20}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"lifecycle_state\": \"stable\", \"name\": \"my-policy-plan\", \"remote_region_policies\": [{\"delete_over_count\": 1, \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}], \"resource_type\": \"backup_policy_plan\"}], \"total_count\": 132}"; - String listBackupPolicyPlansPath = "/backup_policies/testString/plans"; + String mockResponseBody = ""; + String activateReservationPath = "/reservations/testString/activate"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the ListBackupPolicyPlansOptions model - ListBackupPolicyPlansOptions listBackupPolicyPlansOptionsModel = new ListBackupPolicyPlansOptions.Builder() - .backupPolicyId("testString") - .name("my-name") + // Construct an instance of the ActivateReservationOptions model + ActivateReservationOptions activateReservationOptionsModel = new ActivateReservationOptions.Builder() + .id("testString") .build(); - // Invoke listBackupPolicyPlans() with a valid options model and verify the result - Response response = vpcService.listBackupPolicyPlans(listBackupPolicyPlansOptionsModel).execute(); + // Invoke activateReservation() with a valid options model and verify the result + Response response = vpcService.activateReservation(activateReservationOptionsModel).execute(); assertNotNull(response); - BackupPolicyPlanCollection responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listBackupPolicyPlansPath); + assertEquals(parsedPath, activateReservationPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("name"), "my-name"); } - // Test the listBackupPolicyPlans operation with and without retries enabled + // Test the activateReservation operation with and without retries enabled @Test - public void testListBackupPolicyPlansWRetries() throws Throwable { + public void testActivateReservationWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListBackupPolicyPlansWOptions(); + testActivateReservationWOptions(); vpcService.disableRetries(); - testListBackupPolicyPlansWOptions(); + testActivateReservationWOptions(); } - // Test the listBackupPolicyPlans operation with a null options model (negative test) + // Test the activateReservation operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListBackupPolicyPlansNoOptions() throws Throwable { + public void testActivateReservationNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listBackupPolicyPlans(null).execute(); + vpcService.activateReservation(null).execute(); } - // Test the createBackupPolicyPlan operation with a valid options model parameter + // Test the createReservation operation with a valid options model parameter @Test - public void testCreateBackupPolicyPlanWOptions() throws Throwable { + public void testCreateReservationWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"active\": true, \"attach_user_tags\": [\"attachUserTags\"], \"clone_policy\": {\"max_snapshots\": 1, \"zones\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}]}, \"copy_user_tags\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"cron_spec\": \"30 */2 * * 1-5\", \"deletion_trigger\": {\"delete_after\": 20, \"delete_over_count\": 20}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"lifecycle_state\": \"stable\", \"name\": \"my-policy-plan\", \"remote_region_policies\": [{\"delete_over_count\": 1, \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}], \"resource_type\": \"backup_policy_plan\"}"; - String createBackupPolicyPlanPath = "/backup_policies/testString/plans"; + String mockResponseBody = "{\"affinity_policy\": \"automatic\", \"capacity\": {\"allocated\": 10, \"available\": 8, \"status\": \"allocated\", \"total\": 10, \"used\": 2}, \"committed_use\": {\"expiration_at\": \"2019-01-01T12:00:00.000Z\", \"expiration_policy\": \"release\", \"term\": \"term\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"lifecycle_state\": \"stable\", \"name\": \"my-reservation\", \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"reservation\", \"status\": \"activating\", \"status_reasons\": [{\"code\": \"cannot_activate_no_capacity_available\", \"message\": \"The reservation cannot be activated because capacity is unavailable\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String createReservationPath = "/reservations"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the ZoneIdentityByName model - ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() - .name("us-south-1") - .build(); - - // Construct an instance of the BackupPolicyPlanClonePolicyPrototype model - BackupPolicyPlanClonePolicyPrototype backupPolicyPlanClonePolicyPrototypeModel = new BackupPolicyPlanClonePolicyPrototype.Builder() - .maxSnapshots(Long.valueOf("5")) - .zones(java.util.Arrays.asList(zoneIdentityModel)) + // Construct an instance of the ReservationCapacityPrototype model + ReservationCapacityPrototype reservationCapacityPrototypeModel = new ReservationCapacityPrototype.Builder() + .total(Long.valueOf("10")) .build(); - // Construct an instance of the BackupPolicyPlanDeletionTriggerPrototype model - BackupPolicyPlanDeletionTriggerPrototype backupPolicyPlanDeletionTriggerPrototypeModel = new BackupPolicyPlanDeletionTriggerPrototype.Builder() - .deleteAfter(Long.valueOf("20")) - .deleteOverCount(Long.valueOf("20")) + // Construct an instance of the ReservationCommittedUsePrototype model + ReservationCommittedUsePrototype reservationCommittedUsePrototypeModel = new ReservationCommittedUsePrototype.Builder() + .expirationPolicy("release") + .term("testString") .build(); - // Construct an instance of the EncryptionKeyIdentityByCRN model - EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() - .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + // Construct an instance of the ReservationProfilePrototype model + ReservationProfilePrototype reservationProfilePrototypeModel = new ReservationProfilePrototype.Builder() + .name("bx2-4x16") + .resourceType("bare_metal_server_profile") .build(); - // Construct an instance of the RegionIdentityByName model - RegionIdentityByName regionIdentityModel = new RegionIdentityByName.Builder() - .name("us-south") + // Construct an instance of the ZoneIdentityByName model + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() + .name("us-south-1") .build(); - // Construct an instance of the BackupPolicyPlanRemoteRegionPolicyPrototype model - BackupPolicyPlanRemoteRegionPolicyPrototype backupPolicyPlanRemoteRegionPolicyPrototypeModel = new BackupPolicyPlanRemoteRegionPolicyPrototype.Builder() - .deleteOverCount(Long.valueOf("5")) - .encryptionKey(encryptionKeyIdentityModel) - .region(regionIdentityModel) + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") .build(); - // Construct an instance of the CreateBackupPolicyPlanOptions model - CreateBackupPolicyPlanOptions createBackupPolicyPlanOptionsModel = new CreateBackupPolicyPlanOptions.Builder() - .backupPolicyId("testString") - .cronSpec("30 */2 * * 1-5") - .active(true) - .attachUserTags(java.util.Arrays.asList("my-daily-backup-plan")) - .clonePolicy(backupPolicyPlanClonePolicyPrototypeModel) - .copyUserTags(true) - .deletionTrigger(backupPolicyPlanDeletionTriggerPrototypeModel) - .name("my-policy-plan") - .remoteRegionPolicies(java.util.Arrays.asList(backupPolicyPlanRemoteRegionPolicyPrototypeModel)) + // Construct an instance of the CreateReservationOptions model + CreateReservationOptions createReservationOptionsModel = new CreateReservationOptions.Builder() + .capacity(reservationCapacityPrototypeModel) + .committedUse(reservationCommittedUsePrototypeModel) + .profile(reservationProfilePrototypeModel) + .zone(zoneIdentityModel) + .affinityPolicy("automatic") + .name("my-reservation") + .resourceGroup(resourceGroupIdentityModel) .build(); - // Invoke createBackupPolicyPlan() with a valid options model and verify the result - Response response = vpcService.createBackupPolicyPlan(createBackupPolicyPlanOptionsModel).execute(); + // Invoke createReservation() with a valid options model and verify the result + Response response = vpcService.createReservation(createReservationOptionsModel).execute(); assertNotNull(response); - BackupPolicyPlan responseObj = response.getResult(); + Reservation responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -20051,53 +21799,51 @@ public void testCreateBackupPolicyPlanWOptions() throws Throwable { assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createBackupPolicyPlanPath); + assertEquals(parsedPath, createReservationPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createBackupPolicyPlan operation with and without retries enabled + // Test the createReservation operation with and without retries enabled @Test - public void testCreateBackupPolicyPlanWRetries() throws Throwable { + public void testCreateReservationWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateBackupPolicyPlanWOptions(); + testCreateReservationWOptions(); vpcService.disableRetries(); - testCreateBackupPolicyPlanWOptions(); + testCreateReservationWOptions(); } - // Test the createBackupPolicyPlan operation with a null options model (negative test) + // Test the createReservation operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateBackupPolicyPlanNoOptions() throws Throwable { + public void testCreateReservationNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createBackupPolicyPlan(null).execute(); + vpcService.createReservation(null).execute(); } - // Test the deleteBackupPolicyPlan operation with a valid options model parameter + // Test the deleteReservation operation with a valid options model parameter @Test - public void testDeleteBackupPolicyPlanWOptions() throws Throwable { + public void testDeleteReservationWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"active\": true, \"attach_user_tags\": [\"attachUserTags\"], \"clone_policy\": {\"max_snapshots\": 1, \"zones\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}]}, \"copy_user_tags\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"cron_spec\": \"30 */2 * * 1-5\", \"deletion_trigger\": {\"delete_after\": 20, \"delete_over_count\": 20}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"lifecycle_state\": \"stable\", \"name\": \"my-policy-plan\", \"remote_region_policies\": [{\"delete_over_count\": 1, \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}], \"resource_type\": \"backup_policy_plan\"}"; - String deleteBackupPolicyPlanPath = "/backup_policies/testString/plans/testString"; + String mockResponseBody = "{\"affinity_policy\": \"automatic\", \"capacity\": {\"allocated\": 10, \"available\": 8, \"status\": \"allocated\", \"total\": 10, \"used\": 2}, \"committed_use\": {\"expiration_at\": \"2019-01-01T12:00:00.000Z\", \"expiration_policy\": \"release\", \"term\": \"term\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"lifecycle_state\": \"stable\", \"name\": \"my-reservation\", \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"reservation\", \"status\": \"activating\", \"status_reasons\": [{\"code\": \"cannot_activate_no_capacity_available\", \"message\": \"The reservation cannot be activated because capacity is unavailable\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String deleteReservationPath = "/reservations/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the DeleteBackupPolicyPlanOptions model - DeleteBackupPolicyPlanOptions deleteBackupPolicyPlanOptionsModel = new DeleteBackupPolicyPlanOptions.Builder() - .backupPolicyId("testString") + // Construct an instance of the DeleteReservationOptions model + DeleteReservationOptions deleteReservationOptionsModel = new DeleteReservationOptions.Builder() .id("testString") - .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke deleteBackupPolicyPlan() with a valid options model and verify the result - Response response = vpcService.deleteBackupPolicyPlan(deleteBackupPolicyPlanOptionsModel).execute(); + // Invoke deleteReservation() with a valid options model and verify the result + Response response = vpcService.deleteReservation(deleteReservationOptionsModel).execute(); assertNotNull(response); - BackupPolicyPlan responseObj = response.getResult(); + Reservation responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -20106,830 +21852,794 @@ public void testDeleteBackupPolicyPlanWOptions() throws Throwable { assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteBackupPolicyPlanPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - } - - // Test the deleteBackupPolicyPlan operation with and without retries enabled - @Test - public void testDeleteBackupPolicyPlanWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testDeleteBackupPolicyPlanWOptions(); - - vpcService.disableRetries(); - testDeleteBackupPolicyPlanWOptions(); - } - - // Test the deleteBackupPolicyPlan operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteBackupPolicyPlanNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.deleteBackupPolicyPlan(null).execute(); - } - - // Test the getBackupPolicyPlan operation with a valid options model parameter - @Test - public void testGetBackupPolicyPlanWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"active\": true, \"attach_user_tags\": [\"attachUserTags\"], \"clone_policy\": {\"max_snapshots\": 1, \"zones\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}]}, \"copy_user_tags\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"cron_spec\": \"30 */2 * * 1-5\", \"deletion_trigger\": {\"delete_after\": 20, \"delete_over_count\": 20}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"lifecycle_state\": \"stable\", \"name\": \"my-policy-plan\", \"remote_region_policies\": [{\"delete_over_count\": 1, \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}], \"resource_type\": \"backup_policy_plan\"}"; - String getBackupPolicyPlanPath = "/backup_policies/testString/plans/testString"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the GetBackupPolicyPlanOptions model - GetBackupPolicyPlanOptions getBackupPolicyPlanOptionsModel = new GetBackupPolicyPlanOptions.Builder() - .backupPolicyId("testString") - .id("testString") - .build(); - - // Invoke getBackupPolicyPlan() with a valid options model and verify the result - Response response = vpcService.getBackupPolicyPlan(getBackupPolicyPlanOptionsModel).execute(); - assertNotNull(response); - BackupPolicyPlan responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getBackupPolicyPlanPath); + assertEquals(parsedPath, deleteReservationPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getBackupPolicyPlan operation with and without retries enabled + // Test the deleteReservation operation with and without retries enabled @Test - public void testGetBackupPolicyPlanWRetries() throws Throwable { + public void testDeleteReservationWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetBackupPolicyPlanWOptions(); + testDeleteReservationWOptions(); vpcService.disableRetries(); - testGetBackupPolicyPlanWOptions(); + testDeleteReservationWOptions(); } - // Test the getBackupPolicyPlan operation with a null options model (negative test) + // Test the deleteReservation operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetBackupPolicyPlanNoOptions() throws Throwable { + public void testDeleteReservationNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getBackupPolicyPlan(null).execute(); + vpcService.deleteReservation(null).execute(); } - // Test the updateBackupPolicyPlan operation with a valid options model parameter + // Test the getReservation operation with a valid options model parameter @Test - public void testUpdateBackupPolicyPlanWOptions() throws Throwable { + public void testGetReservationWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"active\": true, \"attach_user_tags\": [\"attachUserTags\"], \"clone_policy\": {\"max_snapshots\": 1, \"zones\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}]}, \"copy_user_tags\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"cron_spec\": \"30 */2 * * 1-5\", \"deletion_trigger\": {\"delete_after\": 20, \"delete_over_count\": 20}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"lifecycle_state\": \"stable\", \"name\": \"my-policy-plan\", \"remote_region_policies\": [{\"delete_over_count\": 1, \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}], \"resource_type\": \"backup_policy_plan\"}"; - String updateBackupPolicyPlanPath = "/backup_policies/testString/plans/testString"; + String mockResponseBody = "{\"affinity_policy\": \"automatic\", \"capacity\": {\"allocated\": 10, \"available\": 8, \"status\": \"allocated\", \"total\": 10, \"used\": 2}, \"committed_use\": {\"expiration_at\": \"2019-01-01T12:00:00.000Z\", \"expiration_policy\": \"release\", \"term\": \"term\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"lifecycle_state\": \"stable\", \"name\": \"my-reservation\", \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"reservation\", \"status\": \"activating\", \"status_reasons\": [{\"code\": \"cannot_activate_no_capacity_available\", \"message\": \"The reservation cannot be activated because capacity is unavailable\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String getReservationPath = "/reservations/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ZoneIdentityByName model - ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() - .name("us-south-1") - .build(); - - // Construct an instance of the BackupPolicyPlanClonePolicyPatch model - BackupPolicyPlanClonePolicyPatch backupPolicyPlanClonePolicyPatchModel = new BackupPolicyPlanClonePolicyPatch.Builder() - .maxSnapshots(Long.valueOf("1")) - .zones(java.util.Arrays.asList(zoneIdentityModel)) - .build(); - - // Construct an instance of the BackupPolicyPlanDeletionTriggerPatch model - BackupPolicyPlanDeletionTriggerPatch backupPolicyPlanDeletionTriggerPatchModel = new BackupPolicyPlanDeletionTriggerPatch.Builder() - .deleteAfter(Long.valueOf("20")) - .deleteOverCount(Long.valueOf("1")) - .build(); - - // Construct an instance of the EncryptionKeyIdentityByCRN model - EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() - .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") - .build(); - - // Construct an instance of the RegionIdentityByName model - RegionIdentityByName regionIdentityModel = new RegionIdentityByName.Builder() - .name("us-south") - .build(); - - // Construct an instance of the BackupPolicyPlanRemoteRegionPolicyPrototype model - BackupPolicyPlanRemoteRegionPolicyPrototype backupPolicyPlanRemoteRegionPolicyPrototypeModel = new BackupPolicyPlanRemoteRegionPolicyPrototype.Builder() - .deleteOverCount(Long.valueOf("5")) - .encryptionKey(encryptionKeyIdentityModel) - .region(regionIdentityModel) - .build(); - - // Construct an instance of the BackupPolicyPlanPatch model - BackupPolicyPlanPatch backupPolicyPlanPatchModel = new BackupPolicyPlanPatch.Builder() - .active(true) - .attachUserTags(java.util.Arrays.asList("my-daily-backup-plan")) - .clonePolicy(backupPolicyPlanClonePolicyPatchModel) - .copyUserTags(false) - .cronSpec("30 */2 * * 1-5") - .deletionTrigger(backupPolicyPlanDeletionTriggerPatchModel) - .name("my-policy-plan") - .remoteRegionPolicies(java.util.Arrays.asList(backupPolicyPlanRemoteRegionPolicyPrototypeModel)) - .build(); - Map backupPolicyPlanPatchModelAsPatch = backupPolicyPlanPatchModel.asPatch(); - - // Construct an instance of the UpdateBackupPolicyPlanOptions model - UpdateBackupPolicyPlanOptions updateBackupPolicyPlanOptionsModel = new UpdateBackupPolicyPlanOptions.Builder() - .backupPolicyId("testString") + // Construct an instance of the GetReservationOptions model + GetReservationOptions getReservationOptionsModel = new GetReservationOptions.Builder() .id("testString") - .backupPolicyPlanPatch(backupPolicyPlanPatchModelAsPatch) - .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke updateBackupPolicyPlan() with a valid options model and verify the result - Response response = vpcService.updateBackupPolicyPlan(updateBackupPolicyPlanOptionsModel).execute(); + // Invoke getReservation() with a valid options model and verify the result + Response response = vpcService.getReservation(getReservationOptionsModel).execute(); assertNotNull(response); - BackupPolicyPlan responseObj = response.getResult(); + Reservation responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateBackupPolicyPlanPath); + assertEquals(parsedPath, getReservationPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateBackupPolicyPlan operation with and without retries enabled + // Test the getReservation operation with and without retries enabled @Test - public void testUpdateBackupPolicyPlanWRetries() throws Throwable { + public void testGetReservationWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateBackupPolicyPlanWOptions(); + testGetReservationWOptions(); vpcService.disableRetries(); - testUpdateBackupPolicyPlanWOptions(); + testGetReservationWOptions(); } - // Test the updateBackupPolicyPlan operation with a null options model (negative test) + // Test the getReservation operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateBackupPolicyPlanNoOptions() throws Throwable { + public void testGetReservationNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateBackupPolicyPlan(null).execute(); + vpcService.getReservation(null).execute(); } - // Test the deleteBackupPolicy operation with a valid options model parameter + // Test the listReservations operation with a valid options model parameter @Test - public void testDeleteBackupPolicyWOptions() throws Throwable { + public void testListReservationsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"health_reasons\": [{\"code\": \"missing_service_authorization_policies\", \"message\": \"One or more accounts are missing service authorization policies\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"id\": \"r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"last_job_completed_at\": \"2019-01-01T12:00:00.000Z\", \"lifecycle_state\": \"stable\", \"match_user_tags\": [\"matchUserTags\"], \"name\": \"my-backup-policy\", \"plans\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"backup_policy\", \"scope\": {\"crn\": \"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce\", \"id\": \"ebc2b430240943458b9e91e1432cfcce\", \"resource_type\": \"enterprise\"}, \"included_content\": [\"data_volumes\"], \"match_resource_type\": \"instance\"}"; - String deleteBackupPolicyPath = "/backup_policies/testString"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"reservations\": [{\"affinity_policy\": \"automatic\", \"capacity\": {\"allocated\": 10, \"available\": 8, \"status\": \"allocated\", \"total\": 10, \"used\": 2}, \"committed_use\": {\"expiration_at\": \"2019-01-01T12:00:00.000Z\", \"expiration_policy\": \"release\", \"term\": \"term\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"lifecycle_state\": \"stable\", \"name\": \"my-reservation\", \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"reservation\", \"status\": \"activating\", \"status_reasons\": [{\"code\": \"cannot_activate_no_capacity_available\", \"message\": \"The reservation cannot be activated because capacity is unavailable\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"total_count\": 132}"; + String listReservationsPath = "/reservations"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(202) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteBackupPolicyOptions model - DeleteBackupPolicyOptions deleteBackupPolicyOptionsModel = new DeleteBackupPolicyOptions.Builder() - .id("testString") - .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") + // Construct an instance of the ListReservationsOptions model + ListReservationsOptions listReservationsOptionsModel = new ListReservationsOptions.Builder() + .start("testString") + .limit(Long.valueOf("10")) + .name("my-name") + .profileResourceType("testString") + .affinityPolicy("automatic") + .resourceGroupId("testString") + .zoneName("us-south-1") .build(); - // Invoke deleteBackupPolicy() with a valid options model and verify the result - Response response = vpcService.deleteBackupPolicy(deleteBackupPolicyOptionsModel).execute(); + // Invoke listReservations() with a valid options model and verify the result + Response response = vpcService.listReservations(listReservationsOptionsModel).execute(); assertNotNull(response); - BackupPolicy responseObj = response.getResult(); + ReservationCollection 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteBackupPolicyPath); + assertEquals(parsedPath, listReservationsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("name"), "my-name"); + assertEquals(query.get("profile.resource_type"), "testString"); + assertEquals(query.get("affinity_policy"), "automatic"); + assertEquals(query.get("resource_group.id"), "testString"); + assertEquals(query.get("zone.name"), "us-south-1"); } - // Test the deleteBackupPolicy operation with and without retries enabled + // Test the listReservations operation with and without retries enabled @Test - public void testDeleteBackupPolicyWRetries() throws Throwable { + public void testListReservationsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteBackupPolicyWOptions(); + testListReservationsWOptions(); vpcService.disableRetries(); - testDeleteBackupPolicyWOptions(); + testListReservationsWOptions(); } - // Test the deleteBackupPolicy operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteBackupPolicyNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.deleteBackupPolicy(null).execute(); + // Test the listReservations operation using the ReservationsPager.getNext() method + @Test + public void testListReservationsWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"reservations\":[{\"affinity_policy\":\"automatic\",\"capacity\":{\"allocated\":10,\"available\":8,\"status\":\"allocated\",\"total\":10,\"used\":2},\"committed_use\":{\"expiration_at\":\"2019-01-01T12:00:00.000Z\",\"expiration_policy\":\"release\",\"term\":\"term\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"lifecycle_state\":\"stable\",\"name\":\"my-reservation\",\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"reservation\",\"status\":\"activating\",\"status_reasons\":[{\"code\":\"cannot_activate_no_capacity_available\",\"message\":\"The reservation cannot be activated because capacity is unavailable\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons\"}],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"reservations\":[{\"affinity_policy\":\"automatic\",\"capacity\":{\"allocated\":10,\"available\":8,\"status\":\"allocated\",\"total\":10,\"used\":2},\"committed_use\":{\"expiration_at\":\"2019-01-01T12:00:00.000Z\",\"expiration_policy\":\"release\",\"term\":\"term\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"lifecycle_state\":\"stable\",\"name\":\"my-reservation\",\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"reservation\",\"status\":\"activating\",\"status_reasons\":[{\"code\":\"cannot_activate_no_capacity_available\",\"message\":\"The reservation cannot be activated because capacity is unavailable\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons\"}],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListReservationsOptions listReservationsOptions = new ListReservationsOptions.Builder() + .limit(Long.valueOf("10")) + .name("my-name") + .profileResourceType("testString") + .affinityPolicy("automatic") + .resourceGroupId("testString") + .zoneName("us-south-1") + .build(); + + List allResults = new ArrayList<>(); + ReservationsPager pager = new ReservationsPager(vpcService, listReservationsOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } + + // Test the listReservations operation using the ReservationsPager.getAll() method + @Test + public void testListReservationsWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"reservations\":[{\"affinity_policy\":\"automatic\",\"capacity\":{\"allocated\":10,\"available\":8,\"status\":\"allocated\",\"total\":10,\"used\":2},\"committed_use\":{\"expiration_at\":\"2019-01-01T12:00:00.000Z\",\"expiration_policy\":\"release\",\"term\":\"term\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"lifecycle_state\":\"stable\",\"name\":\"my-reservation\",\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"reservation\",\"status\":\"activating\",\"status_reasons\":[{\"code\":\"cannot_activate_no_capacity_available\",\"message\":\"The reservation cannot be activated because capacity is unavailable\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons\"}],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"reservations\":[{\"affinity_policy\":\"automatic\",\"capacity\":{\"allocated\":10,\"available\":8,\"status\":\"allocated\",\"total\":10,\"used\":2},\"committed_use\":{\"expiration_at\":\"2019-01-01T12:00:00.000Z\",\"expiration_policy\":\"release\",\"term\":\"term\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"id\":\"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\",\"lifecycle_state\":\"stable\",\"name\":\"my-reservation\",\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"reservation\",\"status\":\"activating\",\"status_reasons\":[{\"code\":\"cannot_activate_no_capacity_available\",\"message\":\"The reservation cannot be activated because capacity is unavailable\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons\"}],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Test the getBackupPolicy operation with a valid options model parameter + ListReservationsOptions listReservationsOptions = new ListReservationsOptions.Builder() + .limit(Long.valueOf("10")) + .name("my-name") + .profileResourceType("testString") + .affinityPolicy("automatic") + .resourceGroupId("testString") + .zoneName("us-south-1") + .build(); + + ReservationsPager pager = new ReservationsPager(vpcService, listReservationsOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); + } + + // Test the updateReservation operation with a valid options model parameter @Test - public void testGetBackupPolicyWOptions() throws Throwable { + public void testUpdateReservationWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"health_reasons\": [{\"code\": \"missing_service_authorization_policies\", \"message\": \"One or more accounts are missing service authorization policies\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"id\": \"r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"last_job_completed_at\": \"2019-01-01T12:00:00.000Z\", \"lifecycle_state\": \"stable\", \"match_user_tags\": [\"matchUserTags\"], \"name\": \"my-backup-policy\", \"plans\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"backup_policy\", \"scope\": {\"crn\": \"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce\", \"id\": \"ebc2b430240943458b9e91e1432cfcce\", \"resource_type\": \"enterprise\"}, \"included_content\": [\"data_volumes\"], \"match_resource_type\": \"instance\"}"; - String getBackupPolicyPath = "/backup_policies/testString"; + String mockResponseBody = "{\"affinity_policy\": \"automatic\", \"capacity\": {\"allocated\": 10, \"available\": 8, \"status\": \"allocated\", \"total\": 10, \"used\": 2}, \"committed_use\": {\"expiration_at\": \"2019-01-01T12:00:00.000Z\", \"expiration_policy\": \"release\", \"term\": \"term\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"id\": \"0717-ba49df72-37b8-43ac-98da-f8e029de0e63\", \"lifecycle_state\": \"stable\", \"name\": \"my-reservation\", \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"reservation\", \"status\": \"activating\", \"status_reasons\": [{\"code\": \"cannot_activate_no_capacity_available\", \"message\": \"The reservation cannot be activated because capacity is unavailable\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String updateReservationPath = "/reservations/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetBackupPolicyOptions model - GetBackupPolicyOptions getBackupPolicyOptionsModel = new GetBackupPolicyOptions.Builder() + // Construct an instance of the ReservationCapacityPatch model + ReservationCapacityPatch reservationCapacityPatchModel = new ReservationCapacityPatch.Builder() + .total(Long.valueOf("10")) + .build(); + + // Construct an instance of the ReservationCommittedUsePatch model + ReservationCommittedUsePatch reservationCommittedUsePatchModel = new ReservationCommittedUsePatch.Builder() + .expirationPolicy("release") + .term("testString") + .build(); + + // Construct an instance of the ReservationProfilePatch model + ReservationProfilePatch reservationProfilePatchModel = new ReservationProfilePatch.Builder() + .name("bx2-4x16") + .resourceType("bare_metal_server_profile") + .build(); + + // Construct an instance of the ReservationPatch model + ReservationPatch reservationPatchModel = new ReservationPatch.Builder() + .affinityPolicy("automatic") + .capacity(reservationCapacityPatchModel) + .committedUse(reservationCommittedUsePatchModel) + .name("my-reservation") + .profile(reservationProfilePatchModel) + .build(); + Map reservationPatchModelAsPatch = reservationPatchModel.asPatch(); + + // Construct an instance of the UpdateReservationOptions model + UpdateReservationOptions updateReservationOptionsModel = new UpdateReservationOptions.Builder() .id("testString") + .reservationPatch(reservationPatchModelAsPatch) .build(); - // Invoke getBackupPolicy() with a valid options model and verify the result - Response response = vpcService.getBackupPolicy(getBackupPolicyOptionsModel).execute(); + // Invoke updateReservation() with a valid options model and verify the result + Response response = vpcService.updateReservation(updateReservationOptionsModel).execute(); assertNotNull(response); - BackupPolicy responseObj = response.getResult(); + Reservation responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getBackupPolicyPath); + assertEquals(parsedPath, updateReservationPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getBackupPolicy operation with and without retries enabled + // Test the updateReservation operation with and without retries enabled @Test - public void testGetBackupPolicyWRetries() throws Throwable { + public void testUpdateReservationWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetBackupPolicyWOptions(); + testUpdateReservationWOptions(); vpcService.disableRetries(); - testGetBackupPolicyWOptions(); + testUpdateReservationWOptions(); } - // Test the getBackupPolicy operation with a null options model (negative test) + // Test the updateReservation operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetBackupPolicyNoOptions() throws Throwable { + public void testUpdateReservationNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getBackupPolicy(null).execute(); + vpcService.updateReservation(null).execute(); } - // Test the updateBackupPolicy operation with a valid options model parameter + // Test the createSecurityGroup operation with a valid options model parameter @Test - public void testUpdateBackupPolicyWOptions() throws Throwable { + public void testCreateSecurityGroupWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"health_reasons\": [{\"code\": \"missing_service_authorization_policies\", \"message\": \"One or more accounts are missing service authorization policies\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"id\": \"r006-076191ba-49c2-4763-94fd-c70de73ee2e6\", \"last_job_completed_at\": \"2019-01-01T12:00:00.000Z\", \"lifecycle_state\": \"stable\", \"match_user_tags\": [\"matchUserTags\"], \"name\": \"my-backup-policy\", \"plans\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"backup_policy\", \"scope\": {\"crn\": \"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce\", \"id\": \"ebc2b430240943458b9e91e1432cfcce\", \"resource_type\": \"enterprise\"}, \"included_content\": [\"data_volumes\"], \"match_resource_type\": \"instance\"}"; - String updateBackupPolicyPath = "/backup_policies/testString"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"rules\": [{\"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"id\": \"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"ip_version\": \"ipv4\", \"local\": {\"address\": \"192.168.3.4\"}, \"remote\": {\"address\": \"192.168.3.4\"}, \"protocol\": \"all\"}], \"targets\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"resource_type\": \"network_interface\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String createSecurityGroupPath = "/security_groups"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the BackupPolicyPatch model - BackupPolicyPatch backupPolicyPatchModel = new BackupPolicyPatch.Builder() - .includedContent(java.util.Arrays.asList("data_volumes")) - .matchUserTags(java.util.Arrays.asList("my-tag-1", "my-tag-2", "my-tag-3")) - .name("my-backup-policy") + // Construct an instance of the VPCIdentityById model + VPCIdentityById vpcIdentityModel = new VPCIdentityById.Builder() + .id("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") .build(); - Map backupPolicyPatchModelAsPatch = backupPolicyPatchModel.asPatch(); - // Construct an instance of the UpdateBackupPolicyOptions model - UpdateBackupPolicyOptions updateBackupPolicyOptionsModel = new UpdateBackupPolicyOptions.Builder() - .id("testString") - .backupPolicyPatch(backupPolicyPatchModelAsPatch) - .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") .build(); - // Invoke updateBackupPolicy() with a valid options model and verify the result - Response response = vpcService.updateBackupPolicy(updateBackupPolicyOptionsModel).execute(); + // Construct an instance of the SecurityGroupRuleLocalPrototypeIP model + SecurityGroupRuleLocalPrototypeIP securityGroupRuleLocalPrototypeModel = new SecurityGroupRuleLocalPrototypeIP.Builder() + .address("192.168.3.4") + .build(); + + // Construct an instance of the SecurityGroupRuleRemotePrototypeIP model + SecurityGroupRuleRemotePrototypeIP securityGroupRuleRemotePrototypeModel = new SecurityGroupRuleRemotePrototypeIP.Builder() + .address("192.168.3.4") + .build(); + + // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll model + SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll securityGroupRulePrototypeModel = new SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.Builder() + .direction("inbound") + .ipVersion("ipv4") + .local(securityGroupRuleLocalPrototypeModel) + .remote(securityGroupRuleRemotePrototypeModel) + .protocol("all") + .build(); + + // Construct an instance of the CreateSecurityGroupOptions model + CreateSecurityGroupOptions createSecurityGroupOptionsModel = new CreateSecurityGroupOptions.Builder() + .vpc(vpcIdentityModel) + .name("my-security-group") + .resourceGroup(resourceGroupIdentityModel) + .rules(java.util.Arrays.asList(securityGroupRulePrototypeModel)) + .build(); + + // Invoke createSecurityGroup() with a valid options model and verify the result + Response response = vpcService.createSecurityGroup(createSecurityGroupOptionsModel).execute(); assertNotNull(response); - BackupPolicy responseObj = response.getResult(); + SecurityGroup responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateBackupPolicyPath); + assertEquals(parsedPath, createSecurityGroupPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateBackupPolicy operation with and without retries enabled + // Test the createSecurityGroup operation with and without retries enabled @Test - public void testUpdateBackupPolicyWRetries() throws Throwable { + public void testCreateSecurityGroupWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateBackupPolicyWOptions(); + testCreateSecurityGroupWOptions(); vpcService.disableRetries(); - testUpdateBackupPolicyWOptions(); + testCreateSecurityGroupWOptions(); } - // Test the updateBackupPolicy operation with a null options model (negative test) + // Test the createSecurityGroup operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateBackupPolicyNoOptions() throws Throwable { + public void testCreateSecurityGroupNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateBackupPolicy(null).execute(); + vpcService.createSecurityGroup(null).execute(); } - // Test the listRegions operation with a valid options model parameter + // Test the createSecurityGroupRule operation with a valid options model parameter @Test - public void testListRegionsWOptions() throws Throwable { + public void testCreateSecurityGroupRuleWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"regions\": [{\"endpoint\": \"https://us-south.iaas.cloud.ibm.com\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\", \"status\": \"available\"}]}"; - String listRegionsPath = "/regions"; + String mockResponseBody = "{\"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"id\": \"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"ip_version\": \"ipv4\", \"local\": {\"address\": \"192.168.3.4\"}, \"remote\": {\"address\": \"192.168.3.4\"}, \"protocol\": \"all\"}"; + String createSecurityGroupRulePath = "/security_groups/testString/rules"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the ListRegionsOptions model - ListRegionsOptions listRegionsOptionsModel = new ListRegionsOptions(); + // Construct an instance of the SecurityGroupRuleLocalPrototypeIP model + SecurityGroupRuleLocalPrototypeIP securityGroupRuleLocalPrototypeModel = new SecurityGroupRuleLocalPrototypeIP.Builder() + .address("192.168.3.4") + .build(); - // Invoke listRegions() with a valid options model and verify the result - Response response = vpcService.listRegions(listRegionsOptionsModel).execute(); + // Construct an instance of the SecurityGroupRuleRemotePrototypeIP model + SecurityGroupRuleRemotePrototypeIP securityGroupRuleRemotePrototypeModel = new SecurityGroupRuleRemotePrototypeIP.Builder() + .address("192.168.3.4") + .build(); + + // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll model + SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll securityGroupRulePrototypeModel = new SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.Builder() + .direction("inbound") + .ipVersion("ipv4") + .local(securityGroupRuleLocalPrototypeModel) + .remote(securityGroupRuleRemotePrototypeModel) + .protocol("all") + .build(); + + // Construct an instance of the CreateSecurityGroupRuleOptions model + CreateSecurityGroupRuleOptions createSecurityGroupRuleOptionsModel = new CreateSecurityGroupRuleOptions.Builder() + .securityGroupId("testString") + .securityGroupRulePrototype(securityGroupRulePrototypeModel) + .build(); + + // Invoke createSecurityGroupRule() with a valid options model and verify the result + Response response = vpcService.createSecurityGroupRule(createSecurityGroupRuleOptionsModel).execute(); assertNotNull(response); - RegionCollection responseObj = response.getResult(); + SecurityGroupRule responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listRegionsPath); + assertEquals(parsedPath, createSecurityGroupRulePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the listRegions operation with and without retries enabled + // Test the createSecurityGroupRule operation with and without retries enabled @Test - public void testListRegionsWRetries() throws Throwable { + public void testCreateSecurityGroupRuleWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListRegionsWOptions(); + testCreateSecurityGroupRuleWOptions(); vpcService.disableRetries(); - testListRegionsWOptions(); + testCreateSecurityGroupRuleWOptions(); } - // Test the getRegion operation with a valid options model parameter + // Test the createSecurityGroupRule operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testCreateSecurityGroupRuleNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.createSecurityGroupRule(null).execute(); + } + + // Test the createSecurityGroupTargetBinding operation with a valid options model parameter @Test - public void testGetRegionWOptions() throws Throwable { + public void testCreateSecurityGroupTargetBindingWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"endpoint\": \"https://us-south.iaas.cloud.ibm.com\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\", \"status\": \"available\"}"; - String getRegionPath = "/regions/us-south"; + String mockResponseBody = "{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"resource_type\": \"network_interface\"}"; + String createSecurityGroupTargetBindingPath = "/security_groups/testString/targets/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetRegionOptions model - GetRegionOptions getRegionOptionsModel = new GetRegionOptions.Builder() - .name("us-south") + // Construct an instance of the CreateSecurityGroupTargetBindingOptions model + CreateSecurityGroupTargetBindingOptions createSecurityGroupTargetBindingOptionsModel = new CreateSecurityGroupTargetBindingOptions.Builder() + .securityGroupId("testString") + .id("testString") .build(); - // Invoke getRegion() with a valid options model and verify the result - Response response = vpcService.getRegion(getRegionOptionsModel).execute(); + // Invoke createSecurityGroupTargetBinding() with a valid options model and verify the result + Response response = vpcService.createSecurityGroupTargetBinding(createSecurityGroupTargetBindingOptionsModel).execute(); assertNotNull(response); - Region responseObj = response.getResult(); + SecurityGroupTargetReference responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PUT"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getRegionPath); + assertEquals(parsedPath, createSecurityGroupTargetBindingPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getRegion operation with and without retries enabled + // Test the createSecurityGroupTargetBinding operation with and without retries enabled @Test - public void testGetRegionWRetries() throws Throwable { + public void testCreateSecurityGroupTargetBindingWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetRegionWOptions(); + testCreateSecurityGroupTargetBindingWOptions(); vpcService.disableRetries(); - testGetRegionWOptions(); + testCreateSecurityGroupTargetBindingWOptions(); } - // Test the getRegion operation with a null options model (negative test) + // Test the createSecurityGroupTargetBinding operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetRegionNoOptions() throws Throwable { + public void testCreateSecurityGroupTargetBindingNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getRegion(null).execute(); + vpcService.createSecurityGroupTargetBinding(null).execute(); } - // Test the listRegionZones operation with a valid options model parameter + // Test the deleteSecurityGroup operation with a valid options model parameter @Test - public void testListRegionZonesWOptions() throws Throwable { + public void testDeleteSecurityGroupWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"zones\": [{\"data_center\": \"DAL12\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\", \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}, \"status\": \"available\", \"universal_name\": \"us-south-dal10-a\"}]}"; - String listRegionZonesPath = "/regions/us-south/zones"; + String mockResponseBody = ""; + String deleteSecurityGroupPath = "/security_groups/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the ListRegionZonesOptions model - ListRegionZonesOptions listRegionZonesOptionsModel = new ListRegionZonesOptions.Builder() - .regionName("us-south") + // Construct an instance of the DeleteSecurityGroupOptions model + DeleteSecurityGroupOptions deleteSecurityGroupOptionsModel = new DeleteSecurityGroupOptions.Builder() + .id("testString") .build(); - // Invoke listRegionZones() with a valid options model and verify the result - Response response = vpcService.listRegionZones(listRegionZonesOptionsModel).execute(); + // Invoke deleteSecurityGroup() with a valid options model and verify the result + Response response = vpcService.deleteSecurityGroup(deleteSecurityGroupOptionsModel).execute(); assertNotNull(response); - ZoneCollection responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listRegionZonesPath); + assertEquals(parsedPath, deleteSecurityGroupPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the listRegionZones operation with and without retries enabled + // Test the deleteSecurityGroup operation with and without retries enabled @Test - public void testListRegionZonesWRetries() throws Throwable { + public void testDeleteSecurityGroupWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListRegionZonesWOptions(); + testDeleteSecurityGroupWOptions(); vpcService.disableRetries(); - testListRegionZonesWOptions(); + testDeleteSecurityGroupWOptions(); } - // Test the listRegionZones operation with a null options model (negative test) + // Test the deleteSecurityGroup operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListRegionZonesNoOptions() throws Throwable { + public void testDeleteSecurityGroupNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listRegionZones(null).execute(); + vpcService.deleteSecurityGroup(null).execute(); } - // Test the getRegionZone operation with a valid options model parameter + // Test the deleteSecurityGroupRule operation with a valid options model parameter @Test - public void testGetRegionZoneWOptions() throws Throwable { + public void testDeleteSecurityGroupRuleWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"data_center\": \"DAL12\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\", \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}, \"status\": \"available\", \"universal_name\": \"us-south-dal10-a\"}"; - String getRegionZonePath = "/regions/us-south/zones/us-south-1"; + String mockResponseBody = ""; + String deleteSecurityGroupRulePath = "/security_groups/testString/rules/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the GetRegionZoneOptions model - GetRegionZoneOptions getRegionZoneOptionsModel = new GetRegionZoneOptions.Builder() - .regionName("us-south") - .name("us-south-1") + // Construct an instance of the DeleteSecurityGroupRuleOptions model + DeleteSecurityGroupRuleOptions deleteSecurityGroupRuleOptionsModel = new DeleteSecurityGroupRuleOptions.Builder() + .securityGroupId("testString") + .id("testString") .build(); - // Invoke getRegionZone() with a valid options model and verify the result - Response response = vpcService.getRegionZone(getRegionZoneOptionsModel).execute(); + // Invoke deleteSecurityGroupRule() with a valid options model and verify the result + Response response = vpcService.deleteSecurityGroupRule(deleteSecurityGroupRuleOptionsModel).execute(); assertNotNull(response); - Zone responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getRegionZonePath); + assertEquals(parsedPath, deleteSecurityGroupRulePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getRegionZone operation with and without retries enabled + // Test the deleteSecurityGroupRule operation with and without retries enabled @Test - public void testGetRegionZoneWRetries() throws Throwable { + public void testDeleteSecurityGroupRuleWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetRegionZoneWOptions(); + testDeleteSecurityGroupRuleWOptions(); vpcService.disableRetries(); - testGetRegionZoneWOptions(); + testDeleteSecurityGroupRuleWOptions(); } - // Test the getRegionZone operation with a null options model (negative test) + // Test the deleteSecurityGroupRule operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetRegionZoneNoOptions() throws Throwable { + public void testDeleteSecurityGroupRuleNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getRegionZone(null).execute(); + vpcService.deleteSecurityGroupRule(null).execute(); } - // Test the listVirtualNetworkInterfaces operation with a valid options model parameter + // Test the deleteSecurityGroupTargetBinding operation with a valid options model parameter @Test - public void testListVirtualNetworkInterfacesWOptions() throws Throwable { + public void testDeleteSecurityGroupTargetBindingWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132, \"virtual_network_interfaces\": [{\"allow_ip_spoofing\": true, \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"enable_infrastructure_nat\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"lifecycle_state\": \"stable\", \"mac_address\": \"02:00:4D:45:45:4D\", \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"virtual_network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"name\": \"my-share-mount-target\", \"resource_type\": \"share_mount_target\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}]}"; - String listVirtualNetworkInterfacesPath = "/virtual_network_interfaces"; + String mockResponseBody = ""; + String deleteSecurityGroupTargetBindingPath = "/security_groups/testString/targets/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the ListVirtualNetworkInterfacesOptions model - ListVirtualNetworkInterfacesOptions listVirtualNetworkInterfacesOptionsModel = new ListVirtualNetworkInterfacesOptions.Builder() - .start("testString") - .limit(Long.valueOf("10")) - .resourceGroupId("testString") + // Construct an instance of the DeleteSecurityGroupTargetBindingOptions model + DeleteSecurityGroupTargetBindingOptions deleteSecurityGroupTargetBindingOptionsModel = new DeleteSecurityGroupTargetBindingOptions.Builder() + .securityGroupId("testString") + .id("testString") .build(); - // Invoke listVirtualNetworkInterfaces() with a valid options model and verify the result - Response response = vpcService.listVirtualNetworkInterfaces(listVirtualNetworkInterfacesOptionsModel).execute(); + // Invoke deleteSecurityGroupTargetBinding() with a valid options model and verify the result + Response response = vpcService.deleteSecurityGroupTargetBinding(deleteSecurityGroupTargetBindingOptionsModel).execute(); assertNotNull(response); - VirtualNetworkInterfaceCollection responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listVirtualNetworkInterfacesPath); + assertEquals(parsedPath, deleteSecurityGroupTargetBindingPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("resource_group.id"), "testString"); } - // Test the listVirtualNetworkInterfaces operation with and without retries enabled + // Test the deleteSecurityGroupTargetBinding operation with and without retries enabled @Test - public void testListVirtualNetworkInterfacesWRetries() throws Throwable { + public void testDeleteSecurityGroupTargetBindingWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListVirtualNetworkInterfacesWOptions(); + testDeleteSecurityGroupTargetBindingWOptions(); vpcService.disableRetries(); - testListVirtualNetworkInterfacesWOptions(); + testDeleteSecurityGroupTargetBindingWOptions(); } - // Test the listVirtualNetworkInterfaces operation using the VirtualNetworkInterfacesPager.getNext() method - @Test - public void testListVirtualNetworkInterfacesWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"virtual_network_interfaces\":[{\"allow_ip_spoofing\":true,\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"enable_infrastructure_nat\":true,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"lifecycle_state\":\"stable\",\"mac_address\":\"02:00:4D:45:45:4D\",\"name\":\"my-virtual-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"protocol_state_filtering_mode\":\"auto\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"virtual_network_interface\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"id\":\"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"name\":\"my-share-mount-target\",\"resource_type\":\"share_mount_target\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"virtual_network_interfaces\":[{\"allow_ip_spoofing\":true,\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"enable_infrastructure_nat\":true,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"lifecycle_state\":\"stable\",\"mac_address\":\"02:00:4D:45:45:4D\",\"name\":\"my-virtual-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"protocol_state_filtering_mode\":\"auto\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"virtual_network_interface\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"id\":\"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"name\":\"my-share-mount-target\",\"resource_type\":\"share_mount_target\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListVirtualNetworkInterfacesOptions listVirtualNetworkInterfacesOptions = new ListVirtualNetworkInterfacesOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .build(); - - List allResults = new ArrayList<>(); - VirtualNetworkInterfacesPager pager = new VirtualNetworkInterfacesPager(vpcService, listVirtualNetworkInterfacesOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + // Test the deleteSecurityGroupTargetBinding operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testDeleteSecurityGroupTargetBindingNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.deleteSecurityGroupTargetBinding(null).execute(); } - - // Test the listVirtualNetworkInterfaces operation using the VirtualNetworkInterfacesPager.getAll() method - @Test - public void testListVirtualNetworkInterfacesWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"virtual_network_interfaces\":[{\"allow_ip_spoofing\":true,\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"enable_infrastructure_nat\":true,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"lifecycle_state\":\"stable\",\"mac_address\":\"02:00:4D:45:45:4D\",\"name\":\"my-virtual-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"protocol_state_filtering_mode\":\"auto\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"virtual_network_interface\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"id\":\"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"name\":\"my-share-mount-target\",\"resource_type\":\"share_mount_target\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"virtual_network_interfaces\":[{\"allow_ip_spoofing\":true,\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"enable_infrastructure_nat\":true,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"lifecycle_state\":\"stable\",\"mac_address\":\"02:00:4D:45:45:4D\",\"name\":\"my-virtual-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"protocol_state_filtering_mode\":\"auto\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"virtual_network_interface\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"id\":\"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"name\":\"my-share-mount-target\",\"resource_type\":\"share_mount_target\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListVirtualNetworkInterfacesOptions listVirtualNetworkInterfacesOptions = new ListVirtualNetworkInterfacesOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .build(); - VirtualNetworkInterfacesPager pager = new VirtualNetworkInterfacesPager(vpcService, listVirtualNetworkInterfacesOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the createVirtualNetworkInterface operation with a valid options model parameter + // Test the getSecurityGroup operation with a valid options model parameter @Test - public void testCreateVirtualNetworkInterfaceWOptions() throws Throwable { + public void testGetSecurityGroupWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"allow_ip_spoofing\": true, \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"enable_infrastructure_nat\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"lifecycle_state\": \"stable\", \"mac_address\": \"02:00:4D:45:45:4D\", \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"virtual_network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"name\": \"my-share-mount-target\", \"resource_type\": \"share_mount_target\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String createVirtualNetworkInterfacePath = "/virtual_network_interfaces"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"rules\": [{\"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"id\": \"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"ip_version\": \"ipv4\", \"local\": {\"address\": \"192.168.3.4\"}, \"remote\": {\"address\": \"192.168.3.4\"}, \"protocol\": \"all\"}], \"targets\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"resource_type\": \"network_interface\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String getSecurityGroupPath = "/security_groups/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById model - VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById virtualNetworkInterfaceIpPrototypeModel = new VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById.Builder() - .id("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") - .build(); - - // Construct an instance of the VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById model - VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById virtualNetworkInterfacePrimaryIpPrototypeModel = new VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById.Builder() - .id("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") - .build(); - - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); - - // Construct an instance of the SecurityGroupIdentityById model - SecurityGroupIdentityById securityGroupIdentityModel = new SecurityGroupIdentityById.Builder() - .id("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") - .build(); - - // Construct an instance of the SubnetIdentityById model - SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() - .id("69e55145-cc7d-4d8e-9e1f-cc3fb60b1793") - .build(); - - // Construct an instance of the CreateVirtualNetworkInterfaceOptions model - CreateVirtualNetworkInterfaceOptions createVirtualNetworkInterfaceOptionsModel = new CreateVirtualNetworkInterfaceOptions.Builder() - .allowIpSpoofing(false) - .autoDelete(false) - .enableInfrastructureNat(true) - .ips(java.util.Arrays.asList(virtualNetworkInterfaceIpPrototypeModel)) - .name("my-virtual-network-interface") - .primaryIp(virtualNetworkInterfacePrimaryIpPrototypeModel) - .protocolStateFilteringMode("auto") - .resourceGroup(resourceGroupIdentityModel) - .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) - .subnet(subnetIdentityModel) + // Construct an instance of the GetSecurityGroupOptions model + GetSecurityGroupOptions getSecurityGroupOptionsModel = new GetSecurityGroupOptions.Builder() + .id("testString") .build(); - // Invoke createVirtualNetworkInterface() with a valid options model and verify the result - Response response = vpcService.createVirtualNetworkInterface(createVirtualNetworkInterfaceOptionsModel).execute(); + // Invoke getSecurityGroup() with a valid options model and verify the result + Response response = vpcService.getSecurityGroup(getSecurityGroupOptionsModel).execute(); assertNotNull(response); - VirtualNetworkInterface responseObj = response.getResult(); + SecurityGroup responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createVirtualNetworkInterfacePath); + assertEquals(parsedPath, getSecurityGroupPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createVirtualNetworkInterface operation with and without retries enabled + // Test the getSecurityGroup operation with and without retries enabled @Test - public void testCreateVirtualNetworkInterfaceWRetries() throws Throwable { + public void testGetSecurityGroupWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateVirtualNetworkInterfaceWOptions(); + testGetSecurityGroupWOptions(); vpcService.disableRetries(); - testCreateVirtualNetworkInterfaceWOptions(); + testGetSecurityGroupWOptions(); } - // Test the deleteVirtualNetworkInterfaces operation with a valid options model parameter + // Test the getSecurityGroup operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testGetSecurityGroupNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.getSecurityGroup(null).execute(); + } + + // Test the getSecurityGroupRule operation with a valid options model parameter @Test - public void testDeleteVirtualNetworkInterfacesWOptions() throws Throwable { + public void testGetSecurityGroupRuleWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"allow_ip_spoofing\": true, \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"enable_infrastructure_nat\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"lifecycle_state\": \"stable\", \"mac_address\": \"02:00:4D:45:45:4D\", \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"virtual_network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"name\": \"my-share-mount-target\", \"resource_type\": \"share_mount_target\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String deleteVirtualNetworkInterfacesPath = "/virtual_network_interfaces/testString"; + String mockResponseBody = "{\"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"id\": \"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"ip_version\": \"ipv4\", \"local\": {\"address\": \"192.168.3.4\"}, \"remote\": {\"address\": \"192.168.3.4\"}, \"protocol\": \"all\"}"; + String getSecurityGroupRulePath = "/security_groups/testString/rules/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(202) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteVirtualNetworkInterfacesOptions model - DeleteVirtualNetworkInterfacesOptions deleteVirtualNetworkInterfacesOptionsModel = new DeleteVirtualNetworkInterfacesOptions.Builder() + // Construct an instance of the GetSecurityGroupRuleOptions model + GetSecurityGroupRuleOptions getSecurityGroupRuleOptionsModel = new GetSecurityGroupRuleOptions.Builder() + .securityGroupId("testString") .id("testString") .build(); - // Invoke deleteVirtualNetworkInterfaces() with a valid options model and verify the result - Response response = vpcService.deleteVirtualNetworkInterfaces(deleteVirtualNetworkInterfacesOptionsModel).execute(); + // Invoke getSecurityGroupRule() with a valid options model and verify the result + Response response = vpcService.getSecurityGroupRule(getSecurityGroupRuleOptionsModel).execute(); assertNotNull(response); - VirtualNetworkInterface responseObj = response.getResult(); + SecurityGroupRule 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteVirtualNetworkInterfacesPath); + assertEquals(parsedPath, getSecurityGroupRulePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteVirtualNetworkInterfaces operation with and without retries enabled + // Test the getSecurityGroupRule operation with and without retries enabled @Test - public void testDeleteVirtualNetworkInterfacesWRetries() throws Throwable { + public void testGetSecurityGroupRuleWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteVirtualNetworkInterfacesWOptions(); + testGetSecurityGroupRuleWOptions(); vpcService.disableRetries(); - testDeleteVirtualNetworkInterfacesWOptions(); + testGetSecurityGroupRuleWOptions(); } - // Test the deleteVirtualNetworkInterfaces operation with a null options model (negative test) + // Test the getSecurityGroupRule operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteVirtualNetworkInterfacesNoOptions() throws Throwable { + public void testGetSecurityGroupRuleNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteVirtualNetworkInterfaces(null).execute(); + vpcService.getSecurityGroupRule(null).execute(); } - // Test the getVirtualNetworkInterface operation with a valid options model parameter + // Test the getSecurityGroupTarget operation with a valid options model parameter @Test - public void testGetVirtualNetworkInterfaceWOptions() throws Throwable { + public void testGetSecurityGroupTargetWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"allow_ip_spoofing\": true, \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"enable_infrastructure_nat\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"lifecycle_state\": \"stable\", \"mac_address\": \"02:00:4D:45:45:4D\", \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"virtual_network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"name\": \"my-share-mount-target\", \"resource_type\": \"share_mount_target\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String getVirtualNetworkInterfacePath = "/virtual_network_interfaces/testString"; + String mockResponseBody = "{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"resource_type\": \"network_interface\"}"; + String getSecurityGroupTargetPath = "/security_groups/testString/targets/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetVirtualNetworkInterfaceOptions model - GetVirtualNetworkInterfaceOptions getVirtualNetworkInterfaceOptionsModel = new GetVirtualNetworkInterfaceOptions.Builder() + // Construct an instance of the GetSecurityGroupTargetOptions model + GetSecurityGroupTargetOptions getSecurityGroupTargetOptionsModel = new GetSecurityGroupTargetOptions.Builder() + .securityGroupId("testString") .id("testString") .build(); - // Invoke getVirtualNetworkInterface() with a valid options model and verify the result - Response response = vpcService.getVirtualNetworkInterface(getVirtualNetworkInterfaceOptionsModel).execute(); + // Invoke getSecurityGroupTarget() with a valid options model and verify the result + Response response = vpcService.getSecurityGroupTarget(getSecurityGroupTargetOptionsModel).execute(); assertNotNull(response); - VirtualNetworkInterface responseObj = response.getResult(); + SecurityGroupTargetReference responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -20938,118 +22648,106 @@ public void testGetVirtualNetworkInterfaceWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getVirtualNetworkInterfacePath); + assertEquals(parsedPath, getSecurityGroupTargetPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getVirtualNetworkInterface operation with and without retries enabled + // Test the getSecurityGroupTarget operation with and without retries enabled @Test - public void testGetVirtualNetworkInterfaceWRetries() throws Throwable { + public void testGetSecurityGroupTargetWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetVirtualNetworkInterfaceWOptions(); + testGetSecurityGroupTargetWOptions(); vpcService.disableRetries(); - testGetVirtualNetworkInterfaceWOptions(); + testGetSecurityGroupTargetWOptions(); } - // Test the getVirtualNetworkInterface operation with a null options model (negative test) + // Test the getSecurityGroupTarget operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetVirtualNetworkInterfaceNoOptions() throws Throwable { + public void testGetSecurityGroupTargetNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getVirtualNetworkInterface(null).execute(); + vpcService.getSecurityGroupTarget(null).execute(); } - // Test the updateVirtualNetworkInterface operation with a valid options model parameter + // Test the listSecurityGroupRules operation with a valid options model parameter @Test - public void testUpdateVirtualNetworkInterfaceWOptions() throws Throwable { + public void testListSecurityGroupRulesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"allow_ip_spoofing\": true, \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"enable_infrastructure_nat\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"lifecycle_state\": \"stable\", \"mac_address\": \"02:00:4D:45:45:4D\", \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"virtual_network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"name\": \"my-share-mount-target\", \"resource_type\": \"share_mount_target\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String updateVirtualNetworkInterfacePath = "/virtual_network_interfaces/testString"; + String mockResponseBody = "{\"rules\": [{\"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"id\": \"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"ip_version\": \"ipv4\", \"local\": {\"address\": \"192.168.3.4\"}, \"remote\": {\"address\": \"192.168.3.4\"}, \"protocol\": \"all\"}]}"; + String listSecurityGroupRulesPath = "/security_groups/testString/rules"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the VirtualNetworkInterfacePatch model - VirtualNetworkInterfacePatch virtualNetworkInterfacePatchModel = new VirtualNetworkInterfacePatch.Builder() - .allowIpSpoofing(true) - .autoDelete(false) - .enableInfrastructureNat(true) - .name("my-virtual-network-interface") - .protocolStateFilteringMode("auto") - .build(); - Map virtualNetworkInterfacePatchModelAsPatch = virtualNetworkInterfacePatchModel.asPatch(); - - // Construct an instance of the UpdateVirtualNetworkInterfaceOptions model - UpdateVirtualNetworkInterfaceOptions updateVirtualNetworkInterfaceOptionsModel = new UpdateVirtualNetworkInterfaceOptions.Builder() - .id("testString") - .virtualNetworkInterfacePatch(virtualNetworkInterfacePatchModelAsPatch) + // Construct an instance of the ListSecurityGroupRulesOptions model + ListSecurityGroupRulesOptions listSecurityGroupRulesOptionsModel = new ListSecurityGroupRulesOptions.Builder() + .securityGroupId("testString") .build(); - // Invoke updateVirtualNetworkInterface() with a valid options model and verify the result - Response response = vpcService.updateVirtualNetworkInterface(updateVirtualNetworkInterfaceOptionsModel).execute(); + // Invoke listSecurityGroupRules() with a valid options model and verify the result + Response response = vpcService.listSecurityGroupRules(listSecurityGroupRulesOptionsModel).execute(); assertNotNull(response); - VirtualNetworkInterface responseObj = response.getResult(); + SecurityGroupRuleCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateVirtualNetworkInterfacePath); + assertEquals(parsedPath, listSecurityGroupRulesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateVirtualNetworkInterface operation with and without retries enabled + // Test the listSecurityGroupRules operation with and without retries enabled @Test - public void testUpdateVirtualNetworkInterfaceWRetries() throws Throwable { + public void testListSecurityGroupRulesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateVirtualNetworkInterfaceWOptions(); + testListSecurityGroupRulesWOptions(); vpcService.disableRetries(); - testUpdateVirtualNetworkInterfaceWOptions(); + testListSecurityGroupRulesWOptions(); } - // Test the updateVirtualNetworkInterface operation with a null options model (negative test) + // Test the listSecurityGroupRules operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateVirtualNetworkInterfaceNoOptions() throws Throwable { + public void testListSecurityGroupRulesNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateVirtualNetworkInterface(null).execute(); + vpcService.listSecurityGroupRules(null).execute(); } - // Test the listNetworkInterfaceFloatingIps operation with a valid options model parameter + // Test the listSecurityGroupTargets operation with a valid options model parameter @Test - public void testListNetworkInterfaceFloatingIpsWOptions() throws Throwable { + public void testListSecurityGroupTargetsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"floating_ips\": [{\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listNetworkInterfaceFloatingIpsPath = "/virtual_network_interfaces/testString/floating_ips"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"targets\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"resource_type\": \"network_interface\"}], \"total_count\": 132}"; + String listSecurityGroupTargetsPath = "/security_groups/testString/targets"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListNetworkInterfaceFloatingIpsOptions model - ListNetworkInterfaceFloatingIpsOptions listNetworkInterfaceFloatingIpsOptionsModel = new ListNetworkInterfaceFloatingIpsOptions.Builder() - .virtualNetworkInterfaceId("testString") + // Construct an instance of the ListSecurityGroupTargetsOptions model + ListSecurityGroupTargetsOptions listSecurityGroupTargetsOptionsModel = new ListSecurityGroupTargetsOptions.Builder() + .securityGroupId("testString") .start("testString") .limit(Long.valueOf("10")) - .sort("name") .build(); - // Invoke listNetworkInterfaceFloatingIps() with a valid options model and verify the result - Response response = vpcService.listNetworkInterfaceFloatingIps(listNetworkInterfaceFloatingIpsOptionsModel).execute(); + // Invoke listSecurityGroupTargets() with a valid options model and verify the result + Response response = vpcService.listSecurityGroupTargets(listSecurityGroupTargetsOptionsModel).execute(); assertNotNull(response); - FloatingIPCollectionVirtualNetworkInterfaceContext responseObj = response.getResult(); + SecurityGroupTargetCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -21058,40 +22756,39 @@ public void testListNetworkInterfaceFloatingIpsWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listNetworkInterfaceFloatingIpsPath); + assertEquals(parsedPath, listSecurityGroupTargetsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("sort"), "name"); } - // Test the listNetworkInterfaceFloatingIps operation with and without retries enabled + // Test the listSecurityGroupTargets operation with and without retries enabled @Test - public void testListNetworkInterfaceFloatingIpsWRetries() throws Throwable { + public void testListSecurityGroupTargetsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListNetworkInterfaceFloatingIpsWOptions(); + testListSecurityGroupTargetsWOptions(); vpcService.disableRetries(); - testListNetworkInterfaceFloatingIpsWOptions(); + testListSecurityGroupTargetsWOptions(); } - // Test the listNetworkInterfaceFloatingIps operation with a null options model (negative test) + // Test the listSecurityGroupTargets operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListNetworkInterfaceFloatingIpsNoOptions() throws Throwable { + public void testListSecurityGroupTargetsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listNetworkInterfaceFloatingIps(null).execute(); + vpcService.listSecurityGroupTargets(null).execute(); } - // Test the listNetworkInterfaceFloatingIps operation using the NetworkInterfaceFloatingIpsPager.getNext() method + // Test the listSecurityGroupTargets operation using the SecurityGroupTargetsPager.getNext() method @Test - public void testListNetworkInterfaceFloatingIpsWithPagerGetNext() throws Throwable { + public void testListSecurityGroupTargetsWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"floating_ips\":[{\"address\":\"203.0.113.1\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"floating_ips\":[{\"address\":\"203.0.113.1\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\"}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"targets\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"resource_type\":\"network_interface\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"targets\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"resource_type\":\"network_interface\"}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -21105,28 +22802,27 @@ public void testListNetworkInterfaceFloatingIpsWithPagerGetNext() throws Throwab .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListNetworkInterfaceFloatingIpsOptions listNetworkInterfaceFloatingIpsOptions = new ListNetworkInterfaceFloatingIpsOptions.Builder() - .virtualNetworkInterfaceId("testString") + ListSecurityGroupTargetsOptions listSecurityGroupTargetsOptions = new ListSecurityGroupTargetsOptions.Builder() + .securityGroupId("testString") .limit(Long.valueOf("10")) - .sort("name") .build(); - List allResults = new ArrayList<>(); - NetworkInterfaceFloatingIpsPager pager = new NetworkInterfaceFloatingIpsPager(vpcService, listNetworkInterfaceFloatingIpsOptions); + List allResults = new ArrayList<>(); + SecurityGroupTargetsPager pager = new SecurityGroupTargetsPager(vpcService, listSecurityGroupTargetsOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listNetworkInterfaceFloatingIps operation using the NetworkInterfaceFloatingIpsPager.getAll() method + // Test the listSecurityGroupTargets operation using the SecurityGroupTargetsPager.getAll() method @Test - public void testListNetworkInterfaceFloatingIpsWithPagerGetAll() throws Throwable { + public void testListSecurityGroupTargetsWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"floating_ips\":[{\"address\":\"203.0.113.1\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"floating_ips\":[{\"address\":\"203.0.113.1\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\"}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"targets\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"resource_type\":\"network_interface\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"targets\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"resource_type\":\"network_interface\"}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -21140,1120 +22836,1048 @@ public void testListNetworkInterfaceFloatingIpsWithPagerGetAll() throws Throwabl .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListNetworkInterfaceFloatingIpsOptions listNetworkInterfaceFloatingIpsOptions = new ListNetworkInterfaceFloatingIpsOptions.Builder() - .virtualNetworkInterfaceId("testString") + ListSecurityGroupTargetsOptions listSecurityGroupTargetsOptions = new ListSecurityGroupTargetsOptions.Builder() + .securityGroupId("testString") .limit(Long.valueOf("10")) - .sort("name") .build(); - NetworkInterfaceFloatingIpsPager pager = new NetworkInterfaceFloatingIpsPager(vpcService, listNetworkInterfaceFloatingIpsOptions); - List allResults = pager.getAll(); + SecurityGroupTargetsPager pager = new SecurityGroupTargetsPager(vpcService, listSecurityGroupTargetsOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the removeNetworkInterfaceFloatingIp operation with a valid options model parameter + // Test the listSecurityGroups operation with a valid options model parameter @Test - public void testRemoveNetworkInterfaceFloatingIpWOptions() throws Throwable { + public void testListSecurityGroupsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String removeNetworkInterfaceFloatingIpPath = "/virtual_network_interfaces/testString/floating_ips/testString"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"security_groups\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"rules\": [{\"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"id\": \"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"ip_version\": \"ipv4\", \"local\": {\"address\": \"192.168.3.4\"}, \"remote\": {\"address\": \"192.168.3.4\"}, \"protocol\": \"all\"}], \"targets\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"resource_type\": \"network_interface\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}], \"total_count\": 132}"; + String listSecurityGroupsPath = "/security_groups"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the RemoveNetworkInterfaceFloatingIpOptions model - RemoveNetworkInterfaceFloatingIpOptions removeNetworkInterfaceFloatingIpOptionsModel = new RemoveNetworkInterfaceFloatingIpOptions.Builder() - .virtualNetworkInterfaceId("testString") - .id("testString") + // Construct an instance of the ListSecurityGroupsOptions model + ListSecurityGroupsOptions listSecurityGroupsOptionsModel = new ListSecurityGroupsOptions.Builder() + .start("testString") + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .vpcId("testString") + .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .vpcName("my-vpc") .build(); - // Invoke removeNetworkInterfaceFloatingIp() with a valid options model and verify the result - Response response = vpcService.removeNetworkInterfaceFloatingIp(removeNetworkInterfaceFloatingIpOptionsModel).execute(); + // Invoke listSecurityGroups() with a valid options model and verify the result + Response response = vpcService.listSecurityGroups(listSecurityGroupsOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + SecurityGroupCollection 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, removeNetworkInterfaceFloatingIpPath); + assertEquals(parsedPath, listSecurityGroupsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("resource_group.id"), "testString"); + assertEquals(query.get("vpc.id"), "testString"); + assertEquals(query.get("vpc.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); + assertEquals(query.get("vpc.name"), "my-vpc"); } - // Test the removeNetworkInterfaceFloatingIp operation with and without retries enabled + // Test the listSecurityGroups operation with and without retries enabled @Test - public void testRemoveNetworkInterfaceFloatingIpWRetries() throws Throwable { + public void testListSecurityGroupsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testRemoveNetworkInterfaceFloatingIpWOptions(); + testListSecurityGroupsWOptions(); + + vpcService.disableRetries(); + testListSecurityGroupsWOptions(); + } + + // Test the listSecurityGroups operation using the SecurityGroupsPager.getNext() method + @Test + public void testListSecurityGroupsWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"security_groups\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"rules\":[{\"direction\":\"inbound\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\",\"id\":\"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\",\"ip_version\":\"ipv4\",\"local\":{\"address\":\"192.168.3.4\"},\"remote\":{\"address\":\"192.168.3.4\"},\"protocol\":\"all\"}],\"targets\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"resource_type\":\"network_interface\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"security_groups\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"rules\":[{\"direction\":\"inbound\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\",\"id\":\"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\",\"ip_version\":\"ipv4\",\"local\":{\"address\":\"192.168.3.4\"},\"remote\":{\"address\":\"192.168.3.4\"},\"protocol\":\"all\"}],\"targets\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"resource_type\":\"network_interface\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListSecurityGroupsOptions listSecurityGroupsOptions = new ListSecurityGroupsOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .vpcId("testString") + .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .vpcName("my-vpc") + .build(); + + List allResults = new ArrayList<>(); + SecurityGroupsPager pager = new SecurityGroupsPager(vpcService, listSecurityGroupsOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); + } + + // Test the listSecurityGroups operation using the SecurityGroupsPager.getAll() method + @Test + public void testListSecurityGroupsWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"security_groups\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"rules\":[{\"direction\":\"inbound\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\",\"id\":\"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\",\"ip_version\":\"ipv4\",\"local\":{\"address\":\"192.168.3.4\"},\"remote\":{\"address\":\"192.168.3.4\"},\"protocol\":\"all\"}],\"targets\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"resource_type\":\"network_interface\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"security_groups\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"rules\":[{\"direction\":\"inbound\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\",\"id\":\"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\",\"ip_version\":\"ipv4\",\"local\":{\"address\":\"192.168.3.4\"},\"remote\":{\"address\":\"192.168.3.4\"},\"protocol\":\"all\"}],\"targets\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"resource_type\":\"network_interface\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - vpcService.disableRetries(); - testRemoveNetworkInterfaceFloatingIpWOptions(); - } + ListSecurityGroupsOptions listSecurityGroupsOptions = new ListSecurityGroupsOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .vpcId("testString") + .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .vpcName("my-vpc") + .build(); - // Test the removeNetworkInterfaceFloatingIp operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testRemoveNetworkInterfaceFloatingIpNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.removeNetworkInterfaceFloatingIp(null).execute(); + SecurityGroupsPager pager = new SecurityGroupsPager(vpcService, listSecurityGroupsOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); } - - // Test the getNetworkInterfaceFloatingIp operation with a valid options model parameter + + // Test the updateSecurityGroup operation with a valid options model parameter @Test - public void testGetNetworkInterfaceFloatingIpWOptions() throws Throwable { + public void testUpdateSecurityGroupWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}"; - String getNetworkInterfaceFloatingIpPath = "/virtual_network_interfaces/testString/floating_ips/testString"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"rules\": [{\"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"id\": \"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"ip_version\": \"ipv4\", \"local\": {\"address\": \"192.168.3.4\"}, \"remote\": {\"address\": \"192.168.3.4\"}, \"protocol\": \"all\"}], \"targets\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"resource_type\": \"network_interface\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String updateSecurityGroupPath = "/security_groups/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetNetworkInterfaceFloatingIpOptions model - GetNetworkInterfaceFloatingIpOptions getNetworkInterfaceFloatingIpOptionsModel = new GetNetworkInterfaceFloatingIpOptions.Builder() - .virtualNetworkInterfaceId("testString") + // Construct an instance of the SecurityGroupPatch model + SecurityGroupPatch securityGroupPatchModel = new SecurityGroupPatch.Builder() + .name("my-security-group") + .build(); + Map securityGroupPatchModelAsPatch = securityGroupPatchModel.asPatch(); + + // Construct an instance of the UpdateSecurityGroupOptions model + UpdateSecurityGroupOptions updateSecurityGroupOptionsModel = new UpdateSecurityGroupOptions.Builder() .id("testString") + .securityGroupPatch(securityGroupPatchModelAsPatch) .build(); - // Invoke getNetworkInterfaceFloatingIp() with a valid options model and verify the result - Response response = vpcService.getNetworkInterfaceFloatingIp(getNetworkInterfaceFloatingIpOptionsModel).execute(); + // Invoke updateSecurityGroup() with a valid options model and verify the result + Response response = vpcService.updateSecurityGroup(updateSecurityGroupOptionsModel).execute(); assertNotNull(response); - FloatingIPReference responseObj = response.getResult(); + SecurityGroup responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getNetworkInterfaceFloatingIpPath); + assertEquals(parsedPath, updateSecurityGroupPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getNetworkInterfaceFloatingIp operation with and without retries enabled + // Test the updateSecurityGroup operation with and without retries enabled @Test - public void testGetNetworkInterfaceFloatingIpWRetries() throws Throwable { + public void testUpdateSecurityGroupWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetNetworkInterfaceFloatingIpWOptions(); + testUpdateSecurityGroupWOptions(); vpcService.disableRetries(); - testGetNetworkInterfaceFloatingIpWOptions(); + testUpdateSecurityGroupWOptions(); } - // Test the getNetworkInterfaceFloatingIp operation with a null options model (negative test) + // Test the updateSecurityGroup operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetNetworkInterfaceFloatingIpNoOptions() throws Throwable { + public void testUpdateSecurityGroupNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getNetworkInterfaceFloatingIp(null).execute(); + vpcService.updateSecurityGroup(null).execute(); } - // Test the addNetworkInterfaceFloatingIp operation with a valid options model parameter + // Test the updateSecurityGroupRule operation with a valid options model parameter @Test - public void testAddNetworkInterfaceFloatingIpWOptions() throws Throwable { + public void testUpdateSecurityGroupRuleWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}"; - String addNetworkInterfaceFloatingIpPath = "/virtual_network_interfaces/testString/floating_ips/testString"; + String mockResponseBody = "{\"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"id\": \"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"ip_version\": \"ipv4\", \"local\": {\"address\": \"192.168.3.4\"}, \"remote\": {\"address\": \"192.168.3.4\"}, \"protocol\": \"all\"}"; + String updateSecurityGroupRulePath = "/security_groups/testString/rules/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the AddNetworkInterfaceFloatingIpOptions model - AddNetworkInterfaceFloatingIpOptions addNetworkInterfaceFloatingIpOptionsModel = new AddNetworkInterfaceFloatingIpOptions.Builder() - .virtualNetworkInterfaceId("testString") + // Construct an instance of the SecurityGroupRuleLocalPatchIP model + SecurityGroupRuleLocalPatchIP securityGroupRuleLocalPatchModel = new SecurityGroupRuleLocalPatchIP.Builder() + .address("192.168.3.4") + .build(); + + // Construct an instance of the SecurityGroupRuleRemotePatchCIDR model + SecurityGroupRuleRemotePatchCIDR securityGroupRuleRemotePatchModel = new SecurityGroupRuleRemotePatchCIDR.Builder() + .cidrBlock("10.0.0.0/8") + .build(); + + // Construct an instance of the SecurityGroupRulePatch model + SecurityGroupRulePatch securityGroupRulePatchModel = new SecurityGroupRulePatch.Builder() + .code(Long.valueOf("0")) + .direction("inbound") + .ipVersion("ipv4") + .local(securityGroupRuleLocalPatchModel) + .portMax(Long.valueOf("22")) + .portMin(Long.valueOf("22")) + .remote(securityGroupRuleRemotePatchModel) + .type(Long.valueOf("8")) + .build(); + Map securityGroupRulePatchModelAsPatch = securityGroupRulePatchModel.asPatch(); + + // Construct an instance of the UpdateSecurityGroupRuleOptions model + UpdateSecurityGroupRuleOptions updateSecurityGroupRuleOptionsModel = new UpdateSecurityGroupRuleOptions.Builder() + .securityGroupId("testString") .id("testString") + .securityGroupRulePatch(securityGroupRulePatchModelAsPatch) .build(); - // Invoke addNetworkInterfaceFloatingIp() with a valid options model and verify the result - Response response = vpcService.addNetworkInterfaceFloatingIp(addNetworkInterfaceFloatingIpOptionsModel).execute(); + // Invoke updateSecurityGroupRule() with a valid options model and verify the result + Response response = vpcService.updateSecurityGroupRule(updateSecurityGroupRuleOptionsModel).execute(); assertNotNull(response); - FloatingIPReference responseObj = response.getResult(); + SecurityGroupRule 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"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, addNetworkInterfaceFloatingIpPath); + assertEquals(parsedPath, updateSecurityGroupRulePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the addNetworkInterfaceFloatingIp operation with and without retries enabled + // Test the updateSecurityGroupRule operation with and without retries enabled @Test - public void testAddNetworkInterfaceFloatingIpWRetries() throws Throwable { + public void testUpdateSecurityGroupRuleWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testAddNetworkInterfaceFloatingIpWOptions(); + testUpdateSecurityGroupRuleWOptions(); vpcService.disableRetries(); - testAddNetworkInterfaceFloatingIpWOptions(); + testUpdateSecurityGroupRuleWOptions(); } - // Test the addNetworkInterfaceFloatingIp operation with a null options model (negative test) + // Test the updateSecurityGroupRule operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testAddNetworkInterfaceFloatingIpNoOptions() throws Throwable { + public void testUpdateSecurityGroupRuleNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.addNetworkInterfaceFloatingIp(null).execute(); + vpcService.updateSecurityGroupRule(null).execute(); } - // Test the listVirtualNetworkInterfaceIps operation with a valid options model parameter + // Test the createShare operation with a valid options model parameter @Test - public void testListVirtualNetworkInterfaceIpsWOptions() throws Throwable { + public void testCreateShareWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listVirtualNetworkInterfaceIpsPath = "/virtual_network_interfaces/testString/ips"; + String mockResponseBody = "{\"access_control_mode\": \"security_group\", \"accessor_binding_role\": \"accessor\", \"accessor_bindings\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\", \"id\": \"r006-ce9dac18-dea0-4392-841c-142d3300674f\", \"resource_type\": \"share_accessor_binding\"}], \"allowed_access_protocols\": [\"nfs4\"], \"allowed_transit_encryption_modes\": [\"ipsec\"], \"availability_mode\": \"zonal\", \"bandwidth\": 1, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"initial_owner\": {\"gid\": 50, \"uid\": 50}, \"iops\": 100, \"latest_job\": {\"status\": \"cancelled\", \"status_reasons\": [{\"code\": \"cannot_reach_source_share\", \"message\": \"The replication failover failed because the source share cannot be reached.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}], \"type\": \"replication_failover\"}, \"latest_sync\": {\"completed_at\": \"2019-01-01T12:00:00.000Z\", \"data_transferred\": 0, \"started_at\": \"2019-01-01T12:00:00.000Z\"}, \"lifecycle_reasons\": [{\"code\": \"cloning_in_progress\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"mount_targets\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"name\": \"my-share-mount-target\", \"resource_type\": \"share_mount_target\"}], \"name\": \"my-share\", \"origin_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\", \"name\": \"tier-3iops\", \"resource_type\": \"share_profile\"}, \"replica_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"replication_cron_spec\": \"0 */5 * * *\", \"replication_role\": \"none\", \"replication_status\": \"active\", \"replication_status_reasons\": [{\"code\": \"cannot_reach_source_share\", \"message\": \"The replication failover failed because the source share cannot be reached.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"share\", \"size\": 200, \"snapshot_count\": 0, \"snapshot_size\": 0, \"source_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"id\": \"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"name\": \"my-share-snapshot\", \"resource_type\": \"share_snapshot\"}, \"storage_generation\": 1, \"user_tags\": [\"userTags\"], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String createSharePath = "/shares"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the ListVirtualNetworkInterfaceIpsOptions model - ListVirtualNetworkInterfaceIpsOptions listVirtualNetworkInterfaceIpsOptionsModel = new ListVirtualNetworkInterfaceIpsOptions.Builder() - .virtualNetworkInterfaceId("testString") - .start("testString") - .limit(Long.valueOf("10")) - .sort("name") + // Construct an instance of the VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext model + VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtualNetworkInterfaceIpPrototypeModel = new VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext.Builder() + .address("10.0.0.5") + .autoDelete(false) + .name("my-reserved-ip") .build(); - // Invoke listVirtualNetworkInterfaceIps() with a valid options model and verify the result - Response response = vpcService.listVirtualNetworkInterfaceIps(listVirtualNetworkInterfaceIpsOptionsModel).execute(); + // Construct an instance of the VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model + VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext virtualNetworkInterfacePrimaryIpPrototypeModel = new VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext.Builder() + .address("10.0.0.5") + .autoDelete(false) + .name("my-reserved-ip") + .build(); + + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") + .build(); + + // Construct an instance of the SecurityGroupIdentityById model + SecurityGroupIdentityById securityGroupIdentityModel = new SecurityGroupIdentityById.Builder() + .id("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + .build(); + + // Construct an instance of the SubnetIdentityById model + SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() + .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + .build(); + + // Construct an instance of the ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext model + ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext shareMountTargetVirtualNetworkInterfacePrototypeModel = new ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext.Builder() + .allowIpSpoofing(true) + .autoDelete(false) + .enableInfrastructureNat(true) + .ips(java.util.Arrays.asList(virtualNetworkInterfaceIpPrototypeModel)) + .name("my-virtual-network-interface") + .primaryIp(virtualNetworkInterfacePrimaryIpPrototypeModel) + .protocolStateFilteringMode("auto") + .resourceGroup(resourceGroupIdentityModel) + .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) + .subnet(subnetIdentityModel) + .build(); + + // Construct an instance of the ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup model + ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup shareMountTargetPrototypeModel = new ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.Builder() + .accessProtocol("nfs4") + .name("my-share-mount-target") + .transitEncryption("none") + .virtualNetworkInterface(shareMountTargetVirtualNetworkInterfacePrototypeModel) + .build(); + + // Construct an instance of the ShareProfileIdentityByName model + ShareProfileIdentityByName shareProfileIdentityModel = new ShareProfileIdentityByName.Builder() + .name("tier-3iops") + .build(); + + // Construct an instance of the ZoneIdentityByName model + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() + .name("us-south-1") + .build(); + + // Construct an instance of the SharePrototypeShareContext model + SharePrototypeShareContext sharePrototypeShareContextModel = new SharePrototypeShareContext.Builder() + .allowedTransitEncryptionModes(java.util.Arrays.asList("ipsec")) + .iops(Long.valueOf("100")) + .mountTargets(java.util.Arrays.asList(shareMountTargetPrototypeModel)) + .name("my-share") + .profile(shareProfileIdentityModel) + .replicationCronSpec("0 */5 * * *") + .resourceGroup(resourceGroupIdentityModel) + .userTags(java.util.Arrays.asList()) + .zone(zoneIdentityModel) + .build(); + + // Construct an instance of the EncryptionKeyIdentityByCRN model + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() + .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + .build(); + + // Construct an instance of the ShareInitialOwner model + ShareInitialOwner shareInitialOwnerModel = new ShareInitialOwner.Builder() + .gid(Long.valueOf("50")) + .uid(Long.valueOf("50")) + .build(); + + // Construct an instance of the SharePrototypeShareBySize model + SharePrototypeShareBySize sharePrototypeModel = new SharePrototypeShareBySize.Builder() + .allowedTransitEncryptionModes(java.util.Arrays.asList("ipsec")) + .mountTargets(java.util.Arrays.asList(shareMountTargetPrototypeModel)) + .name("my-share") + .replicaShare(sharePrototypeShareContextModel) + .userTags(java.util.Arrays.asList()) + .accessControlMode("security_group") + .allowedAccessProtocols(java.util.Arrays.asList("nfs4")) + .bandwidth(Long.valueOf("100")) + .encryptionKey(encryptionKeyIdentityModel) + .initialOwner(shareInitialOwnerModel) + .iops(Long.valueOf("100")) + .profile(shareProfileIdentityModel) + .resourceGroup(resourceGroupIdentityModel) + .size(Long.valueOf("200")) + .zone(zoneIdentityModel) + .build(); + + // Construct an instance of the CreateShareOptions model + CreateShareOptions createShareOptionsModel = new CreateShareOptions.Builder() + .sharePrototype(sharePrototypeModel) + .build(); + + // Invoke createShare() with a valid options model and verify the result + Response response = vpcService.createShare(createShareOptionsModel).execute(); assertNotNull(response); - ReservedIPCollectionVirtualNetworkInterfaceContext responseObj = response.getResult(); + Share responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listVirtualNetworkInterfaceIpsPath); + assertEquals(parsedPath, createSharePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("sort"), "name"); } - // Test the listVirtualNetworkInterfaceIps operation with and without retries enabled + // Test the createShare operation with and without retries enabled @Test - public void testListVirtualNetworkInterfaceIpsWRetries() throws Throwable { + public void testCreateShareWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListVirtualNetworkInterfaceIpsWOptions(); + testCreateShareWOptions(); vpcService.disableRetries(); - testListVirtualNetworkInterfaceIpsWOptions(); + testCreateShareWOptions(); } - // Test the listVirtualNetworkInterfaceIps operation with a null options model (negative test) + // Test the createShare operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListVirtualNetworkInterfaceIpsNoOptions() throws Throwable { + public void testCreateShareNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listVirtualNetworkInterfaceIps(null).execute(); + vpcService.createShare(null).execute(); } - // Test the listVirtualNetworkInterfaceIps operation using the VirtualNetworkInterfaceIpsPager.getNext() method + // Test the createShareMountTarget operation with a valid options model parameter @Test - public void testListVirtualNetworkInterfaceIpsWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); + public void testCreateShareMountTargetWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"access_control_mode\": \"security_group\", \"access_protocol\": \"nfs4\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"lifecycle_state\": \"stable\", \"mount_path\": \"10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e\", \"name\": \"my-share-mount-target\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"share_mount_target\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"transit_encryption\": \"none\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String createShareMountTargetPath = "/shares/testString/mount_targets"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); + .setResponseCode(201) + .setBody(mockResponseBody)); - ListVirtualNetworkInterfaceIpsOptions listVirtualNetworkInterfaceIpsOptions = new ListVirtualNetworkInterfaceIpsOptions.Builder() - .virtualNetworkInterfaceId("testString") - .limit(Long.valueOf("10")) - .sort("name") + // Construct an instance of the VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext model + VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtualNetworkInterfaceIpPrototypeModel = new VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext.Builder() + .address("10.0.0.5") + .autoDelete(false) + .name("my-reserved-ip") .build(); - List allResults = new ArrayList<>(); - VirtualNetworkInterfaceIpsPager pager = new VirtualNetworkInterfaceIpsPager(vpcService, listVirtualNetworkInterfaceIpsOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); - } - - // Test the listVirtualNetworkInterfaceIps operation using the VirtualNetworkInterfaceIpsPager.getAll() method - @Test - public void testListVirtualNetworkInterfaceIpsWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); + // Construct an instance of the VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model + VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext virtualNetworkInterfacePrimaryIpPrototypeModel = new VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext.Builder() + .address("10.0.0.5") + .autoDelete(false) + .name("my-reserved-ip") + .build(); - ListVirtualNetworkInterfaceIpsOptions listVirtualNetworkInterfaceIpsOptions = new ListVirtualNetworkInterfaceIpsOptions.Builder() - .virtualNetworkInterfaceId("testString") - .limit(Long.valueOf("10")) - .sort("name") + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") .build(); - VirtualNetworkInterfaceIpsPager pager = new VirtualNetworkInterfaceIpsPager(vpcService, listVirtualNetworkInterfaceIpsOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the removeVirtualNetworkInterfaceIp operation with a valid options model parameter - @Test - public void testRemoveVirtualNetworkInterfaceIpWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = ""; - String removeVirtualNetworkInterfaceIpPath = "/virtual_network_interfaces/testString/ips/testString"; - server.enqueue(new MockResponse() - .setResponseCode(204) - .setBody(mockResponseBody)); + // Construct an instance of the SecurityGroupIdentityById model + SecurityGroupIdentityById securityGroupIdentityModel = new SecurityGroupIdentityById.Builder() + .id("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + .build(); - // Construct an instance of the RemoveVirtualNetworkInterfaceIpOptions model - RemoveVirtualNetworkInterfaceIpOptions removeVirtualNetworkInterfaceIpOptionsModel = new RemoveVirtualNetworkInterfaceIpOptions.Builder() - .virtualNetworkInterfaceId("testString") - .id("testString") + // Construct an instance of the SubnetIdentityById model + SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() + .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") .build(); - // Invoke removeVirtualNetworkInterfaceIp() with a valid options model and verify the result - Response response = vpcService.removeVirtualNetworkInterfaceIp(removeVirtualNetworkInterfaceIpOptionsModel).execute(); + // Construct an instance of the ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext model + ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext shareMountTargetVirtualNetworkInterfacePrototypeModel = new ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext.Builder() + .allowIpSpoofing(true) + .autoDelete(false) + .enableInfrastructureNat(true) + .ips(java.util.Arrays.asList(virtualNetworkInterfaceIpPrototypeModel)) + .name("my-virtual-network-interface") + .primaryIp(virtualNetworkInterfacePrimaryIpPrototypeModel) + .protocolStateFilteringMode("auto") + .resourceGroup(resourceGroupIdentityModel) + .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) + .subnet(subnetIdentityModel) + .build(); + + // Construct an instance of the ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup model + ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup shareMountTargetPrototypeModel = new ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.Builder() + .accessProtocol("nfs4") + .name("my-share-mount-target") + .transitEncryption("none") + .virtualNetworkInterface(shareMountTargetVirtualNetworkInterfacePrototypeModel) + .build(); + + // Construct an instance of the CreateShareMountTargetOptions model + CreateShareMountTargetOptions createShareMountTargetOptionsModel = new CreateShareMountTargetOptions.Builder() + .shareId("testString") + .shareMountTargetPrototype(shareMountTargetPrototypeModel) + .build(); + + // Invoke createShareMountTarget() with a valid options model and verify the result + Response response = vpcService.createShareMountTarget(createShareMountTargetOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + ShareMountTarget 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(), "DELETE"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, removeVirtualNetworkInterfaceIpPath); + assertEquals(parsedPath, createShareMountTargetPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the removeVirtualNetworkInterfaceIp operation with and without retries enabled + // Test the createShareMountTarget operation with and without retries enabled @Test - public void testRemoveVirtualNetworkInterfaceIpWRetries() throws Throwable { + public void testCreateShareMountTargetWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testRemoveVirtualNetworkInterfaceIpWOptions(); + testCreateShareMountTargetWOptions(); vpcService.disableRetries(); - testRemoveVirtualNetworkInterfaceIpWOptions(); + testCreateShareMountTargetWOptions(); } - // Test the removeVirtualNetworkInterfaceIp operation with a null options model (negative test) + // Test the createShareMountTarget operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testRemoveVirtualNetworkInterfaceIpNoOptions() throws Throwable { + public void testCreateShareMountTargetNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.removeVirtualNetworkInterfaceIp(null).execute(); + vpcService.createShareMountTarget(null).execute(); } - // Test the getVirtualNetworkInterfaceIp operation with a valid options model parameter + // Test the createShareSnapshot operation with a valid options model parameter @Test - public void testGetVirtualNetworkInterfaceIpWOptions() throws Throwable { + public void testCreateShareSnapshotWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}"; - String getVirtualNetworkInterfaceIpPath = "/virtual_network_interfaces/testString/ips/testString"; + String mockResponseBody = "{\"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"captured_at\": \"2019-01-01T12:00:00.000Z\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"fingerprint\": \"7abc3aef-c2bc-4f65-a296-2928e534d498\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"id\": \"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"minimum_size\": 10, \"name\": \"my-share-snapshot\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"share_snapshot\", \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"user_tags\": [\"userTags\"], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String createShareSnapshotPath = "/shares/testString/snapshots"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the GetVirtualNetworkInterfaceIpOptions model - GetVirtualNetworkInterfaceIpOptions getVirtualNetworkInterfaceIpOptionsModel = new GetVirtualNetworkInterfaceIpOptions.Builder() - .virtualNetworkInterfaceId("testString") - .id("testString") + // Construct an instance of the CreateShareSnapshotOptions model + CreateShareSnapshotOptions createShareSnapshotOptionsModel = new CreateShareSnapshotOptions.Builder() + .shareId("testString") + .name("my-share-snapshot") + .userTags(java.util.Arrays.asList("testString")) .build(); - // Invoke getVirtualNetworkInterfaceIp() with a valid options model and verify the result - Response response = vpcService.getVirtualNetworkInterfaceIp(getVirtualNetworkInterfaceIpOptionsModel).execute(); + // Invoke createShareSnapshot() with a valid options model and verify the result + Response response = vpcService.createShareSnapshot(createShareSnapshotOptionsModel).execute(); assertNotNull(response); - ReservedIPReference responseObj = response.getResult(); + ShareSnapshot responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getVirtualNetworkInterfaceIpPath); + assertEquals(parsedPath, createShareSnapshotPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getVirtualNetworkInterfaceIp operation with and without retries enabled + // Test the createShareSnapshot operation with and without retries enabled @Test - public void testGetVirtualNetworkInterfaceIpWRetries() throws Throwable { + public void testCreateShareSnapshotWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetVirtualNetworkInterfaceIpWOptions(); + testCreateShareSnapshotWOptions(); vpcService.disableRetries(); - testGetVirtualNetworkInterfaceIpWOptions(); + testCreateShareSnapshotWOptions(); } - // Test the getVirtualNetworkInterfaceIp operation with a null options model (negative test) + // Test the createShareSnapshot operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetVirtualNetworkInterfaceIpNoOptions() throws Throwable { + public void testCreateShareSnapshotNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getVirtualNetworkInterfaceIp(null).execute(); + vpcService.createShareSnapshot(null).execute(); } - // Test the addVirtualNetworkInterfaceIp operation with a valid options model parameter + // Test the deleteShare operation with a valid options model parameter @Test - public void testAddVirtualNetworkInterfaceIpWOptions() throws Throwable { + public void testDeleteShareWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}"; - String addVirtualNetworkInterfaceIpPath = "/virtual_network_interfaces/testString/ips/testString"; + String mockResponseBody = "{\"access_control_mode\": \"security_group\", \"accessor_binding_role\": \"accessor\", \"accessor_bindings\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\", \"id\": \"r006-ce9dac18-dea0-4392-841c-142d3300674f\", \"resource_type\": \"share_accessor_binding\"}], \"allowed_access_protocols\": [\"nfs4\"], \"allowed_transit_encryption_modes\": [\"ipsec\"], \"availability_mode\": \"zonal\", \"bandwidth\": 1, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"initial_owner\": {\"gid\": 50, \"uid\": 50}, \"iops\": 100, \"latest_job\": {\"status\": \"cancelled\", \"status_reasons\": [{\"code\": \"cannot_reach_source_share\", \"message\": \"The replication failover failed because the source share cannot be reached.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}], \"type\": \"replication_failover\"}, \"latest_sync\": {\"completed_at\": \"2019-01-01T12:00:00.000Z\", \"data_transferred\": 0, \"started_at\": \"2019-01-01T12:00:00.000Z\"}, \"lifecycle_reasons\": [{\"code\": \"cloning_in_progress\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"mount_targets\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"name\": \"my-share-mount-target\", \"resource_type\": \"share_mount_target\"}], \"name\": \"my-share\", \"origin_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\", \"name\": \"tier-3iops\", \"resource_type\": \"share_profile\"}, \"replica_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"replication_cron_spec\": \"0 */5 * * *\", \"replication_role\": \"none\", \"replication_status\": \"active\", \"replication_status_reasons\": [{\"code\": \"cannot_reach_source_share\", \"message\": \"The replication failover failed because the source share cannot be reached.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"share\", \"size\": 200, \"snapshot_count\": 0, \"snapshot_size\": 0, \"source_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"id\": \"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"name\": \"my-share-snapshot\", \"resource_type\": \"share_snapshot\"}, \"storage_generation\": 1, \"user_tags\": [\"userTags\"], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String deleteSharePath = "/shares/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the AddVirtualNetworkInterfaceIpOptions model - AddVirtualNetworkInterfaceIpOptions addVirtualNetworkInterfaceIpOptionsModel = new AddVirtualNetworkInterfaceIpOptions.Builder() - .virtualNetworkInterfaceId("testString") + // Construct an instance of the DeleteShareOptions model + DeleteShareOptions deleteShareOptionsModel = new DeleteShareOptions.Builder() .id("testString") + .ifMatch("W/96d225c4-56bd-43d9-98fc-d7148e5c5028") .build(); - // Invoke addVirtualNetworkInterfaceIp() with a valid options model and verify the result - Response response = vpcService.addVirtualNetworkInterfaceIp(addVirtualNetworkInterfaceIpOptionsModel).execute(); + // Invoke deleteShare() with a valid options model and verify the result + Response response = vpcService.deleteShare(deleteShareOptionsModel).execute(); assertNotNull(response); - ReservedIPReference responseObj = response.getResult(); + Share 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"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, addVirtualNetworkInterfaceIpPath); + assertEquals(parsedPath, deleteSharePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the addVirtualNetworkInterfaceIp operation with and without retries enabled + // Test the deleteShare operation with and without retries enabled @Test - public void testAddVirtualNetworkInterfaceIpWRetries() throws Throwable { + public void testDeleteShareWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testAddVirtualNetworkInterfaceIpWOptions(); + testDeleteShareWOptions(); vpcService.disableRetries(); - testAddVirtualNetworkInterfaceIpWOptions(); + testDeleteShareWOptions(); } - // Test the addVirtualNetworkInterfaceIp operation with a null options model (negative test) + // Test the deleteShare operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testAddVirtualNetworkInterfaceIpNoOptions() throws Throwable { + public void testDeleteShareNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.addVirtualNetworkInterfaceIp(null).execute(); + vpcService.deleteShare(null).execute(); } - // Test the listClusterNetworkProfiles operation with a valid options model parameter + // Test the deleteShareAccessorBinding operation with a valid options model parameter @Test - public void testListClusterNetworkProfilesWOptions() throws Throwable { + public void testDeleteShareAccessorBindingWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"profiles\": [{\"family\": \"vela\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\", \"name\": \"h100\", \"resource_type\": \"cluster_network_profile\", \"supported_instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"zones\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}]}], \"total_count\": 132}"; - String listClusterNetworkProfilesPath = "/cluster_network/profiles"; + String mockResponseBody = ""; + String deleteShareAccessorBindingPath = "/shares/testString/accessor_bindings/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the ListClusterNetworkProfilesOptions model - ListClusterNetworkProfilesOptions listClusterNetworkProfilesOptionsModel = new ListClusterNetworkProfilesOptions.Builder() - .start("testString") - .limit(Long.valueOf("10")) + // Construct an instance of the DeleteShareAccessorBindingOptions model + DeleteShareAccessorBindingOptions deleteShareAccessorBindingOptionsModel = new DeleteShareAccessorBindingOptions.Builder() + .shareId("testString") + .id("testString") .build(); - // Invoke listClusterNetworkProfiles() with a valid options model and verify the result - Response response = vpcService.listClusterNetworkProfiles(listClusterNetworkProfilesOptionsModel).execute(); + // Invoke deleteShareAccessorBinding() with a valid options model and verify the result + Response response = vpcService.deleteShareAccessorBinding(deleteShareAccessorBindingOptionsModel).execute(); assertNotNull(response); - ClusterNetworkProfileCollection responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listClusterNetworkProfilesPath); + assertEquals(parsedPath, deleteShareAccessorBindingPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the listClusterNetworkProfiles operation with and without retries enabled + // Test the deleteShareAccessorBinding operation with and without retries enabled @Test - public void testListClusterNetworkProfilesWRetries() throws Throwable { + public void testDeleteShareAccessorBindingWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListClusterNetworkProfilesWOptions(); + testDeleteShareAccessorBindingWOptions(); vpcService.disableRetries(); - testListClusterNetworkProfilesWOptions(); + testDeleteShareAccessorBindingWOptions(); } - // Test the listClusterNetworkProfiles operation using the ClusterNetworkProfilesPager.getNext() method - @Test - public void testListClusterNetworkProfilesWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"profiles\":[{\"family\":\"vela\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\",\"name\":\"h100\",\"resource_type\":\"cluster_network_profile\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"zones\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}]}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"profiles\":[{\"family\":\"vela\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\",\"name\":\"h100\",\"resource_type\":\"cluster_network_profile\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"zones\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}]}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListClusterNetworkProfilesOptions listClusterNetworkProfilesOptions = new ListClusterNetworkProfilesOptions.Builder() - .limit(Long.valueOf("10")) - .build(); - - List allResults = new ArrayList<>(); - ClusterNetworkProfilesPager pager = new ClusterNetworkProfilesPager(vpcService, listClusterNetworkProfilesOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + // Test the deleteShareAccessorBinding operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testDeleteShareAccessorBindingNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.deleteShareAccessorBinding(null).execute(); } - - // Test the listClusterNetworkProfiles operation using the ClusterNetworkProfilesPager.getAll() method - @Test - public void testListClusterNetworkProfilesWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"profiles\":[{\"family\":\"vela\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\",\"name\":\"h100\",\"resource_type\":\"cluster_network_profile\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"zones\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}]}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"profiles\":[{\"family\":\"vela\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\",\"name\":\"h100\",\"resource_type\":\"cluster_network_profile\",\"supported_instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"zones\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}]}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListClusterNetworkProfilesOptions listClusterNetworkProfilesOptions = new ListClusterNetworkProfilesOptions.Builder() - .limit(Long.valueOf("10")) - .build(); - ClusterNetworkProfilesPager pager = new ClusterNetworkProfilesPager(vpcService, listClusterNetworkProfilesOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the getClusterNetworkProfile operation with a valid options model parameter + // Test the deleteShareMountTarget operation with a valid options model parameter @Test - public void testGetClusterNetworkProfileWOptions() throws Throwable { + public void testDeleteShareMountTargetWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"family\": \"vela\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\", \"name\": \"h100\", \"resource_type\": \"cluster_network_profile\", \"supported_instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"zones\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}]}"; - String getClusterNetworkProfilePath = "/cluster_network/profiles/h100"; + String mockResponseBody = "{\"access_control_mode\": \"security_group\", \"access_protocol\": \"nfs4\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"lifecycle_state\": \"stable\", \"mount_path\": \"10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e\", \"name\": \"my-share-mount-target\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"share_mount_target\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"transit_encryption\": \"none\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String deleteShareMountTargetPath = "/shares/testString/mount_targets/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the GetClusterNetworkProfileOptions model - GetClusterNetworkProfileOptions getClusterNetworkProfileOptionsModel = new GetClusterNetworkProfileOptions.Builder() - .name("h100") + // Construct an instance of the DeleteShareMountTargetOptions model + DeleteShareMountTargetOptions deleteShareMountTargetOptionsModel = new DeleteShareMountTargetOptions.Builder() + .shareId("testString") + .id("testString") .build(); - // Invoke getClusterNetworkProfile() with a valid options model and verify the result - Response response = vpcService.getClusterNetworkProfile(getClusterNetworkProfileOptionsModel).execute(); + // Invoke deleteShareMountTarget() with a valid options model and verify the result + Response response = vpcService.deleteShareMountTarget(deleteShareMountTargetOptionsModel).execute(); assertNotNull(response); - ClusterNetworkProfile responseObj = response.getResult(); + ShareMountTarget responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getClusterNetworkProfilePath); + assertEquals(parsedPath, deleteShareMountTargetPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getClusterNetworkProfile operation with and without retries enabled + // Test the deleteShareMountTarget operation with and without retries enabled @Test - public void testGetClusterNetworkProfileWRetries() throws Throwable { + public void testDeleteShareMountTargetWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetClusterNetworkProfileWOptions(); + testDeleteShareMountTargetWOptions(); vpcService.disableRetries(); - testGetClusterNetworkProfileWOptions(); + testDeleteShareMountTargetWOptions(); } - // Test the getClusterNetworkProfile operation with a null options model (negative test) + // Test the deleteShareMountTarget operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetClusterNetworkProfileNoOptions() throws Throwable { + public void testDeleteShareMountTargetNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getClusterNetworkProfile(null).execute(); + vpcService.deleteShareMountTarget(null).execute(); } - // Test the listClusterNetworks operation with a valid options model parameter + // Test the deleteShareSnapshot operation with a valid options model parameter @Test - public void testListClusterNetworksWOptions() throws Throwable { + public void testDeleteShareSnapshotWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"cluster_networks\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"id\": \"0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network\", \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\", \"name\": \"h100\", \"resource_type\": \"cluster_network_profile\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"cluster_network\", \"subnet_prefixes\": [{\"allocation_policy\": \"auto\", \"cidr\": \"10.0.0.0/24\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listClusterNetworksPath = "/cluster_networks"; + String mockResponseBody = "{\"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"captured_at\": \"2019-01-01T12:00:00.000Z\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"fingerprint\": \"7abc3aef-c2bc-4f65-a296-2928e534d498\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"id\": \"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"minimum_size\": 10, \"name\": \"my-share-snapshot\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"share_snapshot\", \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"user_tags\": [\"userTags\"], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String deleteShareSnapshotPath = "/shares/testString/snapshots/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the ListClusterNetworksOptions model - ListClusterNetworksOptions listClusterNetworksOptionsModel = new ListClusterNetworksOptions.Builder() - .start("testString") - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .name("my-name") - .sort("name") - .vpcId("testString") - .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .vpcName("my-vpc") + // Construct an instance of the DeleteShareSnapshotOptions model + DeleteShareSnapshotOptions deleteShareSnapshotOptionsModel = new DeleteShareSnapshotOptions.Builder() + .shareId("testString") + .id("testString") .build(); - // Invoke listClusterNetworks() with a valid options model and verify the result - Response response = vpcService.listClusterNetworks(listClusterNetworksOptionsModel).execute(); + // Invoke deleteShareSnapshot() with a valid options model and verify the result + Response response = vpcService.deleteShareSnapshot(deleteShareSnapshotOptionsModel).execute(); assertNotNull(response); - ClusterNetworkCollection responseObj = response.getResult(); + ShareSnapshot responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listClusterNetworksPath); + assertEquals(parsedPath, deleteShareSnapshotPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("resource_group.id"), "testString"); - assertEquals(query.get("name"), "my-name"); - assertEquals(query.get("sort"), "name"); - assertEquals(query.get("vpc.id"), "testString"); - assertEquals(query.get("vpc.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); - assertEquals(query.get("vpc.name"), "my-vpc"); } - // Test the listClusterNetworks operation with and without retries enabled + // Test the deleteShareSnapshot operation with and without retries enabled @Test - public void testListClusterNetworksWRetries() throws Throwable { + public void testDeleteShareSnapshotWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListClusterNetworksWOptions(); + testDeleteShareSnapshotWOptions(); vpcService.disableRetries(); - testListClusterNetworksWOptions(); + testDeleteShareSnapshotWOptions(); } - // Test the listClusterNetworks operation using the ClusterNetworksPager.getNext() method - @Test - public void testListClusterNetworksWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"cluster_networks\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"id\":\"0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-cluster-network\",\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\",\"name\":\"h100\",\"resource_type\":\"cluster_network_profile\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"cluster_network\",\"subnet_prefixes\":[{\"allocation_policy\":\"auto\",\"cidr\":\"10.0.0.0/24\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"cluster_networks\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"id\":\"0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-cluster-network\",\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\",\"name\":\"h100\",\"resource_type\":\"cluster_network_profile\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"cluster_network\",\"subnet_prefixes\":[{\"allocation_policy\":\"auto\",\"cidr\":\"10.0.0.0/24\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListClusterNetworksOptions listClusterNetworksOptions = new ListClusterNetworksOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .name("my-name") - .sort("name") - .vpcId("testString") - .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .vpcName("my-vpc") - .build(); - - List allResults = new ArrayList<>(); - ClusterNetworksPager pager = new ClusterNetworksPager(vpcService, listClusterNetworksOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + // Test the deleteShareSnapshot operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testDeleteShareSnapshotNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.deleteShareSnapshot(null).execute(); } - - // Test the listClusterNetworks operation using the ClusterNetworksPager.getAll() method - @Test - public void testListClusterNetworksWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"cluster_networks\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"id\":\"0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-cluster-network\",\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\",\"name\":\"h100\",\"resource_type\":\"cluster_network_profile\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"cluster_network\",\"subnet_prefixes\":[{\"allocation_policy\":\"auto\",\"cidr\":\"10.0.0.0/24\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"cluster_networks\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"id\":\"0717-da0df18c-7598-4633-a648-fdaac28a5573\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-cluster-network\",\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\",\"name\":\"h100\",\"resource_type\":\"cluster_network_profile\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"cluster_network\",\"subnet_prefixes\":[{\"allocation_policy\":\"auto\",\"cidr\":\"10.0.0.0/24\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListClusterNetworksOptions listClusterNetworksOptions = new ListClusterNetworksOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .name("my-name") - .sort("name") - .vpcId("testString") - .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .vpcName("my-vpc") - .build(); - ClusterNetworksPager pager = new ClusterNetworksPager(vpcService, listClusterNetworksOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the createClusterNetwork operation with a valid options model parameter + // Test the deleteShareSource operation with a valid options model parameter @Test - public void testCreateClusterNetworkWOptions() throws Throwable { + public void testDeleteShareSourceWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"id\": \"0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network\", \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\", \"name\": \"h100\", \"resource_type\": \"cluster_network_profile\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"cluster_network\", \"subnet_prefixes\": [{\"allocation_policy\": \"auto\", \"cidr\": \"10.0.0.0/24\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String createClusterNetworkPath = "/cluster_networks"; + String mockResponseBody = ""; + String deleteShareSourcePath = "/shares/testString/source"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the ClusterNetworkProfileIdentityByName model - ClusterNetworkProfileIdentityByName clusterNetworkProfileIdentityModel = new ClusterNetworkProfileIdentityByName.Builder() - .name("h100") - .build(); - - // Construct an instance of the VPCIdentityById model - VPCIdentityById vpcIdentityModel = new VPCIdentityById.Builder() - .id("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .build(); - - // Construct an instance of the ZoneIdentityByName model - ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() - .name("us-south-1") - .build(); - - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); - - // Construct an instance of the ClusterNetworkSubnetPrefixPrototype model - ClusterNetworkSubnetPrefixPrototype clusterNetworkSubnetPrefixPrototypeModel = new ClusterNetworkSubnetPrefixPrototype.Builder() - .cidr("10.0.0.0/24") - .build(); - - // Construct an instance of the CreateClusterNetworkOptions model - CreateClusterNetworkOptions createClusterNetworkOptionsModel = new CreateClusterNetworkOptions.Builder() - .profile(clusterNetworkProfileIdentityModel) - .vpc(vpcIdentityModel) - .zone(zoneIdentityModel) - .name("my-cluster-network") - .resourceGroup(resourceGroupIdentityModel) - .subnetPrefixes(java.util.Arrays.asList(clusterNetworkSubnetPrefixPrototypeModel)) + // Construct an instance of the DeleteShareSourceOptions model + DeleteShareSourceOptions deleteShareSourceOptionsModel = new DeleteShareSourceOptions.Builder() + .shareId("testString") .build(); - // Invoke createClusterNetwork() with a valid options model and verify the result - Response response = vpcService.createClusterNetwork(createClusterNetworkOptionsModel).execute(); + // Invoke deleteShareSource() with a valid options model and verify the result + Response response = vpcService.deleteShareSource(deleteShareSourceOptionsModel).execute(); assertNotNull(response); - ClusterNetwork responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createClusterNetworkPath); + assertEquals(parsedPath, deleteShareSourcePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createClusterNetwork operation with and without retries enabled + // Test the deleteShareSource operation with and without retries enabled @Test - public void testCreateClusterNetworkWRetries() throws Throwable { + public void testDeleteShareSourceWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateClusterNetworkWOptions(); + testDeleteShareSourceWOptions(); vpcService.disableRetries(); - testCreateClusterNetworkWOptions(); + testDeleteShareSourceWOptions(); } - // Test the createClusterNetwork operation with a null options model (negative test) + // Test the deleteShareSource operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateClusterNetworkNoOptions() throws Throwable { + public void testDeleteShareSourceNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createClusterNetwork(null).execute(); + vpcService.deleteShareSource(null).execute(); } - // Test the listClusterNetworkInterfaces operation with a valid options model parameter + // Test the failoverShare operation with a valid options model parameter @Test - public void testListClusterNetworkInterfacesWOptions() throws Throwable { + public void testFailoverShareWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"interfaces\": [{\"allow_ip_spoofing\": true, \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"enable_infrastructure_nat\": false, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"mac_address\": \"02:00:4D:45:45:4D\", \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"address\": \"10.1.0.6\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"resource_type\": \"cluster_network_subnet_reserved_ip\"}, \"resource_type\": \"cluster_network_interface\", \"subnet\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\"}, \"target\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listClusterNetworkInterfacesPath = "/cluster_networks/testString/interfaces"; + String mockResponseBody = ""; + String failoverSharePath = "/shares/testString/failover"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the ListClusterNetworkInterfacesOptions model - ListClusterNetworkInterfacesOptions listClusterNetworkInterfacesOptionsModel = new ListClusterNetworkInterfacesOptions.Builder() - .clusterNetworkId("testString") - .start("testString") - .limit(Long.valueOf("10")) - .name("my-name") - .sort("name") + // Construct an instance of the FailoverShareOptions model + FailoverShareOptions failoverShareOptionsModel = new FailoverShareOptions.Builder() + .shareId("testString") + .fallbackPolicy("fail") + .timeout(Long.valueOf("600")) .build(); - // Invoke listClusterNetworkInterfaces() with a valid options model and verify the result - Response response = vpcService.listClusterNetworkInterfaces(listClusterNetworkInterfacesOptionsModel).execute(); + // Invoke failoverShare() with a valid options model and verify the result + Response response = vpcService.failoverShare(failoverShareOptionsModel).execute(); assertNotNull(response); - ClusterNetworkInterfaceCollection responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listClusterNetworkInterfacesPath); + assertEquals(parsedPath, failoverSharePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("name"), "my-name"); - assertEquals(query.get("sort"), "name"); } - // Test the listClusterNetworkInterfaces operation with and without retries enabled + // Test the failoverShare operation with and without retries enabled @Test - public void testListClusterNetworkInterfacesWRetries() throws Throwable { + public void testFailoverShareWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListClusterNetworkInterfacesWOptions(); + testFailoverShareWOptions(); vpcService.disableRetries(); - testListClusterNetworkInterfacesWOptions(); + testFailoverShareWOptions(); } - // Test the listClusterNetworkInterfaces operation with a null options model (negative test) + // Test the failoverShare operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListClusterNetworkInterfacesNoOptions() throws Throwable { + public void testFailoverShareNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listClusterNetworkInterfaces(null).execute(); - } - - // Test the listClusterNetworkInterfaces operation using the ClusterNetworkInterfacesPager.getNext() method - @Test - public void testListClusterNetworkInterfacesWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"interfaces\":[{\"allow_ip_spoofing\":true,\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"enable_infrastructure_nat\":false,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"id\":\"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"mac_address\":\"02:00:4D:45:45:4D\",\"name\":\"my-cluster-network-interface\",\"primary_ip\":{\"address\":\"10.1.0.6\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"id\":\"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"name\":\"my-cluster-network-subnet-reserved-ip\",\"resource_type\":\"cluster_network_subnet_reserved_ip\"},\"resource_type\":\"cluster_network_interface\",\"subnet\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"id\":\"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"name\":\"my-cluster-network-subnet\",\"resource_type\":\"cluster_network_subnet\"},\"target\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"interfaces\":[{\"allow_ip_spoofing\":true,\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"enable_infrastructure_nat\":false,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"id\":\"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"mac_address\":\"02:00:4D:45:45:4D\",\"name\":\"my-cluster-network-interface\",\"primary_ip\":{\"address\":\"10.1.0.6\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"id\":\"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"name\":\"my-cluster-network-subnet-reserved-ip\",\"resource_type\":\"cluster_network_subnet_reserved_ip\"},\"resource_type\":\"cluster_network_interface\",\"subnet\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"id\":\"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"name\":\"my-cluster-network-subnet\",\"resource_type\":\"cluster_network_subnet\"},\"target\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListClusterNetworkInterfacesOptions listClusterNetworkInterfacesOptions = new ListClusterNetworkInterfacesOptions.Builder() - .clusterNetworkId("testString") - .limit(Long.valueOf("10")) - .name("my-name") - .sort("name") - .build(); - - List allResults = new ArrayList<>(); - ClusterNetworkInterfacesPager pager = new ClusterNetworkInterfacesPager(vpcService, listClusterNetworkInterfacesOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + vpcService.failoverShare(null).execute(); } - - // Test the listClusterNetworkInterfaces operation using the ClusterNetworkInterfacesPager.getAll() method - @Test - public void testListClusterNetworkInterfacesWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"interfaces\":[{\"allow_ip_spoofing\":true,\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"enable_infrastructure_nat\":false,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"id\":\"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"mac_address\":\"02:00:4D:45:45:4D\",\"name\":\"my-cluster-network-interface\",\"primary_ip\":{\"address\":\"10.1.0.6\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"id\":\"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"name\":\"my-cluster-network-subnet-reserved-ip\",\"resource_type\":\"cluster_network_subnet_reserved_ip\"},\"resource_type\":\"cluster_network_interface\",\"subnet\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"id\":\"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"name\":\"my-cluster-network-subnet\",\"resource_type\":\"cluster_network_subnet\"},\"target\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"interfaces\":[{\"allow_ip_spoofing\":true,\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"enable_infrastructure_nat\":false,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"id\":\"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"mac_address\":\"02:00:4D:45:45:4D\",\"name\":\"my-cluster-network-interface\",\"primary_ip\":{\"address\":\"10.1.0.6\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"id\":\"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"name\":\"my-cluster-network-subnet-reserved-ip\",\"resource_type\":\"cluster_network_subnet_reserved_ip\"},\"resource_type\":\"cluster_network_interface\",\"subnet\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"id\":\"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"name\":\"my-cluster-network-subnet\",\"resource_type\":\"cluster_network_subnet\"},\"target\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\",\"id\":\"0717-fb880975-db45-4459-8548-64e3995ac213\",\"name\":\"my-instance-network-attachment\",\"resource_type\":\"instance_cluster_network_attachment\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListClusterNetworkInterfacesOptions listClusterNetworkInterfacesOptions = new ListClusterNetworkInterfacesOptions.Builder() - .clusterNetworkId("testString") - .limit(Long.valueOf("10")) - .name("my-name") - .sort("name") - .build(); - ClusterNetworkInterfacesPager pager = new ClusterNetworkInterfacesPager(vpcService, listClusterNetworkInterfacesOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the createClusterNetworkInterface operation with a valid options model parameter + // Test the getShare operation with a valid options model parameter @Test - public void testCreateClusterNetworkInterfaceWOptions() throws Throwable { + public void testGetShareWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"allow_ip_spoofing\": true, \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"enable_infrastructure_nat\": false, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"mac_address\": \"02:00:4D:45:45:4D\", \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"address\": \"10.1.0.6\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"resource_type\": \"cluster_network_subnet_reserved_ip\"}, \"resource_type\": \"cluster_network_interface\", \"subnet\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\"}, \"target\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String createClusterNetworkInterfacePath = "/cluster_networks/testString/interfaces"; + String mockResponseBody = "{\"access_control_mode\": \"security_group\", \"accessor_binding_role\": \"accessor\", \"accessor_bindings\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\", \"id\": \"r006-ce9dac18-dea0-4392-841c-142d3300674f\", \"resource_type\": \"share_accessor_binding\"}], \"allowed_access_protocols\": [\"nfs4\"], \"allowed_transit_encryption_modes\": [\"ipsec\"], \"availability_mode\": \"zonal\", \"bandwidth\": 1, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"initial_owner\": {\"gid\": 50, \"uid\": 50}, \"iops\": 100, \"latest_job\": {\"status\": \"cancelled\", \"status_reasons\": [{\"code\": \"cannot_reach_source_share\", \"message\": \"The replication failover failed because the source share cannot be reached.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}], \"type\": \"replication_failover\"}, \"latest_sync\": {\"completed_at\": \"2019-01-01T12:00:00.000Z\", \"data_transferred\": 0, \"started_at\": \"2019-01-01T12:00:00.000Z\"}, \"lifecycle_reasons\": [{\"code\": \"cloning_in_progress\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"mount_targets\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"name\": \"my-share-mount-target\", \"resource_type\": \"share_mount_target\"}], \"name\": \"my-share\", \"origin_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\", \"name\": \"tier-3iops\", \"resource_type\": \"share_profile\"}, \"replica_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"replication_cron_spec\": \"0 */5 * * *\", \"replication_role\": \"none\", \"replication_status\": \"active\", \"replication_status_reasons\": [{\"code\": \"cannot_reach_source_share\", \"message\": \"The replication failover failed because the source share cannot be reached.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"share\", \"size\": 200, \"snapshot_count\": 0, \"snapshot_size\": 0, \"source_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"id\": \"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"name\": \"my-share-snapshot\", \"resource_type\": \"share_snapshot\"}, \"storage_generation\": 1, \"user_tags\": [\"userTags\"], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String getSharePath = "/shares/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext model - ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext clusterNetworkInterfacePrimaryIpPrototypeModel = new ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext.Builder() - .address("10.0.0.5") - .autoDelete(false) - .name("my-cluster-network-subnet-reserved-ip") - .build(); - - // Construct an instance of the ClusterNetworkSubnetIdentityById model - ClusterNetworkSubnetIdentityById clusterNetworkSubnetIdentityModel = new ClusterNetworkSubnetIdentityById.Builder() - .id("0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930") - .build(); - - // Construct an instance of the CreateClusterNetworkInterfaceOptions model - CreateClusterNetworkInterfaceOptions createClusterNetworkInterfaceOptionsModel = new CreateClusterNetworkInterfaceOptions.Builder() - .clusterNetworkId("testString") - .name("my-cluster-network-interface") - .primaryIp(clusterNetworkInterfacePrimaryIpPrototypeModel) - .subnet(clusterNetworkSubnetIdentityModel) + // Construct an instance of the GetShareOptions model + GetShareOptions getShareOptionsModel = new GetShareOptions.Builder() + .id("testString") .build(); - // Invoke createClusterNetworkInterface() with a valid options model and verify the result - Response response = vpcService.createClusterNetworkInterface(createClusterNetworkInterfaceOptionsModel).execute(); + // Invoke getShare() with a valid options model and verify the result + Response response = vpcService.getShare(getShareOptionsModel).execute(); assertNotNull(response); - ClusterNetworkInterface responseObj = response.getResult(); + Share responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createClusterNetworkInterfacePath); + assertEquals(parsedPath, getSharePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createClusterNetworkInterface operation with and without retries enabled + // Test the getShare operation with and without retries enabled @Test - public void testCreateClusterNetworkInterfaceWRetries() throws Throwable { + public void testGetShareWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateClusterNetworkInterfaceWOptions(); + testGetShareWOptions(); vpcService.disableRetries(); - testCreateClusterNetworkInterfaceWOptions(); + testGetShareWOptions(); } - // Test the createClusterNetworkInterface operation with a null options model (negative test) + // Test the getShare operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateClusterNetworkInterfaceNoOptions() throws Throwable { + public void testGetShareNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createClusterNetworkInterface(null).execute(); + vpcService.getShare(null).execute(); } - // Test the deleteClusterNetworkInterface operation with a valid options model parameter + // Test the getShareAccessorBinding operation with a valid options model parameter @Test - public void testDeleteClusterNetworkInterfaceWOptions() throws Throwable { + public void testGetShareAccessorBindingWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"allow_ip_spoofing\": true, \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"enable_infrastructure_nat\": false, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"mac_address\": \"02:00:4D:45:45:4D\", \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"address\": \"10.1.0.6\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"resource_type\": \"cluster_network_subnet_reserved_ip\"}, \"resource_type\": \"cluster_network_interface\", \"subnet\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\"}, \"target\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String deleteClusterNetworkInterfacePath = "/cluster_networks/testString/interfaces/testString"; + String mockResponseBody = "{\"accessor\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\", \"id\": \"r006-ce9dac18-dea0-4392-841c-142d3300674f\", \"lifecycle_state\": \"stable\", \"resource_type\": \"share_accessor_binding\"}"; + String getShareAccessorBindingPath = "/shares/testString/accessor_bindings/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(202) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteClusterNetworkInterfaceOptions model - DeleteClusterNetworkInterfaceOptions deleteClusterNetworkInterfaceOptionsModel = new DeleteClusterNetworkInterfaceOptions.Builder() - .clusterNetworkId("testString") + // Construct an instance of the GetShareAccessorBindingOptions model + GetShareAccessorBindingOptions getShareAccessorBindingOptionsModel = new GetShareAccessorBindingOptions.Builder() + .shareId("testString") .id("testString") - .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke deleteClusterNetworkInterface() with a valid options model and verify the result - Response response = vpcService.deleteClusterNetworkInterface(deleteClusterNetworkInterfaceOptionsModel).execute(); + // Invoke getShareAccessorBinding() with a valid options model and verify the result + Response response = vpcService.getShareAccessorBinding(getShareAccessorBindingOptionsModel).execute(); assertNotNull(response); - ClusterNetworkInterface responseObj = response.getResult(); + ShareAccessorBinding 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteClusterNetworkInterfacePath); + assertEquals(parsedPath, getShareAccessorBindingPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteClusterNetworkInterface operation with and without retries enabled + // Test the getShareAccessorBinding operation with and without retries enabled @Test - public void testDeleteClusterNetworkInterfaceWRetries() throws Throwable { + public void testGetShareAccessorBindingWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteClusterNetworkInterfaceWOptions(); + testGetShareAccessorBindingWOptions(); vpcService.disableRetries(); - testDeleteClusterNetworkInterfaceWOptions(); + testGetShareAccessorBindingWOptions(); } - // Test the deleteClusterNetworkInterface operation with a null options model (negative test) + // Test the getShareAccessorBinding operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteClusterNetworkInterfaceNoOptions() throws Throwable { + public void testGetShareAccessorBindingNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteClusterNetworkInterface(null).execute(); + vpcService.getShareAccessorBinding(null).execute(); } - // Test the getClusterNetworkInterface operation with a valid options model parameter + // Test the getShareMountTarget operation with a valid options model parameter @Test - public void testGetClusterNetworkInterfaceWOptions() throws Throwable { + public void testGetShareMountTargetWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"allow_ip_spoofing\": true, \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"enable_infrastructure_nat\": false, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"mac_address\": \"02:00:4D:45:45:4D\", \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"address\": \"10.1.0.6\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"resource_type\": \"cluster_network_subnet_reserved_ip\"}, \"resource_type\": \"cluster_network_interface\", \"subnet\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\"}, \"target\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String getClusterNetworkInterfacePath = "/cluster_networks/testString/interfaces/testString"; + String mockResponseBody = "{\"access_control_mode\": \"security_group\", \"access_protocol\": \"nfs4\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"lifecycle_state\": \"stable\", \"mount_path\": \"10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e\", \"name\": \"my-share-mount-target\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"share_mount_target\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"transit_encryption\": \"none\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String getShareMountTargetPath = "/shares/testString/mount_targets/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetClusterNetworkInterfaceOptions model - GetClusterNetworkInterfaceOptions getClusterNetworkInterfaceOptionsModel = new GetClusterNetworkInterfaceOptions.Builder() - .clusterNetworkId("testString") + // Construct an instance of the GetShareMountTargetOptions model + GetShareMountTargetOptions getShareMountTargetOptionsModel = new GetShareMountTargetOptions.Builder() + .shareId("testString") .id("testString") .build(); - // Invoke getClusterNetworkInterface() with a valid options model and verify the result - Response response = vpcService.getClusterNetworkInterface(getClusterNetworkInterfaceOptionsModel).execute(); + // Invoke getShareMountTarget() with a valid options model and verify the result + Response response = vpcService.getShareMountTarget(getShareMountTargetOptionsModel).execute(); assertNotNull(response); - ClusterNetworkInterface responseObj = response.getResult(); + ShareMountTarget responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -22262,118 +23886,105 @@ public void testGetClusterNetworkInterfaceWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getClusterNetworkInterfacePath); + assertEquals(parsedPath, getShareMountTargetPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getClusterNetworkInterface operation with and without retries enabled + // Test the getShareMountTarget operation with and without retries enabled @Test - public void testGetClusterNetworkInterfaceWRetries() throws Throwable { + public void testGetShareMountTargetWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetClusterNetworkInterfaceWOptions(); + testGetShareMountTargetWOptions(); vpcService.disableRetries(); - testGetClusterNetworkInterfaceWOptions(); + testGetShareMountTargetWOptions(); } - // Test the getClusterNetworkInterface operation with a null options model (negative test) + // Test the getShareMountTarget operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetClusterNetworkInterfaceNoOptions() throws Throwable { + public void testGetShareMountTargetNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getClusterNetworkInterface(null).execute(); + vpcService.getShareMountTarget(null).execute(); } - // Test the updateClusterNetworkInterface operation with a valid options model parameter + // Test the getShareProfile operation with a valid options model parameter @Test - public void testUpdateClusterNetworkInterfaceWOptions() throws Throwable { + public void testGetShareProfileWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"allow_ip_spoofing\": true, \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"enable_infrastructure_nat\": false, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"mac_address\": \"02:00:4D:45:45:4D\", \"name\": \"my-cluster-network-interface\", \"primary_ip\": {\"address\": \"10.1.0.6\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"resource_type\": \"cluster_network_subnet_reserved_ip\"}, \"resource_type\": \"cluster_network_interface\", \"subnet\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\"}, \"target\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213\", \"id\": \"0717-fb880975-db45-4459-8548-64e3995ac213\", \"name\": \"my-instance-network-attachment\", \"resource_type\": \"instance_cluster_network_attachment\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String updateClusterNetworkInterfacePath = "/cluster_networks/testString/interfaces/testString"; + String mockResponseBody = "{\"allowed_access_protocols\": {\"default\": [\"nfs4\"], \"type\": \"subset\", \"values\": [\"nfs4\"]}, \"allowed_transit_encryption_modes\": {\"default\": [\"ipsec\"], \"type\": \"subset\", \"values\": [\"ipsec\"]}, \"availability_modes\": {\"default\": \"zonal\", \"type\": \"enum\", \"values\": [\"zonal\"]}, \"bandwidth\": {\"default\": 100, \"max\": 1024, \"min\": 1, \"step\": 1, \"type\": \"range\", \"value\": 5}, \"capacity\": {\"type\": \"fixed\", \"value\": 4800}, \"family\": \"defined_performance\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\", \"iops\": {\"type\": \"fixed\", \"value\": 4000}, \"name\": \"tier-3iops\", \"resource_type\": \"share_profile\", \"storage_generation\": {\"type\": \"fixed\", \"value\": 1}}"; + String getShareProfilePath = "/share/profiles/dp2"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ClusterNetworkInterfacePatch model - ClusterNetworkInterfacePatch clusterNetworkInterfacePatchModel = new ClusterNetworkInterfacePatch.Builder() - .autoDelete(false) - .name("my-cluster-network-interface") - .build(); - Map clusterNetworkInterfacePatchModelAsPatch = clusterNetworkInterfacePatchModel.asPatch(); - - // Construct an instance of the UpdateClusterNetworkInterfaceOptions model - UpdateClusterNetworkInterfaceOptions updateClusterNetworkInterfaceOptionsModel = new UpdateClusterNetworkInterfaceOptions.Builder() - .clusterNetworkId("testString") - .id("testString") - .clusterNetworkInterfacePatch(clusterNetworkInterfacePatchModelAsPatch) - .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") + // Construct an instance of the GetShareProfileOptions model + GetShareProfileOptions getShareProfileOptionsModel = new GetShareProfileOptions.Builder() + .name("dp2") .build(); - // Invoke updateClusterNetworkInterface() with a valid options model and verify the result - Response response = vpcService.updateClusterNetworkInterface(updateClusterNetworkInterfaceOptionsModel).execute(); + // Invoke getShareProfile() with a valid options model and verify the result + Response response = vpcService.getShareProfile(getShareProfileOptionsModel).execute(); assertNotNull(response); - ClusterNetworkInterface responseObj = response.getResult(); + ShareProfile responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateClusterNetworkInterfacePath); + assertEquals(parsedPath, getShareProfilePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateClusterNetworkInterface operation with and without retries enabled + // Test the getShareProfile operation with and without retries enabled @Test - public void testUpdateClusterNetworkInterfaceWRetries() throws Throwable { + public void testGetShareProfileWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateClusterNetworkInterfaceWOptions(); + testGetShareProfileWOptions(); vpcService.disableRetries(); - testUpdateClusterNetworkInterfaceWOptions(); + testGetShareProfileWOptions(); } - // Test the updateClusterNetworkInterface operation with a null options model (negative test) + // Test the getShareProfile operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateClusterNetworkInterfaceNoOptions() throws Throwable { + public void testGetShareProfileNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateClusterNetworkInterface(null).execute(); + vpcService.getShareProfile(null).execute(); } - // Test the listClusterNetworkSubnets operation with a valid options model parameter + // Test the getShareSnapshot operation with a valid options model parameter @Test - public void testListClusterNetworkSubnetsWOptions() throws Throwable { + public void testGetShareSnapshotWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"subnets\": [{\"available_ipv4_address_count\": 15, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"ip_version\": \"ipv4\", \"ipv4_cidr_block\": \"10.0.0.0/24\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\", \"total_ipv4_address_count\": 256}], \"total_count\": 132}"; - String listClusterNetworkSubnetsPath = "/cluster_networks/testString/subnets"; + String mockResponseBody = "{\"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"captured_at\": \"2019-01-01T12:00:00.000Z\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"fingerprint\": \"7abc3aef-c2bc-4f65-a296-2928e534d498\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"id\": \"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"minimum_size\": 10, \"name\": \"my-share-snapshot\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"share_snapshot\", \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"user_tags\": [\"userTags\"], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String getShareSnapshotPath = "/shares/testString/snapshots/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListClusterNetworkSubnetsOptions model - ListClusterNetworkSubnetsOptions listClusterNetworkSubnetsOptionsModel = new ListClusterNetworkSubnetsOptions.Builder() - .clusterNetworkId("testString") - .start("testString") - .limit(Long.valueOf("10")) - .name("my-name") - .sort("name") + // Construct an instance of the GetShareSnapshotOptions model + GetShareSnapshotOptions getShareSnapshotOptionsModel = new GetShareSnapshotOptions.Builder() + .shareId("testString") + .id("testString") .build(); - // Invoke listClusterNetworkSubnets() with a valid options model and verify the result - Response response = vpcService.listClusterNetworkSubnets(listClusterNetworkSubnetsOptionsModel).execute(); + // Invoke getShareSnapshot() with a valid options model and verify the result + Response response = vpcService.getShareSnapshot(getShareSnapshotOptionsModel).execute(); assertNotNull(response); - ClusterNetworkSubnetCollection responseObj = response.getResult(); + ShareSnapshot responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -22382,189 +23993,106 @@ public void testListClusterNetworkSubnetsWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listClusterNetworkSubnetsPath); + assertEquals(parsedPath, getShareSnapshotPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("name"), "my-name"); - assertEquals(query.get("sort"), "name"); } - // Test the listClusterNetworkSubnets operation with and without retries enabled + // Test the getShareSnapshot operation with and without retries enabled @Test - public void testListClusterNetworkSubnetsWRetries() throws Throwable { + public void testGetShareSnapshotWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListClusterNetworkSubnetsWOptions(); + testGetShareSnapshotWOptions(); vpcService.disableRetries(); - testListClusterNetworkSubnetsWOptions(); + testGetShareSnapshotWOptions(); } - // Test the listClusterNetworkSubnets operation with a null options model (negative test) + // Test the getShareSnapshot operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListClusterNetworkSubnetsNoOptions() throws Throwable { + public void testGetShareSnapshotNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listClusterNetworkSubnets(null).execute(); - } - - // Test the listClusterNetworkSubnets operation using the ClusterNetworkSubnetsPager.getNext() method - @Test - public void testListClusterNetworkSubnetsWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"subnets\":[{\"available_ipv4_address_count\":15,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"id\":\"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"ip_version\":\"ipv4\",\"ipv4_cidr_block\":\"10.0.0.0/24\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-cluster-network-subnet\",\"resource_type\":\"cluster_network_subnet\",\"total_ipv4_address_count\":256}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"subnets\":[{\"available_ipv4_address_count\":15,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"id\":\"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"ip_version\":\"ipv4\",\"ipv4_cidr_block\":\"10.0.0.0/24\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-cluster-network-subnet\",\"resource_type\":\"cluster_network_subnet\",\"total_ipv4_address_count\":256}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListClusterNetworkSubnetsOptions listClusterNetworkSubnetsOptions = new ListClusterNetworkSubnetsOptions.Builder() - .clusterNetworkId("testString") - .limit(Long.valueOf("10")) - .name("my-name") - .sort("name") - .build(); - - List allResults = new ArrayList<>(); - ClusterNetworkSubnetsPager pager = new ClusterNetworkSubnetsPager(vpcService, listClusterNetworkSubnetsOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + vpcService.getShareSnapshot(null).execute(); } - - // Test the listClusterNetworkSubnets operation using the ClusterNetworkSubnetsPager.getAll() method - @Test - public void testListClusterNetworkSubnetsWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"subnets\":[{\"available_ipv4_address_count\":15,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"id\":\"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"ip_version\":\"ipv4\",\"ipv4_cidr_block\":\"10.0.0.0/24\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-cluster-network-subnet\",\"resource_type\":\"cluster_network_subnet\",\"total_ipv4_address_count\":256}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"subnets\":[{\"available_ipv4_address_count\":15,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"id\":\"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\",\"ip_version\":\"ipv4\",\"ipv4_cidr_block\":\"10.0.0.0/24\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-cluster-network-subnet\",\"resource_type\":\"cluster_network_subnet\",\"total_ipv4_address_count\":256}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListClusterNetworkSubnetsOptions listClusterNetworkSubnetsOptions = new ListClusterNetworkSubnetsOptions.Builder() - .clusterNetworkId("testString") - .limit(Long.valueOf("10")) - .name("my-name") - .sort("name") - .build(); - ClusterNetworkSubnetsPager pager = new ClusterNetworkSubnetsPager(vpcService, listClusterNetworkSubnetsOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the createClusterNetworkSubnet operation with a valid options model parameter + // Test the getShareSource operation with a valid options model parameter @Test - public void testCreateClusterNetworkSubnetWOptions() throws Throwable { + public void testGetShareSourceWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"available_ipv4_address_count\": 15, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"ip_version\": \"ipv4\", \"ipv4_cidr_block\": \"10.0.0.0/24\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\", \"total_ipv4_address_count\": 256}"; - String createClusterNetworkSubnetPath = "/cluster_networks/testString/subnets"; + String mockResponseBody = "{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}"; + String getShareSourcePath = "/shares/testString/source"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype model - ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype clusterNetworkSubnetPrototypeModel = new ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype.Builder() - .ipVersion("ipv4") - .name("my-cluster-network-subnet") - .totalIpv4AddressCount(Long.valueOf("256")) - .build(); - - // Construct an instance of the CreateClusterNetworkSubnetOptions model - CreateClusterNetworkSubnetOptions createClusterNetworkSubnetOptionsModel = new CreateClusterNetworkSubnetOptions.Builder() - .clusterNetworkId("testString") - .clusterNetworkSubnetPrototype(clusterNetworkSubnetPrototypeModel) + // Construct an instance of the GetShareSourceOptions model + GetShareSourceOptions getShareSourceOptionsModel = new GetShareSourceOptions.Builder() + .shareId("testString") .build(); - // Invoke createClusterNetworkSubnet() with a valid options model and verify the result - Response response = vpcService.createClusterNetworkSubnet(createClusterNetworkSubnetOptionsModel).execute(); + // Invoke getShareSource() with a valid options model and verify the result + Response response = vpcService.getShareSource(getShareSourceOptionsModel).execute(); assertNotNull(response); - ClusterNetworkSubnet responseObj = response.getResult(); + ShareReference responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createClusterNetworkSubnetPath); + assertEquals(parsedPath, getShareSourcePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createClusterNetworkSubnet operation with and without retries enabled + // Test the getShareSource operation with and without retries enabled @Test - public void testCreateClusterNetworkSubnetWRetries() throws Throwable { + public void testGetShareSourceWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateClusterNetworkSubnetWOptions(); + testGetShareSourceWOptions(); vpcService.disableRetries(); - testCreateClusterNetworkSubnetWOptions(); + testGetShareSourceWOptions(); } - // Test the createClusterNetworkSubnet operation with a null options model (negative test) + // Test the getShareSource operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateClusterNetworkSubnetNoOptions() throws Throwable { + public void testGetShareSourceNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createClusterNetworkSubnet(null).execute(); + vpcService.getShareSource(null).execute(); } - // Test the listClusterNetworkSubnetReservedIps operation with a valid options model parameter + // Test the listShareAccessorBindings operation with a valid options model parameter @Test - public void testListClusterNetworkSubnetReservedIpsWOptions() throws Throwable { + public void testListShareAccessorBindingsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"reserved_ips\": [{\"address\": \"10.1.0.6\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"owner\": \"user\", \"resource_type\": \"cluster_network_subnet_reserved_ip\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"name\": \"my-cluster-network-interface\", \"resource_type\": \"cluster_network_interface\"}}], \"total_count\": 132}"; - String listClusterNetworkSubnetReservedIpsPath = "/cluster_networks/testString/subnets/testString/reserved_ips"; + String mockResponseBody = "{\"accessor_bindings\": [{\"accessor\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\", \"id\": \"r006-ce9dac18-dea0-4392-841c-142d3300674f\", \"lifecycle_state\": \"stable\", \"resource_type\": \"share_accessor_binding\"}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listShareAccessorBindingsPath = "/shares/testString/accessor_bindings"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListClusterNetworkSubnetReservedIpsOptions model - ListClusterNetworkSubnetReservedIpsOptions listClusterNetworkSubnetReservedIpsOptionsModel = new ListClusterNetworkSubnetReservedIpsOptions.Builder() - .clusterNetworkId("testString") - .clusterNetworkSubnetId("testString") + // Construct an instance of the ListShareAccessorBindingsOptions model + ListShareAccessorBindingsOptions listShareAccessorBindingsOptionsModel = new ListShareAccessorBindingsOptions.Builder() + .id("testString") .start("testString") .limit(Long.valueOf("10")) - .name("my-name") - .sort("name") .build(); - // Invoke listClusterNetworkSubnetReservedIps() with a valid options model and verify the result - Response response = vpcService.listClusterNetworkSubnetReservedIps(listClusterNetworkSubnetReservedIpsOptionsModel).execute(); + // Invoke listShareAccessorBindings() with a valid options model and verify the result + Response response = vpcService.listShareAccessorBindings(listShareAccessorBindingsOptionsModel).execute(); assertNotNull(response); - ClusterNetworkSubnetReservedIPCollection responseObj = response.getResult(); + ShareAccessorBindingCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -22573,41 +24101,39 @@ public void testListClusterNetworkSubnetReservedIpsWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listClusterNetworkSubnetReservedIpsPath); + assertEquals(parsedPath, listShareAccessorBindingsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("name"), "my-name"); - assertEquals(query.get("sort"), "name"); } - // Test the listClusterNetworkSubnetReservedIps operation with and without retries enabled + // Test the listShareAccessorBindings operation with and without retries enabled @Test - public void testListClusterNetworkSubnetReservedIpsWRetries() throws Throwable { + public void testListShareAccessorBindingsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListClusterNetworkSubnetReservedIpsWOptions(); + testListShareAccessorBindingsWOptions(); vpcService.disableRetries(); - testListClusterNetworkSubnetReservedIpsWOptions(); + testListShareAccessorBindingsWOptions(); } - // Test the listClusterNetworkSubnetReservedIps operation with a null options model (negative test) + // Test the listShareAccessorBindings operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListClusterNetworkSubnetReservedIpsNoOptions() throws Throwable { + public void testListShareAccessorBindingsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listClusterNetworkSubnetReservedIps(null).execute(); + vpcService.listShareAccessorBindings(null).execute(); } - // Test the listClusterNetworkSubnetReservedIps operation using the ClusterNetworkSubnetReservedIpsPager.getNext() method + // Test the listShareAccessorBindings operation using the ShareAccessorBindingsPager.getNext() method @Test - public void testListClusterNetworkSubnetReservedIpsWithPagerGetNext() throws Throwable { + public void testListShareAccessorBindingsWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"reserved_ips\":[{\"address\":\"10.1.0.6\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"id\":\"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-cluster-network-subnet-reserved-ip\",\"owner\":\"user\",\"resource_type\":\"cluster_network_subnet_reserved_ip\",\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"id\":\"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"name\":\"my-cluster-network-interface\",\"resource_type\":\"cluster_network_interface\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"reserved_ips\":[{\"address\":\"10.1.0.6\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"id\":\"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-cluster-network-subnet-reserved-ip\",\"owner\":\"user\",\"resource_type\":\"cluster_network_subnet_reserved_ip\",\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"id\":\"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"name\":\"my-cluster-network-interface\",\"resource_type\":\"cluster_network_interface\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"accessor_bindings\":[{\"accessor\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\",\"id\":\"r006-ce9dac18-dea0-4392-841c-142d3300674f\",\"lifecycle_state\":\"stable\",\"resource_type\":\"share_accessor_binding\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"accessor_bindings\":[{\"accessor\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\",\"id\":\"r006-ce9dac18-dea0-4392-841c-142d3300674f\",\"lifecycle_state\":\"stable\",\"resource_type\":\"share_accessor_binding\"}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -22621,30 +24147,27 @@ public void testListClusterNetworkSubnetReservedIpsWithPagerGetNext() throws Thr .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListClusterNetworkSubnetReservedIpsOptions listClusterNetworkSubnetReservedIpsOptions = new ListClusterNetworkSubnetReservedIpsOptions.Builder() - .clusterNetworkId("testString") - .clusterNetworkSubnetId("testString") + ListShareAccessorBindingsOptions listShareAccessorBindingsOptions = new ListShareAccessorBindingsOptions.Builder() + .id("testString") .limit(Long.valueOf("10")) - .name("my-name") - .sort("name") .build(); - List allResults = new ArrayList<>(); - ClusterNetworkSubnetReservedIpsPager pager = new ClusterNetworkSubnetReservedIpsPager(vpcService, listClusterNetworkSubnetReservedIpsOptions); + List allResults = new ArrayList<>(); + ShareAccessorBindingsPager pager = new ShareAccessorBindingsPager(vpcService, listShareAccessorBindingsOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listClusterNetworkSubnetReservedIps operation using the ClusterNetworkSubnetReservedIpsPager.getAll() method + // Test the listShareAccessorBindings operation using the ShareAccessorBindingsPager.getAll() method @Test - public void testListClusterNetworkSubnetReservedIpsWithPagerGetAll() throws Throwable { + public void testListShareAccessorBindingsWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"reserved_ips\":[{\"address\":\"10.1.0.6\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"id\":\"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-cluster-network-subnet-reserved-ip\",\"owner\":\"user\",\"resource_type\":\"cluster_network_subnet_reserved_ip\",\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"id\":\"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"name\":\"my-cluster-network-interface\",\"resource_type\":\"cluster_network_interface\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"reserved_ips\":[{\"address\":\"10.1.0.6\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"id\":\"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-cluster-network-subnet-reserved-ip\",\"owner\":\"user\",\"resource_type\":\"cluster_network_subnet_reserved_ip\",\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"id\":\"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\",\"name\":\"my-cluster-network-interface\",\"resource_type\":\"cluster_network_interface\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"accessor_bindings\":[{\"accessor\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\",\"id\":\"r006-ce9dac18-dea0-4392-841c-142d3300674f\",\"lifecycle_state\":\"stable\",\"resource_type\":\"share_accessor_binding\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"accessor_bindings\":[{\"accessor\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\",\"id\":\"r006-ce9dac18-dea0-4392-841c-142d3300674f\",\"lifecycle_state\":\"stable\",\"resource_type\":\"share_accessor_binding\"}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -22658,154 +24181,164 @@ public void testListClusterNetworkSubnetReservedIpsWithPagerGetAll() throws Thro .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListClusterNetworkSubnetReservedIpsOptions listClusterNetworkSubnetReservedIpsOptions = new ListClusterNetworkSubnetReservedIpsOptions.Builder() - .clusterNetworkId("testString") - .clusterNetworkSubnetId("testString") + ListShareAccessorBindingsOptions listShareAccessorBindingsOptions = new ListShareAccessorBindingsOptions.Builder() + .id("testString") .limit(Long.valueOf("10")) - .name("my-name") - .sort("name") .build(); - ClusterNetworkSubnetReservedIpsPager pager = new ClusterNetworkSubnetReservedIpsPager(vpcService, listClusterNetworkSubnetReservedIpsOptions); - List allResults = pager.getAll(); + ShareAccessorBindingsPager pager = new ShareAccessorBindingsPager(vpcService, listShareAccessorBindingsOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the createClusterNetworkSubnetReservedIp operation with a valid options model parameter + // Test the listShareMountTargets operation with a valid options model parameter @Test - public void testCreateClusterNetworkSubnetReservedIpWOptions() throws Throwable { + public void testListShareMountTargetsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"address\": \"10.1.0.6\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"owner\": \"user\", \"resource_type\": \"cluster_network_subnet_reserved_ip\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"name\": \"my-cluster-network-interface\", \"resource_type\": \"cluster_network_interface\"}}"; - String createClusterNetworkSubnetReservedIpPath = "/cluster_networks/testString/subnets/testString/reserved_ips"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"mount_targets\": [{\"access_control_mode\": \"security_group\", \"access_protocol\": \"nfs4\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"lifecycle_state\": \"stable\", \"mount_path\": \"10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e\", \"name\": \"my-share-mount-target\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"share_mount_target\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"transit_encryption\": \"none\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}], \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listShareMountTargetsPath = "/shares/testString/mount_targets"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the CreateClusterNetworkSubnetReservedIpOptions model - CreateClusterNetworkSubnetReservedIpOptions createClusterNetworkSubnetReservedIpOptionsModel = new CreateClusterNetworkSubnetReservedIpOptions.Builder() - .clusterNetworkId("testString") - .clusterNetworkSubnetId("testString") - .address("192.168.3.4") - .name("my-cluster-network-subnet-reserved-ip") + // Construct an instance of the ListShareMountTargetsOptions model + ListShareMountTargetsOptions listShareMountTargetsOptionsModel = new ListShareMountTargetsOptions.Builder() + .shareId("testString") + .name("my-name") + .start("testString") + .limit(Long.valueOf("10")) .build(); - // Invoke createClusterNetworkSubnetReservedIp() with a valid options model and verify the result - Response response = vpcService.createClusterNetworkSubnetReservedIp(createClusterNetworkSubnetReservedIpOptionsModel).execute(); + // Invoke listShareMountTargets() with a valid options model and verify the result + Response response = vpcService.listShareMountTargets(listShareMountTargetsOptionsModel).execute(); assertNotNull(response); - ClusterNetworkSubnetReservedIP responseObj = response.getResult(); + ShareMountTargetCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createClusterNetworkSubnetReservedIpPath); + assertEquals(parsedPath, listShareMountTargetsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("name"), "my-name"); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the createClusterNetworkSubnetReservedIp operation with and without retries enabled + // Test the listShareMountTargets operation with and without retries enabled @Test - public void testCreateClusterNetworkSubnetReservedIpWRetries() throws Throwable { + public void testListShareMountTargetsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateClusterNetworkSubnetReservedIpWOptions(); + testListShareMountTargetsWOptions(); vpcService.disableRetries(); - testCreateClusterNetworkSubnetReservedIpWOptions(); + testListShareMountTargetsWOptions(); } - // Test the createClusterNetworkSubnetReservedIp operation with a null options model (negative test) + // Test the listShareMountTargets operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateClusterNetworkSubnetReservedIpNoOptions() throws Throwable { + public void testListShareMountTargetsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createClusterNetworkSubnetReservedIp(null).execute(); + vpcService.listShareMountTargets(null).execute(); } - // Test the deleteClusterNetworkSubnetReservedIp operation with a valid options model parameter + // Test the listShareMountTargets operation using the ShareMountTargetsPager.getNext() method @Test - public void testDeleteClusterNetworkSubnetReservedIpWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"address\": \"10.1.0.6\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"owner\": \"user\", \"resource_type\": \"cluster_network_subnet_reserved_ip\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"name\": \"my-cluster-network-interface\", \"resource_type\": \"cluster_network_interface\"}}"; - String deleteClusterNetworkSubnetReservedIpPath = "/cluster_networks/testString/subnets/testString/reserved_ips/testString"; + public void testListShareMountTargetsWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"mount_targets\":[{\"access_control_mode\":\"security_group\",\"access_protocol\":\"nfs4\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"id\":\"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"lifecycle_state\":\"stable\",\"mount_path\":\"10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e\",\"name\":\"my-share-mount-target\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"share_mount_target\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"transit_encryption\":\"none\",\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"mount_targets\":[{\"access_control_mode\":\"security_group\",\"access_protocol\":\"nfs4\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"id\":\"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"lifecycle_state\":\"stable\",\"mount_path\":\"10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e\",\"name\":\"my-share-mount-target\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"share_mount_target\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"transit_encryption\":\"none\",\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(202) - .setBody(mockResponseBody)); + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the DeleteClusterNetworkSubnetReservedIpOptions model - DeleteClusterNetworkSubnetReservedIpOptions deleteClusterNetworkSubnetReservedIpOptionsModel = new DeleteClusterNetworkSubnetReservedIpOptions.Builder() - .clusterNetworkId("testString") - .clusterNetworkSubnetId("testString") - .id("testString") - .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") + ListShareMountTargetsOptions listShareMountTargetsOptions = new ListShareMountTargetsOptions.Builder() + .shareId("testString") + .name("my-name") + .limit(Long.valueOf("10")) .build(); - // Invoke deleteClusterNetworkSubnetReservedIp() with a valid options model and verify the result - Response response = vpcService.deleteClusterNetworkSubnetReservedIp(deleteClusterNetworkSubnetReservedIpOptionsModel).execute(); - assertNotNull(response); - ClusterNetworkSubnetReservedIP 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(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteClusterNetworkSubnetReservedIpPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + List allResults = new ArrayList<>(); + ShareMountTargetsPager pager = new ShareMountTargetsPager(vpcService, listShareMountTargetsOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } - - // Test the deleteClusterNetworkSubnetReservedIp operation with and without retries enabled + + // Test the listShareMountTargets operation using the ShareMountTargetsPager.getAll() method @Test - public void testDeleteClusterNetworkSubnetReservedIpWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testDeleteClusterNetworkSubnetReservedIpWOptions(); + public void testListShareMountTargetsWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"mount_targets\":[{\"access_control_mode\":\"security_group\",\"access_protocol\":\"nfs4\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"id\":\"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"lifecycle_state\":\"stable\",\"mount_path\":\"10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e\",\"name\":\"my-share-mount-target\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"share_mount_target\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"transit_encryption\":\"none\",\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"mount_targets\":[{\"access_control_mode\":\"security_group\",\"access_protocol\":\"nfs4\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"id\":\"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"lifecycle_state\":\"stable\",\"mount_path\":\"10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e\",\"name\":\"my-share-mount-target\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"share_mount_target\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"transit_encryption\":\"none\",\"virtual_network_interface\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"name\":\"my-virtual-network-interface\",\"resource_type\":\"virtual_network_interface\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - vpcService.disableRetries(); - testDeleteClusterNetworkSubnetReservedIpWOptions(); - } + ListShareMountTargetsOptions listShareMountTargetsOptions = new ListShareMountTargetsOptions.Builder() + .shareId("testString") + .name("my-name") + .limit(Long.valueOf("10")) + .build(); - // Test the deleteClusterNetworkSubnetReservedIp operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteClusterNetworkSubnetReservedIpNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.deleteClusterNetworkSubnetReservedIp(null).execute(); + ShareMountTargetsPager pager = new ShareMountTargetsPager(vpcService, listShareMountTargetsOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); } - - // Test the getClusterNetworkSubnetReservedIp operation with a valid options model parameter + + // Test the listShareProfiles operation with a valid options model parameter @Test - public void testGetClusterNetworkSubnetReservedIpWOptions() throws Throwable { + public void testListShareProfilesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"address\": \"10.1.0.6\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"owner\": \"user\", \"resource_type\": \"cluster_network_subnet_reserved_ip\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"name\": \"my-cluster-network-interface\", \"resource_type\": \"cluster_network_interface\"}}"; - String getClusterNetworkSubnetReservedIpPath = "/cluster_networks/testString/subnets/testString/reserved_ips/testString"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"profiles\": [{\"allowed_access_protocols\": {\"default\": [\"nfs4\"], \"type\": \"subset\", \"values\": [\"nfs4\"]}, \"allowed_transit_encryption_modes\": {\"default\": [\"ipsec\"], \"type\": \"subset\", \"values\": [\"ipsec\"]}, \"availability_modes\": {\"default\": \"zonal\", \"type\": \"enum\", \"values\": [\"zonal\"]}, \"bandwidth\": {\"default\": 100, \"max\": 1024, \"min\": 1, \"step\": 1, \"type\": \"range\", \"value\": 5}, \"capacity\": {\"type\": \"fixed\", \"value\": 4800}, \"family\": \"defined_performance\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\", \"iops\": {\"type\": \"fixed\", \"value\": 4000}, \"name\": \"tier-3iops\", \"resource_type\": \"share_profile\", \"storage_generation\": {\"type\": \"fixed\", \"value\": 1}}], \"total_count\": 132}"; + String listShareProfilesPath = "/share/profiles"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetClusterNetworkSubnetReservedIpOptions model - GetClusterNetworkSubnetReservedIpOptions getClusterNetworkSubnetReservedIpOptionsModel = new GetClusterNetworkSubnetReservedIpOptions.Builder() - .clusterNetworkId("testString") - .clusterNetworkSubnetId("testString") - .id("testString") + // Construct an instance of the ListShareProfilesOptions model + ListShareProfilesOptions listShareProfilesOptionsModel = new ListShareProfilesOptions.Builder() + .start("testString") + .limit(Long.valueOf("10")) + .sort("name") .build(); - // Invoke getClusterNetworkSubnetReservedIp() with a valid options model and verify the result - Response response = vpcService.getClusterNetworkSubnetReservedIp(getClusterNetworkSubnetReservedIpOptionsModel).execute(); + // Invoke listShareProfiles() with a valid options model and verify the result + Response response = vpcService.listShareProfiles(listShareProfilesOptionsModel).execute(); assertNotNull(response); - ClusterNetworkSubnetReservedIP responseObj = response.getResult(); + ShareProfileCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -22814,171 +24347,249 @@ public void testGetClusterNetworkSubnetReservedIpWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getClusterNetworkSubnetReservedIpPath); + assertEquals(parsedPath, listShareProfilesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("sort"), "name"); } - // Test the getClusterNetworkSubnetReservedIp operation with and without retries enabled + // Test the listShareProfiles operation with and without retries enabled @Test - public void testGetClusterNetworkSubnetReservedIpWRetries() throws Throwable { + public void testListShareProfilesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetClusterNetworkSubnetReservedIpWOptions(); + testListShareProfilesWOptions(); vpcService.disableRetries(); - testGetClusterNetworkSubnetReservedIpWOptions(); + testListShareProfilesWOptions(); } - // Test the getClusterNetworkSubnetReservedIp operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetClusterNetworkSubnetReservedIpNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.getClusterNetworkSubnetReservedIp(null).execute(); + // Test the listShareProfiles operation using the ShareProfilesPager.getNext() method + @Test + public void testListShareProfilesWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"profiles\":[{\"allowed_access_protocols\":{\"default\":[\"nfs4\"],\"type\":\"subset\",\"values\":[\"nfs4\"]},\"allowed_transit_encryption_modes\":{\"default\":[\"ipsec\"],\"type\":\"subset\",\"values\":[\"ipsec\"]},\"availability_modes\":{\"default\":\"zonal\",\"type\":\"enum\",\"values\":[\"zonal\"]},\"bandwidth\":{\"default\":100,\"max\":1024,\"min\":1,\"step\":1,\"type\":\"range\",\"value\":5},\"capacity\":{\"type\":\"fixed\",\"value\":4800},\"family\":\"defined_performance\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\",\"iops\":{\"type\":\"fixed\",\"value\":4000},\"name\":\"tier-3iops\",\"resource_type\":\"share_profile\",\"storage_generation\":{\"type\":\"fixed\",\"value\":1}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"profiles\":[{\"allowed_access_protocols\":{\"default\":[\"nfs4\"],\"type\":\"subset\",\"values\":[\"nfs4\"]},\"allowed_transit_encryption_modes\":{\"default\":[\"ipsec\"],\"type\":\"subset\",\"values\":[\"ipsec\"]},\"availability_modes\":{\"default\":\"zonal\",\"type\":\"enum\",\"values\":[\"zonal\"]},\"bandwidth\":{\"default\":100,\"max\":1024,\"min\":1,\"step\":1,\"type\":\"range\",\"value\":5},\"capacity\":{\"type\":\"fixed\",\"value\":4800},\"family\":\"defined_performance\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\",\"iops\":{\"type\":\"fixed\",\"value\":4000},\"name\":\"tier-3iops\",\"resource_type\":\"share_profile\",\"storage_generation\":{\"type\":\"fixed\",\"value\":1}}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListShareProfilesOptions listShareProfilesOptions = new ListShareProfilesOptions.Builder() + .limit(Long.valueOf("10")) + .sort("name") + .build(); + + List allResults = new ArrayList<>(); + ShareProfilesPager pager = new ShareProfilesPager(vpcService, listShareProfilesOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } + + // Test the listShareProfiles operation using the ShareProfilesPager.getAll() method + @Test + public void testListShareProfilesWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"profiles\":[{\"allowed_access_protocols\":{\"default\":[\"nfs4\"],\"type\":\"subset\",\"values\":[\"nfs4\"]},\"allowed_transit_encryption_modes\":{\"default\":[\"ipsec\"],\"type\":\"subset\",\"values\":[\"ipsec\"]},\"availability_modes\":{\"default\":\"zonal\",\"type\":\"enum\",\"values\":[\"zonal\"]},\"bandwidth\":{\"default\":100,\"max\":1024,\"min\":1,\"step\":1,\"type\":\"range\",\"value\":5},\"capacity\":{\"type\":\"fixed\",\"value\":4800},\"family\":\"defined_performance\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\",\"iops\":{\"type\":\"fixed\",\"value\":4000},\"name\":\"tier-3iops\",\"resource_type\":\"share_profile\",\"storage_generation\":{\"type\":\"fixed\",\"value\":1}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"profiles\":[{\"allowed_access_protocols\":{\"default\":[\"nfs4\"],\"type\":\"subset\",\"values\":[\"nfs4\"]},\"allowed_transit_encryption_modes\":{\"default\":[\"ipsec\"],\"type\":\"subset\",\"values\":[\"ipsec\"]},\"availability_modes\":{\"default\":\"zonal\",\"type\":\"enum\",\"values\":[\"zonal\"]},\"bandwidth\":{\"default\":100,\"max\":1024,\"min\":1,\"step\":1,\"type\":\"range\",\"value\":5},\"capacity\":{\"type\":\"fixed\",\"value\":4800},\"family\":\"defined_performance\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\",\"iops\":{\"type\":\"fixed\",\"value\":4000},\"name\":\"tier-3iops\",\"resource_type\":\"share_profile\",\"storage_generation\":{\"type\":\"fixed\",\"value\":1}}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Test the updateClusterNetworkSubnetReservedIp operation with a valid options model parameter + ListShareProfilesOptions listShareProfilesOptions = new ListShareProfilesOptions.Builder() + .limit(Long.valueOf("10")) + .sort("name") + .build(); + + ShareProfilesPager pager = new ShareProfilesPager(vpcService, listShareProfilesOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); + } + + // Test the listShareSnapshots operation with a valid options model parameter @Test - public void testUpdateClusterNetworkSubnetReservedIpWOptions() throws Throwable { + public void testListShareSnapshotsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"address\": \"10.1.0.6\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"id\": \"0717-d4d6489a-3bf5-4104-a33a-3572faf2d117\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network-subnet-reserved-ip\", \"owner\": \"user\", \"resource_type\": \"cluster_network_subnet_reserved_ip\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"id\": \"0717-ffc092f7-5d02-4b93-ab69-26860529b9fb\", \"name\": \"my-cluster-network-interface\", \"resource_type\": \"cluster_network_interface\"}}"; - String updateClusterNetworkSubnetReservedIpPath = "/cluster_networks/testString/subnets/testString/reserved_ips/testString"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"snapshots\": [{\"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"captured_at\": \"2019-01-01T12:00:00.000Z\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"fingerprint\": \"7abc3aef-c2bc-4f65-a296-2928e534d498\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"id\": \"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"minimum_size\": 10, \"name\": \"my-share-snapshot\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"share_snapshot\", \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"user_tags\": [\"userTags\"], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"total_count\": 132}"; + String listShareSnapshotsPath = "/shares/testString/snapshots"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ClusterNetworkSubnetReservedIPPatch model - ClusterNetworkSubnetReservedIPPatch clusterNetworkSubnetReservedIpPatchModel = new ClusterNetworkSubnetReservedIPPatch.Builder() - .autoDelete(false) - .name("my-cluster-network-subnet-reserved-ip") - .build(); - Map clusterNetworkSubnetReservedIpPatchModelAsPatch = clusterNetworkSubnetReservedIpPatchModel.asPatch(); - - // Construct an instance of the UpdateClusterNetworkSubnetReservedIpOptions model - UpdateClusterNetworkSubnetReservedIpOptions updateClusterNetworkSubnetReservedIpOptionsModel = new UpdateClusterNetworkSubnetReservedIpOptions.Builder() - .clusterNetworkId("testString") - .clusterNetworkSubnetId("testString") - .id("testString") - .clusterNetworkSubnetReservedIpPatch(clusterNetworkSubnetReservedIpPatchModelAsPatch) - .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") + // Construct an instance of the ListShareSnapshotsOptions model + ListShareSnapshotsOptions listShareSnapshotsOptionsModel = new ListShareSnapshotsOptions.Builder() + .shareId("testString") + .backupPolicyPlanId("testString") + .name("my-name") + .start("testString") + .limit(Long.valueOf("10")) + .sort("name") .build(); - // Invoke updateClusterNetworkSubnetReservedIp() with a valid options model and verify the result - Response response = vpcService.updateClusterNetworkSubnetReservedIp(updateClusterNetworkSubnetReservedIpOptionsModel).execute(); + // Invoke listShareSnapshots() with a valid options model and verify the result + Response response = vpcService.listShareSnapshots(listShareSnapshotsOptionsModel).execute(); assertNotNull(response); - ClusterNetworkSubnetReservedIP responseObj = response.getResult(); + ShareSnapshotCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateClusterNetworkSubnetReservedIpPath); + assertEquals(parsedPath, listShareSnapshotsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("backup_policy_plan.id"), "testString"); + assertEquals(query.get("name"), "my-name"); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("sort"), "name"); } - // Test the updateClusterNetworkSubnetReservedIp operation with and without retries enabled + // Test the listShareSnapshots operation with and without retries enabled @Test - public void testUpdateClusterNetworkSubnetReservedIpWRetries() throws Throwable { + public void testListShareSnapshotsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateClusterNetworkSubnetReservedIpWOptions(); + testListShareSnapshotsWOptions(); vpcService.disableRetries(); - testUpdateClusterNetworkSubnetReservedIpWOptions(); + testListShareSnapshotsWOptions(); } - // Test the updateClusterNetworkSubnetReservedIp operation with a null options model (negative test) + // Test the listShareSnapshots operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateClusterNetworkSubnetReservedIpNoOptions() throws Throwable { + public void testListShareSnapshotsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateClusterNetworkSubnetReservedIp(null).execute(); + vpcService.listShareSnapshots(null).execute(); } - // Test the deleteClusterNetworkSubnet operation with a valid options model parameter + // Test the listShareSnapshots operation using the ShareSnapshotsPager.getNext() method @Test - public void testDeleteClusterNetworkSubnetWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"available_ipv4_address_count\": 15, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"ip_version\": \"ipv4\", \"ipv4_cidr_block\": \"10.0.0.0/24\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\", \"total_ipv4_address_count\": 256}"; - String deleteClusterNetworkSubnetPath = "/cluster_networks/testString/subnets/testString"; + public void testListShareSnapshotsWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"snapshots\":[{\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"captured_at\":\"2019-01-01T12:00:00.000Z\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"fingerprint\":\"7abc3aef-c2bc-4f65-a296-2928e534d498\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"id\":\"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"minimum_size\":10,\"name\":\"my-share-snapshot\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"share_snapshot\",\"status\":\"available\",\"status_reasons\":[{\"code\":\"encryption_key_deleted\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"user_tags\":[\"userTags\"],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"snapshots\":[{\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"captured_at\":\"2019-01-01T12:00:00.000Z\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"fingerprint\":\"7abc3aef-c2bc-4f65-a296-2928e534d498\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"id\":\"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"minimum_size\":10,\"name\":\"my-share-snapshot\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"share_snapshot\",\"status\":\"available\",\"status_reasons\":[{\"code\":\"encryption_key_deleted\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"user_tags\":[\"userTags\"],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(202) - .setBody(mockResponseBody)); + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the DeleteClusterNetworkSubnetOptions model - DeleteClusterNetworkSubnetOptions deleteClusterNetworkSubnetOptionsModel = new DeleteClusterNetworkSubnetOptions.Builder() - .clusterNetworkId("testString") - .id("testString") - .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") + ListShareSnapshotsOptions listShareSnapshotsOptions = new ListShareSnapshotsOptions.Builder() + .shareId("testString") + .backupPolicyPlanId("testString") + .name("my-name") + .limit(Long.valueOf("10")) + .sort("name") .build(); - // Invoke deleteClusterNetworkSubnet() with a valid options model and verify the result - Response response = vpcService.deleteClusterNetworkSubnet(deleteClusterNetworkSubnetOptionsModel).execute(); - assertNotNull(response); - ClusterNetworkSubnet 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(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteClusterNetworkSubnetPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + List allResults = new ArrayList<>(); + ShareSnapshotsPager pager = new ShareSnapshotsPager(vpcService, listShareSnapshotsOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } - - // Test the deleteClusterNetworkSubnet operation with and without retries enabled + + // Test the listShareSnapshots operation using the ShareSnapshotsPager.getAll() method @Test - public void testDeleteClusterNetworkSubnetWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testDeleteClusterNetworkSubnetWOptions(); + public void testListShareSnapshotsWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"snapshots\":[{\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"captured_at\":\"2019-01-01T12:00:00.000Z\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"fingerprint\":\"7abc3aef-c2bc-4f65-a296-2928e534d498\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"id\":\"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"minimum_size\":10,\"name\":\"my-share-snapshot\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"share_snapshot\",\"status\":\"available\",\"status_reasons\":[{\"code\":\"encryption_key_deleted\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"user_tags\":[\"userTags\"],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"snapshots\":[{\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"captured_at\":\"2019-01-01T12:00:00.000Z\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"fingerprint\":\"7abc3aef-c2bc-4f65-a296-2928e534d498\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"id\":\"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"minimum_size\":10,\"name\":\"my-share-snapshot\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"share_snapshot\",\"status\":\"available\",\"status_reasons\":[{\"code\":\"encryption_key_deleted\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"user_tags\":[\"userTags\"],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - vpcService.disableRetries(); - testDeleteClusterNetworkSubnetWOptions(); - } + ListShareSnapshotsOptions listShareSnapshotsOptions = new ListShareSnapshotsOptions.Builder() + .shareId("testString") + .backupPolicyPlanId("testString") + .name("my-name") + .limit(Long.valueOf("10")) + .sort("name") + .build(); - // Test the deleteClusterNetworkSubnet operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteClusterNetworkSubnetNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.deleteClusterNetworkSubnet(null).execute(); + ShareSnapshotsPager pager = new ShareSnapshotsPager(vpcService, listShareSnapshotsOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); } - - // Test the getClusterNetworkSubnet operation with a valid options model parameter + + // Test the listShares operation with a valid options model parameter @Test - public void testGetClusterNetworkSubnetWOptions() throws Throwable { + public void testListSharesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"available_ipv4_address_count\": 15, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"ip_version\": \"ipv4\", \"ipv4_cidr_block\": \"10.0.0.0/24\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\", \"total_ipv4_address_count\": 256}"; - String getClusterNetworkSubnetPath = "/cluster_networks/testString/subnets/testString"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"shares\": [{\"access_control_mode\": \"security_group\", \"accessor_binding_role\": \"accessor\", \"accessor_bindings\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\", \"id\": \"r006-ce9dac18-dea0-4392-841c-142d3300674f\", \"resource_type\": \"share_accessor_binding\"}], \"allowed_access_protocols\": [\"nfs4\"], \"allowed_transit_encryption_modes\": [\"ipsec\"], \"availability_mode\": \"zonal\", \"bandwidth\": 1, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"initial_owner\": {\"gid\": 50, \"uid\": 50}, \"iops\": 100, \"latest_job\": {\"status\": \"cancelled\", \"status_reasons\": [{\"code\": \"cannot_reach_source_share\", \"message\": \"The replication failover failed because the source share cannot be reached.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}], \"type\": \"replication_failover\"}, \"latest_sync\": {\"completed_at\": \"2019-01-01T12:00:00.000Z\", \"data_transferred\": 0, \"started_at\": \"2019-01-01T12:00:00.000Z\"}, \"lifecycle_reasons\": [{\"code\": \"cloning_in_progress\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"mount_targets\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"name\": \"my-share-mount-target\", \"resource_type\": \"share_mount_target\"}], \"name\": \"my-share\", \"origin_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\", \"name\": \"tier-3iops\", \"resource_type\": \"share_profile\"}, \"replica_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"replication_cron_spec\": \"0 */5 * * *\", \"replication_role\": \"none\", \"replication_status\": \"active\", \"replication_status_reasons\": [{\"code\": \"cannot_reach_source_share\", \"message\": \"The replication failover failed because the source share cannot be reached.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"share\", \"size\": 200, \"snapshot_count\": 0, \"snapshot_size\": 0, \"source_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"id\": \"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"name\": \"my-share-snapshot\", \"resource_type\": \"share_snapshot\"}, \"storage_generation\": 1, \"user_tags\": [\"userTags\"], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"total_count\": 132}"; + String listSharesPath = "/shares"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetClusterNetworkSubnetOptions model - GetClusterNetworkSubnetOptions getClusterNetworkSubnetOptionsModel = new GetClusterNetworkSubnetOptions.Builder() - .clusterNetworkId("testString") - .id("testString") + // Construct an instance of the ListSharesOptions model + ListSharesOptions listSharesOptionsModel = new ListSharesOptions.Builder() + .start("testString") + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .name("my-name") + .sort("name") + .replicationRole("none") .build(); - // Invoke getClusterNetworkSubnet() with a valid options model and verify the result - Response response = vpcService.getClusterNetworkSubnet(getClusterNetworkSubnetOptionsModel).execute(); + // Invoke listShares() with a valid options model and verify the result + Response response = vpcService.listShares(listSharesOptionsModel).execute(); assertNotNull(response); - ClusterNetworkSubnet responseObj = response.getResult(); + ShareCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -22987,60 +24598,142 @@ public void testGetClusterNetworkSubnetWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getClusterNetworkSubnetPath); + assertEquals(parsedPath, listSharesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("resource_group.id"), "testString"); + assertEquals(query.get("name"), "my-name"); + assertEquals(query.get("sort"), "name"); + assertEquals(query.get("replication_role"), "none"); } - // Test the getClusterNetworkSubnet operation with and without retries enabled + // Test the listShares operation with and without retries enabled @Test - public void testGetClusterNetworkSubnetWRetries() throws Throwable { + public void testListSharesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetClusterNetworkSubnetWOptions(); + testListSharesWOptions(); vpcService.disableRetries(); - testGetClusterNetworkSubnetWOptions(); + testListSharesWOptions(); } - // Test the getClusterNetworkSubnet operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetClusterNetworkSubnetNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.getClusterNetworkSubnet(null).execute(); + // Test the listShares operation using the SharesPager.getNext() method + @Test + public void testListSharesWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"shares\":[{\"access_control_mode\":\"security_group\",\"accessor_binding_role\":\"accessor\",\"accessor_bindings\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\",\"id\":\"r006-ce9dac18-dea0-4392-841c-142d3300674f\",\"resource_type\":\"share_accessor_binding\"}],\"allowed_access_protocols\":[\"nfs4\"],\"allowed_transit_encryption_modes\":[\"ipsec\"],\"availability_mode\":\"zonal\",\"bandwidth\":1,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"encryption\":\"provider_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"initial_owner\":{\"gid\":50,\"uid\":50},\"iops\":100,\"latest_job\":{\"status\":\"cancelled\",\"status_reasons\":[{\"code\":\"cannot_reach_source_share\",\"message\":\"The replication failover failed because the source share cannot be reached.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}],\"type\":\"replication_failover\"},\"latest_sync\":{\"completed_at\":\"2019-01-01T12:00:00.000Z\",\"data_transferred\":0,\"started_at\":\"2019-01-01T12:00:00.000Z\"},\"lifecycle_reasons\":[{\"code\":\"cloning_in_progress\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"mount_targets\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"id\":\"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"name\":\"my-share-mount-target\",\"resource_type\":\"share_mount_target\"}],\"name\":\"my-share\",\"origin_share\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\",\"name\":\"tier-3iops\",\"resource_type\":\"share_profile\"},\"replica_share\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"replication_cron_spec\":\"0 */5 * * *\",\"replication_role\":\"none\",\"replication_status\":\"active\",\"replication_status_reasons\":[{\"code\":\"cannot_reach_source_share\",\"message\":\"The replication failover failed because the source share cannot be reached.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"share\",\"size\":200,\"snapshot_count\":0,\"snapshot_size\":0,\"source_share\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"source_snapshot\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"id\":\"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"name\":\"my-share-snapshot\",\"resource_type\":\"share_snapshot\"},\"storage_generation\":1,\"user_tags\":[\"userTags\"],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"shares\":[{\"access_control_mode\":\"security_group\",\"accessor_binding_role\":\"accessor\",\"accessor_bindings\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\",\"id\":\"r006-ce9dac18-dea0-4392-841c-142d3300674f\",\"resource_type\":\"share_accessor_binding\"}],\"allowed_access_protocols\":[\"nfs4\"],\"allowed_transit_encryption_modes\":[\"ipsec\"],\"availability_mode\":\"zonal\",\"bandwidth\":1,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"encryption\":\"provider_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"initial_owner\":{\"gid\":50,\"uid\":50},\"iops\":100,\"latest_job\":{\"status\":\"cancelled\",\"status_reasons\":[{\"code\":\"cannot_reach_source_share\",\"message\":\"The replication failover failed because the source share cannot be reached.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}],\"type\":\"replication_failover\"},\"latest_sync\":{\"completed_at\":\"2019-01-01T12:00:00.000Z\",\"data_transferred\":0,\"started_at\":\"2019-01-01T12:00:00.000Z\"},\"lifecycle_reasons\":[{\"code\":\"cloning_in_progress\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"mount_targets\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"id\":\"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"name\":\"my-share-mount-target\",\"resource_type\":\"share_mount_target\"}],\"name\":\"my-share\",\"origin_share\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\",\"name\":\"tier-3iops\",\"resource_type\":\"share_profile\"},\"replica_share\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"replication_cron_spec\":\"0 */5 * * *\",\"replication_role\":\"none\",\"replication_status\":\"active\",\"replication_status_reasons\":[{\"code\":\"cannot_reach_source_share\",\"message\":\"The replication failover failed because the source share cannot be reached.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"share\",\"size\":200,\"snapshot_count\":0,\"snapshot_size\":0,\"source_share\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"source_snapshot\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"id\":\"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"name\":\"my-share-snapshot\",\"resource_type\":\"share_snapshot\"},\"storage_generation\":1,\"user_tags\":[\"userTags\"],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListSharesOptions listSharesOptions = new ListSharesOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .name("my-name") + .sort("name") + .replicationRole("none") + .build(); + + List allResults = new ArrayList<>(); + SharesPager pager = new SharesPager(vpcService, listSharesOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } + + // Test the listShares operation using the SharesPager.getAll() method + @Test + public void testListSharesWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"shares\":[{\"access_control_mode\":\"security_group\",\"accessor_binding_role\":\"accessor\",\"accessor_bindings\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\",\"id\":\"r006-ce9dac18-dea0-4392-841c-142d3300674f\",\"resource_type\":\"share_accessor_binding\"}],\"allowed_access_protocols\":[\"nfs4\"],\"allowed_transit_encryption_modes\":[\"ipsec\"],\"availability_mode\":\"zonal\",\"bandwidth\":1,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"encryption\":\"provider_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"initial_owner\":{\"gid\":50,\"uid\":50},\"iops\":100,\"latest_job\":{\"status\":\"cancelled\",\"status_reasons\":[{\"code\":\"cannot_reach_source_share\",\"message\":\"The replication failover failed because the source share cannot be reached.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}],\"type\":\"replication_failover\"},\"latest_sync\":{\"completed_at\":\"2019-01-01T12:00:00.000Z\",\"data_transferred\":0,\"started_at\":\"2019-01-01T12:00:00.000Z\"},\"lifecycle_reasons\":[{\"code\":\"cloning_in_progress\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"mount_targets\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"id\":\"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"name\":\"my-share-mount-target\",\"resource_type\":\"share_mount_target\"}],\"name\":\"my-share\",\"origin_share\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\",\"name\":\"tier-3iops\",\"resource_type\":\"share_profile\"},\"replica_share\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"replication_cron_spec\":\"0 */5 * * *\",\"replication_role\":\"none\",\"replication_status\":\"active\",\"replication_status_reasons\":[{\"code\":\"cannot_reach_source_share\",\"message\":\"The replication failover failed because the source share cannot be reached.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"share\",\"size\":200,\"snapshot_count\":0,\"snapshot_size\":0,\"source_share\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"source_snapshot\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"id\":\"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"name\":\"my-share-snapshot\",\"resource_type\":\"share_snapshot\"},\"storage_generation\":1,\"user_tags\":[\"userTags\"],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"shares\":[{\"access_control_mode\":\"security_group\",\"accessor_binding_role\":\"accessor\",\"accessor_bindings\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\",\"id\":\"r006-ce9dac18-dea0-4392-841c-142d3300674f\",\"resource_type\":\"share_accessor_binding\"}],\"allowed_access_protocols\":[\"nfs4\"],\"allowed_transit_encryption_modes\":[\"ipsec\"],\"availability_mode\":\"zonal\",\"bandwidth\":1,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"encryption\":\"provider_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"initial_owner\":{\"gid\":50,\"uid\":50},\"iops\":100,\"latest_job\":{\"status\":\"cancelled\",\"status_reasons\":[{\"code\":\"cannot_reach_source_share\",\"message\":\"The replication failover failed because the source share cannot be reached.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}],\"type\":\"replication_failover\"},\"latest_sync\":{\"completed_at\":\"2019-01-01T12:00:00.000Z\",\"data_transferred\":0,\"started_at\":\"2019-01-01T12:00:00.000Z\"},\"lifecycle_reasons\":[{\"code\":\"cloning_in_progress\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"mount_targets\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"id\":\"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"name\":\"my-share-mount-target\",\"resource_type\":\"share_mount_target\"}],\"name\":\"my-share\",\"origin_share\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\",\"name\":\"tier-3iops\",\"resource_type\":\"share_profile\"},\"replica_share\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"replication_cron_spec\":\"0 */5 * * *\",\"replication_role\":\"none\",\"replication_status\":\"active\",\"replication_status_reasons\":[{\"code\":\"cannot_reach_source_share\",\"message\":\"The replication failover failed because the source share cannot be reached.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"share\",\"size\":200,\"snapshot_count\":0,\"snapshot_size\":0,\"source_share\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"id\":\"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\",\"name\":\"my-share\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"share\"},\"source_snapshot\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"id\":\"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\",\"name\":\"my-share-snapshot\",\"resource_type\":\"share_snapshot\"},\"storage_generation\":1,\"user_tags\":[\"userTags\"],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Test the updateClusterNetworkSubnet operation with a valid options model parameter + ListSharesOptions listSharesOptions = new ListSharesOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .name("my-name") + .sort("name") + .replicationRole("none") + .build(); + + SharesPager pager = new SharesPager(vpcService, listSharesOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); + } + + // Test the updateShare operation with a valid options model parameter @Test - public void testUpdateClusterNetworkSubnetWOptions() throws Throwable { + public void testUpdateShareWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"available_ipv4_address_count\": 15, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"id\": \"0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930\", \"ip_version\": \"ipv4\", \"ipv4_cidr_block\": \"10.0.0.0/24\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network-subnet\", \"resource_type\": \"cluster_network_subnet\", \"total_ipv4_address_count\": 256}"; - String updateClusterNetworkSubnetPath = "/cluster_networks/testString/subnets/testString"; + String mockResponseBody = "{\"access_control_mode\": \"security_group\", \"accessor_binding_role\": \"accessor\", \"accessor_bindings\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r006-ae9bdc18-aed0-4392-841c-142d3300674f\", \"id\": \"r006-ce9dac18-dea0-4392-841c-142d3300674f\", \"resource_type\": \"share_accessor_binding\"}], \"allowed_access_protocols\": [\"nfs4\"], \"allowed_transit_encryption_modes\": [\"ipsec\"], \"availability_mode\": \"zonal\", \"bandwidth\": 1, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"initial_owner\": {\"gid\": 50, \"uid\": 50}, \"iops\": 100, \"latest_job\": {\"status\": \"cancelled\", \"status_reasons\": [{\"code\": \"cannot_reach_source_share\", \"message\": \"The replication failover failed because the source share cannot be reached.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}], \"type\": \"replication_failover\"}, \"latest_sync\": {\"completed_at\": \"2019-01-01T12:00:00.000Z\", \"data_transferred\": 0, \"started_at\": \"2019-01-01T12:00:00.000Z\"}, \"lifecycle_reasons\": [{\"code\": \"cloning_in_progress\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"mount_targets\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"name\": \"my-share-mount-target\", \"resource_type\": \"share_mount_target\"}], \"name\": \"my-share\", \"origin_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops\", \"name\": \"tier-3iops\", \"resource_type\": \"share_profile\"}, \"replica_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"replication_cron_spec\": \"0 */5 * * *\", \"replication_role\": \"none\", \"replication_status\": \"active\", \"replication_status_reasons\": [{\"code\": \"cannot_reach_source_share\", \"message\": \"The replication failover failed because the source share cannot be reached.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"share\", \"size\": 200, \"snapshot_count\": 0, \"snapshot_size\": 0, \"source_share\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"id\": \"r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58\", \"name\": \"my-share\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"share\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"id\": \"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"name\": \"my-share-snapshot\", \"resource_type\": \"share_snapshot\"}, \"storage_generation\": 1, \"user_tags\": [\"userTags\"], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String updateSharePath = "/shares/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ClusterNetworkSubnetPatch model - ClusterNetworkSubnetPatch clusterNetworkSubnetPatchModel = new ClusterNetworkSubnetPatch.Builder() - .name("my-cluster-network-subnet") + // Construct an instance of the ShareProfileIdentityByName model + ShareProfileIdentityByName shareProfileIdentityModel = new ShareProfileIdentityByName.Builder() + .name("tier-3iops") .build(); - Map clusterNetworkSubnetPatchModelAsPatch = clusterNetworkSubnetPatchModel.asPatch(); - // Construct an instance of the UpdateClusterNetworkSubnetOptions model - UpdateClusterNetworkSubnetOptions updateClusterNetworkSubnetOptionsModel = new UpdateClusterNetworkSubnetOptions.Builder() - .clusterNetworkId("testString") + // Construct an instance of the SharePatch model + SharePatch sharePatchModel = new SharePatch.Builder() + .accessControlMode("security_group") + .allowedAccessProtocols(java.util.Arrays.asList("nfs4")) + .allowedTransitEncryptionModes(java.util.Arrays.asList("ipsec")) + .bandwidth(Long.valueOf("1")) + .iops(Long.valueOf("100")) + .name("my-share") + .profile(shareProfileIdentityModel) + .replicationCronSpec("0 */5 * * *") + .size(Long.valueOf("8000")) + .userTags(java.util.Arrays.asList("testString")) + .build(); + Map sharePatchModelAsPatch = sharePatchModel.asPatch(); + + // Construct an instance of the UpdateShareOptions model + UpdateShareOptions updateShareOptionsModel = new UpdateShareOptions.Builder() .id("testString") - .clusterNetworkSubnetPatch(clusterNetworkSubnetPatchModelAsPatch) - .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") + .sharePatch(sharePatchModelAsPatch) + .ifMatch("W/96d225c4-56bd-43d9-98fc-d7148e5c5028") .build(); - // Invoke updateClusterNetworkSubnet() with a valid options model and verify the result - Response response = vpcService.updateClusterNetworkSubnet(updateClusterNetworkSubnetOptionsModel).execute(); + // Invoke updateShare() with a valid options model and verify the result + Response response = vpcService.updateShare(updateShareOptionsModel).execute(); assertNotNull(response); - ClusterNetworkSubnet responseObj = response.getResult(); + Share responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -23049,358 +24742,344 @@ public void testUpdateClusterNetworkSubnetWOptions() throws Throwable { assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateClusterNetworkSubnetPath); + assertEquals(parsedPath, updateSharePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateClusterNetworkSubnet operation with and without retries enabled + // Test the updateShare operation with and without retries enabled @Test - public void testUpdateClusterNetworkSubnetWRetries() throws Throwable { + public void testUpdateShareWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateClusterNetworkSubnetWOptions(); + testUpdateShareWOptions(); vpcService.disableRetries(); - testUpdateClusterNetworkSubnetWOptions(); + testUpdateShareWOptions(); } - // Test the updateClusterNetworkSubnet operation with a null options model (negative test) + // Test the updateShare operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateClusterNetworkSubnetNoOptions() throws Throwable { + public void testUpdateShareNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateClusterNetworkSubnet(null).execute(); + vpcService.updateShare(null).execute(); } - // Test the deleteClusterNetwork operation with a valid options model parameter + // Test the updateShareMountTarget operation with a valid options model parameter @Test - public void testDeleteClusterNetworkWOptions() throws Throwable { + public void testUpdateShareMountTargetWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"id\": \"0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network\", \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\", \"name\": \"h100\", \"resource_type\": \"cluster_network_profile\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"cluster_network\", \"subnet_prefixes\": [{\"allocation_policy\": \"auto\", \"cidr\": \"10.0.0.0/24\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String deleteClusterNetworkPath = "/cluster_networks/testString"; + String mockResponseBody = "{\"access_control_mode\": \"security_group\", \"access_protocol\": \"nfs4\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"lifecycle_state\": \"stable\", \"mount_path\": \"10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e\", \"name\": \"my-share-mount-target\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"share_mount_target\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"transit_encryption\": \"none\", \"virtual_network_interface\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"name\": \"my-virtual-network-interface\", \"resource_type\": \"virtual_network_interface\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String updateShareMountTargetPath = "/shares/testString/mount_targets/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(202) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteClusterNetworkOptions model - DeleteClusterNetworkOptions deleteClusterNetworkOptionsModel = new DeleteClusterNetworkOptions.Builder() + // Construct an instance of the ShareMountTargetPatch model + ShareMountTargetPatch shareMountTargetPatchModel = new ShareMountTargetPatch.Builder() + .name("my-share-mount-target") + .build(); + Map shareMountTargetPatchModelAsPatch = shareMountTargetPatchModel.asPatch(); + + // Construct an instance of the UpdateShareMountTargetOptions model + UpdateShareMountTargetOptions updateShareMountTargetOptionsModel = new UpdateShareMountTargetOptions.Builder() + .shareId("testString") .id("testString") - .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") + .shareMountTargetPatch(shareMountTargetPatchModelAsPatch) .build(); - // Invoke deleteClusterNetwork() with a valid options model and verify the result - Response response = vpcService.deleteClusterNetwork(deleteClusterNetworkOptionsModel).execute(); + // Invoke updateShareMountTarget() with a valid options model and verify the result + Response response = vpcService.updateShareMountTarget(updateShareMountTargetOptionsModel).execute(); assertNotNull(response); - ClusterNetwork responseObj = response.getResult(); + ShareMountTarget 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(), "DELETE"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteClusterNetworkPath); + assertEquals(parsedPath, updateShareMountTargetPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteClusterNetwork operation with and without retries enabled + // Test the updateShareMountTarget operation with and without retries enabled @Test - public void testDeleteClusterNetworkWRetries() throws Throwable { + public void testUpdateShareMountTargetWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteClusterNetworkWOptions(); + testUpdateShareMountTargetWOptions(); vpcService.disableRetries(); - testDeleteClusterNetworkWOptions(); + testUpdateShareMountTargetWOptions(); } - // Test the deleteClusterNetwork operation with a null options model (negative test) + // Test the updateShareMountTarget operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteClusterNetworkNoOptions() throws Throwable { + public void testUpdateShareMountTargetNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteClusterNetwork(null).execute(); + vpcService.updateShareMountTarget(null).execute(); } - // Test the getClusterNetwork operation with a valid options model parameter + // Test the updateShareSnapshot operation with a valid options model parameter @Test - public void testGetClusterNetworkWOptions() throws Throwable { + public void testUpdateShareSnapshotWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"id\": \"0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network\", \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\", \"name\": \"h100\", \"resource_type\": \"cluster_network_profile\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"cluster_network\", \"subnet_prefixes\": [{\"allocation_policy\": \"auto\", \"cidr\": \"10.0.0.0/24\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String getClusterNetworkPath = "/cluster_networks/testString"; + String mockResponseBody = "{\"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"captured_at\": \"2019-01-01T12:00:00.000Z\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"fingerprint\": \"7abc3aef-c2bc-4f65-a296-2928e534d498\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"id\": \"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"minimum_size\": 10, \"name\": \"my-share-snapshot\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"share_snapshot\", \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"user_tags\": [\"userTags\"], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String updateShareSnapshotPath = "/shares/testString/snapshots/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetClusterNetworkOptions model - GetClusterNetworkOptions getClusterNetworkOptionsModel = new GetClusterNetworkOptions.Builder() + // Construct an instance of the ShareSnapshotPatch model + ShareSnapshotPatch shareSnapshotPatchModel = new ShareSnapshotPatch.Builder() + .name("my-share-snapshot") + .userTags(java.util.Arrays.asList("testString")) + .build(); + Map shareSnapshotPatchModelAsPatch = shareSnapshotPatchModel.asPatch(); + + // Construct an instance of the UpdateShareSnapshotOptions model + UpdateShareSnapshotOptions updateShareSnapshotOptionsModel = new UpdateShareSnapshotOptions.Builder() + .shareId("testString") .id("testString") + .shareSnapshotPatch(shareSnapshotPatchModelAsPatch) + .ifMatch("W/96d225c4-56bd-43d9-98fc-d7148e5c5028") .build(); - // Invoke getClusterNetwork() with a valid options model and verify the result - Response response = vpcService.getClusterNetwork(getClusterNetworkOptionsModel).execute(); + // Invoke updateShareSnapshot() with a valid options model and verify the result + Response response = vpcService.updateShareSnapshot(updateShareSnapshotOptionsModel).execute(); assertNotNull(response); - ClusterNetwork responseObj = response.getResult(); + ShareSnapshot responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getClusterNetworkPath); + assertEquals(parsedPath, updateShareSnapshotPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getClusterNetwork operation with and without retries enabled + // Test the updateShareSnapshot operation with and without retries enabled @Test - public void testGetClusterNetworkWRetries() throws Throwable { + public void testUpdateShareSnapshotWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetClusterNetworkWOptions(); + testUpdateShareSnapshotWOptions(); vpcService.disableRetries(); - testGetClusterNetworkWOptions(); + testUpdateShareSnapshotWOptions(); } - // Test the getClusterNetwork operation with a null options model (negative test) + // Test the updateShareSnapshot operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetClusterNetworkNoOptions() throws Throwable { + public void testUpdateShareSnapshotNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getClusterNetwork(null).execute(); + vpcService.updateShareSnapshot(null).execute(); } - // Test the updateClusterNetwork operation with a valid options model parameter + // Test the createSnapshot operation with a valid options model parameter @Test - public void testUpdateClusterNetworkWOptions() throws Throwable { + public void testCreateSnapshotWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"id\": \"0717-da0df18c-7598-4633-a648-fdaac28a5573\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-cluster-network\", \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100\", \"name\": \"h100\", \"resource_type\": \"cluster_network_profile\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"cluster_network\", \"subnet_prefixes\": [{\"allocation_policy\": \"auto\", \"cidr\": \"10.0.0.0/24\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String updateClusterNetworkPath = "/cluster_networks/testString"; + String mockResponseBody = "{\"allowed_use\": {\"api_version\": \"2024-06-23\", \"bare_metal_server\": \"enable_secure_boot == true\", \"instance\": \"gpu.count > 0 && enable_secure_boot == true\"}, \"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"bootable\": true, \"captured_at\": \"2019-01-01T12:00:00.000Z\", \"catalog_offering\": {\"plan\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}}, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"clones\": [{\"available\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"copies\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deletable\": false, \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"lifecycle_state\": \"stable\", \"minimum_capacity\": 1, \"name\": \"my-snapshot\", \"operating_system\": {\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}, \"progress\": 55, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"snapshot\", \"service_tags\": [\"serviceTags\"], \"size\": 1, \"snapshot_consistency_group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot-consistency-group\", \"resource_type\": \"snapshot_consistency_group\"}, \"source_image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}, \"source_volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"volume\"}, \"storage_generation\": 1, \"user_tags\": [\"userTags\"]}"; + String createSnapshotPath = "/snapshots"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the ClusterNetworkPatch model - ClusterNetworkPatch clusterNetworkPatchModel = new ClusterNetworkPatch.Builder() - .name("my-cluster-network") + // Construct an instance of the SnapshotAllowedUsePrototype model + SnapshotAllowedUsePrototype snapshotAllowedUsePrototypeModel = new SnapshotAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") .build(); - Map clusterNetworkPatchModelAsPatch = clusterNetworkPatchModel.asPatch(); - // Construct an instance of the UpdateClusterNetworkOptions model - UpdateClusterNetworkOptions updateClusterNetworkOptionsModel = new UpdateClusterNetworkOptions.Builder() - .id("testString") - .clusterNetworkPatch(clusterNetworkPatchModelAsPatch) - .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") + // Construct an instance of the ZoneIdentityByName model + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() + .name("us-south-1") .build(); - // Invoke updateClusterNetwork() with a valid options model and verify the result - Response response = vpcService.updateClusterNetwork(updateClusterNetworkOptionsModel).execute(); + // Construct an instance of the SnapshotClonePrototype model + SnapshotClonePrototype snapshotClonePrototypeModel = new SnapshotClonePrototype.Builder() + .zone(zoneIdentityModel) + .build(); + + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") + .build(); + + // Construct an instance of the VolumeIdentityById model + VolumeIdentityById volumeIdentityModel = new VolumeIdentityById.Builder() + .id("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + .build(); + + // Construct an instance of the SnapshotPrototypeSnapshotBySourceVolume model + SnapshotPrototypeSnapshotBySourceVolume snapshotPrototypeModel = new SnapshotPrototypeSnapshotBySourceVolume.Builder() + .allowedUse(snapshotAllowedUsePrototypeModel) + .clones(java.util.Arrays.asList(snapshotClonePrototypeModel)) + .name("my-snapshot") + .resourceGroup(resourceGroupIdentityModel) + .userTags(java.util.Arrays.asList()) + .sourceVolume(volumeIdentityModel) + .build(); + + // Construct an instance of the CreateSnapshotOptions model + CreateSnapshotOptions createSnapshotOptionsModel = new CreateSnapshotOptions.Builder() + .snapshotPrototype(snapshotPrototypeModel) + .build(); + + // Invoke createSnapshot() with a valid options model and verify the result + Response response = vpcService.createSnapshot(createSnapshotOptionsModel).execute(); assertNotNull(response); - ClusterNetwork responseObj = response.getResult(); + Snapshot responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateClusterNetworkPath); + assertEquals(parsedPath, createSnapshotPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateClusterNetwork operation with and without retries enabled + // Test the createSnapshot operation with and without retries enabled @Test - public void testUpdateClusterNetworkWRetries() throws Throwable { + public void testCreateSnapshotWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateClusterNetworkWOptions(); + testCreateSnapshotWOptions(); vpcService.disableRetries(); - testUpdateClusterNetworkWOptions(); + testCreateSnapshotWOptions(); } - // Test the updateClusterNetwork operation with a null options model (negative test) + // Test the createSnapshot operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateClusterNetworkNoOptions() throws Throwable { + public void testCreateSnapshotNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateClusterNetwork(null).execute(); + vpcService.createSnapshot(null).execute(); } - // Test the listPublicGateways operation with a valid options model parameter + // Test the createSnapshotClone operation with a valid options model parameter @Test - public void testListPublicGatewaysWOptions() throws Throwable { + public void testCreateSnapshotCloneWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"public_gateways\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"floating_ip\": {\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"id\": \"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"name\": \"my-public-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"public_gateway\", \"status\": \"available\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"total_count\": 132}"; - String listPublicGatewaysPath = "/public_gateways"; + String mockResponseBody = "{\"available\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String createSnapshotClonePath = "/snapshots/testString/clones/us-south-1"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListPublicGatewaysOptions model - ListPublicGatewaysOptions listPublicGatewaysOptionsModel = new ListPublicGatewaysOptions.Builder() - .start("testString") - .limit(Long.valueOf("10")) - .resourceGroupId("testString") + // Construct an instance of the CreateSnapshotCloneOptions model + CreateSnapshotCloneOptions createSnapshotCloneOptionsModel = new CreateSnapshotCloneOptions.Builder() + .id("testString") + .zoneName("us-south-1") .build(); - // Invoke listPublicGateways() with a valid options model and verify the result - Response response = vpcService.listPublicGateways(listPublicGatewaysOptionsModel).execute(); + // Invoke createSnapshotClone() with a valid options model and verify the result + Response response = vpcService.createSnapshotClone(createSnapshotCloneOptionsModel).execute(); assertNotNull(response); - PublicGatewayCollection responseObj = response.getResult(); + SnapshotClone responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PUT"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listPublicGatewaysPath); + assertEquals(parsedPath, createSnapshotClonePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("resource_group.id"), "testString"); } - // Test the listPublicGateways operation with and without retries enabled + // Test the createSnapshotClone operation with and without retries enabled @Test - public void testListPublicGatewaysWRetries() throws Throwable { + public void testCreateSnapshotCloneWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListPublicGatewaysWOptions(); + testCreateSnapshotCloneWOptions(); vpcService.disableRetries(); - testListPublicGatewaysWOptions(); + testCreateSnapshotCloneWOptions(); } - // Test the listPublicGateways operation using the PublicGatewaysPager.getNext() method - @Test - public void testListPublicGatewaysWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"public_gateways\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"floating_ip\":{\"address\":\"203.0.113.1\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"id\":\"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"name\":\"my-public-gateway\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"public_gateway\",\"status\":\"available\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"public_gateways\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"floating_ip\":{\"address\":\"203.0.113.1\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"id\":\"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"name\":\"my-public-gateway\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"public_gateway\",\"status\":\"available\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListPublicGatewaysOptions listPublicGatewaysOptions = new ListPublicGatewaysOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .build(); - - List allResults = new ArrayList<>(); - PublicGatewaysPager pager = new PublicGatewaysPager(vpcService, listPublicGatewaysOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + // Test the createSnapshotClone operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testCreateSnapshotCloneNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.createSnapshotClone(null).execute(); } - - // Test the listPublicGateways operation using the PublicGatewaysPager.getAll() method - @Test - public void testListPublicGatewaysWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"public_gateways\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"floating_ip\":{\"address\":\"203.0.113.1\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"id\":\"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"name\":\"my-public-gateway\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"public_gateway\",\"status\":\"available\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"public_gateways\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"floating_ip\":{\"address\":\"203.0.113.1\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"id\":\"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"name\":\"my-public-gateway\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"public_gateway\",\"status\":\"available\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListPublicGatewaysOptions listPublicGatewaysOptions = new ListPublicGatewaysOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .build(); - PublicGatewaysPager pager = new PublicGatewaysPager(vpcService, listPublicGatewaysOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the createPublicGateway operation with a valid options model parameter + // Test the createSnapshotConsistencyGroup operation with a valid options model parameter @Test - public void testCreatePublicGatewayWOptions() throws Throwable { + public void testCreateSnapshotConsistencyGroupWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"floating_ip\": {\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"id\": \"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"name\": \"my-public-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"public_gateway\", \"status\": \"available\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String createPublicGatewayPath = "/public_gateways"; + String mockResponseBody = "{\"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"delete_snapshots_on_delete\": false, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"lifecycle_state\": \"stable\", \"name\": \"my-snapshot-consistency-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"snapshot_consistency_group\", \"service_tags\": [\"serviceTags\"], \"snapshots\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}]}"; + String createSnapshotConsistencyGroupPath = "/snapshot_consistency_groups"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the VPCIdentityById model - VPCIdentityById vpcIdentityModel = new VPCIdentityById.Builder() - .id("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") .build(); - // Construct an instance of the ZoneIdentityByName model - ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() - .name("us-south-1") + // Construct an instance of the VolumeIdentityById model + VolumeIdentityById volumeIdentityModel = new VolumeIdentityById.Builder() + .id("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") .build(); - // Construct an instance of the PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById model - PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById publicGatewayFloatingIpPrototypeModel = new PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById.Builder() - .id("r006-f45e0d90-12a8-4460-8210-290ff2ab75cd") + // Construct an instance of the SnapshotPrototypeSnapshotConsistencyGroupContext model + SnapshotPrototypeSnapshotConsistencyGroupContext snapshotPrototypeSnapshotConsistencyGroupContextModel = new SnapshotPrototypeSnapshotConsistencyGroupContext.Builder() + .name("my-snapshot") + .sourceVolume(volumeIdentityModel) + .userTags(java.util.Arrays.asList("testString")) .build(); - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") + // Construct an instance of the SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots model + SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots snapshotConsistencyGroupPrototypeModel = new SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots.Builder() + .deleteSnapshotsOnDelete(true) + .name("my-snapshot-consistency-group") + .resourceGroup(resourceGroupIdentityModel) + .snapshots(java.util.Arrays.asList(snapshotPrototypeSnapshotConsistencyGroupContextModel)) .build(); - // Construct an instance of the CreatePublicGatewayOptions model - CreatePublicGatewayOptions createPublicGatewayOptionsModel = new CreatePublicGatewayOptions.Builder() - .vpc(vpcIdentityModel) - .zone(zoneIdentityModel) - .floatingIp(publicGatewayFloatingIpPrototypeModel) - .name("my-public-gateway") - .resourceGroup(resourceGroupIdentityModel) + // Construct an instance of the CreateSnapshotConsistencyGroupOptions model + CreateSnapshotConsistencyGroupOptions createSnapshotConsistencyGroupOptionsModel = new CreateSnapshotConsistencyGroupOptions.Builder() + .snapshotConsistencyGroupPrototype(snapshotConsistencyGroupPrototypeModel) .build(); - // Invoke createPublicGateway() with a valid options model and verify the result - Response response = vpcService.createPublicGateway(createPublicGatewayOptionsModel).execute(); + // Invoke createSnapshotConsistencyGroup() with a valid options model and verify the result + Response response = vpcService.createSnapshotConsistencyGroup(createSnapshotConsistencyGroupOptionsModel).execute(); assertNotNull(response); - PublicGateway responseObj = response.getResult(); + SnapshotConsistencyGroup responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -23409,48 +25088,49 @@ public void testCreatePublicGatewayWOptions() throws Throwable { assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createPublicGatewayPath); + assertEquals(parsedPath, createSnapshotConsistencyGroupPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createPublicGateway operation with and without retries enabled + // Test the createSnapshotConsistencyGroup operation with and without retries enabled @Test - public void testCreatePublicGatewayWRetries() throws Throwable { + public void testCreateSnapshotConsistencyGroupWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreatePublicGatewayWOptions(); + testCreateSnapshotConsistencyGroupWOptions(); vpcService.disableRetries(); - testCreatePublicGatewayWOptions(); + testCreateSnapshotConsistencyGroupWOptions(); } - // Test the createPublicGateway operation with a null options model (negative test) + // Test the createSnapshotConsistencyGroup operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreatePublicGatewayNoOptions() throws Throwable { + public void testCreateSnapshotConsistencyGroupNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createPublicGateway(null).execute(); + vpcService.createSnapshotConsistencyGroup(null).execute(); } - // Test the deletePublicGateway operation with a valid options model parameter + // Test the deleteSnapshot operation with a valid options model parameter @Test - public void testDeletePublicGatewayWOptions() throws Throwable { + public void testDeleteSnapshotWOptions() throws Throwable { // Register a mock response String mockResponseBody = ""; - String deletePublicGatewayPath = "/public_gateways/testString"; + String deleteSnapshotPath = "/snapshots/testString"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the DeletePublicGatewayOptions model - DeletePublicGatewayOptions deletePublicGatewayOptionsModel = new DeletePublicGatewayOptions.Builder() + // Construct an instance of the DeleteSnapshotOptions model + DeleteSnapshotOptions deleteSnapshotOptionsModel = new DeleteSnapshotOptions.Builder() .id("testString") + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke deletePublicGateway() with a valid options model and verify the result - Response response = vpcService.deletePublicGateway(deletePublicGatewayOptionsModel).execute(); + // Invoke deleteSnapshot() with a valid options model and verify the result + Response response = vpcService.deleteSnapshot(deleteSnapshotOptionsModel).execute(); assertNotNull(response); Void responseObj = response.getResult(); assertNull(responseObj); @@ -23461,421 +25141,317 @@ public void testDeletePublicGatewayWOptions() throws Throwable { assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deletePublicGatewayPath); + assertEquals(parsedPath, deleteSnapshotPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deletePublicGateway operation with and without retries enabled + // Test the deleteSnapshot operation with and without retries enabled @Test - public void testDeletePublicGatewayWRetries() throws Throwable { + public void testDeleteSnapshotWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeletePublicGatewayWOptions(); + testDeleteSnapshotWOptions(); vpcService.disableRetries(); - testDeletePublicGatewayWOptions(); + testDeleteSnapshotWOptions(); } - // Test the deletePublicGateway operation with a null options model (negative test) + // Test the deleteSnapshot operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeletePublicGatewayNoOptions() throws Throwable { + public void testDeleteSnapshotNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deletePublicGateway(null).execute(); + vpcService.deleteSnapshot(null).execute(); } - // Test the getPublicGateway operation with a valid options model parameter + // Test the deleteSnapshotClone operation with a valid options model parameter @Test - public void testGetPublicGatewayWOptions() throws Throwable { + public void testDeleteSnapshotCloneWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"floating_ip\": {\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"id\": \"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"name\": \"my-public-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"public_gateway\", \"status\": \"available\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String getPublicGatewayPath = "/public_gateways/testString"; + String mockResponseBody = ""; + String deleteSnapshotClonePath = "/snapshots/testString/clones/us-south-1"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the GetPublicGatewayOptions model - GetPublicGatewayOptions getPublicGatewayOptionsModel = new GetPublicGatewayOptions.Builder() + // Construct an instance of the DeleteSnapshotCloneOptions model + DeleteSnapshotCloneOptions deleteSnapshotCloneOptionsModel = new DeleteSnapshotCloneOptions.Builder() .id("testString") + .zoneName("us-south-1") .build(); - // Invoke getPublicGateway() with a valid options model and verify the result - Response response = vpcService.getPublicGateway(getPublicGatewayOptionsModel).execute(); + // Invoke deleteSnapshotClone() with a valid options model and verify the result + Response response = vpcService.deleteSnapshotClone(deleteSnapshotCloneOptionsModel).execute(); assertNotNull(response); - PublicGateway responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getPublicGatewayPath); + assertEquals(parsedPath, deleteSnapshotClonePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getPublicGateway operation with and without retries enabled + // Test the deleteSnapshotClone operation with and without retries enabled @Test - public void testGetPublicGatewayWRetries() throws Throwable { + public void testDeleteSnapshotCloneWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetPublicGatewayWOptions(); + testDeleteSnapshotCloneWOptions(); vpcService.disableRetries(); - testGetPublicGatewayWOptions(); + testDeleteSnapshotCloneWOptions(); } - // Test the getPublicGateway operation with a null options model (negative test) + // Test the deleteSnapshotClone operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetPublicGatewayNoOptions() throws Throwable { + public void testDeleteSnapshotCloneNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getPublicGateway(null).execute(); + vpcService.deleteSnapshotClone(null).execute(); } - // Test the updatePublicGateway operation with a valid options model parameter + // Test the deleteSnapshotConsistencyGroup operation with a valid options model parameter @Test - public void testUpdatePublicGatewayWOptions() throws Throwable { + public void testDeleteSnapshotConsistencyGroupWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"floating_ip\": {\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"id\": \"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"name\": \"my-public-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"public_gateway\", \"status\": \"available\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String updatePublicGatewayPath = "/public_gateways/testString"; + String mockResponseBody = "{\"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"delete_snapshots_on_delete\": false, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"lifecycle_state\": \"stable\", \"name\": \"my-snapshot-consistency-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"snapshot_consistency_group\", \"service_tags\": [\"serviceTags\"], \"snapshots\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}]}"; + String deleteSnapshotConsistencyGroupPath = "/snapshot_consistency_groups/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the PublicGatewayPatch model - PublicGatewayPatch publicGatewayPatchModel = new PublicGatewayPatch.Builder() - .name("my-public-gateway-updated") - .build(); - Map publicGatewayPatchModelAsPatch = publicGatewayPatchModel.asPatch(); - - // Construct an instance of the UpdatePublicGatewayOptions model - UpdatePublicGatewayOptions updatePublicGatewayOptionsModel = new UpdatePublicGatewayOptions.Builder() + // Construct an instance of the DeleteSnapshotConsistencyGroupOptions model + DeleteSnapshotConsistencyGroupOptions deleteSnapshotConsistencyGroupOptionsModel = new DeleteSnapshotConsistencyGroupOptions.Builder() .id("testString") - .publicGatewayPatch(publicGatewayPatchModelAsPatch) .build(); - // Invoke updatePublicGateway() with a valid options model and verify the result - Response response = vpcService.updatePublicGateway(updatePublicGatewayOptionsModel).execute(); + // Invoke deleteSnapshotConsistencyGroup() with a valid options model and verify the result + Response response = vpcService.deleteSnapshotConsistencyGroup(deleteSnapshotConsistencyGroupOptionsModel).execute(); assertNotNull(response); - PublicGateway responseObj = response.getResult(); + SnapshotConsistencyGroup responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updatePublicGatewayPath); + assertEquals(parsedPath, deleteSnapshotConsistencyGroupPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updatePublicGateway operation with and without retries enabled + // Test the deleteSnapshotConsistencyGroup operation with and without retries enabled @Test - public void testUpdatePublicGatewayWRetries() throws Throwable { + public void testDeleteSnapshotConsistencyGroupWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdatePublicGatewayWOptions(); + testDeleteSnapshotConsistencyGroupWOptions(); vpcService.disableRetries(); - testUpdatePublicGatewayWOptions(); + testDeleteSnapshotConsistencyGroupWOptions(); } - // Test the updatePublicGateway operation with a null options model (negative test) + // Test the deleteSnapshotConsistencyGroup operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdatePublicGatewayNoOptions() throws Throwable { + public void testDeleteSnapshotConsistencyGroupNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updatePublicGateway(null).execute(); + vpcService.deleteSnapshotConsistencyGroup(null).execute(); } - // Test the listFloatingIps operation with a valid options model parameter + // Test the deleteSnapshots operation with a valid options model parameter @Test - public void testListFloatingIpsWOptions() throws Throwable { + public void testDeleteSnapshotsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"floating_ips\": [{\"address\": \"203.0.113.1\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"available\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listFloatingIpsPath = "/floating_ips"; + String mockResponseBody = ""; + String deleteSnapshotsPath = "/snapshots"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the ListFloatingIpsOptions model - ListFloatingIpsOptions listFloatingIpsOptionsModel = new ListFloatingIpsOptions.Builder() - .start("testString") - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .sort("name") - .targetId("testString") - .targetCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727") - .targetName("my-resource") - .targetResourceType("testString") + // Construct an instance of the DeleteSnapshotsOptions model + DeleteSnapshotsOptions deleteSnapshotsOptionsModel = new DeleteSnapshotsOptions.Builder() + .sourceVolumeId("testString") .build(); - // Invoke listFloatingIps() with a valid options model and verify the result - Response response = vpcService.listFloatingIps(listFloatingIpsOptionsModel).execute(); + // Invoke deleteSnapshots() with a valid options model and verify the result + Response response = vpcService.deleteSnapshots(deleteSnapshotsOptionsModel).execute(); assertNotNull(response); - FloatingIPCollection responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listFloatingIpsPath); + assertEquals(parsedPath, deleteSnapshotsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("resource_group.id"), "testString"); - assertEquals(query.get("sort"), "name"); - assertEquals(query.get("target.id"), "testString"); - assertEquals(query.get("target.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727"); - assertEquals(query.get("target.name"), "my-resource"); - assertEquals(query.get("target.resource_type"), "testString"); + assertEquals(query.get("source_volume.id"), "testString"); } - // Test the listFloatingIps operation with and without retries enabled + // Test the deleteSnapshots operation with and without retries enabled @Test - public void testListFloatingIpsWRetries() throws Throwable { + public void testDeleteSnapshotsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListFloatingIpsWOptions(); + testDeleteSnapshotsWOptions(); vpcService.disableRetries(); - testListFloatingIpsWOptions(); - } - - // Test the listFloatingIps operation using the FloatingIpsPager.getNext() method - @Test - public void testListFloatingIpsWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"floating_ips\":[{\"address\":\"203.0.113.1\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"status\":\"available\",\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"floating_ips\":[{\"address\":\"203.0.113.1\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"status\":\"available\",\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListFloatingIpsOptions listFloatingIpsOptions = new ListFloatingIpsOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .sort("name") - .targetId("testString") - .targetCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727") - .targetName("my-resource") - .targetResourceType("testString") - .build(); - - List allResults = new ArrayList<>(); - FloatingIpsPager pager = new FloatingIpsPager(vpcService, listFloatingIpsOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + testDeleteSnapshotsWOptions(); } - - // Test the listFloatingIps operation using the FloatingIpsPager.getAll() method - @Test - public void testListFloatingIpsWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"floating_ips\":[{\"address\":\"203.0.113.1\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"status\":\"available\",\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"floating_ips\":[{\"address\":\"203.0.113.1\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"status\":\"available\",\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"resource_type\":\"network_interface\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListFloatingIpsOptions listFloatingIpsOptions = new ListFloatingIpsOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .sort("name") - .targetId("testString") - .targetCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727") - .targetName("my-resource") - .targetResourceType("testString") - .build(); - FloatingIpsPager pager = new FloatingIpsPager(vpcService, listFloatingIpsOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); + // Test the deleteSnapshots operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testDeleteSnapshotsNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.deleteSnapshots(null).execute(); } - - // Test the createFloatingIp operation with a valid options model parameter + + // Test the getSnapshot operation with a valid options model parameter @Test - public void testCreateFloatingIpWOptions() throws Throwable { + public void testGetSnapshotWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"address\": \"203.0.113.1\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"available\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String createFloatingIpPath = "/floating_ips"; + String mockResponseBody = "{\"allowed_use\": {\"api_version\": \"2024-06-23\", \"bare_metal_server\": \"enable_secure_boot == true\", \"instance\": \"gpu.count > 0 && enable_secure_boot == true\"}, \"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"bootable\": true, \"captured_at\": \"2019-01-01T12:00:00.000Z\", \"catalog_offering\": {\"plan\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}}, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"clones\": [{\"available\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"copies\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deletable\": false, \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"lifecycle_state\": \"stable\", \"minimum_capacity\": 1, \"name\": \"my-snapshot\", \"operating_system\": {\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}, \"progress\": 55, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"snapshot\", \"service_tags\": [\"serviceTags\"], \"size\": 1, \"snapshot_consistency_group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot-consistency-group\", \"resource_type\": \"snapshot_consistency_group\"}, \"source_image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}, \"source_volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"volume\"}, \"storage_generation\": 1, \"user_tags\": [\"userTags\"]}"; + String getSnapshotPath = "/snapshots/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); - - // Construct an instance of the FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById model - FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById floatingIpTargetPrototypeModel = new FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById.Builder() - .id("0717-54eb57ee-86f2-4796-90bb-d7874e0831ef") - .build(); - - // Construct an instance of the FloatingIPPrototypeFloatingIPByTarget model - FloatingIPPrototypeFloatingIPByTarget floatingIpPrototypeModel = new FloatingIPPrototypeFloatingIPByTarget.Builder() - .name("my-floating-ip") - .resourceGroup(resourceGroupIdentityModel) - .target(floatingIpTargetPrototypeModel) - .build(); - - // Construct an instance of the CreateFloatingIpOptions model - CreateFloatingIpOptions createFloatingIpOptionsModel = new CreateFloatingIpOptions.Builder() - .floatingIpPrototype(floatingIpPrototypeModel) + // Construct an instance of the GetSnapshotOptions model + GetSnapshotOptions getSnapshotOptionsModel = new GetSnapshotOptions.Builder() + .id("testString") .build(); - // Invoke createFloatingIp() with a valid options model and verify the result - Response response = vpcService.createFloatingIp(createFloatingIpOptionsModel).execute(); + // Invoke getSnapshot() with a valid options model and verify the result + Response response = vpcService.getSnapshot(getSnapshotOptionsModel).execute(); assertNotNull(response); - FloatingIP responseObj = response.getResult(); + Snapshot responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createFloatingIpPath); + assertEquals(parsedPath, getSnapshotPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createFloatingIp operation with and without retries enabled + // Test the getSnapshot operation with and without retries enabled @Test - public void testCreateFloatingIpWRetries() throws Throwable { + public void testGetSnapshotWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateFloatingIpWOptions(); + testGetSnapshotWOptions(); vpcService.disableRetries(); - testCreateFloatingIpWOptions(); + testGetSnapshotWOptions(); } - // Test the createFloatingIp operation with a null options model (negative test) + // Test the getSnapshot operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateFloatingIpNoOptions() throws Throwable { + public void testGetSnapshotNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createFloatingIp(null).execute(); + vpcService.getSnapshot(null).execute(); } - // Test the deleteFloatingIp operation with a valid options model parameter + // Test the getSnapshotClone operation with a valid options model parameter @Test - public void testDeleteFloatingIpWOptions() throws Throwable { + public void testGetSnapshotCloneWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteFloatingIpPath = "/floating_ips/testString"; + String mockResponseBody = "{\"available\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String getSnapshotClonePath = "/snapshots/testString/clones/us-south-1"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteFloatingIpOptions model - DeleteFloatingIpOptions deleteFloatingIpOptionsModel = new DeleteFloatingIpOptions.Builder() + // Construct an instance of the GetSnapshotCloneOptions model + GetSnapshotCloneOptions getSnapshotCloneOptionsModel = new GetSnapshotCloneOptions.Builder() .id("testString") + .zoneName("us-south-1") .build(); - // Invoke deleteFloatingIp() with a valid options model and verify the result - Response response = vpcService.deleteFloatingIp(deleteFloatingIpOptionsModel).execute(); + // Invoke getSnapshotClone() with a valid options model and verify the result + Response response = vpcService.getSnapshotClone(getSnapshotCloneOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + SnapshotClone 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteFloatingIpPath); + assertEquals(parsedPath, getSnapshotClonePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteFloatingIp operation with and without retries enabled + // Test the getSnapshotClone operation with and without retries enabled @Test - public void testDeleteFloatingIpWRetries() throws Throwable { + public void testGetSnapshotCloneWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteFloatingIpWOptions(); + testGetSnapshotCloneWOptions(); vpcService.disableRetries(); - testDeleteFloatingIpWOptions(); + testGetSnapshotCloneWOptions(); } - // Test the deleteFloatingIp operation with a null options model (negative test) + // Test the getSnapshotClone operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteFloatingIpNoOptions() throws Throwable { + public void testGetSnapshotCloneNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteFloatingIp(null).execute(); + vpcService.getSnapshotClone(null).execute(); } - // Test the getFloatingIp operation with a valid options model parameter + // Test the getSnapshotConsistencyGroup operation with a valid options model parameter @Test - public void testGetFloatingIpWOptions() throws Throwable { + public void testGetSnapshotConsistencyGroupWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"address\": \"203.0.113.1\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"available\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String getFloatingIpPath = "/floating_ips/testString"; + String mockResponseBody = "{\"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"delete_snapshots_on_delete\": false, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"lifecycle_state\": \"stable\", \"name\": \"my-snapshot-consistency-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"snapshot_consistency_group\", \"service_tags\": [\"serviceTags\"], \"snapshots\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}]}"; + String getSnapshotConsistencyGroupPath = "/snapshot_consistency_groups/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetFloatingIpOptions model - GetFloatingIpOptions getFloatingIpOptionsModel = new GetFloatingIpOptions.Builder() + // Construct an instance of the GetSnapshotConsistencyGroupOptions model + GetSnapshotConsistencyGroupOptions getSnapshotConsistencyGroupOptionsModel = new GetSnapshotConsistencyGroupOptions.Builder() .id("testString") .build(); - // Invoke getFloatingIp() with a valid options model and verify the result - Response response = vpcService.getFloatingIp(getFloatingIpOptionsModel).execute(); + // Invoke getSnapshotConsistencyGroup() with a valid options model and verify the result + Response response = vpcService.getSnapshotConsistencyGroup(getSnapshotConsistencyGroupOptionsModel).execute(); assertNotNull(response); - FloatingIP responseObj = response.getResult(); + SnapshotConsistencyGroup responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -23884,119 +25460,109 @@ public void testGetFloatingIpWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getFloatingIpPath); + assertEquals(parsedPath, getSnapshotConsistencyGroupPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getFloatingIp operation with and without retries enabled + // Test the getSnapshotConsistencyGroup operation with and without retries enabled @Test - public void testGetFloatingIpWRetries() throws Throwable { + public void testGetSnapshotConsistencyGroupWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetFloatingIpWOptions(); + testGetSnapshotConsistencyGroupWOptions(); vpcService.disableRetries(); - testGetFloatingIpWOptions(); + testGetSnapshotConsistencyGroupWOptions(); } - // Test the getFloatingIp operation with a null options model (negative test) + // Test the getSnapshotConsistencyGroup operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetFloatingIpNoOptions() throws Throwable { + public void testGetSnapshotConsistencyGroupNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getFloatingIp(null).execute(); + vpcService.getSnapshotConsistencyGroup(null).execute(); } - // Test the updateFloatingIp operation with a valid options model parameter + // Test the listSnapshotClones operation with a valid options model parameter @Test - public void testUpdateFloatingIpWOptions() throws Throwable { + public void testListSnapshotClonesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"address\": \"203.0.113.1\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"status\": \"available\", \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"resource_type\": \"network_interface\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; - String updateFloatingIpPath = "/floating_ips/testString"; + String mockResponseBody = "{\"clones\": [{\"available\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}]}"; + String listSnapshotClonesPath = "/snapshots/testString/clones"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById model - FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById floatingIpTargetPatchModel = new FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById.Builder() - .id("0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6") - .build(); - - // Construct an instance of the FloatingIPPatch model - FloatingIPPatch floatingIpPatchModel = new FloatingIPPatch.Builder() - .name("my-floating-ip") - .target(floatingIpTargetPatchModel) - .build(); - Map floatingIpPatchModelAsPatch = floatingIpPatchModel.asPatch(); - - // Construct an instance of the UpdateFloatingIpOptions model - UpdateFloatingIpOptions updateFloatingIpOptionsModel = new UpdateFloatingIpOptions.Builder() + // Construct an instance of the ListSnapshotClonesOptions model + ListSnapshotClonesOptions listSnapshotClonesOptionsModel = new ListSnapshotClonesOptions.Builder() .id("testString") - .floatingIpPatch(floatingIpPatchModelAsPatch) .build(); - // Invoke updateFloatingIp() with a valid options model and verify the result - Response response = vpcService.updateFloatingIp(updateFloatingIpOptionsModel).execute(); + // Invoke listSnapshotClones() with a valid options model and verify the result + Response response = vpcService.listSnapshotClones(listSnapshotClonesOptionsModel).execute(); assertNotNull(response); - FloatingIP responseObj = response.getResult(); + SnapshotCloneCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateFloatingIpPath); + assertEquals(parsedPath, listSnapshotClonesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateFloatingIp operation with and without retries enabled + // Test the listSnapshotClones operation with and without retries enabled @Test - public void testUpdateFloatingIpWRetries() throws Throwable { + public void testListSnapshotClonesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateFloatingIpWOptions(); + testListSnapshotClonesWOptions(); vpcService.disableRetries(); - testUpdateFloatingIpWOptions(); + testListSnapshotClonesWOptions(); } - // Test the updateFloatingIp operation with a null options model (negative test) + // Test the listSnapshotClones operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateFloatingIpNoOptions() throws Throwable { + public void testListSnapshotClonesNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateFloatingIp(null).execute(); + vpcService.listSnapshotClones(null).execute(); } - // Test the listPublicAddressRanges operation with a valid options model parameter + // Test the listSnapshotConsistencyGroups operation with a valid options model parameter @Test - public void testListPublicAddressRangesWOptions() throws Throwable { + public void testListSnapshotConsistencyGroupsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"public_address_ranges\": [{\"cidr\": \"192.168.3.0/24\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"id\": \"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"ipv4_address_count\": 8, \"lifecycle_state\": \"stable\", \"name\": \"my-public-address-range\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"public_address_range\", \"target\": {\"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}}], \"total_count\": 132}"; - String listPublicAddressRangesPath = "/public_address_ranges"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"snapshot_consistency_groups\": [{\"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"delete_snapshots_on_delete\": false, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"lifecycle_state\": \"stable\", \"name\": \"my-snapshot-consistency-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"snapshot_consistency_group\", \"service_tags\": [\"serviceTags\"], \"snapshots\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}]}], \"total_count\": 132}"; + String listSnapshotConsistencyGroupsPath = "/snapshot_consistency_groups"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListPublicAddressRangesOptions model - ListPublicAddressRangesOptions listPublicAddressRangesOptionsModel = new ListPublicAddressRangesOptions.Builder() + // Construct an instance of the ListSnapshotConsistencyGroupsOptions model + ListSnapshotConsistencyGroupsOptions listSnapshotConsistencyGroupsOptionsModel = new ListSnapshotConsistencyGroupsOptions.Builder() .start("testString") .limit(Long.valueOf("10")) .resourceGroupId("testString") + .name("my-name") + .sort("name") + .backupPolicyPlanId("testString") .build(); - // Invoke listPublicAddressRanges() with a valid options model and verify the result - Response response = vpcService.listPublicAddressRanges(listPublicAddressRangesOptionsModel).execute(); + // Invoke listSnapshotConsistencyGroups() with a valid options model and verify the result + Response response = vpcService.listSnapshotConsistencyGroups(listSnapshotConsistencyGroupsOptionsModel).execute(); assertNotNull(response); - PublicAddressRangeCollection responseObj = response.getResult(); + SnapshotConsistencyGroupCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -24005,33 +25571,36 @@ public void testListPublicAddressRangesWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listPublicAddressRangesPath); + assertEquals(parsedPath, listSnapshotConsistencyGroupsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); assertEquals(query.get("resource_group.id"), "testString"); + assertEquals(query.get("name"), "my-name"); + assertEquals(query.get("sort"), "name"); + assertEquals(query.get("backup_policy_plan.id"), "testString"); } - // Test the listPublicAddressRanges operation with and without retries enabled + // Test the listSnapshotConsistencyGroups operation with and without retries enabled @Test - public void testListPublicAddressRangesWRetries() throws Throwable { + public void testListSnapshotConsistencyGroupsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListPublicAddressRangesWOptions(); + testListSnapshotConsistencyGroupsWOptions(); vpcService.disableRetries(); - testListPublicAddressRangesWOptions(); + testListSnapshotConsistencyGroupsWOptions(); } - // Test the listPublicAddressRanges operation using the PublicAddressRangesPager.getNext() method + // Test the listSnapshotConsistencyGroups operation using the SnapshotConsistencyGroupsPager.getNext() method @Test - public void testListPublicAddressRangesWithPagerGetNext() throws Throwable { + public void testListSnapshotConsistencyGroupsWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"public_address_ranges\":[{\"cidr\":\"192.168.3.0/24\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"id\":\"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"ipv4_address_count\":8,\"lifecycle_state\":\"stable\",\"name\":\"my-public-address-range\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"public_address_range\",\"target\":{\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"public_address_ranges\":[{\"cidr\":\"192.168.3.0/24\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"id\":\"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"ipv4_address_count\":8,\"lifecycle_state\":\"stable\",\"name\":\"my-public-address-range\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"public_address_range\",\"target\":{\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"snapshot_consistency_groups\":[{\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"delete_snapshots_on_delete\":false,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"lifecycle_state\":\"stable\",\"name\":\"my-snapshot-consistency-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"snapshot_consistency_group\",\"service_tags\":[\"serviceTags\"],\"snapshots\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"}]}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"snapshot_consistency_groups\":[{\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"delete_snapshots_on_delete\":false,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"lifecycle_state\":\"stable\",\"name\":\"my-snapshot-consistency-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"snapshot_consistency_group\",\"service_tags\":[\"serviceTags\"],\"snapshots\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"}]}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -24045,27 +25614,30 @@ public void testListPublicAddressRangesWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListPublicAddressRangesOptions listPublicAddressRangesOptions = new ListPublicAddressRangesOptions.Builder() + ListSnapshotConsistencyGroupsOptions listSnapshotConsistencyGroupsOptions = new ListSnapshotConsistencyGroupsOptions.Builder() .limit(Long.valueOf("10")) .resourceGroupId("testString") + .name("my-name") + .sort("name") + .backupPolicyPlanId("testString") .build(); - List allResults = new ArrayList<>(); - PublicAddressRangesPager pager = new PublicAddressRangesPager(vpcService, listPublicAddressRangesOptions); + List allResults = new ArrayList<>(); + SnapshotConsistencyGroupsPager pager = new SnapshotConsistencyGroupsPager(vpcService, listSnapshotConsistencyGroupsOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listPublicAddressRanges operation using the PublicAddressRangesPager.getAll() method + // Test the listSnapshotConsistencyGroups operation using the SnapshotConsistencyGroupsPager.getAll() method @Test - public void testListPublicAddressRangesWithPagerGetAll() throws Throwable { + public void testListSnapshotConsistencyGroupsWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"public_address_ranges\":[{\"cidr\":\"192.168.3.0/24\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"id\":\"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"ipv4_address_count\":8,\"lifecycle_state\":\"stable\",\"name\":\"my-public-address-range\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"public_address_range\",\"target\":{\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"public_address_ranges\":[{\"cidr\":\"192.168.3.0/24\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"id\":\"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"ipv4_address_count\":8,\"lifecycle_state\":\"stable\",\"name\":\"my-public-address-range\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"public_address_range\",\"target\":{\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"snapshot_consistency_groups\":[{\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"delete_snapshots_on_delete\":false,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"lifecycle_state\":\"stable\",\"name\":\"my-snapshot-consistency-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"snapshot_consistency_group\",\"service_tags\":[\"serviceTags\"],\"snapshots\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"}]}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"snapshot_consistency_groups\":[{\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"delete_snapshots_on_delete\":false,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"lifecycle_state\":\"stable\",\"name\":\"my-snapshot-consistency-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"snapshot_consistency_group\",\"service_tags\":[\"serviceTags\"],\"snapshots\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"}]}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -24079,299 +25651,182 @@ public void testListPublicAddressRangesWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListPublicAddressRangesOptions listPublicAddressRangesOptions = new ListPublicAddressRangesOptions.Builder() + ListSnapshotConsistencyGroupsOptions listSnapshotConsistencyGroupsOptions = new ListSnapshotConsistencyGroupsOptions.Builder() .limit(Long.valueOf("10")) .resourceGroupId("testString") + .name("my-name") + .sort("name") + .backupPolicyPlanId("testString") .build(); - PublicAddressRangesPager pager = new PublicAddressRangesPager(vpcService, listPublicAddressRangesOptions); - List allResults = pager.getAll(); + SnapshotConsistencyGroupsPager pager = new SnapshotConsistencyGroupsPager(vpcService, listSnapshotConsistencyGroupsOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the createPublicAddressRange operation with a valid options model parameter + // Test the listSnapshotInstanceProfiles operation with a valid options model parameter @Test - public void testCreatePublicAddressRangeWOptions() throws Throwable { + public void testListSnapshotInstanceProfilesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"cidr\": \"192.168.3.0/24\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"id\": \"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"ipv4_address_count\": 8, \"lifecycle_state\": \"stable\", \"name\": \"my-public-address-range\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"public_address_range\", \"target\": {\"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}}"; - String createPublicAddressRangePath = "/public_address_ranges"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listSnapshotInstanceProfilesPath = "/snapshots/testString/instance_profiles"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); - - // Construct an instance of the VPCIdentityById model - VPCIdentityById vpcIdentityModel = new VPCIdentityById.Builder() - .id("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .build(); - - // Construct an instance of the ZoneIdentityByName model - ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() - .name("us-south-1") - .build(); - - // Construct an instance of the PublicAddressRangeTargetPrototype model - PublicAddressRangeTargetPrototype publicAddressRangeTargetPrototypeModel = new PublicAddressRangeTargetPrototype.Builder() - .vpc(vpcIdentityModel) - .zone(zoneIdentityModel) - .build(); - - // Construct an instance of the CreatePublicAddressRangeOptions model - CreatePublicAddressRangeOptions createPublicAddressRangeOptionsModel = new CreatePublicAddressRangeOptions.Builder() - .ipv4AddressCount(Long.valueOf("8")) - .name("my-public-address-range") - .resourceGroup(resourceGroupIdentityModel) - .target(publicAddressRangeTargetPrototypeModel) + // Construct an instance of the ListSnapshotInstanceProfilesOptions model + ListSnapshotInstanceProfilesOptions listSnapshotInstanceProfilesOptionsModel = new ListSnapshotInstanceProfilesOptions.Builder() + .id("testString") + .start("testString") + .limit(Long.valueOf("10")) .build(); - // Invoke createPublicAddressRange() with a valid options model and verify the result - Response response = vpcService.createPublicAddressRange(createPublicAddressRangeOptionsModel).execute(); + // Invoke listSnapshotInstanceProfiles() with a valid options model and verify the result + Response response = vpcService.listSnapshotInstanceProfiles(listSnapshotInstanceProfilesOptionsModel).execute(); assertNotNull(response); - PublicAddressRange responseObj = response.getResult(); + SnapshotInstanceProfileCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createPublicAddressRangePath); + assertEquals(parsedPath, listSnapshotInstanceProfilesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the createPublicAddressRange operation with and without retries enabled + // Test the listSnapshotInstanceProfiles operation with and without retries enabled @Test - public void testCreatePublicAddressRangeWRetries() throws Throwable { + public void testListSnapshotInstanceProfilesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreatePublicAddressRangeWOptions(); + testListSnapshotInstanceProfilesWOptions(); vpcService.disableRetries(); - testCreatePublicAddressRangeWOptions(); + testListSnapshotInstanceProfilesWOptions(); } - // Test the createPublicAddressRange operation with a null options model (negative test) + // Test the listSnapshotInstanceProfiles operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreatePublicAddressRangeNoOptions() throws Throwable { + public void testListSnapshotInstanceProfilesNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createPublicAddressRange(null).execute(); + vpcService.listSnapshotInstanceProfiles(null).execute(); } - // Test the deletePublicAddressRange operation with a valid options model parameter + // Test the listSnapshotInstanceProfiles operation using the SnapshotInstanceProfilesPager.getNext() method @Test - public void testDeletePublicAddressRangeWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"cidr\": \"192.168.3.0/24\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"id\": \"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"ipv4_address_count\": 8, \"lifecycle_state\": \"stable\", \"name\": \"my-public-address-range\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"public_address_range\", \"target\": {\"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}}"; - String deletePublicAddressRangePath = "/public_address_ranges/testString"; + public void testListSnapshotInstanceProfilesWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(202) - .setBody(mockResponseBody)); - - // Construct an instance of the DeletePublicAddressRangeOptions model - DeletePublicAddressRangeOptions deletePublicAddressRangeOptionsModel = new DeletePublicAddressRangeOptions.Builder() - .id("testString") - .build(); - - // Invoke deletePublicAddressRange() with a valid options model and verify the result - Response response = vpcService.deletePublicAddressRange(deletePublicAddressRangeOptionsModel).execute(); - assertNotNull(response); - PublicAddressRange 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(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deletePublicAddressRangePath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - } - - // Test the deletePublicAddressRange operation with and without retries enabled - @Test - public void testDeletePublicAddressRangeWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testDeletePublicAddressRangeWOptions(); - - vpcService.disableRetries(); - testDeletePublicAddressRangeWOptions(); - } - - // Test the deletePublicAddressRange operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeletePublicAddressRangeNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.deletePublicAddressRange(null).execute(); - } - - // Test the getPublicAddressRange operation with a valid options model parameter - @Test - public void testGetPublicAddressRangeWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"cidr\": \"192.168.3.0/24\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"id\": \"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"ipv4_address_count\": 8, \"lifecycle_state\": \"stable\", \"name\": \"my-public-address-range\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"public_address_range\", \"target\": {\"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}}"; - String getPublicAddressRangePath = "/public_address_ranges/testString"; + .setResponseCode(200) + .setBody(mockResponsePage1)); server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) - .setBody(mockResponseBody)); + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the GetPublicAddressRangeOptions model - GetPublicAddressRangeOptions getPublicAddressRangeOptionsModel = new GetPublicAddressRangeOptions.Builder() + ListSnapshotInstanceProfilesOptions listSnapshotInstanceProfilesOptions = new ListSnapshotInstanceProfilesOptions.Builder() .id("testString") + .limit(Long.valueOf("10")) .build(); - // Invoke getPublicAddressRange() with a valid options model and verify the result - Response response = vpcService.getPublicAddressRange(getPublicAddressRangeOptionsModel).execute(); - assertNotNull(response); - PublicAddressRange responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getPublicAddressRangePath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - } - - // Test the getPublicAddressRange operation with and without retries enabled - @Test - public void testGetPublicAddressRangeWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testGetPublicAddressRangeWOptions(); - - vpcService.disableRetries(); - testGetPublicAddressRangeWOptions(); - } - - // Test the getPublicAddressRange operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetPublicAddressRangeNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.getPublicAddressRange(null).execute(); + List allResults = new ArrayList<>(); + SnapshotInstanceProfilesPager pager = new SnapshotInstanceProfilesPager(vpcService, listSnapshotInstanceProfilesOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } - - // Test the updatePublicAddressRange operation with a valid options model parameter + + // Test the listSnapshotInstanceProfiles operation using the SnapshotInstanceProfilesPager.getAll() method @Test - public void testUpdatePublicAddressRangeWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"cidr\": \"192.168.3.0/24\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"id\": \"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"ipv4_address_count\": 8, \"lifecycle_state\": \"stable\", \"name\": \"my-public-address-range\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"public_address_range\", \"target\": {\"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}}"; - String updatePublicAddressRangePath = "/public_address_ranges/testString"; + public void testListSnapshotInstanceProfilesWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the VPCIdentityById model - VPCIdentityById vpcIdentityModel = new VPCIdentityById.Builder() - .id("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .build(); - - // Construct an instance of the ZoneIdentityByName model - ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() - .name("us-south-1") - .build(); - - // Construct an instance of the PublicAddressRangeTargetPatch model - PublicAddressRangeTargetPatch publicAddressRangeTargetPatchModel = new PublicAddressRangeTargetPatch.Builder() - .vpc(vpcIdentityModel) - .zone(zoneIdentityModel) - .build(); - - // Construct an instance of the PublicAddressRangePatch model - PublicAddressRangePatch publicAddressRangePatchModel = new PublicAddressRangePatch.Builder() - .name("my-public-address-range-updated") - .target(publicAddressRangeTargetPatchModel) - .build(); - Map publicAddressRangePatchModelAsPatch = publicAddressRangePatchModel.asPatch(); + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the UpdatePublicAddressRangeOptions model - UpdatePublicAddressRangeOptions updatePublicAddressRangeOptionsModel = new UpdatePublicAddressRangeOptions.Builder() + ListSnapshotInstanceProfilesOptions listSnapshotInstanceProfilesOptions = new ListSnapshotInstanceProfilesOptions.Builder() .id("testString") - .publicAddressRangePatch(publicAddressRangePatchModelAsPatch) + .limit(Long.valueOf("10")) .build(); - // Invoke updatePublicAddressRange() with a valid options model and verify the result - Response response = vpcService.updatePublicAddressRange(updatePublicAddressRangeOptionsModel).execute(); - assertNotNull(response); - PublicAddressRange responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updatePublicAddressRangePath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - } - - // Test the updatePublicAddressRange operation with and without retries enabled - @Test - public void testUpdatePublicAddressRangeWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testUpdatePublicAddressRangeWOptions(); - - vpcService.disableRetries(); - testUpdatePublicAddressRangeWOptions(); - } - - // Test the updatePublicAddressRange operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdatePublicAddressRangeNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.updatePublicAddressRange(null).execute(); + SnapshotInstanceProfilesPager pager = new SnapshotInstanceProfilesPager(vpcService, listSnapshotInstanceProfilesOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); } - - // Test the listNetworkAcls operation with a valid options model parameter + + // Test the listSnapshots operation with a valid options model parameter @Test - public void testListNetworkAclsWOptions() throws Throwable { + public void testListSnapshotsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"network_acls\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"rules\": [{\"action\": \"allow\", \"before\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"name\": \"my-network-acl-rule\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"ip_version\": \"ipv4\", \"name\": \"my-network-acl-rule\", \"source\": \"192.168.3.0/24\", \"protocol\": \"all\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}], \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listNetworkAclsPath = "/network_acls"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"snapshots\": [{\"allowed_use\": {\"api_version\": \"2024-06-23\", \"bare_metal_server\": \"enable_secure_boot == true\", \"instance\": \"gpu.count > 0 && enable_secure_boot == true\"}, \"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"bootable\": true, \"captured_at\": \"2019-01-01T12:00:00.000Z\", \"catalog_offering\": {\"plan\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}}, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"clones\": [{\"available\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"copies\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deletable\": false, \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"lifecycle_state\": \"stable\", \"minimum_capacity\": 1, \"name\": \"my-snapshot\", \"operating_system\": {\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}, \"progress\": 55, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"snapshot\", \"service_tags\": [\"serviceTags\"], \"size\": 1, \"snapshot_consistency_group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot-consistency-group\", \"resource_type\": \"snapshot_consistency_group\"}, \"source_image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}, \"source_volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"volume\"}, \"storage_generation\": 1, \"user_tags\": [\"userTags\"]}], \"total_count\": 132}"; + String listSnapshotsPath = "/snapshots"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListNetworkAclsOptions model - ListNetworkAclsOptions listNetworkAclsOptionsModel = new ListNetworkAclsOptions.Builder() + // Construct an instance of the ListSnapshotsOptions model + ListSnapshotsOptions listSnapshotsOptionsModel = new ListSnapshotsOptions.Builder() .start("testString") .limit(Long.valueOf("10")) + .tag("testString") .resourceGroupId("testString") + .name("my-name") + .sourceVolumeId("testString") + .sourceVolumeCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + .sourceImageId("testString") + .sourceImageCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") + .sort("name") + .backupPolicyPlanId("testString") + .copiesId("testString") + .copiesName("my-snapshot-copy") + .copiesCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263") + .copiesRemoteRegionName("us-south") + .sourceSnapshotId("testString") + .sourceSnapshotRemoteRegionName("us-south") + .sourceVolumeRemoteRegionName("us-east") + .sourceImageRemoteRegionName("us-south") + .clonesZoneName("us-south-1") + .snapshotConsistencyGroupId("testString") + .snapshotConsistencyGroupCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263") .build(); - // Invoke listNetworkAcls() with a valid options model and verify the result - Response response = vpcService.listNetworkAcls(listNetworkAclsOptionsModel).execute(); + // Invoke listSnapshots() with a valid options model and verify the result + Response response = vpcService.listSnapshots(listSnapshotsOptionsModel).execute(); assertNotNull(response); - NetworkACLCollection responseObj = response.getResult(); + SnapshotCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -24380,33 +25835,52 @@ public void testListNetworkAclsWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listNetworkAclsPath); + assertEquals(parsedPath, listSnapshotsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("tag"), "testString"); assertEquals(query.get("resource_group.id"), "testString"); + assertEquals(query.get("name"), "my-name"); + assertEquals(query.get("source_volume.id"), "testString"); + assertEquals(query.get("source_volume.crn"), "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"); + assertEquals(query.get("source_image.id"), "testString"); + assertEquals(query.get("source_image.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"); + assertEquals(query.get("sort"), "name"); + assertEquals(query.get("backup_policy_plan.id"), "testString"); + assertEquals(query.get("copies[].id"), "testString"); + assertEquals(query.get("copies[].name"), "my-snapshot-copy"); + assertEquals(query.get("copies[].crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263"); + assertEquals(query.get("copies[].remote.region.name"), "us-south"); + assertEquals(query.get("source_snapshot.id"), "testString"); + assertEquals(query.get("source_snapshot.remote.region.name"), "us-south"); + assertEquals(query.get("source_volume.remote.region.name"), "us-east"); + assertEquals(query.get("source_image.remote.region.name"), "us-south"); + assertEquals(query.get("clones[].zone.name"), "us-south-1"); + assertEquals(query.get("snapshot_consistency_group.id"), "testString"); + assertEquals(query.get("snapshot_consistency_group.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263"); } - // Test the listNetworkAcls operation with and without retries enabled + // Test the listSnapshots operation with and without retries enabled @Test - public void testListNetworkAclsWRetries() throws Throwable { + public void testListSnapshotsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListNetworkAclsWOptions(); + testListSnapshotsWOptions(); vpcService.disableRetries(); - testListNetworkAclsWOptions(); + testListSnapshotsWOptions(); } - // Test the listNetworkAcls operation using the NetworkAclsPager.getNext() method + // Test the listSnapshots operation using the SnapshotsPager.getNext() method @Test - public void testListNetworkAclsWithPagerGetNext() throws Throwable { + public void testListSnapshotsWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"network_acls\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"id\":\"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"name\":\"my-network-acl\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"rules\":[{\"action\":\"allow\",\"before\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"name\":\"my-network-acl-rule\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"destination\":\"192.168.3.0/24\",\"direction\":\"inbound\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"ip_version\":\"ipv4\",\"name\":\"my-network-acl-rule\",\"source\":\"192.168.3.0/24\",\"protocol\":\"all\"}],\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"network_acls\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"id\":\"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"name\":\"my-network-acl\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"rules\":[{\"action\":\"allow\",\"before\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"name\":\"my-network-acl-rule\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"destination\":\"192.168.3.0/24\",\"direction\":\"inbound\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"ip_version\":\"ipv4\",\"name\":\"my-network-acl-rule\",\"source\":\"192.168.3.0/24\",\"protocol\":\"all\"}],\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage1 = "{\"snapshots\":[{\"allowed_use\":{\"api_version\":\"2024-06-23\",\"bare_metal_server\":\"enable_secure_boot == true\",\"instance\":\"gpu.count > 0 && enable_secure_boot == true\"},\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"bootable\":true,\"captured_at\":\"2019-01-01T12:00:00.000Z\",\"catalog_offering\":{\"plan\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}},\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"clones\":[{\"available\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"copies\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deletable\":false,\"encryption\":\"provider_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"lifecycle_state\":\"stable\",\"minimum_capacity\":1,\"name\":\"my-snapshot\",\"operating_system\":{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"},\"progress\":55,\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"snapshot\",\"service_tags\":[\"serviceTags\"],\"size\":1,\"snapshot_consistency_group\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot-consistency-group\",\"resource_type\":\"snapshot_consistency_group\"},\"source_image\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"name\":\"my-image\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"image\"},\"source_snapshot\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"},\"source_volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"volume\"},\"storage_generation\":1,\"user_tags\":[\"userTags\"]}],\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"snapshots\":[{\"allowed_use\":{\"api_version\":\"2024-06-23\",\"bare_metal_server\":\"enable_secure_boot == true\",\"instance\":\"gpu.count > 0 && enable_secure_boot == true\"},\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"bootable\":true,\"captured_at\":\"2019-01-01T12:00:00.000Z\",\"catalog_offering\":{\"plan\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}},\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"clones\":[{\"available\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"copies\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deletable\":false,\"encryption\":\"provider_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"lifecycle_state\":\"stable\",\"minimum_capacity\":1,\"name\":\"my-snapshot\",\"operating_system\":{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"},\"progress\":55,\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"snapshot\",\"service_tags\":[\"serviceTags\"],\"size\":1,\"snapshot_consistency_group\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot-consistency-group\",\"resource_type\":\"snapshot_consistency_group\"},\"source_image\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"name\":\"my-image\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"image\"},\"source_snapshot\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"},\"source_volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"volume\"},\"storage_generation\":1,\"user_tags\":[\"userTags\"]}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -24420,27 +25894,46 @@ public void testListNetworkAclsWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListNetworkAclsOptions listNetworkAclsOptions = new ListNetworkAclsOptions.Builder() + ListSnapshotsOptions listSnapshotsOptions = new ListSnapshotsOptions.Builder() .limit(Long.valueOf("10")) + .tag("testString") .resourceGroupId("testString") + .name("my-name") + .sourceVolumeId("testString") + .sourceVolumeCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + .sourceImageId("testString") + .sourceImageCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") + .sort("name") + .backupPolicyPlanId("testString") + .copiesId("testString") + .copiesName("my-snapshot-copy") + .copiesCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263") + .copiesRemoteRegionName("us-south") + .sourceSnapshotId("testString") + .sourceSnapshotRemoteRegionName("us-south") + .sourceVolumeRemoteRegionName("us-east") + .sourceImageRemoteRegionName("us-south") + .clonesZoneName("us-south-1") + .snapshotConsistencyGroupId("testString") + .snapshotConsistencyGroupCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263") .build(); - List allResults = new ArrayList<>(); - NetworkAclsPager pager = new NetworkAclsPager(vpcService, listNetworkAclsOptions); + List allResults = new ArrayList<>(); + SnapshotsPager pager = new SnapshotsPager(vpcService, listSnapshotsOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listNetworkAcls operation using the NetworkAclsPager.getAll() method + // Test the listSnapshots operation using the SnapshotsPager.getAll() method @Test - public void testListNetworkAclsWithPagerGetAll() throws Throwable { + public void testListSnapshotsWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"network_acls\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"id\":\"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"name\":\"my-network-acl\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"rules\":[{\"action\":\"allow\",\"before\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"name\":\"my-network-acl-rule\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"destination\":\"192.168.3.0/24\",\"direction\":\"inbound\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"ip_version\":\"ipv4\",\"name\":\"my-network-acl-rule\",\"source\":\"192.168.3.0/24\",\"protocol\":\"all\"}],\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"network_acls\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"id\":\"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"name\":\"my-network-acl\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"rules\":[{\"action\":\"allow\",\"before\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"name\":\"my-network-acl-rule\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"destination\":\"192.168.3.0/24\",\"direction\":\"inbound\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"ip_version\":\"ipv4\",\"name\":\"my-network-acl-rule\",\"source\":\"192.168.3.0/24\",\"protocol\":\"all\"}],\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage1 = "{\"snapshots\":[{\"allowed_use\":{\"api_version\":\"2024-06-23\",\"bare_metal_server\":\"enable_secure_boot == true\",\"instance\":\"gpu.count > 0 && enable_secure_boot == true\"},\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"bootable\":true,\"captured_at\":\"2019-01-01T12:00:00.000Z\",\"catalog_offering\":{\"plan\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}},\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"clones\":[{\"available\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"copies\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deletable\":false,\"encryption\":\"provider_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"lifecycle_state\":\"stable\",\"minimum_capacity\":1,\"name\":\"my-snapshot\",\"operating_system\":{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"},\"progress\":55,\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"snapshot\",\"service_tags\":[\"serviceTags\"],\"size\":1,\"snapshot_consistency_group\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot-consistency-group\",\"resource_type\":\"snapshot_consistency_group\"},\"source_image\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"name\":\"my-image\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"image\"},\"source_snapshot\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"},\"source_volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"volume\"},\"storage_generation\":1,\"user_tags\":[\"userTags\"]}],\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"snapshots\":[{\"allowed_use\":{\"api_version\":\"2024-06-23\",\"bare_metal_server\":\"enable_secure_boot == true\",\"instance\":\"gpu.count > 0 && enable_secure_boot == true\"},\"backup_policy_plan\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"id\":\"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\",\"name\":\"my-policy-plan\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"backup_policy_plan\"},\"bootable\":true,\"captured_at\":\"2019-01-01T12:00:00.000Z\",\"catalog_offering\":{\"plan\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}},\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"clones\":[{\"available\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"copies\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deletable\":false,\"encryption\":\"provider_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"lifecycle_state\":\"stable\",\"minimum_capacity\":1,\"name\":\"my-snapshot\",\"operating_system\":{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"},\"progress\":55,\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"snapshot\",\"service_tags\":[\"serviceTags\"],\"size\":1,\"snapshot_consistency_group\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot-consistency-group\",\"resource_type\":\"snapshot_consistency_group\"},\"source_image\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"name\":\"my-image\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"image\"},\"source_snapshot\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"},\"source_volume\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"name\":\"my-volume\",\"remote\":{\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"volume\"},\"storage_generation\":1,\"user_tags\":[\"userTags\"]}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -24454,231 +25947,135 @@ public void testListNetworkAclsWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListNetworkAclsOptions listNetworkAclsOptions = new ListNetworkAclsOptions.Builder() + ListSnapshotsOptions listSnapshotsOptions = new ListSnapshotsOptions.Builder() .limit(Long.valueOf("10")) + .tag("testString") .resourceGroupId("testString") + .name("my-name") + .sourceVolumeId("testString") + .sourceVolumeCrn("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + .sourceImageId("testString") + .sourceImageCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") + .sort("name") + .backupPolicyPlanId("testString") + .copiesId("testString") + .copiesName("my-snapshot-copy") + .copiesCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263") + .copiesRemoteRegionName("us-south") + .sourceSnapshotId("testString") + .sourceSnapshotRemoteRegionName("us-south") + .sourceVolumeRemoteRegionName("us-east") + .sourceImageRemoteRegionName("us-south") + .clonesZoneName("us-south-1") + .snapshotConsistencyGroupId("testString") + .snapshotConsistencyGroupCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263") .build(); - NetworkAclsPager pager = new NetworkAclsPager(vpcService, listNetworkAclsOptions); - List allResults = pager.getAll(); + SnapshotsPager pager = new SnapshotsPager(vpcService, listSnapshotsOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the createNetworkAcl operation with a valid options model parameter + // Test the updateSnapshot operation with a valid options model parameter @Test - public void testCreateNetworkAclWOptions() throws Throwable { + public void testUpdateSnapshotWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"rules\": [{\"action\": \"allow\", \"before\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"name\": \"my-network-acl-rule\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"ip_version\": \"ipv4\", \"name\": \"my-network-acl-rule\", \"source\": \"192.168.3.0/24\", \"protocol\": \"all\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String createNetworkAclPath = "/network_acls"; + String mockResponseBody = "{\"allowed_use\": {\"api_version\": \"2024-06-23\", \"bare_metal_server\": \"enable_secure_boot == true\", \"instance\": \"gpu.count > 0 && enable_secure_boot == true\"}, \"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"bootable\": true, \"captured_at\": \"2019-01-01T12:00:00.000Z\", \"catalog_offering\": {\"plan\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}}, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"clones\": [{\"available\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"copies\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deletable\": false, \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"lifecycle_state\": \"stable\", \"minimum_capacity\": 1, \"name\": \"my-snapshot\", \"operating_system\": {\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}, \"progress\": 55, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"snapshot\", \"service_tags\": [\"serviceTags\"], \"size\": 1, \"snapshot_consistency_group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot-consistency-group\", \"resource_type\": \"snapshot_consistency_group\"}, \"source_image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}, \"source_volume\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"name\": \"my-volume\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"volume\"}, \"storage_generation\": 1, \"user_tags\": [\"userTags\"]}"; + String updateSnapshotPath = "/snapshots/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); - - // Construct an instance of the VPCIdentityById model - VPCIdentityById vpcIdentityModel = new VPCIdentityById.Builder() - .id("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .build(); - - // Construct an instance of the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype model - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype networkAclRulePrototypeNetworkAclContextModel = new NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype.Builder() - .action("allow") - .destination("192.168.3.2/32") - .direction("inbound") - .ipVersion("ipv4") - .name("my-network-acl-rule") - .source("192.168.3.2/32") - .protocol("all") - .build(); - - // Construct an instance of the NetworkACLPrototypeNetworkACLByRules model - NetworkACLPrototypeNetworkACLByRules networkAclPrototypeModel = new NetworkACLPrototypeNetworkACLByRules.Builder() - .name("my-network-acl") - .resourceGroup(resourceGroupIdentityModel) - .vpc(vpcIdentityModel) - .rules(java.util.Arrays.asList(networkAclRulePrototypeNetworkAclContextModel)) - .build(); - - // Construct an instance of the CreateNetworkAclOptions model - CreateNetworkAclOptions createNetworkAclOptionsModel = new CreateNetworkAclOptions.Builder() - .networkAclPrototype(networkAclPrototypeModel) + // Construct an instance of the SnapshotAllowedUsePatch model + SnapshotAllowedUsePatch snapshotAllowedUsePatchModel = new SnapshotAllowedUsePatch.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") .build(); - // Invoke createNetworkAcl() with a valid options model and verify the result - Response response = vpcService.createNetworkAcl(createNetworkAclOptionsModel).execute(); - assertNotNull(response); - NetworkACL responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createNetworkAclPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - } - - // Test the createNetworkAcl operation with and without retries enabled - @Test - public void testCreateNetworkAclWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testCreateNetworkAclWOptions(); - - vpcService.disableRetries(); - testCreateNetworkAclWOptions(); - } - - // Test the createNetworkAcl operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateNetworkAclNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.createNetworkAcl(null).execute(); - } - - // Test the deleteNetworkAcl operation with a valid options model parameter - @Test - public void testDeleteNetworkAclWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = ""; - String deleteNetworkAclPath = "/network_acls/testString"; - server.enqueue(new MockResponse() - .setResponseCode(204) - .setBody(mockResponseBody)); - - // Construct an instance of the DeleteNetworkAclOptions model - DeleteNetworkAclOptions deleteNetworkAclOptionsModel = new DeleteNetworkAclOptions.Builder() - .id("testString") + // Construct an instance of the SnapshotPatch model + SnapshotPatch snapshotPatchModel = new SnapshotPatch.Builder() + .allowedUse(snapshotAllowedUsePatchModel) + .name("my-snapshot-updated") + .userTags(java.util.Arrays.asList("testString")) .build(); + Map snapshotPatchModelAsPatch = snapshotPatchModel.asPatch(); - // Invoke deleteNetworkAcl() with a valid options model and verify the result - Response response = vpcService.deleteNetworkAcl(deleteNetworkAclOptionsModel).execute(); - assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteNetworkAclPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - } - - // Test the deleteNetworkAcl operation with and without retries enabled - @Test - public void testDeleteNetworkAclWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testDeleteNetworkAclWOptions(); - - vpcService.disableRetries(); - testDeleteNetworkAclWOptions(); - } - - // Test the deleteNetworkAcl operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteNetworkAclNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.deleteNetworkAcl(null).execute(); - } - - // Test the getNetworkAcl operation with a valid options model parameter - @Test - public void testGetNetworkAclWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"rules\": [{\"action\": \"allow\", \"before\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"name\": \"my-network-acl-rule\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"ip_version\": \"ipv4\", \"name\": \"my-network-acl-rule\", \"source\": \"192.168.3.0/24\", \"protocol\": \"all\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String getNetworkAclPath = "/network_acls/testString"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the GetNetworkAclOptions model - GetNetworkAclOptions getNetworkAclOptionsModel = new GetNetworkAclOptions.Builder() + // Construct an instance of the UpdateSnapshotOptions model + UpdateSnapshotOptions updateSnapshotOptionsModel = new UpdateSnapshotOptions.Builder() .id("testString") + .snapshotPatch(snapshotPatchModelAsPatch) + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke getNetworkAcl() with a valid options model and verify the result - Response response = vpcService.getNetworkAcl(getNetworkAclOptionsModel).execute(); + // Invoke updateSnapshot() with a valid options model and verify the result + Response response = vpcService.updateSnapshot(updateSnapshotOptionsModel).execute(); assertNotNull(response); - NetworkACL responseObj = response.getResult(); + Snapshot responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getNetworkAclPath); + assertEquals(parsedPath, updateSnapshotPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getNetworkAcl operation with and without retries enabled + // Test the updateSnapshot operation with and without retries enabled @Test - public void testGetNetworkAclWRetries() throws Throwable { + public void testUpdateSnapshotWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetNetworkAclWOptions(); + testUpdateSnapshotWOptions(); vpcService.disableRetries(); - testGetNetworkAclWOptions(); + testUpdateSnapshotWOptions(); } - // Test the getNetworkAcl operation with a null options model (negative test) + // Test the updateSnapshot operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetNetworkAclNoOptions() throws Throwable { + public void testUpdateSnapshotNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getNetworkAcl(null).execute(); + vpcService.updateSnapshot(null).execute(); } - // Test the updateNetworkAcl operation with a valid options model parameter + // Test the updateSnapshotConsistencyGroup operation with a valid options model parameter @Test - public void testUpdateNetworkAclWOptions() throws Throwable { + public void testUpdateSnapshotConsistencyGroupWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"rules\": [{\"action\": \"allow\", \"before\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"name\": \"my-network-acl-rule\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"ip_version\": \"ipv4\", \"name\": \"my-network-acl-rule\", \"source\": \"192.168.3.0/24\", \"protocol\": \"all\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String updateNetworkAclPath = "/network_acls/testString"; + String mockResponseBody = "{\"backup_policy_plan\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"id\": \"r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178\", \"name\": \"my-policy-plan\", \"remote\": {\"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"backup_policy_plan\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"delete_snapshots_on_delete\": false, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-fa329f6b-0e36-433f-a3bb-0df632e79263\", \"lifecycle_state\": \"stable\", \"name\": \"my-snapshot-consistency-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"snapshot_consistency_group\", \"service_tags\": [\"serviceTags\"], \"snapshots\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}]}"; + String updateSnapshotConsistencyGroupPath = "/snapshot_consistency_groups/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the NetworkACLPatch model - NetworkACLPatch networkAclPatchModel = new NetworkACLPatch.Builder() - .name("my-network-acl-updated") + // Construct an instance of the SnapshotConsistencyGroupPatch model + SnapshotConsistencyGroupPatch snapshotConsistencyGroupPatchModel = new SnapshotConsistencyGroupPatch.Builder() + .deleteSnapshotsOnDelete(false) + .name("my-snapshot-consistency-group") .build(); - Map networkAclPatchModelAsPatch = networkAclPatchModel.asPatch(); + Map snapshotConsistencyGroupPatchModelAsPatch = snapshotConsistencyGroupPatchModel.asPatch(); - // Construct an instance of the UpdateNetworkAclOptions model - UpdateNetworkAclOptions updateNetworkAclOptionsModel = new UpdateNetworkAclOptions.Builder() + // Construct an instance of the UpdateSnapshotConsistencyGroupOptions model + UpdateSnapshotConsistencyGroupOptions updateSnapshotConsistencyGroupOptionsModel = new UpdateSnapshotConsistencyGroupOptions.Builder() .id("testString") - .networkAclPatch(networkAclPatchModelAsPatch) + .snapshotConsistencyGroupPatch(snapshotConsistencyGroupPatchModelAsPatch) + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke updateNetworkAcl() with a valid options model and verify the result - Response response = vpcService.updateNetworkAcl(updateNetworkAclOptionsModel).execute(); + // Invoke updateSnapshotConsistencyGroup() with a valid options model and verify the result + Response response = vpcService.updateSnapshotConsistencyGroup(updateSnapshotConsistencyGroupOptionsModel).execute(); assertNotNull(response); - NetworkACL responseObj = response.getResult(); + SnapshotConsistencyGroup responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -24687,194 +26084,94 @@ public void testUpdateNetworkAclWOptions() throws Throwable { assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateNetworkAclPath); + assertEquals(parsedPath, updateSnapshotConsistencyGroupPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateNetworkAcl operation with and without retries enabled + // Test the updateSnapshotConsistencyGroup operation with and without retries enabled @Test - public void testUpdateNetworkAclWRetries() throws Throwable { + public void testUpdateSnapshotConsistencyGroupWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateNetworkAclWOptions(); + testUpdateSnapshotConsistencyGroupWOptions(); vpcService.disableRetries(); - testUpdateNetworkAclWOptions(); + testUpdateSnapshotConsistencyGroupWOptions(); } - // Test the updateNetworkAcl operation with a null options model (negative test) + // Test the updateSnapshotConsistencyGroup operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateNetworkAclNoOptions() throws Throwable { + public void testUpdateSnapshotConsistencyGroupNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateNetworkAcl(null).execute(); + vpcService.updateSnapshotConsistencyGroup(null).execute(); } - // Test the listNetworkAclRules operation with a valid options model parameter + // Test the createSubnet operation with a valid options model parameter @Test - public void testListNetworkAclRulesWOptions() throws Throwable { + public void testCreateSubnetWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"rules\": [{\"action\": \"allow\", \"before\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"name\": \"my-network-acl-rule\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"ip_version\": \"ipv4\", \"name\": \"my-network-acl-rule\", \"source\": \"192.168.3.0/24\", \"protocol\": \"all\"}], \"total_count\": 132}"; - String listNetworkAclRulesPath = "/network_acls/testString/rules"; + String mockResponseBody = "{\"available_ipv4_address_count\": 15, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"ip_version\": \"ipv4\", \"ipv4_cidr_block\": \"10.0.0.0/24\", \"name\": \"my-subnet\", \"network_acl\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\"}, \"public_gateway\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"id\": \"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"name\": \"my-public-gateway\", \"resource_type\": \"public_gateway\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"subnet\", \"routing_table\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"name\": \"my-routing-table-1\", \"resource_type\": \"routing_table\"}, \"status\": \"available\", \"total_ipv4_address_count\": 256, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String createSubnetPath = "/subnets"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the ListNetworkAclRulesOptions model - ListNetworkAclRulesOptions listNetworkAclRulesOptionsModel = new ListNetworkAclRulesOptions.Builder() - .networkAclId("testString") - .start("testString") - .limit(Long.valueOf("10")) - .direction("inbound") + // Construct an instance of the NetworkACLIdentityById model + NetworkACLIdentityById networkAclIdentityModel = new NetworkACLIdentityById.Builder() + .id("r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf") .build(); - // Invoke listNetworkAclRules() with a valid options model and verify the result - Response response = vpcService.listNetworkAclRules(listNetworkAclRulesOptionsModel).execute(); - assertNotNull(response); - NetworkACLRuleCollection responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listNetworkAclRulesPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("direction"), "inbound"); - } - - // Test the listNetworkAclRules operation with and without retries enabled - @Test - public void testListNetworkAclRulesWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testListNetworkAclRulesWOptions(); - - vpcService.disableRetries(); - testListNetworkAclRulesWOptions(); - } - - // Test the listNetworkAclRules operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListNetworkAclRulesNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.listNetworkAclRules(null).execute(); - } - - // Test the listNetworkAclRules operation using the NetworkAclRulesPager.getNext() method - @Test - public void testListNetworkAclRulesWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"rules\":[{\"action\":\"allow\",\"before\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"name\":\"my-network-acl-rule\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"destination\":\"192.168.3.0/24\",\"direction\":\"inbound\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"ip_version\":\"ipv4\",\"name\":\"my-network-acl-rule\",\"source\":\"192.168.3.0/24\",\"protocol\":\"all\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"rules\":[{\"action\":\"allow\",\"before\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"name\":\"my-network-acl-rule\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"destination\":\"192.168.3.0/24\",\"direction\":\"inbound\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"ip_version\":\"ipv4\",\"name\":\"my-network-acl-rule\",\"source\":\"192.168.3.0/24\",\"protocol\":\"all\"}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListNetworkAclRulesOptions listNetworkAclRulesOptions = new ListNetworkAclRulesOptions.Builder() - .networkAclId("testString") - .limit(Long.valueOf("10")) - .direction("inbound") + // Construct an instance of the PublicGatewayIdentityPublicGatewayIdentityById model + PublicGatewayIdentityPublicGatewayIdentityById publicGatewayIdentityModel = new PublicGatewayIdentityPublicGatewayIdentityById.Builder() + .id("r006-dc5431ef-1fc6-4861-adc9-a59d077d1241") .build(); - List allResults = new ArrayList<>(); - NetworkAclRulesPager pager = new NetworkAclRulesPager(vpcService, listNetworkAclRulesOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); - } - - // Test the listNetworkAclRules operation using the NetworkAclRulesPager.getAll() method - @Test - public void testListNetworkAclRulesWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"rules\":[{\"action\":\"allow\",\"before\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"name\":\"my-network-acl-rule\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"destination\":\"192.168.3.0/24\",\"direction\":\"inbound\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"ip_version\":\"ipv4\",\"name\":\"my-network-acl-rule\",\"source\":\"192.168.3.0/24\",\"protocol\":\"all\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"rules\":[{\"action\":\"allow\",\"before\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"name\":\"my-network-acl-rule\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"destination\":\"192.168.3.0/24\",\"direction\":\"inbound\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"id\":\"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\",\"ip_version\":\"ipv4\",\"name\":\"my-network-acl-rule\",\"source\":\"192.168.3.0/24\",\"protocol\":\"all\"}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") + .build(); - ListNetworkAclRulesOptions listNetworkAclRulesOptions = new ListNetworkAclRulesOptions.Builder() - .networkAclId("testString") - .limit(Long.valueOf("10")) - .direction("inbound") + // Construct an instance of the RoutingTableIdentityByCRN model + RoutingTableIdentityByCRN routingTableIdentityModel = new RoutingTableIdentityByCRN.Builder() + .crn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840") .build(); - NetworkAclRulesPager pager = new NetworkAclRulesPager(vpcService, listNetworkAclRulesOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the createNetworkAclRule operation with a valid options model parameter - @Test - public void testCreateNetworkAclRuleWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"action\": \"allow\", \"before\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"name\": \"my-network-acl-rule\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"ip_version\": \"ipv4\", \"name\": \"my-network-acl-rule\", \"source\": \"192.168.3.0/24\", \"protocol\": \"all\"}"; - String createNetworkAclRulePath = "/network_acls/testString/rules"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(201) - .setBody(mockResponseBody)); + // Construct an instance of the VPCIdentityById model + VPCIdentityById vpcIdentityModel = new VPCIdentityById.Builder() + .id("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .build(); - // Construct an instance of the NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById model - NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById networkAclRuleBeforePrototypeModel = new NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById.Builder() - .id("r006-8daca77a-4980-4d33-8f3e-7038797be8f9") + // Construct an instance of the ZoneIdentityByName model + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() + .name("us-south-1") .build(); - // Construct an instance of the NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype model - NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype networkAclRulePrototypeModel = new NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype.Builder() - .action("allow") - .before(networkAclRuleBeforePrototypeModel) - .destination("192.168.3.2/32") - .direction("inbound") + // Construct an instance of the SubnetPrototypeSubnetByTotalCount model + SubnetPrototypeSubnetByTotalCount subnetPrototypeModel = new SubnetPrototypeSubnetByTotalCount.Builder() .ipVersion("ipv4") - .name("my-network-acl-rule") - .source("192.168.3.2/32") - .protocol("all") + .name("my-subnet") + .networkAcl(networkAclIdentityModel) + .publicGateway(publicGatewayIdentityModel) + .resourceGroup(resourceGroupIdentityModel) + .routingTable(routingTableIdentityModel) + .vpc(vpcIdentityModel) + .totalIpv4AddressCount(Long.valueOf("256")) + .zone(zoneIdentityModel) .build(); - // Construct an instance of the CreateNetworkAclRuleOptions model - CreateNetworkAclRuleOptions createNetworkAclRuleOptionsModel = new CreateNetworkAclRuleOptions.Builder() - .networkAclId("testString") - .networkAclRulePrototype(networkAclRulePrototypeModel) + // Construct an instance of the CreateSubnetOptions model + CreateSubnetOptions createSubnetOptionsModel = new CreateSubnetOptions.Builder() + .subnetPrototype(subnetPrototypeModel) .build(); - // Invoke createNetworkAclRule() with a valid options model and verify the result - Response response = vpcService.createNetworkAclRule(createNetworkAclRuleOptionsModel).execute(); + // Invoke createSubnet() with a valid options model and verify the result + Response response = vpcService.createSubnet(createSubnetOptionsModel).execute(); assertNotNull(response); - NetworkACLRule responseObj = response.getResult(); + Subnet responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -24883,240 +26180,218 @@ public void testCreateNetworkAclRuleWOptions() throws Throwable { assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createNetworkAclRulePath); + assertEquals(parsedPath, createSubnetPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createNetworkAclRule operation with and without retries enabled + // Test the createSubnet operation with and without retries enabled @Test - public void testCreateNetworkAclRuleWRetries() throws Throwable { + public void testCreateSubnetWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateNetworkAclRuleWOptions(); + testCreateSubnetWOptions(); vpcService.disableRetries(); - testCreateNetworkAclRuleWOptions(); + testCreateSubnetWOptions(); } - // Test the createNetworkAclRule operation with a null options model (negative test) + // Test the createSubnet operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateNetworkAclRuleNoOptions() throws Throwable { + public void testCreateSubnetNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createNetworkAclRule(null).execute(); + vpcService.createSubnet(null).execute(); } - // Test the deleteNetworkAclRule operation with a valid options model parameter + // Test the createSubnetReservedIp operation with a valid options model parameter @Test - public void testDeleteNetworkAclRuleWOptions() throws Throwable { + public void testCreateSubnetReservedIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteNetworkAclRulePath = "/network_acls/testString/rules/testString"; + String mockResponseBody = "{\"address\": \"192.168.3.4\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"lifecycle_state\": \"stable\", \"name\": \"my-reserved-ip\", \"owner\": \"provider\", \"resource_type\": \"subnet_reserved_ip\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"resource_type\": \"endpoint_gateway\"}}"; + String createSubnetReservedIpPath = "/subnets/testString/reserved_ips"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the DeleteNetworkAclRuleOptions model - DeleteNetworkAclRuleOptions deleteNetworkAclRuleOptionsModel = new DeleteNetworkAclRuleOptions.Builder() - .networkAclId("testString") - .id("testString") + // Construct an instance of the ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById model + ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById reservedIpTargetPrototypeModel = new ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById.Builder() + .id("r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0") .build(); - // Invoke deleteNetworkAclRule() with a valid options model and verify the result - Response response = vpcService.deleteNetworkAclRule(deleteNetworkAclRuleOptionsModel).execute(); + // Construct an instance of the CreateSubnetReservedIpOptions model + CreateSubnetReservedIpOptions createSubnetReservedIpOptionsModel = new CreateSubnetReservedIpOptions.Builder() + .subnetId("testString") + .address("192.168.3.4") + .autoDelete(false) + .name("my-reserved-ip") + .target(reservedIpTargetPrototypeModel) + .build(); + + // Invoke createSubnetReservedIp() with a valid options model and verify the result + Response response = vpcService.createSubnetReservedIp(createSubnetReservedIpOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + ReservedIP 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(), "DELETE"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteNetworkAclRulePath); + assertEquals(parsedPath, createSubnetReservedIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteNetworkAclRule operation with and without retries enabled + // Test the createSubnetReservedIp operation with and without retries enabled @Test - public void testDeleteNetworkAclRuleWRetries() throws Throwable { + public void testCreateSubnetReservedIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteNetworkAclRuleWOptions(); + testCreateSubnetReservedIpWOptions(); vpcService.disableRetries(); - testDeleteNetworkAclRuleWOptions(); + testCreateSubnetReservedIpWOptions(); } - // Test the deleteNetworkAclRule operation with a null options model (negative test) + // Test the createSubnetReservedIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteNetworkAclRuleNoOptions() throws Throwable { + public void testCreateSubnetReservedIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteNetworkAclRule(null).execute(); + vpcService.createSubnetReservedIp(null).execute(); } - // Test the getNetworkAclRule operation with a valid options model parameter + // Test the deleteSubnet operation with a valid options model parameter @Test - public void testGetNetworkAclRuleWOptions() throws Throwable { + public void testDeleteSubnetWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"action\": \"allow\", \"before\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"name\": \"my-network-acl-rule\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"ip_version\": \"ipv4\", \"name\": \"my-network-acl-rule\", \"source\": \"192.168.3.0/24\", \"protocol\": \"all\"}"; - String getNetworkAclRulePath = "/network_acls/testString/rules/testString"; + String mockResponseBody = ""; + String deleteSubnetPath = "/subnets/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the GetNetworkAclRuleOptions model - GetNetworkAclRuleOptions getNetworkAclRuleOptionsModel = new GetNetworkAclRuleOptions.Builder() - .networkAclId("testString") + // Construct an instance of the DeleteSubnetOptions model + DeleteSubnetOptions deleteSubnetOptionsModel = new DeleteSubnetOptions.Builder() .id("testString") .build(); - // Invoke getNetworkAclRule() with a valid options model and verify the result - Response response = vpcService.getNetworkAclRule(getNetworkAclRuleOptionsModel).execute(); + // Invoke deleteSubnet() with a valid options model and verify the result + Response response = vpcService.deleteSubnet(deleteSubnetOptionsModel).execute(); assertNotNull(response); - NetworkACLRule responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getNetworkAclRulePath); + assertEquals(parsedPath, deleteSubnetPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getNetworkAclRule operation with and without retries enabled + // Test the deleteSubnet operation with and without retries enabled @Test - public void testGetNetworkAclRuleWRetries() throws Throwable { + public void testDeleteSubnetWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetNetworkAclRuleWOptions(); + testDeleteSubnetWOptions(); vpcService.disableRetries(); - testGetNetworkAclRuleWOptions(); + testDeleteSubnetWOptions(); } - // Test the getNetworkAclRule operation with a null options model (negative test) + // Test the deleteSubnet operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetNetworkAclRuleNoOptions() throws Throwable { + public void testDeleteSubnetNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getNetworkAclRule(null).execute(); + vpcService.deleteSubnet(null).execute(); } - // Test the updateNetworkAclRule operation with a valid options model parameter + // Test the deleteSubnetReservedIp operation with a valid options model parameter @Test - public void testUpdateNetworkAclRuleWOptions() throws Throwable { + public void testDeleteSubnetReservedIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"action\": \"allow\", \"before\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"name\": \"my-network-acl-rule\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"ip_version\": \"ipv4\", \"name\": \"my-network-acl-rule\", \"source\": \"192.168.3.0/24\", \"protocol\": \"all\"}"; - String updateNetworkAclRulePath = "/network_acls/testString/rules/testString"; + String mockResponseBody = ""; + String deleteSubnetReservedIpPath = "/subnets/testString/reserved_ips/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the NetworkACLRuleBeforePatchNetworkACLRuleIdentityById model - NetworkACLRuleBeforePatchNetworkACLRuleIdentityById networkAclRuleBeforePatchModel = new NetworkACLRuleBeforePatchNetworkACLRuleIdentityById.Builder() - .id("r006-8daca77a-4980-4d33-8f3e-7038797be8f9") - .build(); - - // Construct an instance of the NetworkACLRulePatch model - NetworkACLRulePatch networkAclRulePatchModel = new NetworkACLRulePatch.Builder() - .action("allow") - .before(networkAclRuleBeforePatchModel) - .code(Long.valueOf("0")) - .destination("192.168.3.2/32") - .destinationPortMax(Long.valueOf("22")) - .destinationPortMin(Long.valueOf("22")) - .direction("inbound") - .name("my-network-acl-rule") - .source("10.0.0.0/0") - .sourcePortMax(Long.valueOf("65535")) - .sourcePortMin(Long.valueOf("49152")) - .type(Long.valueOf("8")) - .build(); - Map networkAclRulePatchModelAsPatch = networkAclRulePatchModel.asPatch(); - - // Construct an instance of the UpdateNetworkAclRuleOptions model - UpdateNetworkAclRuleOptions updateNetworkAclRuleOptionsModel = new UpdateNetworkAclRuleOptions.Builder() - .networkAclId("testString") + // Construct an instance of the DeleteSubnetReservedIpOptions model + DeleteSubnetReservedIpOptions deleteSubnetReservedIpOptionsModel = new DeleteSubnetReservedIpOptions.Builder() + .subnetId("testString") .id("testString") - .networkAclRulePatch(networkAclRulePatchModelAsPatch) .build(); - // Invoke updateNetworkAclRule() with a valid options model and verify the result - Response response = vpcService.updateNetworkAclRule(updateNetworkAclRuleOptionsModel).execute(); + // Invoke deleteSubnetReservedIp() with a valid options model and verify the result + Response response = vpcService.deleteSubnetReservedIp(deleteSubnetReservedIpOptionsModel).execute(); assertNotNull(response); - NetworkACLRule responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateNetworkAclRulePath); + assertEquals(parsedPath, deleteSubnetReservedIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateNetworkAclRule operation with and without retries enabled + // Test the deleteSubnetReservedIp operation with and without retries enabled @Test - public void testUpdateNetworkAclRuleWRetries() throws Throwable { + public void testDeleteSubnetReservedIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateNetworkAclRuleWOptions(); + testDeleteSubnetReservedIpWOptions(); vpcService.disableRetries(); - testUpdateNetworkAclRuleWOptions(); + testDeleteSubnetReservedIpWOptions(); } - // Test the updateNetworkAclRule operation with a null options model (negative test) + // Test the deleteSubnetReservedIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateNetworkAclRuleNoOptions() throws Throwable { + public void testDeleteSubnetReservedIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateNetworkAclRule(null).execute(); + vpcService.deleteSubnetReservedIp(null).execute(); } - // Test the listSecurityGroups operation with a valid options model parameter + // Test the getSubnet operation with a valid options model parameter @Test - public void testListSecurityGroupsWOptions() throws Throwable { + public void testGetSubnetWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"security_groups\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"rules\": [{\"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"id\": \"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"ip_version\": \"ipv4\", \"local\": {\"address\": \"192.168.3.4\"}, \"remote\": {\"address\": \"192.168.3.4\"}, \"protocol\": \"all\"}], \"targets\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"resource_type\": \"network_interface\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}], \"total_count\": 132}"; - String listSecurityGroupsPath = "/security_groups"; + String mockResponseBody = "{\"available_ipv4_address_count\": 15, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"ip_version\": \"ipv4\", \"ipv4_cidr_block\": \"10.0.0.0/24\", \"name\": \"my-subnet\", \"network_acl\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\"}, \"public_gateway\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"id\": \"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"name\": \"my-public-gateway\", \"resource_type\": \"public_gateway\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"subnet\", \"routing_table\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"name\": \"my-routing-table-1\", \"resource_type\": \"routing_table\"}, \"status\": \"available\", \"total_ipv4_address_count\": 256, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String getSubnetPath = "/subnets/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListSecurityGroupsOptions model - ListSecurityGroupsOptions listSecurityGroupsOptionsModel = new ListSecurityGroupsOptions.Builder() - .start("testString") - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .vpcId("testString") - .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .vpcName("my-vpc") + // Construct an instance of the GetSubnetOptions model + GetSubnetOptions getSubnetOptionsModel = new GetSubnetOptions.Builder() + .id("testString") .build(); - // Invoke listSecurityGroups() with a valid options model and verify the result - Response response = vpcService.listSecurityGroups(listSecurityGroupsOptionsModel).execute(); + // Invoke getSubnet() with a valid options model and verify the result + Response response = vpcService.getSubnet(getSubnetOptionsModel).execute(); assertNotNull(response); - SecurityGroupCollection responseObj = response.getResult(); + Subnet responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -25125,257 +26400,158 @@ public void testListSecurityGroupsWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listSecurityGroupsPath); + assertEquals(parsedPath, getSubnetPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("resource_group.id"), "testString"); - assertEquals(query.get("vpc.id"), "testString"); - assertEquals(query.get("vpc.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); - assertEquals(query.get("vpc.name"), "my-vpc"); } - // Test the listSecurityGroups operation with and without retries enabled + // Test the getSubnet operation with and without retries enabled @Test - public void testListSecurityGroupsWRetries() throws Throwable { + public void testGetSubnetWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListSecurityGroupsWOptions(); + testGetSubnetWOptions(); vpcService.disableRetries(); - testListSecurityGroupsWOptions(); + testGetSubnetWOptions(); } - // Test the listSecurityGroups operation using the SecurityGroupsPager.getNext() method - @Test - public void testListSecurityGroupsWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"security_groups\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"rules\":[{\"direction\":\"inbound\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\",\"id\":\"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\",\"ip_version\":\"ipv4\",\"local\":{\"address\":\"192.168.3.4\"},\"remote\":{\"address\":\"192.168.3.4\"},\"protocol\":\"all\"}],\"targets\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"resource_type\":\"network_interface\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"security_groups\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"rules\":[{\"direction\":\"inbound\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\",\"id\":\"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\",\"ip_version\":\"ipv4\",\"local\":{\"address\":\"192.168.3.4\"},\"remote\":{\"address\":\"192.168.3.4\"},\"protocol\":\"all\"}],\"targets\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"resource_type\":\"network_interface\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListSecurityGroupsOptions listSecurityGroupsOptions = new ListSecurityGroupsOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .vpcId("testString") - .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .vpcName("my-vpc") - .build(); - - List allResults = new ArrayList<>(); - SecurityGroupsPager pager = new SecurityGroupsPager(vpcService, listSecurityGroupsOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + // Test the getSubnet operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testGetSubnetNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.getSubnet(null).execute(); } - - // Test the listSecurityGroups operation using the SecurityGroupsPager.getAll() method - @Test - public void testListSecurityGroupsWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"security_groups\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"rules\":[{\"direction\":\"inbound\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\",\"id\":\"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\",\"ip_version\":\"ipv4\",\"local\":{\"address\":\"192.168.3.4\"},\"remote\":{\"address\":\"192.168.3.4\"},\"protocol\":\"all\"}],\"targets\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"resource_type\":\"network_interface\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"security_groups\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"rules\":[{\"direction\":\"inbound\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\",\"id\":\"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\",\"ip_version\":\"ipv4\",\"local\":{\"address\":\"192.168.3.4\"},\"remote\":{\"address\":\"192.168.3.4\"},\"protocol\":\"all\"}],\"targets\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"resource_type\":\"network_interface\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListSecurityGroupsOptions listSecurityGroupsOptions = new ListSecurityGroupsOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .vpcId("testString") - .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .vpcName("my-vpc") - .build(); - SecurityGroupsPager pager = new SecurityGroupsPager(vpcService, listSecurityGroupsOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the createSecurityGroup operation with a valid options model parameter + // Test the getSubnetNetworkAcl operation with a valid options model parameter @Test - public void testCreateSecurityGroupWOptions() throws Throwable { + public void testGetSubnetNetworkAclWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"rules\": [{\"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"id\": \"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"ip_version\": \"ipv4\", \"local\": {\"address\": \"192.168.3.4\"}, \"remote\": {\"address\": \"192.168.3.4\"}, \"protocol\": \"all\"}], \"targets\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"resource_type\": \"network_interface\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String createSecurityGroupPath = "/security_groups"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"rules\": [{\"action\": \"allow\", \"before\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"name\": \"my-network-acl-rule\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"ip_version\": \"ipv4\", \"name\": \"my-network-acl-rule\", \"source\": \"192.168.3.0/24\", \"protocol\": \"all\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String getSubnetNetworkAclPath = "/subnets/testString/network_acl"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the VPCIdentityById model - VPCIdentityById vpcIdentityModel = new VPCIdentityById.Builder() - .id("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .build(); - - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); - - // Construct an instance of the SecurityGroupRuleLocalPrototypeIP model - SecurityGroupRuleLocalPrototypeIP securityGroupRuleLocalPrototypeModel = new SecurityGroupRuleLocalPrototypeIP.Builder() - .address("192.168.3.4") - .build(); - - // Construct an instance of the SecurityGroupRuleRemotePrototypeIP model - SecurityGroupRuleRemotePrototypeIP securityGroupRuleRemotePrototypeModel = new SecurityGroupRuleRemotePrototypeIP.Builder() - .address("192.168.3.4") - .build(); - - // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll model - SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll securityGroupRulePrototypeModel = new SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.Builder() - .direction("inbound") - .ipVersion("ipv4") - .local(securityGroupRuleLocalPrototypeModel) - .remote(securityGroupRuleRemotePrototypeModel) - .protocol("all") - .build(); - - // Construct an instance of the CreateSecurityGroupOptions model - CreateSecurityGroupOptions createSecurityGroupOptionsModel = new CreateSecurityGroupOptions.Builder() - .vpc(vpcIdentityModel) - .name("my-security-group") - .resourceGroup(resourceGroupIdentityModel) - .rules(java.util.Arrays.asList(securityGroupRulePrototypeModel)) + // Construct an instance of the GetSubnetNetworkAclOptions model + GetSubnetNetworkAclOptions getSubnetNetworkAclOptionsModel = new GetSubnetNetworkAclOptions.Builder() + .id("testString") .build(); - // Invoke createSecurityGroup() with a valid options model and verify the result - Response response = vpcService.createSecurityGroup(createSecurityGroupOptionsModel).execute(); + // Invoke getSubnetNetworkAcl() with a valid options model and verify the result + Response response = vpcService.getSubnetNetworkAcl(getSubnetNetworkAclOptionsModel).execute(); assertNotNull(response); - SecurityGroup responseObj = response.getResult(); + NetworkACL responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createSecurityGroupPath); + assertEquals(parsedPath, getSubnetNetworkAclPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createSecurityGroup operation with and without retries enabled + // Test the getSubnetNetworkAcl operation with and without retries enabled @Test - public void testCreateSecurityGroupWRetries() throws Throwable { + public void testGetSubnetNetworkAclWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateSecurityGroupWOptions(); + testGetSubnetNetworkAclWOptions(); vpcService.disableRetries(); - testCreateSecurityGroupWOptions(); + testGetSubnetNetworkAclWOptions(); } - // Test the createSecurityGroup operation with a null options model (negative test) + // Test the getSubnetNetworkAcl operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateSecurityGroupNoOptions() throws Throwable { + public void testGetSubnetNetworkAclNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createSecurityGroup(null).execute(); + vpcService.getSubnetNetworkAcl(null).execute(); } - // Test the deleteSecurityGroup operation with a valid options model parameter + // Test the getSubnetPublicGateway operation with a valid options model parameter @Test - public void testDeleteSecurityGroupWOptions() throws Throwable { + public void testGetSubnetPublicGatewayWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteSecurityGroupPath = "/security_groups/testString"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"floating_ip\": {\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"id\": \"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"name\": \"my-public-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"public_gateway\", \"status\": \"available\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String getSubnetPublicGatewayPath = "/subnets/testString/public_gateway"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteSecurityGroupOptions model - DeleteSecurityGroupOptions deleteSecurityGroupOptionsModel = new DeleteSecurityGroupOptions.Builder() + // Construct an instance of the GetSubnetPublicGatewayOptions model + GetSubnetPublicGatewayOptions getSubnetPublicGatewayOptionsModel = new GetSubnetPublicGatewayOptions.Builder() .id("testString") .build(); - // Invoke deleteSecurityGroup() with a valid options model and verify the result - Response response = vpcService.deleteSecurityGroup(deleteSecurityGroupOptionsModel).execute(); + // Invoke getSubnetPublicGateway() with a valid options model and verify the result + Response response = vpcService.getSubnetPublicGateway(getSubnetPublicGatewayOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + PublicGateway 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteSecurityGroupPath); + assertEquals(parsedPath, getSubnetPublicGatewayPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteSecurityGroup operation with and without retries enabled + // Test the getSubnetPublicGateway operation with and without retries enabled @Test - public void testDeleteSecurityGroupWRetries() throws Throwable { + public void testGetSubnetPublicGatewayWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteSecurityGroupWOptions(); + testGetSubnetPublicGatewayWOptions(); vpcService.disableRetries(); - testDeleteSecurityGroupWOptions(); + testGetSubnetPublicGatewayWOptions(); } - // Test the deleteSecurityGroup operation with a null options model (negative test) + // Test the getSubnetPublicGateway operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteSecurityGroupNoOptions() throws Throwable { + public void testGetSubnetPublicGatewayNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteSecurityGroup(null).execute(); + vpcService.getSubnetPublicGateway(null).execute(); } - // Test the getSecurityGroup operation with a valid options model parameter + // Test the getSubnetReservedIp operation with a valid options model parameter @Test - public void testGetSecurityGroupWOptions() throws Throwable { + public void testGetSubnetReservedIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"rules\": [{\"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"id\": \"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"ip_version\": \"ipv4\", \"local\": {\"address\": \"192.168.3.4\"}, \"remote\": {\"address\": \"192.168.3.4\"}, \"protocol\": \"all\"}], \"targets\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"resource_type\": \"network_interface\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String getSecurityGroupPath = "/security_groups/testString"; + String mockResponseBody = "{\"address\": \"192.168.3.4\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"lifecycle_state\": \"stable\", \"name\": \"my-reserved-ip\", \"owner\": \"provider\", \"resource_type\": \"subnet_reserved_ip\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"resource_type\": \"endpoint_gateway\"}}"; + String getSubnetReservedIpPath = "/subnets/testString/reserved_ips/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetSecurityGroupOptions model - GetSecurityGroupOptions getSecurityGroupOptionsModel = new GetSecurityGroupOptions.Builder() + // Construct an instance of the GetSubnetReservedIpOptions model + GetSubnetReservedIpOptions getSubnetReservedIpOptionsModel = new GetSubnetReservedIpOptions.Builder() + .subnetId("testString") .id("testString") .build(); - // Invoke getSecurityGroup() with a valid options model and verify the result - Response response = vpcService.getSecurityGroup(getSecurityGroupOptionsModel).execute(); + // Invoke getSubnetReservedIp() with a valid options model and verify the result + Response response = vpcService.getSubnetReservedIp(getSubnetReservedIpOptionsModel).execute(); assertNotNull(response); - SecurityGroup responseObj = response.getResult(); + ReservedIP responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -25384,111 +26560,111 @@ public void testGetSecurityGroupWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getSecurityGroupPath); + assertEquals(parsedPath, getSubnetReservedIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getSecurityGroup operation with and without retries enabled + // Test the getSubnetReservedIp operation with and without retries enabled @Test - public void testGetSecurityGroupWRetries() throws Throwable { + public void testGetSubnetReservedIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetSecurityGroupWOptions(); + testGetSubnetReservedIpWOptions(); vpcService.disableRetries(); - testGetSecurityGroupWOptions(); + testGetSubnetReservedIpWOptions(); } - // Test the getSecurityGroup operation with a null options model (negative test) + // Test the getSubnetReservedIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetSecurityGroupNoOptions() throws Throwable { + public void testGetSubnetReservedIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getSecurityGroup(null).execute(); + vpcService.getSubnetReservedIp(null).execute(); } - // Test the updateSecurityGroup operation with a valid options model parameter + // Test the getSubnetRoutingTable operation with a valid options model parameter @Test - public void testUpdateSecurityGroupWOptions() throws Throwable { + public void testGetSubnetRoutingTableWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"rules\": [{\"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"id\": \"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"ip_version\": \"ipv4\", \"local\": {\"address\": \"192.168.3.4\"}, \"remote\": {\"address\": \"192.168.3.4\"}, \"protocol\": \"all\"}], \"targets\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"resource_type\": \"network_interface\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String updateSecurityGroupPath = "/security_groups/testString"; + String mockResponseBody = "{\"accept_routes_from\": [{\"resource_type\": \"vpn_server\"}], \"advertise_routes_to\": [\"transit_gateway\"], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"is_default\": false, \"lifecycle_state\": \"stable\", \"name\": \"my-routing-table-1\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"routing_table\", \"route_direct_link_ingress\": true, \"route_internet_ingress\": true, \"route_transit_gateway_ingress\": true, \"route_vpc_zone_ingress\": false, \"routes\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"name\": \"my-vpc-routing-table-route\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}]}"; + String getSubnetRoutingTablePath = "/subnets/testString/routing_table"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the SecurityGroupPatch model - SecurityGroupPatch securityGroupPatchModel = new SecurityGroupPatch.Builder() - .name("my-security-group") - .build(); - Map securityGroupPatchModelAsPatch = securityGroupPatchModel.asPatch(); - - // Construct an instance of the UpdateSecurityGroupOptions model - UpdateSecurityGroupOptions updateSecurityGroupOptionsModel = new UpdateSecurityGroupOptions.Builder() + // Construct an instance of the GetSubnetRoutingTableOptions model + GetSubnetRoutingTableOptions getSubnetRoutingTableOptionsModel = new GetSubnetRoutingTableOptions.Builder() .id("testString") - .securityGroupPatch(securityGroupPatchModelAsPatch) .build(); - // Invoke updateSecurityGroup() with a valid options model and verify the result - Response response = vpcService.updateSecurityGroup(updateSecurityGroupOptionsModel).execute(); + // Invoke getSubnetRoutingTable() with a valid options model and verify the result + Response response = vpcService.getSubnetRoutingTable(getSubnetRoutingTableOptionsModel).execute(); assertNotNull(response); - SecurityGroup responseObj = response.getResult(); + RoutingTable responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateSecurityGroupPath); + assertEquals(parsedPath, getSubnetRoutingTablePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateSecurityGroup operation with and without retries enabled + // Test the getSubnetRoutingTable operation with and without retries enabled @Test - public void testUpdateSecurityGroupWRetries() throws Throwable { + public void testGetSubnetRoutingTableWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateSecurityGroupWOptions(); + testGetSubnetRoutingTableWOptions(); vpcService.disableRetries(); - testUpdateSecurityGroupWOptions(); + testGetSubnetRoutingTableWOptions(); } - // Test the updateSecurityGroup operation with a null options model (negative test) + // Test the getSubnetRoutingTable operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateSecurityGroupNoOptions() throws Throwable { + public void testGetSubnetRoutingTableNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateSecurityGroup(null).execute(); + vpcService.getSubnetRoutingTable(null).execute(); } - // Test the listSecurityGroupRules operation with a valid options model parameter + // Test the listSubnetReservedIps operation with a valid options model parameter @Test - public void testListSecurityGroupRulesWOptions() throws Throwable { + public void testListSubnetReservedIpsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"rules\": [{\"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"id\": \"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"ip_version\": \"ipv4\", \"local\": {\"address\": \"192.168.3.4\"}, \"remote\": {\"address\": \"192.168.3.4\"}, \"protocol\": \"all\"}]}"; - String listSecurityGroupRulesPath = "/security_groups/testString/rules"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"reserved_ips\": [{\"address\": \"192.168.3.4\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"lifecycle_state\": \"stable\", \"name\": \"my-reserved-ip\", \"owner\": \"provider\", \"resource_type\": \"subnet_reserved_ip\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"resource_type\": \"endpoint_gateway\"}}], \"total_count\": 132}"; + String listSubnetReservedIpsPath = "/subnets/testString/reserved_ips"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListSecurityGroupRulesOptions model - ListSecurityGroupRulesOptions listSecurityGroupRulesOptionsModel = new ListSecurityGroupRulesOptions.Builder() - .securityGroupId("testString") + // Construct an instance of the ListSubnetReservedIpsOptions model + ListSubnetReservedIpsOptions listSubnetReservedIpsOptionsModel = new ListSubnetReservedIpsOptions.Builder() + .subnetId("testString") + .start("testString") + .limit(Long.valueOf("10")) + .sort("name") + .targetId("testString") + .targetCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + .targetName("my-resource") + .targetResourceType("testString") .build(); - // Invoke listSecurityGroupRules() with a valid options model and verify the result - Response response = vpcService.listSecurityGroupRules(listSecurityGroupRulesOptionsModel).execute(); + // Invoke listSubnetReservedIps() with a valid options model and verify the result + Response response = vpcService.listSubnetReservedIps(listSubnetReservedIpsOptionsModel).execute(); assertNotNull(response); - SecurityGroupRuleCollection responseObj = response.getResult(); + ReservedIPCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -25497,538 +26673,641 @@ public void testListSecurityGroupRulesWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listSecurityGroupRulesPath); + assertEquals(parsedPath, listSubnetReservedIpsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("sort"), "name"); + assertEquals(query.get("target.id"), "testString"); + assertEquals(query.get("target.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727"); + assertEquals(query.get("target.name"), "my-resource"); + assertEquals(query.get("target.resource_type"), "testString"); } - // Test the listSecurityGroupRules operation with and without retries enabled + // Test the listSubnetReservedIps operation with and without retries enabled @Test - public void testListSecurityGroupRulesWRetries() throws Throwable { + public void testListSubnetReservedIpsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListSecurityGroupRulesWOptions(); + testListSubnetReservedIpsWOptions(); vpcService.disableRetries(); - testListSecurityGroupRulesWOptions(); + testListSubnetReservedIpsWOptions(); } - // Test the listSecurityGroupRules operation with a null options model (negative test) + // Test the listSubnetReservedIps operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListSecurityGroupRulesNoOptions() throws Throwable { + public void testListSubnetReservedIpsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listSecurityGroupRules(null).execute(); + vpcService.listSubnetReservedIps(null).execute(); } - // Test the createSecurityGroupRule operation with a valid options model parameter + // Test the listSubnetReservedIps operation using the SubnetReservedIpsPager.getNext() method @Test - public void testCreateSecurityGroupRuleWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"id\": \"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"ip_version\": \"ipv4\", \"local\": {\"address\": \"192.168.3.4\"}, \"remote\": {\"address\": \"192.168.3.4\"}, \"protocol\": \"all\"}"; - String createSecurityGroupRulePath = "/security_groups/testString/rules"; + public void testListSubnetReservedIpsWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"reserved_ips\":[{\"address\":\"192.168.3.4\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"lifecycle_state\":\"stable\",\"name\":\"my-reserved-ip\",\"owner\":\"provider\",\"resource_type\":\"subnet_reserved_ip\",\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"resource_type\":\"endpoint_gateway\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"reserved_ips\":[{\"address\":\"192.168.3.4\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"lifecycle_state\":\"stable\",\"name\":\"my-reserved-ip\",\"owner\":\"provider\",\"resource_type\":\"subnet_reserved_ip\",\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"resource_type\":\"endpoint_gateway\"}}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) - .setBody(mockResponseBody)); + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the SecurityGroupRuleLocalPrototypeIP model - SecurityGroupRuleLocalPrototypeIP securityGroupRuleLocalPrototypeModel = new SecurityGroupRuleLocalPrototypeIP.Builder() - .address("192.168.3.4") + ListSubnetReservedIpsOptions listSubnetReservedIpsOptions = new ListSubnetReservedIpsOptions.Builder() + .subnetId("testString") + .limit(Long.valueOf("10")) + .sort("name") + .targetId("testString") + .targetCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + .targetName("my-resource") + .targetResourceType("testString") .build(); - // Construct an instance of the SecurityGroupRuleRemotePrototypeIP model - SecurityGroupRuleRemotePrototypeIP securityGroupRuleRemotePrototypeModel = new SecurityGroupRuleRemotePrototypeIP.Builder() - .address("192.168.3.4") - .build(); + List allResults = new ArrayList<>(); + SubnetReservedIpsPager pager = new SubnetReservedIpsPager(vpcService, listSubnetReservedIpsOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); + } + + // Test the listSubnetReservedIps operation using the SubnetReservedIpsPager.getAll() method + @Test + public void testListSubnetReservedIpsWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"reserved_ips\":[{\"address\":\"192.168.3.4\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"lifecycle_state\":\"stable\",\"name\":\"my-reserved-ip\",\"owner\":\"provider\",\"resource_type\":\"subnet_reserved_ip\",\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"resource_type\":\"endpoint_gateway\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"reserved_ips\":[{\"address\":\"192.168.3.4\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"lifecycle_state\":\"stable\",\"name\":\"my-reserved-ip\",\"owner\":\"provider\",\"resource_type\":\"subnet_reserved_ip\",\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"resource_type\":\"endpoint_gateway\"}}],\"total_count\":2,\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll model - SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll securityGroupRulePrototypeModel = new SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.Builder() - .direction("inbound") - .ipVersion("ipv4") - .local(securityGroupRuleLocalPrototypeModel) - .remote(securityGroupRuleRemotePrototypeModel) - .protocol("all") + ListSubnetReservedIpsOptions listSubnetReservedIpsOptions = new ListSubnetReservedIpsOptions.Builder() + .subnetId("testString") + .limit(Long.valueOf("10")) + .sort("name") + .targetId("testString") + .targetCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + .targetName("my-resource") + .targetResourceType("testString") .build(); - // Construct an instance of the CreateSecurityGroupRuleOptions model - CreateSecurityGroupRuleOptions createSecurityGroupRuleOptionsModel = new CreateSecurityGroupRuleOptions.Builder() - .securityGroupId("testString") - .securityGroupRulePrototype(securityGroupRulePrototypeModel) + SubnetReservedIpsPager pager = new SubnetReservedIpsPager(vpcService, listSubnetReservedIpsOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); + } + + // Test the listSubnets operation with a valid options model parameter + @Test + public void testListSubnetsWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"subnets\": [{\"available_ipv4_address_count\": 15, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"ip_version\": \"ipv4\", \"ipv4_cidr_block\": \"10.0.0.0/24\", \"name\": \"my-subnet\", \"network_acl\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\"}, \"public_gateway\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"id\": \"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"name\": \"my-public-gateway\", \"resource_type\": \"public_gateway\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"subnet\", \"routing_table\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"name\": \"my-routing-table-1\", \"resource_type\": \"routing_table\"}, \"status\": \"available\", \"total_ipv4_address_count\": 256, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"total_count\": 132}"; + String listSubnetsPath = "/subnets"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the ListSubnetsOptions model + ListSubnetsOptions listSubnetsOptionsModel = new ListSubnetsOptions.Builder() + .start("testString") + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .zoneName("us-south-1") + .vpcId("testString") + .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .vpcName("my-vpc") + .routingTableId("testString") + .routingTableName("my-routing-table") .build(); - // Invoke createSecurityGroupRule() with a valid options model and verify the result - Response response = vpcService.createSecurityGroupRule(createSecurityGroupRuleOptionsModel).execute(); + // Invoke listSubnets() with a valid options model and verify the result + Response response = vpcService.listSubnets(listSubnetsOptionsModel).execute(); assertNotNull(response); - SecurityGroupRule responseObj = response.getResult(); + SubnetCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createSecurityGroupRulePath); + assertEquals(parsedPath, listSubnetsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("resource_group.id"), "testString"); + assertEquals(query.get("zone.name"), "us-south-1"); + assertEquals(query.get("vpc.id"), "testString"); + assertEquals(query.get("vpc.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); + assertEquals(query.get("vpc.name"), "my-vpc"); + assertEquals(query.get("routing_table.id"), "testString"); + assertEquals(query.get("routing_table.name"), "my-routing-table"); } - // Test the createSecurityGroupRule operation with and without retries enabled + // Test the listSubnets operation with and without retries enabled @Test - public void testCreateSecurityGroupRuleWRetries() throws Throwable { + public void testListSubnetsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateSecurityGroupRuleWOptions(); + testListSubnetsWOptions(); vpcService.disableRetries(); - testCreateSecurityGroupRuleWOptions(); + testListSubnetsWOptions(); } - // Test the createSecurityGroupRule operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateSecurityGroupRuleNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.createSecurityGroupRule(null).execute(); + // Test the listSubnets operation using the SubnetsPager.getNext() method + @Test + public void testListSubnetsWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"subnets\":[{\"available_ipv4_address_count\":15,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"ip_version\":\"ipv4\",\"ipv4_cidr_block\":\"10.0.0.0/24\",\"name\":\"my-subnet\",\"network_acl\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"id\":\"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"name\":\"my-network-acl\"},\"public_gateway\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"id\":\"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"name\":\"my-public-gateway\",\"resource_type\":\"public_gateway\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"subnet\",\"routing_table\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"id\":\"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"name\":\"my-routing-table-1\",\"resource_type\":\"routing_table\"},\"status\":\"available\",\"total_ipv4_address_count\":256,\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"subnets\":[{\"available_ipv4_address_count\":15,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"ip_version\":\"ipv4\",\"ipv4_cidr_block\":\"10.0.0.0/24\",\"name\":\"my-subnet\",\"network_acl\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"id\":\"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"name\":\"my-network-acl\"},\"public_gateway\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"id\":\"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"name\":\"my-public-gateway\",\"resource_type\":\"public_gateway\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"subnet\",\"routing_table\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"id\":\"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"name\":\"my-routing-table-1\",\"resource_type\":\"routing_table\"},\"status\":\"available\",\"total_ipv4_address_count\":256,\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListSubnetsOptions listSubnetsOptions = new ListSubnetsOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .zoneName("us-south-1") + .vpcId("testString") + .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .vpcName("my-vpc") + .routingTableId("testString") + .routingTableName("my-routing-table") + .build(); + + List allResults = new ArrayList<>(); + SubnetsPager pager = new SubnetsPager(vpcService, listSubnetsOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } + + // Test the listSubnets operation using the SubnetsPager.getAll() method + @Test + public void testListSubnetsWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"subnets\":[{\"available_ipv4_address_count\":15,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"ip_version\":\"ipv4\",\"ipv4_cidr_block\":\"10.0.0.0/24\",\"name\":\"my-subnet\",\"network_acl\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"id\":\"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"name\":\"my-network-acl\"},\"public_gateway\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"id\":\"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"name\":\"my-public-gateway\",\"resource_type\":\"public_gateway\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"subnet\",\"routing_table\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"id\":\"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"name\":\"my-routing-table-1\",\"resource_type\":\"routing_table\"},\"status\":\"available\",\"total_ipv4_address_count\":256,\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"subnets\":[{\"available_ipv4_address_count\":15,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"ip_version\":\"ipv4\",\"ipv4_cidr_block\":\"10.0.0.0/24\",\"name\":\"my-subnet\",\"network_acl\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"id\":\"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"name\":\"my-network-acl\"},\"public_gateway\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"id\":\"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\",\"name\":\"my-public-gateway\",\"resource_type\":\"public_gateway\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"subnet\",\"routing_table\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"id\":\"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"name\":\"my-routing-table-1\",\"resource_type\":\"routing_table\"},\"status\":\"available\",\"total_ipv4_address_count\":256,\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Test the deleteSecurityGroupRule operation with a valid options model parameter + ListSubnetsOptions listSubnetsOptions = new ListSubnetsOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .zoneName("us-south-1") + .vpcId("testString") + .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .vpcName("my-vpc") + .routingTableId("testString") + .routingTableName("my-routing-table") + .build(); + + SubnetsPager pager = new SubnetsPager(vpcService, listSubnetsOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); + } + + // Test the replaceSubnetNetworkAcl operation with a valid options model parameter @Test - public void testDeleteSecurityGroupRuleWOptions() throws Throwable { + public void testReplaceSubnetNetworkAclWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteSecurityGroupRulePath = "/security_groups/testString/rules/testString"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"rules\": [{\"action\": \"allow\", \"before\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"name\": \"my-network-acl-rule\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"ip_version\": \"ipv4\", \"name\": \"my-network-acl-rule\", \"source\": \"192.168.3.0/24\", \"protocol\": \"all\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String replaceSubnetNetworkAclPath = "/subnets/testString/network_acl"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the DeleteSecurityGroupRuleOptions model - DeleteSecurityGroupRuleOptions deleteSecurityGroupRuleOptionsModel = new DeleteSecurityGroupRuleOptions.Builder() - .securityGroupId("testString") + // Construct an instance of the NetworkACLIdentityById model + NetworkACLIdentityById networkAclIdentityModel = new NetworkACLIdentityById.Builder() + .id("r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf") + .build(); + + // Construct an instance of the ReplaceSubnetNetworkAclOptions model + ReplaceSubnetNetworkAclOptions replaceSubnetNetworkAclOptionsModel = new ReplaceSubnetNetworkAclOptions.Builder() .id("testString") + .networkAclIdentity(networkAclIdentityModel) .build(); - // Invoke deleteSecurityGroupRule() with a valid options model and verify the result - Response response = vpcService.deleteSecurityGroupRule(deleteSecurityGroupRuleOptionsModel).execute(); + // Invoke replaceSubnetNetworkAcl() with a valid options model and verify the result + Response response = vpcService.replaceSubnetNetworkAcl(replaceSubnetNetworkAclOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + NetworkACL 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(), "DELETE"); + assertEquals(request.getMethod(), "PUT"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteSecurityGroupRulePath); + assertEquals(parsedPath, replaceSubnetNetworkAclPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteSecurityGroupRule operation with and without retries enabled + // Test the replaceSubnetNetworkAcl operation with and without retries enabled @Test - public void testDeleteSecurityGroupRuleWRetries() throws Throwable { + public void testReplaceSubnetNetworkAclWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteSecurityGroupRuleWOptions(); + testReplaceSubnetNetworkAclWOptions(); vpcService.disableRetries(); - testDeleteSecurityGroupRuleWOptions(); + testReplaceSubnetNetworkAclWOptions(); } - // Test the deleteSecurityGroupRule operation with a null options model (negative test) + // Test the replaceSubnetNetworkAcl operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteSecurityGroupRuleNoOptions() throws Throwable { + public void testReplaceSubnetNetworkAclNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteSecurityGroupRule(null).execute(); + vpcService.replaceSubnetNetworkAcl(null).execute(); } - // Test the getSecurityGroupRule operation with a valid options model parameter + // Test the replaceSubnetRoutingTable operation with a valid options model parameter @Test - public void testGetSecurityGroupRuleWOptions() throws Throwable { + public void testReplaceSubnetRoutingTableWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"id\": \"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"ip_version\": \"ipv4\", \"local\": {\"address\": \"192.168.3.4\"}, \"remote\": {\"address\": \"192.168.3.4\"}, \"protocol\": \"all\"}"; - String getSecurityGroupRulePath = "/security_groups/testString/rules/testString"; + String mockResponseBody = "{\"accept_routes_from\": [{\"resource_type\": \"vpn_server\"}], \"advertise_routes_to\": [\"transit_gateway\"], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"is_default\": false, \"lifecycle_state\": \"stable\", \"name\": \"my-routing-table-1\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"routing_table\", \"route_direct_link_ingress\": true, \"route_internet_ingress\": true, \"route_transit_gateway_ingress\": true, \"route_vpc_zone_ingress\": false, \"routes\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"name\": \"my-vpc-routing-table-route\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}]}"; + String replaceSubnetRoutingTablePath = "/subnets/testString/routing_table"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the GetSecurityGroupRuleOptions model - GetSecurityGroupRuleOptions getSecurityGroupRuleOptionsModel = new GetSecurityGroupRuleOptions.Builder() - .securityGroupId("testString") + // Construct an instance of the RoutingTableIdentityByCRN model + RoutingTableIdentityByCRN routingTableIdentityModel = new RoutingTableIdentityByCRN.Builder() + .crn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840") + .build(); + + // Construct an instance of the ReplaceSubnetRoutingTableOptions model + ReplaceSubnetRoutingTableOptions replaceSubnetRoutingTableOptionsModel = new ReplaceSubnetRoutingTableOptions.Builder() .id("testString") + .routingTableIdentity(routingTableIdentityModel) .build(); - // Invoke getSecurityGroupRule() with a valid options model and verify the result - Response response = vpcService.getSecurityGroupRule(getSecurityGroupRuleOptionsModel).execute(); + // Invoke replaceSubnetRoutingTable() with a valid options model and verify the result + Response response = vpcService.replaceSubnetRoutingTable(replaceSubnetRoutingTableOptionsModel).execute(); assertNotNull(response); - SecurityGroupRule responseObj = response.getResult(); + RoutingTable responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PUT"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getSecurityGroupRulePath); + assertEquals(parsedPath, replaceSubnetRoutingTablePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getSecurityGroupRule operation with and without retries enabled + // Test the replaceSubnetRoutingTable operation with and without retries enabled @Test - public void testGetSecurityGroupRuleWRetries() throws Throwable { + public void testReplaceSubnetRoutingTableWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetSecurityGroupRuleWOptions(); + testReplaceSubnetRoutingTableWOptions(); vpcService.disableRetries(); - testGetSecurityGroupRuleWOptions(); + testReplaceSubnetRoutingTableWOptions(); } - // Test the getSecurityGroupRule operation with a null options model (negative test) + // Test the replaceSubnetRoutingTable operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetSecurityGroupRuleNoOptions() throws Throwable { + public void testReplaceSubnetRoutingTableNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getSecurityGroupRule(null).execute(); + vpcService.replaceSubnetRoutingTable(null).execute(); } - // Test the updateSecurityGroupRule operation with a valid options model parameter + // Test the setSubnetPublicGateway operation with a valid options model parameter @Test - public void testUpdateSecurityGroupRuleWOptions() throws Throwable { + public void testSetSubnetPublicGatewayWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"id\": \"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"ip_version\": \"ipv4\", \"local\": {\"address\": \"192.168.3.4\"}, \"remote\": {\"address\": \"192.168.3.4\"}, \"protocol\": \"all\"}"; - String updateSecurityGroupRulePath = "/security_groups/testString/rules/testString"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"floating_ip\": {\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"id\": \"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"name\": \"my-public-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"public_gateway\", \"status\": \"available\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String setSubnetPublicGatewayPath = "/subnets/testString/public_gateway"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the SecurityGroupRuleLocalPatchIP model - SecurityGroupRuleLocalPatchIP securityGroupRuleLocalPatchModel = new SecurityGroupRuleLocalPatchIP.Builder() - .address("192.168.3.4") - .build(); - - // Construct an instance of the SecurityGroupRuleRemotePatchCIDR model - SecurityGroupRuleRemotePatchCIDR securityGroupRuleRemotePatchModel = new SecurityGroupRuleRemotePatchCIDR.Builder() - .cidrBlock("10.0.0.0/8") - .build(); - - // Construct an instance of the SecurityGroupRulePatch model - SecurityGroupRulePatch securityGroupRulePatchModel = new SecurityGroupRulePatch.Builder() - .code(Long.valueOf("0")) - .direction("inbound") - .ipVersion("ipv4") - .local(securityGroupRuleLocalPatchModel) - .portMax(Long.valueOf("22")) - .portMin(Long.valueOf("22")) - .remote(securityGroupRuleRemotePatchModel) - .type(Long.valueOf("8")) + // Construct an instance of the PublicGatewayIdentityPublicGatewayIdentityById model + PublicGatewayIdentityPublicGatewayIdentityById publicGatewayIdentityModel = new PublicGatewayIdentityPublicGatewayIdentityById.Builder() + .id("r006-dc5431ef-1fc6-4861-adc9-a59d077d1241") .build(); - Map securityGroupRulePatchModelAsPatch = securityGroupRulePatchModel.asPatch(); - // Construct an instance of the UpdateSecurityGroupRuleOptions model - UpdateSecurityGroupRuleOptions updateSecurityGroupRuleOptionsModel = new UpdateSecurityGroupRuleOptions.Builder() - .securityGroupId("testString") + // Construct an instance of the SetSubnetPublicGatewayOptions model + SetSubnetPublicGatewayOptions setSubnetPublicGatewayOptionsModel = new SetSubnetPublicGatewayOptions.Builder() .id("testString") - .securityGroupRulePatch(securityGroupRulePatchModelAsPatch) + .publicGatewayIdentity(publicGatewayIdentityModel) .build(); - // Invoke updateSecurityGroupRule() with a valid options model and verify the result - Response response = vpcService.updateSecurityGroupRule(updateSecurityGroupRuleOptionsModel).execute(); + // Invoke setSubnetPublicGateway() with a valid options model and verify the result + Response response = vpcService.setSubnetPublicGateway(setSubnetPublicGatewayOptionsModel).execute(); assertNotNull(response); - SecurityGroupRule responseObj = response.getResult(); + PublicGateway responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "PUT"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateSecurityGroupRulePath); + assertEquals(parsedPath, setSubnetPublicGatewayPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateSecurityGroupRule operation with and without retries enabled + // Test the setSubnetPublicGateway operation with and without retries enabled @Test - public void testUpdateSecurityGroupRuleWRetries() throws Throwable { + public void testSetSubnetPublicGatewayWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateSecurityGroupRuleWOptions(); + testSetSubnetPublicGatewayWOptions(); vpcService.disableRetries(); - testUpdateSecurityGroupRuleWOptions(); + testSetSubnetPublicGatewayWOptions(); } - // Test the updateSecurityGroupRule operation with a null options model (negative test) + // Test the setSubnetPublicGateway operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateSecurityGroupRuleNoOptions() throws Throwable { + public void testSetSubnetPublicGatewayNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateSecurityGroupRule(null).execute(); + vpcService.setSubnetPublicGateway(null).execute(); } - // Test the listSecurityGroupTargets operation with a valid options model parameter + // Test the unsetSubnetPublicGateway operation with a valid options model parameter @Test - public void testListSecurityGroupTargetsWOptions() throws Throwable { + public void testUnsetSubnetPublicGatewayWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"targets\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"resource_type\": \"network_interface\"}], \"total_count\": 132}"; - String listSecurityGroupTargetsPath = "/security_groups/testString/targets"; + String mockResponseBody = ""; + String unsetSubnetPublicGatewayPath = "/subnets/testString/public_gateway"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the ListSecurityGroupTargetsOptions model - ListSecurityGroupTargetsOptions listSecurityGroupTargetsOptionsModel = new ListSecurityGroupTargetsOptions.Builder() - .securityGroupId("testString") - .start("testString") - .limit(Long.valueOf("10")) + // Construct an instance of the UnsetSubnetPublicGatewayOptions model + UnsetSubnetPublicGatewayOptions unsetSubnetPublicGatewayOptionsModel = new UnsetSubnetPublicGatewayOptions.Builder() + .id("testString") .build(); - // Invoke listSecurityGroupTargets() with a valid options model and verify the result - Response response = vpcService.listSecurityGroupTargets(listSecurityGroupTargetsOptionsModel).execute(); + // Invoke unsetSubnetPublicGateway() with a valid options model and verify the result + Response response = vpcService.unsetSubnetPublicGateway(unsetSubnetPublicGatewayOptionsModel).execute(); assertNotNull(response); - SecurityGroupTargetCollection responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listSecurityGroupTargetsPath); + assertEquals(parsedPath, unsetSubnetPublicGatewayPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the listSecurityGroupTargets operation with and without retries enabled + // Test the unsetSubnetPublicGateway operation with and without retries enabled @Test - public void testListSecurityGroupTargetsWRetries() throws Throwable { + public void testUnsetSubnetPublicGatewayWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListSecurityGroupTargetsWOptions(); + testUnsetSubnetPublicGatewayWOptions(); vpcService.disableRetries(); - testListSecurityGroupTargetsWOptions(); + testUnsetSubnetPublicGatewayWOptions(); } - // Test the listSecurityGroupTargets operation with a null options model (negative test) + // Test the unsetSubnetPublicGateway operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListSecurityGroupTargetsNoOptions() throws Throwable { + public void testUnsetSubnetPublicGatewayNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listSecurityGroupTargets(null).execute(); - } - - // Test the listSecurityGroupTargets operation using the SecurityGroupTargetsPager.getNext() method - @Test - public void testListSecurityGroupTargetsWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"targets\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"resource_type\":\"network_interface\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"targets\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"resource_type\":\"network_interface\"}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListSecurityGroupTargetsOptions listSecurityGroupTargetsOptions = new ListSecurityGroupTargetsOptions.Builder() - .securityGroupId("testString") - .limit(Long.valueOf("10")) - .build(); - - List allResults = new ArrayList<>(); - SecurityGroupTargetsPager pager = new SecurityGroupTargetsPager(vpcService, listSecurityGroupTargetsOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); - } - - // Test the listSecurityGroupTargets operation using the SecurityGroupTargetsPager.getAll() method - @Test - public void testListSecurityGroupTargetsWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"targets\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"resource_type\":\"network_interface\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"targets\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"id\":\"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\",\"name\":\"my-bare-metal-server-network-interface\",\"resource_type\":\"network_interface\"}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListSecurityGroupTargetsOptions listSecurityGroupTargetsOptions = new ListSecurityGroupTargetsOptions.Builder() - .securityGroupId("testString") - .limit(Long.valueOf("10")) - .build(); - - SecurityGroupTargetsPager pager = new SecurityGroupTargetsPager(vpcService, listSecurityGroupTargetsOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the deleteSecurityGroupTargetBinding operation with a valid options model parameter + vpcService.unsetSubnetPublicGateway(null).execute(); + } + + // Test the updateSubnet operation with a valid options model parameter @Test - public void testDeleteSecurityGroupTargetBindingWOptions() throws Throwable { + public void testUpdateSubnetWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteSecurityGroupTargetBindingPath = "/security_groups/testString/targets/testString"; + String mockResponseBody = "{\"available_ipv4_address_count\": 15, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"ip_version\": \"ipv4\", \"ipv4_cidr_block\": \"10.0.0.0/24\", \"name\": \"my-subnet\", \"network_acl\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\"}, \"public_gateway\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"id\": \"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241\", \"name\": \"my-public-gateway\", \"resource_type\": \"public_gateway\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"subnet\", \"routing_table\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"name\": \"my-routing-table-1\", \"resource_type\": \"routing_table\"}, \"status\": \"available\", \"total_ipv4_address_count\": 256, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String updateSubnetPath = "/subnets/testString"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteSecurityGroupTargetBindingOptions model - DeleteSecurityGroupTargetBindingOptions deleteSecurityGroupTargetBindingOptionsModel = new DeleteSecurityGroupTargetBindingOptions.Builder() - .securityGroupId("testString") + // Construct an instance of the NetworkACLIdentityById model + NetworkACLIdentityById networkAclIdentityModel = new NetworkACLIdentityById.Builder() + .id("r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf") + .build(); + + // Construct an instance of the SubnetPublicGatewayPatchPublicGatewayIdentityById model + SubnetPublicGatewayPatchPublicGatewayIdentityById subnetPublicGatewayPatchModel = new SubnetPublicGatewayPatchPublicGatewayIdentityById.Builder() + .id("r006-dc5431ef-1fc6-4861-adc9-a59d077d1241") + .build(); + + // Construct an instance of the RoutingTableIdentityByCRN model + RoutingTableIdentityByCRN routingTableIdentityModel = new RoutingTableIdentityByCRN.Builder() + .crn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840") + .build(); + + // Construct an instance of the SubnetPatch model + SubnetPatch subnetPatchModel = new SubnetPatch.Builder() + .name("my-subnet") + .networkAcl(networkAclIdentityModel) + .publicGateway(subnetPublicGatewayPatchModel) + .routingTable(routingTableIdentityModel) + .build(); + Map subnetPatchModelAsPatch = subnetPatchModel.asPatch(); + + // Construct an instance of the UpdateSubnetOptions model + UpdateSubnetOptions updateSubnetOptionsModel = new UpdateSubnetOptions.Builder() .id("testString") + .subnetPatch(subnetPatchModelAsPatch) .build(); - // Invoke deleteSecurityGroupTargetBinding() with a valid options model and verify the result - Response response = vpcService.deleteSecurityGroupTargetBinding(deleteSecurityGroupTargetBindingOptionsModel).execute(); + // Invoke updateSubnet() with a valid options model and verify the result + Response response = vpcService.updateSubnet(updateSubnetOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + Subnet 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(), "DELETE"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteSecurityGroupTargetBindingPath); + assertEquals(parsedPath, updateSubnetPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteSecurityGroupTargetBinding operation with and without retries enabled + // Test the updateSubnet operation with and without retries enabled @Test - public void testDeleteSecurityGroupTargetBindingWRetries() throws Throwable { + public void testUpdateSubnetWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteSecurityGroupTargetBindingWOptions(); + testUpdateSubnetWOptions(); vpcService.disableRetries(); - testDeleteSecurityGroupTargetBindingWOptions(); + testUpdateSubnetWOptions(); } - // Test the deleteSecurityGroupTargetBinding operation with a null options model (negative test) + // Test the updateSubnet operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteSecurityGroupTargetBindingNoOptions() throws Throwable { + public void testUpdateSubnetNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteSecurityGroupTargetBinding(null).execute(); + vpcService.updateSubnet(null).execute(); } - // Test the getSecurityGroupTarget operation with a valid options model parameter + // Test the updateSubnetReservedIp operation with a valid options model parameter @Test - public void testGetSecurityGroupTargetWOptions() throws Throwable { + public void testUpdateSubnetReservedIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"resource_type\": \"network_interface\"}"; - String getSecurityGroupTargetPath = "/security_groups/testString/targets/testString"; + String mockResponseBody = "{\"address\": \"192.168.3.4\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"lifecycle_state\": \"stable\", \"name\": \"my-reserved-ip\", \"owner\": \"provider\", \"resource_type\": \"subnet_reserved_ip\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"resource_type\": \"endpoint_gateway\"}}"; + String updateSubnetReservedIpPath = "/subnets/testString/reserved_ips/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetSecurityGroupTargetOptions model - GetSecurityGroupTargetOptions getSecurityGroupTargetOptionsModel = new GetSecurityGroupTargetOptions.Builder() - .securityGroupId("testString") + // Construct an instance of the ReservedIPPatch model + ReservedIPPatch reservedIpPatchModel = new ReservedIPPatch.Builder() + .autoDelete(false) + .name("my-reserved-ip-updated") + .build(); + Map reservedIpPatchModelAsPatch = reservedIpPatchModel.asPatch(); + + // Construct an instance of the UpdateSubnetReservedIpOptions model + UpdateSubnetReservedIpOptions updateSubnetReservedIpOptionsModel = new UpdateSubnetReservedIpOptions.Builder() + .subnetId("testString") .id("testString") + .reservedIpPatch(reservedIpPatchModelAsPatch) .build(); - // Invoke getSecurityGroupTarget() with a valid options model and verify the result - Response response = vpcService.getSecurityGroupTarget(getSecurityGroupTargetOptionsModel).execute(); + // Invoke updateSubnetReservedIp() with a valid options model and verify the result + Response response = vpcService.updateSubnetReservedIp(updateSubnetReservedIpOptionsModel).execute(); assertNotNull(response); - SecurityGroupTargetReference responseObj = response.getResult(); + ReservedIP responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getSecurityGroupTargetPath); + assertEquals(parsedPath, updateSubnetReservedIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getSecurityGroupTarget operation with and without retries enabled + // Test the updateSubnetReservedIp operation with and without retries enabled @Test - public void testGetSecurityGroupTargetWRetries() throws Throwable { + public void testUpdateSubnetReservedIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetSecurityGroupTargetWOptions(); + testUpdateSubnetReservedIpWOptions(); vpcService.disableRetries(); - testGetSecurityGroupTargetWOptions(); + testUpdateSubnetReservedIpWOptions(); } - // Test the getSecurityGroupTarget operation with a null options model (negative test) + // Test the updateSubnetReservedIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetSecurityGroupTargetNoOptions() throws Throwable { + public void testUpdateSubnetReservedIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getSecurityGroupTarget(null).execute(); + vpcService.updateSubnetReservedIp(null).execute(); } - // Test the createSecurityGroupTargetBinding operation with a valid options model parameter + // Test the addNetworkInterfaceFloatingIp operation with a valid options model parameter @Test - public void testCreateSecurityGroupTargetBindingWOptions() throws Throwable { + public void testAddNetworkInterfaceFloatingIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"resource_type\": \"network_interface\"}"; - String createSecurityGroupTargetBindingPath = "/security_groups/testString/targets/testString"; + String mockResponseBody = "{\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}"; + String addNetworkInterfaceFloatingIpPath = "/virtual_network_interfaces/testString/floating_ips/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the CreateSecurityGroupTargetBindingOptions model - CreateSecurityGroupTargetBindingOptions createSecurityGroupTargetBindingOptionsModel = new CreateSecurityGroupTargetBindingOptions.Builder() - .securityGroupId("testString") + // Construct an instance of the AddNetworkInterfaceFloatingIpOptions model + AddNetworkInterfaceFloatingIpOptions addNetworkInterfaceFloatingIpOptionsModel = new AddNetworkInterfaceFloatingIpOptions.Builder() + .virtualNetworkInterfaceId("testString") .id("testString") .build(); - // Invoke createSecurityGroupTargetBinding() with a valid options model and verify the result - Response response = vpcService.createSecurityGroupTargetBinding(createSecurityGroupTargetBindingOptionsModel).execute(); + // Invoke addNetworkInterfaceFloatingIp() with a valid options model and verify the result + Response response = vpcService.addNetworkInterfaceFloatingIp(addNetworkInterfaceFloatingIpOptionsModel).execute(); assertNotNull(response); - SecurityGroupTargetReference responseObj = response.getResult(); + FloatingIPReference responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -26037,173 +27316,139 @@ public void testCreateSecurityGroupTargetBindingWOptions() throws Throwable { assertEquals(request.getMethod(), "PUT"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createSecurityGroupTargetBindingPath); + assertEquals(parsedPath, addNetworkInterfaceFloatingIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createSecurityGroupTargetBinding operation with and without retries enabled + // Test the addNetworkInterfaceFloatingIp operation with and without retries enabled @Test - public void testCreateSecurityGroupTargetBindingWRetries() throws Throwable { + public void testAddNetworkInterfaceFloatingIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateSecurityGroupTargetBindingWOptions(); + testAddNetworkInterfaceFloatingIpWOptions(); vpcService.disableRetries(); - testCreateSecurityGroupTargetBindingWOptions(); + testAddNetworkInterfaceFloatingIpWOptions(); } - // Test the createSecurityGroupTargetBinding operation with a null options model (negative test) + // Test the addNetworkInterfaceFloatingIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateSecurityGroupTargetBindingNoOptions() throws Throwable { + public void testAddNetworkInterfaceFloatingIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createSecurityGroupTargetBinding(null).execute(); + vpcService.addNetworkInterfaceFloatingIp(null).execute(); } - // Test the listIkePolicies operation with a valid options model parameter + // Test the addVirtualNetworkInterfaceIp operation with a valid options model parameter @Test - public void testListIkePoliciesWOptions() throws Throwable { + public void testAddVirtualNetworkInterfaceIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"ike_policies\": [{\"authentication_algorithm\": \"md5\", \"connections\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"name\": \"my-vpn-gateway-connection\", \"resource_type\": \"vpn_gateway_connection\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"dh_group\": 14, \"encryption_algorithm\": \"aes128\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"id\": \"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"ike_version\": 1, \"key_lifetime\": 28800, \"name\": \"my-ike-policy\", \"negotiation_mode\": \"main\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"ike_policy\"}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listIkePoliciesPath = "/ike_policies"; + String mockResponseBody = "{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}"; + String addVirtualNetworkInterfaceIpPath = "/virtual_network_interfaces/testString/ips/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListIkePoliciesOptions model - ListIkePoliciesOptions listIkePoliciesOptionsModel = new ListIkePoliciesOptions.Builder() - .start("testString") - .limit(Long.valueOf("10")) + // Construct an instance of the AddVirtualNetworkInterfaceIpOptions model + AddVirtualNetworkInterfaceIpOptions addVirtualNetworkInterfaceIpOptionsModel = new AddVirtualNetworkInterfaceIpOptions.Builder() + .virtualNetworkInterfaceId("testString") + .id("testString") .build(); - // Invoke listIkePolicies() with a valid options model and verify the result - Response response = vpcService.listIkePolicies(listIkePoliciesOptionsModel).execute(); + // Invoke addVirtualNetworkInterfaceIp() with a valid options model and verify the result + Response response = vpcService.addVirtualNetworkInterfaceIp(addVirtualNetworkInterfaceIpOptionsModel).execute(); assertNotNull(response); - IKEPolicyCollection responseObj = response.getResult(); + ReservedIPReference responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PUT"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listIkePoliciesPath); + assertEquals(parsedPath, addVirtualNetworkInterfaceIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the listIkePolicies operation with and without retries enabled + // Test the addVirtualNetworkInterfaceIp operation with and without retries enabled @Test - public void testListIkePoliciesWRetries() throws Throwable { + public void testAddVirtualNetworkInterfaceIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListIkePoliciesWOptions(); + testAddVirtualNetworkInterfaceIpWOptions(); vpcService.disableRetries(); - testListIkePoliciesWOptions(); + testAddVirtualNetworkInterfaceIpWOptions(); } - // Test the listIkePolicies operation using the IkePoliciesPager.getNext() method - @Test - public void testListIkePoliciesWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"ike_policies\":[{\"authentication_algorithm\":\"md5\",\"connections\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"name\":\"my-vpn-gateway-connection\",\"resource_type\":\"vpn_gateway_connection\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dh_group\":14,\"encryption_algorithm\":\"aes128\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"ike_version\":1,\"key_lifetime\":28800,\"name\":\"my-ike-policy\",\"negotiation_mode\":\"main\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"ike_policy\"}],\"limit\":1}"; - String mockResponsePage2 = "{\"total_count\":2,\"ike_policies\":[{\"authentication_algorithm\":\"md5\",\"connections\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"name\":\"my-vpn-gateway-connection\",\"resource_type\":\"vpn_gateway_connection\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dh_group\":14,\"encryption_algorithm\":\"aes128\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"ike_version\":1,\"key_lifetime\":28800,\"name\":\"my-ike-policy\",\"negotiation_mode\":\"main\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"ike_policy\"}],\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListIkePoliciesOptions listIkePoliciesOptions = new ListIkePoliciesOptions.Builder() - .limit(Long.valueOf("10")) - .build(); - - List allResults = new ArrayList<>(); - IkePoliciesPager pager = new IkePoliciesPager(vpcService, listIkePoliciesOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + // Test the addVirtualNetworkInterfaceIp operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testAddVirtualNetworkInterfaceIpNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.addVirtualNetworkInterfaceIp(null).execute(); } - - // Test the listIkePolicies operation using the IkePoliciesPager.getAll() method - @Test - public void testListIkePoliciesWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"ike_policies\":[{\"authentication_algorithm\":\"md5\",\"connections\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"name\":\"my-vpn-gateway-connection\",\"resource_type\":\"vpn_gateway_connection\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dh_group\":14,\"encryption_algorithm\":\"aes128\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"ike_version\":1,\"key_lifetime\":28800,\"name\":\"my-ike-policy\",\"negotiation_mode\":\"main\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"ike_policy\"}],\"limit\":1}"; - String mockResponsePage2 = "{\"total_count\":2,\"ike_policies\":[{\"authentication_algorithm\":\"md5\",\"connections\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"name\":\"my-vpn-gateway-connection\",\"resource_type\":\"vpn_gateway_connection\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dh_group\":14,\"encryption_algorithm\":\"aes128\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"ike_version\":1,\"key_lifetime\":28800,\"name\":\"my-ike-policy\",\"negotiation_mode\":\"main\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"ike_policy\"}],\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListIkePoliciesOptions listIkePoliciesOptions = new ListIkePoliciesOptions.Builder() - .limit(Long.valueOf("10")) - .build(); - IkePoliciesPager pager = new IkePoliciesPager(vpcService, listIkePoliciesOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the createIkePolicy operation with a valid options model parameter + // Test the createVirtualNetworkInterface operation with a valid options model parameter @Test - public void testCreateIkePolicyWOptions() throws Throwable { + public void testCreateVirtualNetworkInterfaceWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"authentication_algorithm\": \"md5\", \"connections\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"name\": \"my-vpn-gateway-connection\", \"resource_type\": \"vpn_gateway_connection\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"dh_group\": 14, \"encryption_algorithm\": \"aes128\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"id\": \"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"ike_version\": 1, \"key_lifetime\": 28800, \"name\": \"my-ike-policy\", \"negotiation_mode\": \"main\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"ike_policy\"}"; - String createIkePolicyPath = "/ike_policies"; + String mockResponseBody = "{\"allow_ip_spoofing\": true, \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"enable_infrastructure_nat\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"lifecycle_state\": \"stable\", \"mac_address\": \"02:00:4D:45:45:4D\", \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"virtual_network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"name\": \"my-share-mount-target\", \"resource_type\": \"share_mount_target\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String createVirtualNetworkInterfacePath = "/virtual_network_interfaces"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(201) .setBody(mockResponseBody)); + // Construct an instance of the VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById model + VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById virtualNetworkInterfaceIpPrototypeModel = new VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById.Builder() + .id("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + .build(); + + // Construct an instance of the VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById model + VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById virtualNetworkInterfacePrimaryIpPrototypeModel = new VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById.Builder() + .id("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + .build(); + // Construct an instance of the ResourceGroupIdentityById model ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() .id("fee82deba12e4c0fb69c3b09d1f12345") .build(); - // Construct an instance of the CreateIkePolicyOptions model - CreateIkePolicyOptions createIkePolicyOptionsModel = new CreateIkePolicyOptions.Builder() - .authenticationAlgorithm("sha256") - .dhGroup(Long.valueOf("14")) - .encryptionAlgorithm("aes128") - .ikeVersion(Long.valueOf("1")) - .keyLifetime(Long.valueOf("28800")) - .name("my-ike-policy") + // Construct an instance of the SecurityGroupIdentityById model + SecurityGroupIdentityById securityGroupIdentityModel = new SecurityGroupIdentityById.Builder() + .id("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + .build(); + + // Construct an instance of the SubnetIdentityById model + SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() + .id("69e55145-cc7d-4d8e-9e1f-cc3fb60b1793") + .build(); + + // Construct an instance of the CreateVirtualNetworkInterfaceOptions model + CreateVirtualNetworkInterfaceOptions createVirtualNetworkInterfaceOptionsModel = new CreateVirtualNetworkInterfaceOptions.Builder() + .allowIpSpoofing(false) + .autoDelete(false) + .enableInfrastructureNat(true) + .ips(java.util.Arrays.asList(virtualNetworkInterfaceIpPrototypeModel)) + .name("my-virtual-network-interface") + .primaryIp(virtualNetworkInterfacePrimaryIpPrototypeModel) + .protocolStateFilteringMode("auto") .resourceGroup(resourceGroupIdentityModel) + .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) + .subnet(subnetIdentityModel) .build(); - // Invoke createIkePolicy() with a valid options model and verify the result - Response response = vpcService.createIkePolicy(createIkePolicyOptionsModel).execute(); + // Invoke createVirtualNetworkInterface() with a valid options model and verify the result + Response response = vpcService.createVirtualNetworkInterface(createVirtualNetworkInterfaceOptionsModel).execute(); assertNotNull(response); - IKEPolicy responseObj = response.getResult(); + VirtualNetworkInterface responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -26212,103 +27457,151 @@ public void testCreateIkePolicyWOptions() throws Throwable { assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createIkePolicyPath); + assertEquals(parsedPath, createVirtualNetworkInterfacePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createIkePolicy operation with and without retries enabled + // Test the createVirtualNetworkInterface operation with and without retries enabled @Test - public void testCreateIkePolicyWRetries() throws Throwable { + public void testCreateVirtualNetworkInterfaceWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateIkePolicyWOptions(); + testCreateVirtualNetworkInterfaceWOptions(); vpcService.disableRetries(); - testCreateIkePolicyWOptions(); + testCreateVirtualNetworkInterfaceWOptions(); } - // Test the createIkePolicy operation with a null options model (negative test) + // Test the deleteVirtualNetworkInterfaces operation with a valid options model parameter + @Test + public void testDeleteVirtualNetworkInterfacesWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"allow_ip_spoofing\": true, \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"enable_infrastructure_nat\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"lifecycle_state\": \"stable\", \"mac_address\": \"02:00:4D:45:45:4D\", \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"virtual_network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"name\": \"my-share-mount-target\", \"resource_type\": \"share_mount_target\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String deleteVirtualNetworkInterfacesPath = "/virtual_network_interfaces/testString"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(202) + .setBody(mockResponseBody)); + + // Construct an instance of the DeleteVirtualNetworkInterfacesOptions model + DeleteVirtualNetworkInterfacesOptions deleteVirtualNetworkInterfacesOptionsModel = new DeleteVirtualNetworkInterfacesOptions.Builder() + .id("testString") + .build(); + + // Invoke deleteVirtualNetworkInterfaces() with a valid options model and verify the result + Response response = vpcService.deleteVirtualNetworkInterfaces(deleteVirtualNetworkInterfacesOptionsModel).execute(); + assertNotNull(response); + VirtualNetworkInterface 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(), "DELETE"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, deleteVirtualNetworkInterfacesPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } + + // Test the deleteVirtualNetworkInterfaces operation with and without retries enabled + @Test + public void testDeleteVirtualNetworkInterfacesWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testDeleteVirtualNetworkInterfacesWOptions(); + + vpcService.disableRetries(); + testDeleteVirtualNetworkInterfacesWOptions(); + } + + // Test the deleteVirtualNetworkInterfaces operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateIkePolicyNoOptions() throws Throwable { + public void testDeleteVirtualNetworkInterfacesNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createIkePolicy(null).execute(); + vpcService.deleteVirtualNetworkInterfaces(null).execute(); } - // Test the deleteIkePolicy operation with a valid options model parameter + // Test the getNetworkInterfaceFloatingIp operation with a valid options model parameter @Test - public void testDeleteIkePolicyWOptions() throws Throwable { + public void testGetNetworkInterfaceFloatingIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteIkePolicyPath = "/ike_policies/testString"; + String mockResponseBody = "{\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}"; + String getNetworkInterfaceFloatingIpPath = "/virtual_network_interfaces/testString/floating_ips/testString"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteIkePolicyOptions model - DeleteIkePolicyOptions deleteIkePolicyOptionsModel = new DeleteIkePolicyOptions.Builder() + // Construct an instance of the GetNetworkInterfaceFloatingIpOptions model + GetNetworkInterfaceFloatingIpOptions getNetworkInterfaceFloatingIpOptionsModel = new GetNetworkInterfaceFloatingIpOptions.Builder() + .virtualNetworkInterfaceId("testString") .id("testString") .build(); - // Invoke deleteIkePolicy() with a valid options model and verify the result - Response response = vpcService.deleteIkePolicy(deleteIkePolicyOptionsModel).execute(); + // Invoke getNetworkInterfaceFloatingIp() with a valid options model and verify the result + Response response = vpcService.getNetworkInterfaceFloatingIp(getNetworkInterfaceFloatingIpOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + FloatingIPReference 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteIkePolicyPath); + assertEquals(parsedPath, getNetworkInterfaceFloatingIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteIkePolicy operation with and without retries enabled + // Test the getNetworkInterfaceFloatingIp operation with and without retries enabled @Test - public void testDeleteIkePolicyWRetries() throws Throwable { + public void testGetNetworkInterfaceFloatingIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteIkePolicyWOptions(); + testGetNetworkInterfaceFloatingIpWOptions(); vpcService.disableRetries(); - testDeleteIkePolicyWOptions(); + testGetNetworkInterfaceFloatingIpWOptions(); } - // Test the deleteIkePolicy operation with a null options model (negative test) + // Test the getNetworkInterfaceFloatingIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteIkePolicyNoOptions() throws Throwable { + public void testGetNetworkInterfaceFloatingIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteIkePolicy(null).execute(); + vpcService.getNetworkInterfaceFloatingIp(null).execute(); } - // Test the getIkePolicy operation with a valid options model parameter + // Test the getVirtualNetworkInterface operation with a valid options model parameter @Test - public void testGetIkePolicyWOptions() throws Throwable { + public void testGetVirtualNetworkInterfaceWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"authentication_algorithm\": \"md5\", \"connections\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"name\": \"my-vpn-gateway-connection\", \"resource_type\": \"vpn_gateway_connection\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"dh_group\": 14, \"encryption_algorithm\": \"aes128\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"id\": \"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"ike_version\": 1, \"key_lifetime\": 28800, \"name\": \"my-ike-policy\", \"negotiation_mode\": \"main\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"ike_policy\"}"; - String getIkePolicyPath = "/ike_policies/testString"; + String mockResponseBody = "{\"allow_ip_spoofing\": true, \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"enable_infrastructure_nat\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"lifecycle_state\": \"stable\", \"mac_address\": \"02:00:4D:45:45:4D\", \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"virtual_network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"name\": \"my-share-mount-target\", \"resource_type\": \"share_mount_target\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String getVirtualNetworkInterfacePath = "/virtual_network_interfaces/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetIkePolicyOptions model - GetIkePolicyOptions getIkePolicyOptionsModel = new GetIkePolicyOptions.Builder() + // Construct an instance of the GetVirtualNetworkInterfaceOptions model + GetVirtualNetworkInterfaceOptions getVirtualNetworkInterfaceOptionsModel = new GetVirtualNetworkInterfaceOptions.Builder() .id("testString") .build(); - // Invoke getIkePolicy() with a valid options model and verify the result - Response response = vpcService.getIkePolicy(getIkePolicyOptionsModel).execute(); + // Invoke getVirtualNetworkInterface() with a valid options model and verify the result + Response response = vpcService.getVirtualNetworkInterface(getVirtualNetworkInterfaceOptionsModel).execute(); assertNotNull(response); - IKEPolicy responseObj = response.getResult(); + VirtualNetworkInterface responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -26317,118 +27610,108 @@ public void testGetIkePolicyWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getIkePolicyPath); + assertEquals(parsedPath, getVirtualNetworkInterfacePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getIkePolicy operation with and without retries enabled + // Test the getVirtualNetworkInterface operation with and without retries enabled @Test - public void testGetIkePolicyWRetries() throws Throwable { + public void testGetVirtualNetworkInterfaceWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetIkePolicyWOptions(); + testGetVirtualNetworkInterfaceWOptions(); vpcService.disableRetries(); - testGetIkePolicyWOptions(); + testGetVirtualNetworkInterfaceWOptions(); } - // Test the getIkePolicy operation with a null options model (negative test) + // Test the getVirtualNetworkInterface operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetIkePolicyNoOptions() throws Throwable { + public void testGetVirtualNetworkInterfaceNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getIkePolicy(null).execute(); + vpcService.getVirtualNetworkInterface(null).execute(); } - // Test the updateIkePolicy operation with a valid options model parameter + // Test the getVirtualNetworkInterfaceIp operation with a valid options model parameter @Test - public void testUpdateIkePolicyWOptions() throws Throwable { + public void testGetVirtualNetworkInterfaceIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"authentication_algorithm\": \"md5\", \"connections\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"name\": \"my-vpn-gateway-connection\", \"resource_type\": \"vpn_gateway_connection\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"dh_group\": 14, \"encryption_algorithm\": \"aes128\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"id\": \"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"ike_version\": 1, \"key_lifetime\": 28800, \"name\": \"my-ike-policy\", \"negotiation_mode\": \"main\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"ike_policy\"}"; - String updateIkePolicyPath = "/ike_policies/testString"; + String mockResponseBody = "{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}"; + String getVirtualNetworkInterfaceIpPath = "/virtual_network_interfaces/testString/ips/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the IKEPolicyPatch model - IKEPolicyPatch ikePolicyPatchModel = new IKEPolicyPatch.Builder() - .authenticationAlgorithm("sha256") - .dhGroup(Long.valueOf("14")) - .encryptionAlgorithm("aes128") - .ikeVersion(Long.valueOf("1")) - .keyLifetime(Long.valueOf("86400")) - .name("my-ike-policy") - .build(); - Map ikePolicyPatchModelAsPatch = ikePolicyPatchModel.asPatch(); - - // Construct an instance of the UpdateIkePolicyOptions model - UpdateIkePolicyOptions updateIkePolicyOptionsModel = new UpdateIkePolicyOptions.Builder() + // Construct an instance of the GetVirtualNetworkInterfaceIpOptions model + GetVirtualNetworkInterfaceIpOptions getVirtualNetworkInterfaceIpOptionsModel = new GetVirtualNetworkInterfaceIpOptions.Builder() + .virtualNetworkInterfaceId("testString") .id("testString") - .ikePolicyPatch(ikePolicyPatchModelAsPatch) .build(); - // Invoke updateIkePolicy() with a valid options model and verify the result - Response response = vpcService.updateIkePolicy(updateIkePolicyOptionsModel).execute(); + // Invoke getVirtualNetworkInterfaceIp() with a valid options model and verify the result + Response response = vpcService.getVirtualNetworkInterfaceIp(getVirtualNetworkInterfaceIpOptionsModel).execute(); assertNotNull(response); - IKEPolicy responseObj = response.getResult(); + ReservedIPReference responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateIkePolicyPath); + assertEquals(parsedPath, getVirtualNetworkInterfaceIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateIkePolicy operation with and without retries enabled + // Test the getVirtualNetworkInterfaceIp operation with and without retries enabled @Test - public void testUpdateIkePolicyWRetries() throws Throwable { + public void testGetVirtualNetworkInterfaceIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateIkePolicyWOptions(); + testGetVirtualNetworkInterfaceIpWOptions(); vpcService.disableRetries(); - testUpdateIkePolicyWOptions(); + testGetVirtualNetworkInterfaceIpWOptions(); } - // Test the updateIkePolicy operation with a null options model (negative test) + // Test the getVirtualNetworkInterfaceIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateIkePolicyNoOptions() throws Throwable { + public void testGetVirtualNetworkInterfaceIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateIkePolicy(null).execute(); + vpcService.getVirtualNetworkInterfaceIp(null).execute(); } - // Test the listIkePolicyConnections operation with a valid options model parameter + // Test the listNetworkInterfaceFloatingIps operation with a valid options model parameter @Test - public void testListIkePolicyConnectionsWOptions() throws Throwable { + public void testListNetworkInterfaceFloatingIpsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"connections\": [{\"admin_state_up\": true, \"authentication_mode\": \"psk\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"dead_peer_detection\": {\"action\": \"restart\", \"interval\": 30, \"timeout\": 120}, \"establish_mode\": \"bidirectional\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"ike_policy\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"id\": \"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"name\": \"my-ike-policy\", \"resource_type\": \"ike_policy\"}, \"ipsec_policy\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"id\": \"r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"name\": \"my-ipsec-policy\", \"resource_type\": \"ipsec_policy\"}, \"mode\": \"policy\", \"name\": \"my-vpn-gateway-connection\", \"psk\": \"lkj14b1oi0alcniejkso\", \"resource_type\": \"vpn_gateway_connection\", \"status\": \"down\", \"status_reasons\": [{\"code\": \"cannot_authenticate_connection\", \"message\": \"Failed to authenticate a connection because of mismatched IKE ID and PSK.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}], \"distribute_traffic\": false, \"local\": {\"ike_identities\": [{\"type\": \"fqdn\", \"value\": \"my-service.example.com\"}]}, \"peer\": {\"ike_identity\": {\"type\": \"fqdn\", \"value\": \"my-service.example.com\"}, \"type\": \"address\", \"address\": \"192.0.2.5\"}, \"routing_protocol\": \"none\", \"tunnels\": [{\"public_ip\": {\"address\": \"192.168.3.4\"}, \"status\": \"down\", \"status_reasons\": [{\"code\": \"cannot_authenticate_connection\", \"message\": \"Failed to authenticate a connection because of mismatched IKE ID and PSK.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listIkePolicyConnectionsPath = "/ike_policies/testString/connections"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"floating_ips\": [{\"address\": \"203.0.113.1\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"id\": \"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\", \"name\": \"my-floating-ip\"}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listNetworkInterfaceFloatingIpsPath = "/virtual_network_interfaces/testString/floating_ips"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListIkePolicyConnectionsOptions model - ListIkePolicyConnectionsOptions listIkePolicyConnectionsOptionsModel = new ListIkePolicyConnectionsOptions.Builder() - .id("testString") + // Construct an instance of the ListNetworkInterfaceFloatingIpsOptions model + ListNetworkInterfaceFloatingIpsOptions listNetworkInterfaceFloatingIpsOptionsModel = new ListNetworkInterfaceFloatingIpsOptions.Builder() + .virtualNetworkInterfaceId("testString") .start("testString") .limit(Long.valueOf("10")) + .sort("name") .build(); - // Invoke listIkePolicyConnections() with a valid options model and verify the result - Response response = vpcService.listIkePolicyConnections(listIkePolicyConnectionsOptionsModel).execute(); + // Invoke listNetworkInterfaceFloatingIps() with a valid options model and verify the result + Response response = vpcService.listNetworkInterfaceFloatingIps(listNetworkInterfaceFloatingIpsOptionsModel).execute(); assertNotNull(response); - IKEPolicyConnectionCollection responseObj = response.getResult(); + FloatingIPCollectionVirtualNetworkInterfaceContext responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -26437,39 +27720,40 @@ public void testListIkePolicyConnectionsWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listIkePolicyConnectionsPath); + assertEquals(parsedPath, listNetworkInterfaceFloatingIpsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("sort"), "name"); } - // Test the listIkePolicyConnections operation with and without retries enabled + // Test the listNetworkInterfaceFloatingIps operation with and without retries enabled @Test - public void testListIkePolicyConnectionsWRetries() throws Throwable { + public void testListNetworkInterfaceFloatingIpsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListIkePolicyConnectionsWOptions(); + testListNetworkInterfaceFloatingIpsWOptions(); vpcService.disableRetries(); - testListIkePolicyConnectionsWOptions(); + testListNetworkInterfaceFloatingIpsWOptions(); } - // Test the listIkePolicyConnections operation with a null options model (negative test) + // Test the listNetworkInterfaceFloatingIps operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListIkePolicyConnectionsNoOptions() throws Throwable { + public void testListNetworkInterfaceFloatingIpsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listIkePolicyConnections(null).execute(); + vpcService.listNetworkInterfaceFloatingIps(null).execute(); } - // Test the listIkePolicyConnections operation using the IkePolicyConnectionsPager.getNext() method + // Test the listNetworkInterfaceFloatingIps operation using the NetworkInterfaceFloatingIpsPager.getNext() method @Test - public void testListIkePolicyConnectionsWithPagerGetNext() throws Throwable { + public void testListNetworkInterfaceFloatingIpsWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"connections\":[{\"admin_state_up\":true,\"authentication_mode\":\"psk\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dead_peer_detection\":{\"action\":\"restart\",\"interval\":30,\"timeout\":120},\"establish_mode\":\"bidirectional\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"ike_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"name\":\"my-ike-policy\",\"resource_type\":\"ike_policy\"},\"ipsec_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"name\":\"my-ipsec-policy\",\"resource_type\":\"ipsec_policy\"},\"mode\":\"policy\",\"name\":\"my-vpn-gateway-connection\",\"psk\":\"lkj14b1oi0alcniejkso\",\"resource_type\":\"vpn_gateway_connection\",\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}],\"distribute_traffic\":false,\"local\":{\"ike_identities\":[{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"}]},\"peer\":{\"ike_identity\":{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"},\"type\":\"address\",\"address\":\"192.0.2.5\"},\"routing_protocol\":\"none\",\"tunnels\":[{\"public_ip\":{\"address\":\"192.168.3.4\"},\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"connections\":[{\"admin_state_up\":true,\"authentication_mode\":\"psk\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dead_peer_detection\":{\"action\":\"restart\",\"interval\":30,\"timeout\":120},\"establish_mode\":\"bidirectional\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"ike_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"name\":\"my-ike-policy\",\"resource_type\":\"ike_policy\"},\"ipsec_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"name\":\"my-ipsec-policy\",\"resource_type\":\"ipsec_policy\"},\"mode\":\"policy\",\"name\":\"my-vpn-gateway-connection\",\"psk\":\"lkj14b1oi0alcniejkso\",\"resource_type\":\"vpn_gateway_connection\",\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}],\"distribute_traffic\":false,\"local\":{\"ike_identities\":[{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"}]},\"peer\":{\"ike_identity\":{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"},\"type\":\"address\",\"address\":\"192.0.2.5\"},\"routing_protocol\":\"none\",\"tunnels\":[{\"public_ip\":{\"address\":\"192.168.3.4\"},\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"floating_ips\":[{\"address\":\"203.0.113.1\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"floating_ips\":[{\"address\":\"203.0.113.1\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\"}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -26483,27 +27767,28 @@ public void testListIkePolicyConnectionsWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListIkePolicyConnectionsOptions listIkePolicyConnectionsOptions = new ListIkePolicyConnectionsOptions.Builder() - .id("testString") + ListNetworkInterfaceFloatingIpsOptions listNetworkInterfaceFloatingIpsOptions = new ListNetworkInterfaceFloatingIpsOptions.Builder() + .virtualNetworkInterfaceId("testString") .limit(Long.valueOf("10")) + .sort("name") .build(); - List allResults = new ArrayList<>(); - IkePolicyConnectionsPager pager = new IkePolicyConnectionsPager(vpcService, listIkePolicyConnectionsOptions); + List allResults = new ArrayList<>(); + NetworkInterfaceFloatingIpsPager pager = new NetworkInterfaceFloatingIpsPager(vpcService, listNetworkInterfaceFloatingIpsOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listIkePolicyConnections operation using the IkePolicyConnectionsPager.getAll() method + // Test the listNetworkInterfaceFloatingIps operation using the NetworkInterfaceFloatingIpsPager.getAll() method @Test - public void testListIkePolicyConnectionsWithPagerGetAll() throws Throwable { + public void testListNetworkInterfaceFloatingIpsWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"connections\":[{\"admin_state_up\":true,\"authentication_mode\":\"psk\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dead_peer_detection\":{\"action\":\"restart\",\"interval\":30,\"timeout\":120},\"establish_mode\":\"bidirectional\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"ike_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"name\":\"my-ike-policy\",\"resource_type\":\"ike_policy\"},\"ipsec_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"name\":\"my-ipsec-policy\",\"resource_type\":\"ipsec_policy\"},\"mode\":\"policy\",\"name\":\"my-vpn-gateway-connection\",\"psk\":\"lkj14b1oi0alcniejkso\",\"resource_type\":\"vpn_gateway_connection\",\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}],\"distribute_traffic\":false,\"local\":{\"ike_identities\":[{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"}]},\"peer\":{\"ike_identity\":{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"},\"type\":\"address\",\"address\":\"192.0.2.5\"},\"routing_protocol\":\"none\",\"tunnels\":[{\"public_ip\":{\"address\":\"192.168.3.4\"},\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"connections\":[{\"admin_state_up\":true,\"authentication_mode\":\"psk\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dead_peer_detection\":{\"action\":\"restart\",\"interval\":30,\"timeout\":120},\"establish_mode\":\"bidirectional\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"ike_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"name\":\"my-ike-policy\",\"resource_type\":\"ike_policy\"},\"ipsec_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"name\":\"my-ipsec-policy\",\"resource_type\":\"ipsec_policy\"},\"mode\":\"policy\",\"name\":\"my-vpn-gateway-connection\",\"psk\":\"lkj14b1oi0alcniejkso\",\"resource_type\":\"vpn_gateway_connection\",\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}],\"distribute_traffic\":false,\"local\":{\"ike_identities\":[{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"}]},\"peer\":{\"ike_identity\":{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"},\"type\":\"address\",\"address\":\"192.0.2.5\"},\"routing_protocol\":\"none\",\"tunnels\":[{\"public_ip\":{\"address\":\"192.168.3.4\"},\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"floating_ips\":[{\"address\":\"203.0.113.1\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"floating_ips\":[{\"address\":\"203.0.113.1\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"id\":\"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd\",\"name\":\"my-floating-ip\"}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -26517,38 +27802,41 @@ public void testListIkePolicyConnectionsWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListIkePolicyConnectionsOptions listIkePolicyConnectionsOptions = new ListIkePolicyConnectionsOptions.Builder() - .id("testString") + ListNetworkInterfaceFloatingIpsOptions listNetworkInterfaceFloatingIpsOptions = new ListNetworkInterfaceFloatingIpsOptions.Builder() + .virtualNetworkInterfaceId("testString") .limit(Long.valueOf("10")) + .sort("name") .build(); - IkePolicyConnectionsPager pager = new IkePolicyConnectionsPager(vpcService, listIkePolicyConnectionsOptions); - List allResults = pager.getAll(); + NetworkInterfaceFloatingIpsPager pager = new NetworkInterfaceFloatingIpsPager(vpcService, listNetworkInterfaceFloatingIpsOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the listIpsecPolicies operation with a valid options model parameter + // Test the listVirtualNetworkInterfaceIps operation with a valid options model parameter @Test - public void testListIpsecPoliciesWOptions() throws Throwable { + public void testListVirtualNetworkInterfaceIpsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"ipsec_policies\": [{\"authentication_algorithm\": \"disabled\", \"connections\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"name\": \"my-vpn-gateway-connection\", \"resource_type\": \"vpn_gateway_connection\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"encapsulation_mode\": \"tunnel\", \"encryption_algorithm\": \"aes128\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"id\": \"r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"key_lifetime\": 3600, \"name\": \"my-ipsec-policy\", \"pfs\": \"disabled\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"ipsec_policy\", \"transform_protocol\": \"esp\"}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listIpsecPoliciesPath = "/ipsec_policies"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listVirtualNetworkInterfaceIpsPath = "/virtual_network_interfaces/testString/ips"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListIpsecPoliciesOptions model - ListIpsecPoliciesOptions listIpsecPoliciesOptionsModel = new ListIpsecPoliciesOptions.Builder() + // Construct an instance of the ListVirtualNetworkInterfaceIpsOptions model + ListVirtualNetworkInterfaceIpsOptions listVirtualNetworkInterfaceIpsOptionsModel = new ListVirtualNetworkInterfaceIpsOptions.Builder() + .virtualNetworkInterfaceId("testString") .start("testString") .limit(Long.valueOf("10")) + .sort("name") .build(); - // Invoke listIpsecPolicies() with a valid options model and verify the result - Response response = vpcService.listIpsecPolicies(listIpsecPoliciesOptionsModel).execute(); + // Invoke listVirtualNetworkInterfaceIps() with a valid options model and verify the result + Response response = vpcService.listVirtualNetworkInterfaceIps(listVirtualNetworkInterfaceIpsOptionsModel).execute(); assertNotNull(response); - IPsecPolicyCollection responseObj = response.getResult(); + ReservedIPCollectionVirtualNetworkInterfaceContext responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -26557,32 +27845,40 @@ public void testListIpsecPoliciesWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listIpsecPoliciesPath); + assertEquals(parsedPath, listVirtualNetworkInterfaceIpsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("sort"), "name"); } - // Test the listIpsecPolicies operation with and without retries enabled + // Test the listVirtualNetworkInterfaceIps operation with and without retries enabled @Test - public void testListIpsecPoliciesWRetries() throws Throwable { + public void testListVirtualNetworkInterfaceIpsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListIpsecPoliciesWOptions(); + testListVirtualNetworkInterfaceIpsWOptions(); vpcService.disableRetries(); - testListIpsecPoliciesWOptions(); + testListVirtualNetworkInterfaceIpsWOptions(); } - // Test the listIpsecPolicies operation using the IpsecPoliciesPager.getNext() method + // Test the listVirtualNetworkInterfaceIps operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testListVirtualNetworkInterfaceIpsNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.listVirtualNetworkInterfaceIps(null).execute(); + } + + // Test the listVirtualNetworkInterfaceIps operation using the VirtualNetworkInterfaceIpsPager.getNext() method @Test - public void testListIpsecPoliciesWithPagerGetNext() throws Throwable { + public void testListVirtualNetworkInterfaceIpsWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"ipsec_policies\":[{\"authentication_algorithm\":\"disabled\",\"connections\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"name\":\"my-vpn-gateway-connection\",\"resource_type\":\"vpn_gateway_connection\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"encapsulation_mode\":\"tunnel\",\"encryption_algorithm\":\"aes128\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"key_lifetime\":3600,\"name\":\"my-ipsec-policy\",\"pfs\":\"disabled\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"ipsec_policy\",\"transform_protocol\":\"esp\"}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"ipsec_policies\":[{\"authentication_algorithm\":\"disabled\",\"connections\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"name\":\"my-vpn-gateway-connection\",\"resource_type\":\"vpn_gateway_connection\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"encapsulation_mode\":\"tunnel\",\"encryption_algorithm\":\"aes128\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"key_lifetime\":3600,\"name\":\"my-ipsec-policy\",\"pfs\":\"disabled\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"ipsec_policy\",\"transform_protocol\":\"esp\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -26596,26 +27892,28 @@ public void testListIpsecPoliciesWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListIpsecPoliciesOptions listIpsecPoliciesOptions = new ListIpsecPoliciesOptions.Builder() + ListVirtualNetworkInterfaceIpsOptions listVirtualNetworkInterfaceIpsOptions = new ListVirtualNetworkInterfaceIpsOptions.Builder() + .virtualNetworkInterfaceId("testString") .limit(Long.valueOf("10")) + .sort("name") .build(); - List allResults = new ArrayList<>(); - IpsecPoliciesPager pager = new IpsecPoliciesPager(vpcService, listIpsecPoliciesOptions); + List allResults = new ArrayList<>(); + VirtualNetworkInterfaceIpsPager pager = new VirtualNetworkInterfaceIpsPager(vpcService, listVirtualNetworkInterfaceIpsOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listIpsecPolicies operation using the IpsecPoliciesPager.getAll() method + // Test the listVirtualNetworkInterfaceIps operation using the VirtualNetworkInterfaceIpsPager.getAll() method @Test - public void testListIpsecPoliciesWithPagerGetAll() throws Throwable { + public void testListVirtualNetworkInterfaceIpsWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"ipsec_policies\":[{\"authentication_algorithm\":\"disabled\",\"connections\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"name\":\"my-vpn-gateway-connection\",\"resource_type\":\"vpn_gateway_connection\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"encapsulation_mode\":\"tunnel\",\"encryption_algorithm\":\"aes128\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"key_lifetime\":3600,\"name\":\"my-ipsec-policy\",\"pfs\":\"disabled\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"ipsec_policy\",\"transform_protocol\":\"esp\"}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"ipsec_policies\":[{\"authentication_algorithm\":\"disabled\",\"connections\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"name\":\"my-vpn-gateway-connection\",\"resource_type\":\"vpn_gateway_connection\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"encapsulation_mode\":\"tunnel\",\"encryption_algorithm\":\"aes128\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"key_lifetime\":3600,\"name\":\"my-ipsec-policy\",\"pfs\":\"disabled\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"ipsec_policy\",\"transform_protocol\":\"esp\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -26629,530 +27927,356 @@ public void testListIpsecPoliciesWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListIpsecPoliciesOptions listIpsecPoliciesOptions = new ListIpsecPoliciesOptions.Builder() + ListVirtualNetworkInterfaceIpsOptions listVirtualNetworkInterfaceIpsOptions = new ListVirtualNetworkInterfaceIpsOptions.Builder() + .virtualNetworkInterfaceId("testString") .limit(Long.valueOf("10")) + .sort("name") .build(); - IpsecPoliciesPager pager = new IpsecPoliciesPager(vpcService, listIpsecPoliciesOptions); - List allResults = pager.getAll(); + VirtualNetworkInterfaceIpsPager pager = new VirtualNetworkInterfaceIpsPager(vpcService, listVirtualNetworkInterfaceIpsOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the createIpsecPolicy operation with a valid options model parameter + // Test the listVirtualNetworkInterfaces operation with a valid options model parameter @Test - public void testCreateIpsecPolicyWOptions() throws Throwable { + public void testListVirtualNetworkInterfacesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"authentication_algorithm\": \"disabled\", \"connections\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"name\": \"my-vpn-gateway-connection\", \"resource_type\": \"vpn_gateway_connection\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"encapsulation_mode\": \"tunnel\", \"encryption_algorithm\": \"aes128\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"id\": \"r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"key_lifetime\": 3600, \"name\": \"my-ipsec-policy\", \"pfs\": \"disabled\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"ipsec_policy\", \"transform_protocol\": \"esp\"}"; - String createIpsecPolicyPath = "/ipsec_policies"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132, \"virtual_network_interfaces\": [{\"allow_ip_spoofing\": true, \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"enable_infrastructure_nat\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"lifecycle_state\": \"stable\", \"mac_address\": \"02:00:4D:45:45:4D\", \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"virtual_network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"name\": \"my-share-mount-target\", \"resource_type\": \"share_mount_target\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}]}"; + String listVirtualNetworkInterfacesPath = "/virtual_network_interfaces"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); - - // Construct an instance of the CreateIpsecPolicyOptions model - CreateIpsecPolicyOptions createIpsecPolicyOptionsModel = new CreateIpsecPolicyOptions.Builder() - .authenticationAlgorithm("disabled") - .encryptionAlgorithm("aes128") - .pfs("disabled") - .keyLifetime(Long.valueOf("3600")) - .name("my-ipsec-policy") - .resourceGroup(resourceGroupIdentityModel) + // Construct an instance of the ListVirtualNetworkInterfacesOptions model + ListVirtualNetworkInterfacesOptions listVirtualNetworkInterfacesOptionsModel = new ListVirtualNetworkInterfacesOptions.Builder() + .start("testString") + .limit(Long.valueOf("10")) + .resourceGroupId("testString") .build(); - // Invoke createIpsecPolicy() with a valid options model and verify the result - Response response = vpcService.createIpsecPolicy(createIpsecPolicyOptionsModel).execute(); + // Invoke listVirtualNetworkInterfaces() with a valid options model and verify the result + Response response = vpcService.listVirtualNetworkInterfaces(listVirtualNetworkInterfacesOptionsModel).execute(); assertNotNull(response); - IPsecPolicy responseObj = response.getResult(); + VirtualNetworkInterfaceCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createIpsecPolicyPath); + assertEquals(parsedPath, listVirtualNetworkInterfacesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("resource_group.id"), "testString"); } - // Test the createIpsecPolicy operation with and without retries enabled + // Test the listVirtualNetworkInterfaces operation with and without retries enabled @Test - public void testCreateIpsecPolicyWRetries() throws Throwable { + public void testListVirtualNetworkInterfacesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateIpsecPolicyWOptions(); + testListVirtualNetworkInterfacesWOptions(); vpcService.disableRetries(); - testCreateIpsecPolicyWOptions(); - } - - // Test the createIpsecPolicy operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateIpsecPolicyNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.createIpsecPolicy(null).execute(); + testListVirtualNetworkInterfacesWOptions(); } - // Test the deleteIpsecPolicy operation with a valid options model parameter + // Test the listVirtualNetworkInterfaces operation using the VirtualNetworkInterfacesPager.getNext() method @Test - public void testDeleteIpsecPolicyWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = ""; - String deleteIpsecPolicyPath = "/ipsec_policies/testString"; + public void testListVirtualNetworkInterfacesWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"virtual_network_interfaces\":[{\"allow_ip_spoofing\":true,\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"enable_infrastructure_nat\":true,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"lifecycle_state\":\"stable\",\"mac_address\":\"02:00:4D:45:45:4D\",\"name\":\"my-virtual-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"protocol_state_filtering_mode\":\"auto\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"virtual_network_interface\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"id\":\"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"name\":\"my-share-mount-target\",\"resource_type\":\"share_mount_target\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"virtual_network_interfaces\":[{\"allow_ip_spoofing\":true,\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"enable_infrastructure_nat\":true,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"lifecycle_state\":\"stable\",\"mac_address\":\"02:00:4D:45:45:4D\",\"name\":\"my-virtual-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"protocol_state_filtering_mode\":\"auto\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"virtual_network_interface\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"id\":\"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"name\":\"my-share-mount-target\",\"resource_type\":\"share_mount_target\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() - .setResponseCode(204) - .setBody(mockResponseBody)); + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the DeleteIpsecPolicyOptions model - DeleteIpsecPolicyOptions deleteIpsecPolicyOptionsModel = new DeleteIpsecPolicyOptions.Builder() - .id("testString") + ListVirtualNetworkInterfacesOptions listVirtualNetworkInterfacesOptions = new ListVirtualNetworkInterfacesOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") .build(); - // Invoke deleteIpsecPolicy() with a valid options model and verify the result - Response response = vpcService.deleteIpsecPolicy(deleteIpsecPolicyOptionsModel).execute(); - assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteIpsecPolicyPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - } - - // Test the deleteIpsecPolicy operation with and without retries enabled - @Test - public void testDeleteIpsecPolicyWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testDeleteIpsecPolicyWOptions(); - - vpcService.disableRetries(); - testDeleteIpsecPolicyWOptions(); - } - - // Test the deleteIpsecPolicy operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteIpsecPolicyNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.deleteIpsecPolicy(null).execute(); + List allResults = new ArrayList<>(); + VirtualNetworkInterfacesPager pager = new VirtualNetworkInterfacesPager(vpcService, listVirtualNetworkInterfacesOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } - - // Test the getIpsecPolicy operation with a valid options model parameter + + // Test the listVirtualNetworkInterfaces operation using the VirtualNetworkInterfacesPager.getAll() method @Test - public void testGetIpsecPolicyWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"authentication_algorithm\": \"disabled\", \"connections\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"name\": \"my-vpn-gateway-connection\", \"resource_type\": \"vpn_gateway_connection\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"encapsulation_mode\": \"tunnel\", \"encryption_algorithm\": \"aes128\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"id\": \"r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"key_lifetime\": 3600, \"name\": \"my-ipsec-policy\", \"pfs\": \"disabled\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"ipsec_policy\", \"transform_protocol\": \"esp\"}"; - String getIpsecPolicyPath = "/ipsec_policies/testString"; + public void testListVirtualNetworkInterfacesWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"virtual_network_interfaces\":[{\"allow_ip_spoofing\":true,\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"enable_infrastructure_nat\":true,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"lifecycle_state\":\"stable\",\"mac_address\":\"02:00:4D:45:45:4D\",\"name\":\"my-virtual-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"protocol_state_filtering_mode\":\"auto\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"virtual_network_interface\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"id\":\"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"name\":\"my-share-mount-target\",\"resource_type\":\"share_mount_target\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"virtual_network_interfaces\":[{\"allow_ip_spoofing\":true,\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"enable_infrastructure_nat\":true,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"id\":\"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\",\"ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"lifecycle_state\":\"stable\",\"mac_address\":\"02:00:4D:45:45:4D\",\"name\":\"my-virtual-network-interface\",\"primary_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"protocol_state_filtering_mode\":\"auto\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"virtual_network_interface\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"id\":\"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\",\"name\":\"my-share-mount-target\",\"resource_type\":\"share_mount_target\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) - .setBody(mockResponseBody)); + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the GetIpsecPolicyOptions model - GetIpsecPolicyOptions getIpsecPolicyOptionsModel = new GetIpsecPolicyOptions.Builder() - .id("testString") + ListVirtualNetworkInterfacesOptions listVirtualNetworkInterfacesOptions = new ListVirtualNetworkInterfacesOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") .build(); - // Invoke getIpsecPolicy() with a valid options model and verify the result - Response response = vpcService.getIpsecPolicy(getIpsecPolicyOptionsModel).execute(); - assertNotNull(response); - IPsecPolicy responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getIpsecPolicyPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - } - - // Test the getIpsecPolicy operation with and without retries enabled - @Test - public void testGetIpsecPolicyWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testGetIpsecPolicyWOptions(); - - vpcService.disableRetries(); - testGetIpsecPolicyWOptions(); - } - - // Test the getIpsecPolicy operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetIpsecPolicyNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.getIpsecPolicy(null).execute(); + VirtualNetworkInterfacesPager pager = new VirtualNetworkInterfacesPager(vpcService, listVirtualNetworkInterfacesOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); } - - // Test the updateIpsecPolicy operation with a valid options model parameter + + // Test the removeNetworkInterfaceFloatingIp operation with a valid options model parameter @Test - public void testUpdateIpsecPolicyWOptions() throws Throwable { + public void testRemoveNetworkInterfaceFloatingIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"authentication_algorithm\": \"disabled\", \"connections\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"name\": \"my-vpn-gateway-connection\", \"resource_type\": \"vpn_gateway_connection\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"encapsulation_mode\": \"tunnel\", \"encryption_algorithm\": \"aes128\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"id\": \"r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"key_lifetime\": 3600, \"name\": \"my-ipsec-policy\", \"pfs\": \"disabled\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"ipsec_policy\", \"transform_protocol\": \"esp\"}"; - String updateIpsecPolicyPath = "/ipsec_policies/testString"; + String mockResponseBody = ""; + String removeNetworkInterfaceFloatingIpPath = "/virtual_network_interfaces/testString/floating_ips/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the IPsecPolicyPatch model - IPsecPolicyPatch iPsecPolicyPatchModel = new IPsecPolicyPatch.Builder() - .authenticationAlgorithm("disabled") - .encryptionAlgorithm("aes128") - .keyLifetime(Long.valueOf("3600")) - .name("my-ipsec-policy") - .pfs("disabled") - .build(); - Map iPsecPolicyPatchModelAsPatch = iPsecPolicyPatchModel.asPatch(); - - // Construct an instance of the UpdateIpsecPolicyOptions model - UpdateIpsecPolicyOptions updateIpsecPolicyOptionsModel = new UpdateIpsecPolicyOptions.Builder() + // Construct an instance of the RemoveNetworkInterfaceFloatingIpOptions model + RemoveNetworkInterfaceFloatingIpOptions removeNetworkInterfaceFloatingIpOptionsModel = new RemoveNetworkInterfaceFloatingIpOptions.Builder() + .virtualNetworkInterfaceId("testString") .id("testString") - .iPsecPolicyPatch(iPsecPolicyPatchModelAsPatch) .build(); - // Invoke updateIpsecPolicy() with a valid options model and verify the result - Response response = vpcService.updateIpsecPolicy(updateIpsecPolicyOptionsModel).execute(); + // Invoke removeNetworkInterfaceFloatingIp() with a valid options model and verify the result + Response response = vpcService.removeNetworkInterfaceFloatingIp(removeNetworkInterfaceFloatingIpOptionsModel).execute(); assertNotNull(response); - IPsecPolicy responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateIpsecPolicyPath); + assertEquals(parsedPath, removeNetworkInterfaceFloatingIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateIpsecPolicy operation with and without retries enabled + // Test the removeNetworkInterfaceFloatingIp operation with and without retries enabled @Test - public void testUpdateIpsecPolicyWRetries() throws Throwable { + public void testRemoveNetworkInterfaceFloatingIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateIpsecPolicyWOptions(); + testRemoveNetworkInterfaceFloatingIpWOptions(); vpcService.disableRetries(); - testUpdateIpsecPolicyWOptions(); + testRemoveNetworkInterfaceFloatingIpWOptions(); } - // Test the updateIpsecPolicy operation with a null options model (negative test) + // Test the removeNetworkInterfaceFloatingIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateIpsecPolicyNoOptions() throws Throwable { + public void testRemoveNetworkInterfaceFloatingIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateIpsecPolicy(null).execute(); + vpcService.removeNetworkInterfaceFloatingIp(null).execute(); } - // Test the listIpsecPolicyConnections operation with a valid options model parameter + // Test the removeVirtualNetworkInterfaceIp operation with a valid options model parameter @Test - public void testListIpsecPolicyConnectionsWOptions() throws Throwable { + public void testRemoveVirtualNetworkInterfaceIpWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"connections\": [{\"admin_state_up\": true, \"authentication_mode\": \"psk\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"dead_peer_detection\": {\"action\": \"restart\", \"interval\": 30, \"timeout\": 120}, \"establish_mode\": \"bidirectional\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"ike_policy\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"id\": \"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"name\": \"my-ike-policy\", \"resource_type\": \"ike_policy\"}, \"ipsec_policy\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"id\": \"r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"name\": \"my-ipsec-policy\", \"resource_type\": \"ipsec_policy\"}, \"mode\": \"policy\", \"name\": \"my-vpn-gateway-connection\", \"psk\": \"lkj14b1oi0alcniejkso\", \"resource_type\": \"vpn_gateway_connection\", \"status\": \"down\", \"status_reasons\": [{\"code\": \"cannot_authenticate_connection\", \"message\": \"Failed to authenticate a connection because of mismatched IKE ID and PSK.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}], \"distribute_traffic\": false, \"local\": {\"ike_identities\": [{\"type\": \"fqdn\", \"value\": \"my-service.example.com\"}]}, \"peer\": {\"ike_identity\": {\"type\": \"fqdn\", \"value\": \"my-service.example.com\"}, \"type\": \"address\", \"address\": \"192.0.2.5\"}, \"routing_protocol\": \"none\", \"tunnels\": [{\"public_ip\": {\"address\": \"192.168.3.4\"}, \"status\": \"down\", \"status_reasons\": [{\"code\": \"cannot_authenticate_connection\", \"message\": \"Failed to authenticate a connection because of mismatched IKE ID and PSK.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listIpsecPolicyConnectionsPath = "/ipsec_policies/testString/connections"; + String mockResponseBody = ""; + String removeVirtualNetworkInterfaceIpPath = "/virtual_network_interfaces/testString/ips/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the ListIpsecPolicyConnectionsOptions model - ListIpsecPolicyConnectionsOptions listIpsecPolicyConnectionsOptionsModel = new ListIpsecPolicyConnectionsOptions.Builder() + // Construct an instance of the RemoveVirtualNetworkInterfaceIpOptions model + RemoveVirtualNetworkInterfaceIpOptions removeVirtualNetworkInterfaceIpOptionsModel = new RemoveVirtualNetworkInterfaceIpOptions.Builder() + .virtualNetworkInterfaceId("testString") .id("testString") - .start("testString") - .limit(Long.valueOf("10")) .build(); - // Invoke listIpsecPolicyConnections() with a valid options model and verify the result - Response response = vpcService.listIpsecPolicyConnections(listIpsecPolicyConnectionsOptionsModel).execute(); + // Invoke removeVirtualNetworkInterfaceIp() with a valid options model and verify the result + Response response = vpcService.removeVirtualNetworkInterfaceIp(removeVirtualNetworkInterfaceIpOptionsModel).execute(); assertNotNull(response); - IPsecPolicyConnectionCollection responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listIpsecPolicyConnectionsPath); + assertEquals(parsedPath, removeVirtualNetworkInterfaceIpPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the listIpsecPolicyConnections operation with and without retries enabled + // Test the removeVirtualNetworkInterfaceIp operation with and without retries enabled @Test - public void testListIpsecPolicyConnectionsWRetries() throws Throwable { + public void testRemoveVirtualNetworkInterfaceIpWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListIpsecPolicyConnectionsWOptions(); + testRemoveVirtualNetworkInterfaceIpWOptions(); vpcService.disableRetries(); - testListIpsecPolicyConnectionsWOptions(); + testRemoveVirtualNetworkInterfaceIpWOptions(); } - // Test the listIpsecPolicyConnections operation with a null options model (negative test) + // Test the removeVirtualNetworkInterfaceIp operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListIpsecPolicyConnectionsNoOptions() throws Throwable { + public void testRemoveVirtualNetworkInterfaceIpNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listIpsecPolicyConnections(null).execute(); - } - - // Test the listIpsecPolicyConnections operation using the IpsecPolicyConnectionsPager.getNext() method - @Test - public void testListIpsecPolicyConnectionsWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"connections\":[{\"admin_state_up\":true,\"authentication_mode\":\"psk\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dead_peer_detection\":{\"action\":\"restart\",\"interval\":30,\"timeout\":120},\"establish_mode\":\"bidirectional\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"ike_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"name\":\"my-ike-policy\",\"resource_type\":\"ike_policy\"},\"ipsec_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"name\":\"my-ipsec-policy\",\"resource_type\":\"ipsec_policy\"},\"mode\":\"policy\",\"name\":\"my-vpn-gateway-connection\",\"psk\":\"lkj14b1oi0alcniejkso\",\"resource_type\":\"vpn_gateway_connection\",\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}],\"distribute_traffic\":false,\"local\":{\"ike_identities\":[{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"}]},\"peer\":{\"ike_identity\":{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"},\"type\":\"address\",\"address\":\"192.0.2.5\"},\"routing_protocol\":\"none\",\"tunnels\":[{\"public_ip\":{\"address\":\"192.168.3.4\"},\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"connections\":[{\"admin_state_up\":true,\"authentication_mode\":\"psk\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dead_peer_detection\":{\"action\":\"restart\",\"interval\":30,\"timeout\":120},\"establish_mode\":\"bidirectional\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"ike_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"name\":\"my-ike-policy\",\"resource_type\":\"ike_policy\"},\"ipsec_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"name\":\"my-ipsec-policy\",\"resource_type\":\"ipsec_policy\"},\"mode\":\"policy\",\"name\":\"my-vpn-gateway-connection\",\"psk\":\"lkj14b1oi0alcniejkso\",\"resource_type\":\"vpn_gateway_connection\",\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}],\"distribute_traffic\":false,\"local\":{\"ike_identities\":[{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"}]},\"peer\":{\"ike_identity\":{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"},\"type\":\"address\",\"address\":\"192.0.2.5\"},\"routing_protocol\":\"none\",\"tunnels\":[{\"public_ip\":{\"address\":\"192.168.3.4\"},\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListIpsecPolicyConnectionsOptions listIpsecPolicyConnectionsOptions = new ListIpsecPolicyConnectionsOptions.Builder() - .id("testString") - .limit(Long.valueOf("10")) - .build(); - - List allResults = new ArrayList<>(); - IpsecPolicyConnectionsPager pager = new IpsecPolicyConnectionsPager(vpcService, listIpsecPolicyConnectionsOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + vpcService.removeVirtualNetworkInterfaceIp(null).execute(); } - - // Test the listIpsecPolicyConnections operation using the IpsecPolicyConnectionsPager.getAll() method - @Test - public void testListIpsecPolicyConnectionsWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"connections\":[{\"admin_state_up\":true,\"authentication_mode\":\"psk\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dead_peer_detection\":{\"action\":\"restart\",\"interval\":30,\"timeout\":120},\"establish_mode\":\"bidirectional\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"ike_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"name\":\"my-ike-policy\",\"resource_type\":\"ike_policy\"},\"ipsec_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"name\":\"my-ipsec-policy\",\"resource_type\":\"ipsec_policy\"},\"mode\":\"policy\",\"name\":\"my-vpn-gateway-connection\",\"psk\":\"lkj14b1oi0alcniejkso\",\"resource_type\":\"vpn_gateway_connection\",\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}],\"distribute_traffic\":false,\"local\":{\"ike_identities\":[{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"}]},\"peer\":{\"ike_identity\":{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"},\"type\":\"address\",\"address\":\"192.0.2.5\"},\"routing_protocol\":\"none\",\"tunnels\":[{\"public_ip\":{\"address\":\"192.168.3.4\"},\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"connections\":[{\"admin_state_up\":true,\"authentication_mode\":\"psk\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dead_peer_detection\":{\"action\":\"restart\",\"interval\":30,\"timeout\":120},\"establish_mode\":\"bidirectional\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"ike_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"name\":\"my-ike-policy\",\"resource_type\":\"ike_policy\"},\"ipsec_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"name\":\"my-ipsec-policy\",\"resource_type\":\"ipsec_policy\"},\"mode\":\"policy\",\"name\":\"my-vpn-gateway-connection\",\"psk\":\"lkj14b1oi0alcniejkso\",\"resource_type\":\"vpn_gateway_connection\",\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}],\"distribute_traffic\":false,\"local\":{\"ike_identities\":[{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"}]},\"peer\":{\"ike_identity\":{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"},\"type\":\"address\",\"address\":\"192.0.2.5\"},\"routing_protocol\":\"none\",\"tunnels\":[{\"public_ip\":{\"address\":\"192.168.3.4\"},\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListIpsecPolicyConnectionsOptions listIpsecPolicyConnectionsOptions = new ListIpsecPolicyConnectionsOptions.Builder() - .id("testString") - .limit(Long.valueOf("10")) - .build(); - IpsecPolicyConnectionsPager pager = new IpsecPolicyConnectionsPager(vpcService, listIpsecPolicyConnectionsOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the listVpnGateways operation with a valid options model parameter + // Test the updateVirtualNetworkInterface operation with a valid options model parameter @Test - public void testListVpnGatewaysWOptions() throws Throwable { + public void testUpdateVirtualNetworkInterfaceWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132, \"vpn_gateways\": [{\"connections\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"name\": \"my-vpn-gateway-connection\", \"resource_type\": \"vpn_gateway_connection\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"health_reasons\": [{\"code\": \"cannot_reserve_ip_address\", \"message\": \"IP address exhaustion (release addresses on the VPN's subnet).\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"id\": \"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"members\": [{\"health_reasons\": [{\"code\": \"cannot_reserve_ip_address\", \"message\": \"IP address exhaustion (release addresses on the VPN's subnet).\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}], \"health_state\": \"ok\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"private_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"public_ip\": {\"address\": \"192.168.3.4\"}, \"role\": \"active\"}], \"name\": \"my-vpn-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"vpn_gateway\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"mode\": \"policy\"}]}"; - String listVpnGatewaysPath = "/vpn_gateways"; + String mockResponseBody = "{\"allow_ip_spoofing\": true, \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"enable_infrastructure_nat\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"id\": \"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef\", \"ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"lifecycle_state\": \"stable\", \"mac_address\": \"02:00:4D:45:45:4D\", \"name\": \"my-virtual-network-interface\", \"primary_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"protocol_state_filtering_mode\": \"auto\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"virtual_network_interface\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"id\": \"r006-76083f29-e320-4c3f-a1ff-ec479f7249d1\", \"name\": \"my-share-mount-target\", \"resource_type\": \"share_mount_target\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String updateVirtualNetworkInterfacePath = "/virtual_network_interfaces/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListVpnGatewaysOptions model - ListVpnGatewaysOptions listVpnGatewaysOptionsModel = new ListVpnGatewaysOptions.Builder() - .start("testString") - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .sort("name") - .mode("policy") + // Construct an instance of the VirtualNetworkInterfacePatch model + VirtualNetworkInterfacePatch virtualNetworkInterfacePatchModel = new VirtualNetworkInterfacePatch.Builder() + .allowIpSpoofing(true) + .autoDelete(false) + .enableInfrastructureNat(true) + .name("my-virtual-network-interface") + .protocolStateFilteringMode("auto") .build(); + Map virtualNetworkInterfacePatchModelAsPatch = virtualNetworkInterfacePatchModel.asPatch(); - // Invoke listVpnGateways() with a valid options model and verify the result - Response response = vpcService.listVpnGateways(listVpnGatewaysOptionsModel).execute(); + // Construct an instance of the UpdateVirtualNetworkInterfaceOptions model + UpdateVirtualNetworkInterfaceOptions updateVirtualNetworkInterfaceOptionsModel = new UpdateVirtualNetworkInterfaceOptions.Builder() + .id("testString") + .virtualNetworkInterfacePatch(virtualNetworkInterfacePatchModelAsPatch) + .build(); + + // Invoke updateVirtualNetworkInterface() with a valid options model and verify the result + Response response = vpcService.updateVirtualNetworkInterface(updateVirtualNetworkInterfaceOptionsModel).execute(); assertNotNull(response); - VPNGatewayCollection responseObj = response.getResult(); + VirtualNetworkInterface responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listVpnGatewaysPath); + assertEquals(parsedPath, updateVirtualNetworkInterfacePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("resource_group.id"), "testString"); - assertEquals(query.get("sort"), "name"); - assertEquals(query.get("mode"), "policy"); } - // Test the listVpnGateways operation with and without retries enabled + // Test the updateVirtualNetworkInterface operation with and without retries enabled @Test - public void testListVpnGatewaysWRetries() throws Throwable { + public void testUpdateVirtualNetworkInterfaceWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListVpnGatewaysWOptions(); + testUpdateVirtualNetworkInterfaceWOptions(); vpcService.disableRetries(); - testListVpnGatewaysWOptions(); + testUpdateVirtualNetworkInterfaceWOptions(); } - // Test the listVpnGateways operation using the VpnGatewaysPager.getNext() method - @Test - public void testListVpnGatewaysWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"vpn_gateways\":[{\"connections\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"name\":\"my-vpn-gateway-connection\",\"resource_type\":\"vpn_gateway_connection\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"health_reasons\":[{\"code\":\"cannot_reserve_ip_address\",\"message\":\"IP address exhaustion (release addresses on the VPN's subnet).\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"id\":\"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"members\":[{\"health_reasons\":[{\"code\":\"cannot_reserve_ip_address\",\"message\":\"IP address exhaustion (release addresses on the VPN's subnet).\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}],\"health_state\":\"ok\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"private_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"public_ip\":{\"address\":\"192.168.3.4\"},\"role\":\"active\"}],\"name\":\"my-vpn-gateway\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"vpn_gateway\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"mode\":\"policy\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"vpn_gateways\":[{\"connections\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"name\":\"my-vpn-gateway-connection\",\"resource_type\":\"vpn_gateway_connection\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"health_reasons\":[{\"code\":\"cannot_reserve_ip_address\",\"message\":\"IP address exhaustion (release addresses on the VPN's subnet).\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"id\":\"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"members\":[{\"health_reasons\":[{\"code\":\"cannot_reserve_ip_address\",\"message\":\"IP address exhaustion (release addresses on the VPN's subnet).\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}],\"health_state\":\"ok\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"private_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"public_ip\":{\"address\":\"192.168.3.4\"},\"role\":\"active\"}],\"name\":\"my-vpn-gateway\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"vpn_gateway\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"mode\":\"policy\"}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListVpnGatewaysOptions listVpnGatewaysOptions = new ListVpnGatewaysOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .sort("name") - .mode("policy") - .build(); - - List allResults = new ArrayList<>(); - VpnGatewaysPager pager = new VpnGatewaysPager(vpcService, listVpnGatewaysOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + // Test the updateVirtualNetworkInterface operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testUpdateVirtualNetworkInterfaceNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.updateVirtualNetworkInterface(null).execute(); } - - // Test the listVpnGateways operation using the VpnGatewaysPager.getAll() method - @Test - public void testListVpnGatewaysWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"vpn_gateways\":[{\"connections\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"name\":\"my-vpn-gateway-connection\",\"resource_type\":\"vpn_gateway_connection\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"health_reasons\":[{\"code\":\"cannot_reserve_ip_address\",\"message\":\"IP address exhaustion (release addresses on the VPN's subnet).\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"id\":\"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"members\":[{\"health_reasons\":[{\"code\":\"cannot_reserve_ip_address\",\"message\":\"IP address exhaustion (release addresses on the VPN's subnet).\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}],\"health_state\":\"ok\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"private_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"public_ip\":{\"address\":\"192.168.3.4\"},\"role\":\"active\"}],\"name\":\"my-vpn-gateway\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"vpn_gateway\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"mode\":\"policy\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"vpn_gateways\":[{\"connections\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"name\":\"my-vpn-gateway-connection\",\"resource_type\":\"vpn_gateway_connection\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"health_reasons\":[{\"code\":\"cannot_reserve_ip_address\",\"message\":\"IP address exhaustion (release addresses on the VPN's subnet).\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"id\":\"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"members\":[{\"health_reasons\":[{\"code\":\"cannot_reserve_ip_address\",\"message\":\"IP address exhaustion (release addresses on the VPN's subnet).\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}],\"health_state\":\"ok\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"private_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"public_ip\":{\"address\":\"192.168.3.4\"},\"role\":\"active\"}],\"name\":\"my-vpn-gateway\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"vpn_gateway\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"mode\":\"policy\"}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - ListVpnGatewaysOptions listVpnGatewaysOptions = new ListVpnGatewaysOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .sort("name") - .mode("policy") - .build(); - - VpnGatewaysPager pager = new VpnGatewaysPager(vpcService, listVpnGatewaysOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the createVpnGateway operation with a valid options model parameter + // Test the createVolume operation with a valid options model parameter @Test - public void testCreateVpnGatewayWOptions() throws Throwable { + public void testCreateVolumeWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"connections\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"name\": \"my-vpn-gateway-connection\", \"resource_type\": \"vpn_gateway_connection\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"health_reasons\": [{\"code\": \"cannot_reserve_ip_address\", \"message\": \"IP address exhaustion (release addresses on the VPN's subnet).\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"id\": \"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"members\": [{\"health_reasons\": [{\"code\": \"cannot_reserve_ip_address\", \"message\": \"IP address exhaustion (release addresses on the VPN's subnet).\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}], \"health_state\": \"ok\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"private_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"public_ip\": {\"address\": \"192.168.3.4\"}, \"role\": \"active\"}], \"name\": \"my-vpn-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"vpn_gateway\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"mode\": \"policy\"}"; - String createVpnGatewayPath = "/vpn_gateways"; + String mockResponseBody = "{\"active\": true, \"adjustable_capacity_states\": [\"attached\"], \"adjustable_iops_states\": [\"attached\"], \"allowed_use\": {\"api_version\": \"2024-06-23\", \"bare_metal_server\": \"enable_secure_boot == true\", \"instance\": \"gpu.count > 0 && enable_secure_boot == true\"}, \"attachment_state\": \"attached\", \"bandwidth\": 100, \"busy\": true, \"capacity\": 1000, \"catalog_offering\": {\"plan\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}}, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"health_reasons\": [{\"code\": \"initializing_from_snapshot\", \"message\": \"Performance will be degraded while this volume is being initialized from its snapshot\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"iops\": 10000, \"name\": \"my-volume\", \"operating_system\": {\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\", \"name\": \"general-purpose\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"volume\", \"source_image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}, \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"storage_generation\": 1, \"user_tags\": [\"userTags\"], \"volume_attachments\": [{\"delete_volume_on_instance_delete\": true, \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"instance\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}, \"name\": \"my-volume-attachment\", \"type\": \"boot\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String createVolumePath = "/volumes"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(201) .setBody(mockResponseBody)); + // Construct an instance of the VolumeProfileIdentityByName model + VolumeProfileIdentityByName volumeProfileIdentityModel = new VolumeProfileIdentityByName.Builder() + .name("custom") + .build(); + // Construct an instance of the ResourceGroupIdentityById model ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() .id("fee82deba12e4c0fb69c3b09d1f12345") .build(); - // Construct an instance of the SubnetIdentityById model - SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() - .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + // Construct an instance of the ZoneIdentityByName model + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() + .name("us-south-1") .build(); - // Construct an instance of the VPNGatewayPrototypeVPNGatewayRouteModePrototype model - VPNGatewayPrototypeVPNGatewayRouteModePrototype vpnGatewayPrototypeModel = new VPNGatewayPrototypeVPNGatewayRouteModePrototype.Builder() - .name("my-vpn-gateway") + // Construct an instance of the EncryptionKeyIdentityByCRN model + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() + .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + .build(); + + // Construct an instance of the VolumePrototypeVolumeByCapacity model + VolumePrototypeVolumeByCapacity volumePrototypeModel = new VolumePrototypeVolumeByCapacity.Builder() + .bandwidth(Long.valueOf("1000")) + .iops(Long.valueOf("10000")) + .name("my-volume") + .profile(volumeProfileIdentityModel) .resourceGroup(resourceGroupIdentityModel) - .subnet(subnetIdentityModel) - .mode("route") + .userTags(java.util.Arrays.asList()) + .zone(zoneIdentityModel) + .capacity(Long.valueOf("100")) + .encryptionKey(encryptionKeyIdentityModel) .build(); - // Construct an instance of the CreateVpnGatewayOptions model - CreateVpnGatewayOptions createVpnGatewayOptionsModel = new CreateVpnGatewayOptions.Builder() - .vpnGatewayPrototype(vpnGatewayPrototypeModel) + // Construct an instance of the CreateVolumeOptions model + CreateVolumeOptions createVolumeOptionsModel = new CreateVolumeOptions.Builder() + .volumePrototype(volumePrototypeModel) .build(); - // Invoke createVpnGateway() with a valid options model and verify the result - Response response = vpcService.createVpnGateway(createVpnGatewayOptionsModel).execute(); + // Invoke createVolume() with a valid options model and verify the result + Response response = vpcService.createVolume(createVolumeOptionsModel).execute(); assertNotNull(response); - VPNGateway responseObj = response.getResult(); + Volume responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -27161,48 +28285,49 @@ public void testCreateVpnGatewayWOptions() throws Throwable { assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createVpnGatewayPath); + assertEquals(parsedPath, createVolumePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createVpnGateway operation with and without retries enabled + // Test the createVolume operation with and without retries enabled @Test - public void testCreateVpnGatewayWRetries() throws Throwable { + public void testCreateVolumeWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateVpnGatewayWOptions(); + testCreateVolumeWOptions(); vpcService.disableRetries(); - testCreateVpnGatewayWOptions(); + testCreateVolumeWOptions(); } - // Test the createVpnGateway operation with a null options model (negative test) + // Test the createVolume operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateVpnGatewayNoOptions() throws Throwable { + public void testCreateVolumeNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createVpnGateway(null).execute(); + vpcService.createVolume(null).execute(); } - // Test the deleteVpnGateway operation with a valid options model parameter + // Test the deleteVolume operation with a valid options model parameter @Test - public void testDeleteVpnGatewayWOptions() throws Throwable { + public void testDeleteVolumeWOptions() throws Throwable { // Register a mock response String mockResponseBody = ""; - String deleteVpnGatewayPath = "/vpn_gateways/testString"; + String deleteVolumePath = "/volumes/testString"; server.enqueue(new MockResponse() - .setResponseCode(202) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the DeleteVpnGatewayOptions model - DeleteVpnGatewayOptions deleteVpnGatewayOptionsModel = new DeleteVpnGatewayOptions.Builder() + // Construct an instance of the DeleteVolumeOptions model + DeleteVolumeOptions deleteVolumeOptionsModel = new DeleteVolumeOptions.Builder() .id("testString") + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke deleteVpnGateway() with a valid options model and verify the result - Response response = vpcService.deleteVpnGateway(deleteVpnGatewayOptionsModel).execute(); + // Invoke deleteVolume() with a valid options model and verify the result + Response response = vpcService.deleteVolume(deleteVolumeOptionsModel).execute(); assertNotNull(response); Void responseObj = response.getResult(); assertNull(responseObj); @@ -27213,51 +28338,51 @@ public void testDeleteVpnGatewayWOptions() throws Throwable { assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteVpnGatewayPath); + assertEquals(parsedPath, deleteVolumePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteVpnGateway operation with and without retries enabled + // Test the deleteVolume operation with and without retries enabled @Test - public void testDeleteVpnGatewayWRetries() throws Throwable { + public void testDeleteVolumeWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteVpnGatewayWOptions(); + testDeleteVolumeWOptions(); vpcService.disableRetries(); - testDeleteVpnGatewayWOptions(); + testDeleteVolumeWOptions(); } - // Test the deleteVpnGateway operation with a null options model (negative test) + // Test the deleteVolume operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteVpnGatewayNoOptions() throws Throwable { + public void testDeleteVolumeNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteVpnGateway(null).execute(); + vpcService.deleteVolume(null).execute(); } - // Test the getVpnGateway operation with a valid options model parameter + // Test the getVolume operation with a valid options model parameter @Test - public void testGetVpnGatewayWOptions() throws Throwable { + public void testGetVolumeWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"connections\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"name\": \"my-vpn-gateway-connection\", \"resource_type\": \"vpn_gateway_connection\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"health_reasons\": [{\"code\": \"cannot_reserve_ip_address\", \"message\": \"IP address exhaustion (release addresses on the VPN's subnet).\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"id\": \"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"members\": [{\"health_reasons\": [{\"code\": \"cannot_reserve_ip_address\", \"message\": \"IP address exhaustion (release addresses on the VPN's subnet).\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}], \"health_state\": \"ok\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"private_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"public_ip\": {\"address\": \"192.168.3.4\"}, \"role\": \"active\"}], \"name\": \"my-vpn-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"vpn_gateway\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"mode\": \"policy\"}"; - String getVpnGatewayPath = "/vpn_gateways/testString"; + String mockResponseBody = "{\"active\": true, \"adjustable_capacity_states\": [\"attached\"], \"adjustable_iops_states\": [\"attached\"], \"allowed_use\": {\"api_version\": \"2024-06-23\", \"bare_metal_server\": \"enable_secure_boot == true\", \"instance\": \"gpu.count > 0 && enable_secure_boot == true\"}, \"attachment_state\": \"attached\", \"bandwidth\": 100, \"busy\": true, \"capacity\": 1000, \"catalog_offering\": {\"plan\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}}, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"health_reasons\": [{\"code\": \"initializing_from_snapshot\", \"message\": \"Performance will be degraded while this volume is being initialized from its snapshot\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"iops\": 10000, \"name\": \"my-volume\", \"operating_system\": {\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\", \"name\": \"general-purpose\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"volume\", \"source_image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}, \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"storage_generation\": 1, \"user_tags\": [\"userTags\"], \"volume_attachments\": [{\"delete_volume_on_instance_delete\": true, \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"instance\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}, \"name\": \"my-volume-attachment\", \"type\": \"boot\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String getVolumePath = "/volumes/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetVpnGatewayOptions model - GetVpnGatewayOptions getVpnGatewayOptionsModel = new GetVpnGatewayOptions.Builder() + // Construct an instance of the GetVolumeOptions model + GetVolumeOptions getVolumeOptionsModel = new GetVolumeOptions.Builder() .id("testString") .build(); - // Invoke getVpnGateway() with a valid options model and verify the result - Response response = vpcService.getVpnGateway(getVpnGatewayOptionsModel).execute(); + // Invoke getVolume() with a valid options model and verify the result + Response response = vpcService.getVolume(getVolumeOptionsModel).execute(); assertNotNull(response); - VPNGateway responseObj = response.getResult(); + Volume responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -27266,114 +28391,106 @@ public void testGetVpnGatewayWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getVpnGatewayPath); + assertEquals(parsedPath, getVolumePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getVpnGateway operation with and without retries enabled + // Test the getVolume operation with and without retries enabled @Test - public void testGetVpnGatewayWRetries() throws Throwable { + public void testGetVolumeWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetVpnGatewayWOptions(); + testGetVolumeWOptions(); vpcService.disableRetries(); - testGetVpnGatewayWOptions(); + testGetVolumeWOptions(); } - // Test the getVpnGateway operation with a null options model (negative test) + // Test the getVolume operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetVpnGatewayNoOptions() throws Throwable { + public void testGetVolumeNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getVpnGateway(null).execute(); + vpcService.getVolume(null).execute(); } - // Test the updateVpnGateway operation with a valid options model parameter + // Test the getVolumeProfile operation with a valid options model parameter @Test - public void testUpdateVpnGatewayWOptions() throws Throwable { + public void testGetVolumeProfileWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"connections\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"name\": \"my-vpn-gateway-connection\", \"resource_type\": \"vpn_gateway_connection\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"health_reasons\": [{\"code\": \"cannot_reserve_ip_address\", \"message\": \"IP address exhaustion (release addresses on the VPN's subnet).\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"id\": \"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"members\": [{\"health_reasons\": [{\"code\": \"cannot_reserve_ip_address\", \"message\": \"IP address exhaustion (release addresses on the VPN's subnet).\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}], \"health_state\": \"ok\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"private_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"public_ip\": {\"address\": \"192.168.3.4\"}, \"role\": \"active\"}], \"name\": \"my-vpn-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"vpn_gateway\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"mode\": \"policy\"}"; - String updateVpnGatewayPath = "/vpn_gateways/testString"; + String mockResponseBody = "{\"adjustable_capacity_states\": {\"type\": \"enum\", \"values\": [\"attached\"]}, \"adjustable_iops_states\": {\"type\": \"enum\", \"values\": [\"attached\"]}, \"bandwidth\": {\"type\": \"fixed\", \"value\": 4000}, \"boot_capacity\": {\"type\": \"fixed\", \"value\": 4800}, \"capacity\": {\"type\": \"fixed\", \"value\": 4800}, \"family\": \"tiered\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\", \"iops\": {\"type\": \"fixed\", \"value\": 4000}, \"name\": \"general-purpose\", \"storage_generation\": {\"type\": \"fixed\", \"value\": 1}}"; + String getVolumeProfilePath = "/volume/profiles/10iops-tier"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the VPNGatewayPatch model - VPNGatewayPatch vpnGatewayPatchModel = new VPNGatewayPatch.Builder() - .name("my-vpn-gateway-updated") - .build(); - Map vpnGatewayPatchModelAsPatch = vpnGatewayPatchModel.asPatch(); - - // Construct an instance of the UpdateVpnGatewayOptions model - UpdateVpnGatewayOptions updateVpnGatewayOptionsModel = new UpdateVpnGatewayOptions.Builder() - .id("testString") - .vpnGatewayPatch(vpnGatewayPatchModelAsPatch) + // Construct an instance of the GetVolumeProfileOptions model + GetVolumeProfileOptions getVolumeProfileOptionsModel = new GetVolumeProfileOptions.Builder() + .name("10iops-tier") .build(); - // Invoke updateVpnGateway() with a valid options model and verify the result - Response response = vpcService.updateVpnGateway(updateVpnGatewayOptionsModel).execute(); + // Invoke getVolumeProfile() with a valid options model and verify the result + Response response = vpcService.getVolumeProfile(getVolumeProfileOptionsModel).execute(); assertNotNull(response); - VPNGateway responseObj = response.getResult(); + VolumeProfile responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateVpnGatewayPath); + assertEquals(parsedPath, getVolumeProfilePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateVpnGateway operation with and without retries enabled + // Test the getVolumeProfile operation with and without retries enabled @Test - public void testUpdateVpnGatewayWRetries() throws Throwable { + public void testGetVolumeProfileWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateVpnGatewayWOptions(); + testGetVolumeProfileWOptions(); vpcService.disableRetries(); - testUpdateVpnGatewayWOptions(); + testGetVolumeProfileWOptions(); } - // Test the updateVpnGateway operation with a null options model (negative test) + // Test the getVolumeProfile operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateVpnGatewayNoOptions() throws Throwable { + public void testGetVolumeProfileNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateVpnGateway(null).execute(); + vpcService.getVolumeProfile(null).execute(); } - // Test the listVpnGatewayConnections operation with a valid options model parameter + // Test the listVolumeInstanceProfiles operation with a valid options model parameter @Test - public void testListVpnGatewayConnectionsWOptions() throws Throwable { + public void testListVolumeInstanceProfilesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"connections\": [{\"admin_state_up\": true, \"authentication_mode\": \"psk\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"dead_peer_detection\": {\"action\": \"restart\", \"interval\": 30, \"timeout\": 120}, \"establish_mode\": \"bidirectional\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"ike_policy\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"id\": \"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"name\": \"my-ike-policy\", \"resource_type\": \"ike_policy\"}, \"ipsec_policy\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"id\": \"r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"name\": \"my-ipsec-policy\", \"resource_type\": \"ipsec_policy\"}, \"mode\": \"policy\", \"name\": \"my-vpn-gateway-connection\", \"psk\": \"lkj14b1oi0alcniejkso\", \"resource_type\": \"vpn_gateway_connection\", \"status\": \"down\", \"status_reasons\": [{\"code\": \"cannot_authenticate_connection\", \"message\": \"Failed to authenticate a connection because of mismatched IKE ID and PSK.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}], \"distribute_traffic\": false, \"local\": {\"ike_identities\": [{\"type\": \"fqdn\", \"value\": \"my-service.example.com\"}]}, \"peer\": {\"ike_identity\": {\"type\": \"fqdn\", \"value\": \"my-service.example.com\"}, \"type\": \"address\", \"address\": \"192.0.2.5\"}, \"routing_protocol\": \"none\", \"tunnels\": [{\"public_ip\": {\"address\": \"192.168.3.4\"}, \"status\": \"down\", \"status_reasons\": [{\"code\": \"cannot_authenticate_connection\", \"message\": \"Failed to authenticate a connection because of mismatched IKE ID and PSK.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listVpnGatewayConnectionsPath = "/vpn_gateways/testString/connections"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"instance_profiles\": [{\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\", \"name\": \"bx2-4x16\", \"resource_type\": \"instance_profile\"}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listVolumeInstanceProfilesPath = "/volumes/testString/instance_profiles"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListVpnGatewayConnectionsOptions model - ListVpnGatewayConnectionsOptions listVpnGatewayConnectionsOptionsModel = new ListVpnGatewayConnectionsOptions.Builder() - .vpnGatewayId("testString") + // Construct an instance of the ListVolumeInstanceProfilesOptions model + ListVolumeInstanceProfilesOptions listVolumeInstanceProfilesOptionsModel = new ListVolumeInstanceProfilesOptions.Builder() + .id("testString") .start("testString") .limit(Long.valueOf("10")) - .status("down") .build(); - // Invoke listVpnGatewayConnections() with a valid options model and verify the result - Response response = vpcService.listVpnGatewayConnections(listVpnGatewayConnectionsOptionsModel).execute(); + // Invoke listVolumeInstanceProfiles() with a valid options model and verify the result + Response response = vpcService.listVolumeInstanceProfiles(listVolumeInstanceProfilesOptionsModel).execute(); assertNotNull(response); - VPNGatewayConnectionCollection responseObj = response.getResult(); + VolumeInstanceProfileCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -27382,40 +28499,39 @@ public void testListVpnGatewayConnectionsWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listVpnGatewayConnectionsPath); + assertEquals(parsedPath, listVolumeInstanceProfilesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("status"), "down"); } - // Test the listVpnGatewayConnections operation with and without retries enabled + // Test the listVolumeInstanceProfiles operation with and without retries enabled @Test - public void testListVpnGatewayConnectionsWRetries() throws Throwable { + public void testListVolumeInstanceProfilesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListVpnGatewayConnectionsWOptions(); + testListVolumeInstanceProfilesWOptions(); vpcService.disableRetries(); - testListVpnGatewayConnectionsWOptions(); + testListVolumeInstanceProfilesWOptions(); } - // Test the listVpnGatewayConnections operation with a null options model (negative test) + // Test the listVolumeInstanceProfiles operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListVpnGatewayConnectionsNoOptions() throws Throwable { + public void testListVolumeInstanceProfilesNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listVpnGatewayConnections(null).execute(); + vpcService.listVolumeInstanceProfiles(null).execute(); } - // Test the listVpnGatewayConnections operation using the VpnGatewayConnectionsPager.getNext() method + // Test the listVolumeInstanceProfiles operation using the VolumeInstanceProfilesPager.getNext() method @Test - public void testListVpnGatewayConnectionsWithPagerGetNext() throws Throwable { + public void testListVolumeInstanceProfilesWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"connections\":[{\"admin_state_up\":true,\"authentication_mode\":\"psk\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dead_peer_detection\":{\"action\":\"restart\",\"interval\":30,\"timeout\":120},\"establish_mode\":\"bidirectional\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"ike_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"name\":\"my-ike-policy\",\"resource_type\":\"ike_policy\"},\"ipsec_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"name\":\"my-ipsec-policy\",\"resource_type\":\"ipsec_policy\"},\"mode\":\"policy\",\"name\":\"my-vpn-gateway-connection\",\"psk\":\"lkj14b1oi0alcniejkso\",\"resource_type\":\"vpn_gateway_connection\",\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}],\"distribute_traffic\":false,\"local\":{\"ike_identities\":[{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"}]},\"peer\":{\"ike_identity\":{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"},\"type\":\"address\",\"address\":\"192.0.2.5\"},\"routing_protocol\":\"none\",\"tunnels\":[{\"public_ip\":{\"address\":\"192.168.3.4\"},\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"connections\":[{\"admin_state_up\":true,\"authentication_mode\":\"psk\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dead_peer_detection\":{\"action\":\"restart\",\"interval\":30,\"timeout\":120},\"establish_mode\":\"bidirectional\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"ike_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"name\":\"my-ike-policy\",\"resource_type\":\"ike_policy\"},\"ipsec_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"name\":\"my-ipsec-policy\",\"resource_type\":\"ipsec_policy\"},\"mode\":\"policy\",\"name\":\"my-vpn-gateway-connection\",\"psk\":\"lkj14b1oi0alcniejkso\",\"resource_type\":\"vpn_gateway_connection\",\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}],\"distribute_traffic\":false,\"local\":{\"ike_identities\":[{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"}]},\"peer\":{\"ike_identity\":{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"},\"type\":\"address\",\"address\":\"192.0.2.5\"},\"routing_protocol\":\"none\",\"tunnels\":[{\"public_ip\":{\"address\":\"192.168.3.4\"},\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -27429,28 +28545,27 @@ public void testListVpnGatewayConnectionsWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListVpnGatewayConnectionsOptions listVpnGatewayConnectionsOptions = new ListVpnGatewayConnectionsOptions.Builder() - .vpnGatewayId("testString") + ListVolumeInstanceProfilesOptions listVolumeInstanceProfilesOptions = new ListVolumeInstanceProfilesOptions.Builder() + .id("testString") .limit(Long.valueOf("10")) - .status("down") .build(); - List allResults = new ArrayList<>(); - VpnGatewayConnectionsPager pager = new VpnGatewayConnectionsPager(vpcService, listVpnGatewayConnectionsOptions); + List allResults = new ArrayList<>(); + VolumeInstanceProfilesPager pager = new VolumeInstanceProfilesPager(vpcService, listVolumeInstanceProfilesOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listVpnGatewayConnections operation using the VpnGatewayConnectionsPager.getAll() method + // Test the listVolumeInstanceProfiles operation using the VolumeInstanceProfilesPager.getAll() method @Test - public void testListVpnGatewayConnectionsWithPagerGetAll() throws Throwable { + public void testListVolumeInstanceProfilesWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"connections\":[{\"admin_state_up\":true,\"authentication_mode\":\"psk\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dead_peer_detection\":{\"action\":\"restart\",\"interval\":30,\"timeout\":120},\"establish_mode\":\"bidirectional\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"ike_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"name\":\"my-ike-policy\",\"resource_type\":\"ike_policy\"},\"ipsec_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"name\":\"my-ipsec-policy\",\"resource_type\":\"ipsec_policy\"},\"mode\":\"policy\",\"name\":\"my-vpn-gateway-connection\",\"psk\":\"lkj14b1oi0alcniejkso\",\"resource_type\":\"vpn_gateway_connection\",\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}],\"distribute_traffic\":false,\"local\":{\"ike_identities\":[{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"}]},\"peer\":{\"ike_identity\":{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"},\"type\":\"address\",\"address\":\"192.0.2.5\"},\"routing_protocol\":\"none\",\"tunnels\":[{\"public_ip\":{\"address\":\"192.168.3.4\"},\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"connections\":[{\"admin_state_up\":true,\"authentication_mode\":\"psk\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dead_peer_detection\":{\"action\":\"restart\",\"interval\":30,\"timeout\":120},\"establish_mode\":\"bidirectional\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"ike_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"name\":\"my-ike-policy\",\"resource_type\":\"ike_policy\"},\"ipsec_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"name\":\"my-ipsec-policy\",\"resource_type\":\"ipsec_policy\"},\"mode\":\"policy\",\"name\":\"my-vpn-gateway-connection\",\"psk\":\"lkj14b1oi0alcniejkso\",\"resource_type\":\"vpn_gateway_connection\",\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}],\"distribute_traffic\":false,\"local\":{\"ike_identities\":[{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"}]},\"peer\":{\"ike_identity\":{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"},\"type\":\"address\",\"address\":\"192.0.2.5\"},\"routing_protocol\":\"none\",\"tunnels\":[{\"public_ip\":{\"address\":\"192.168.3.4\"},\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"instance_profiles\":[{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16\",\"name\":\"bx2-4x16\",\"resource_type\":\"instance_profile\"}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -27464,195 +28579,156 @@ public void testListVpnGatewayConnectionsWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListVpnGatewayConnectionsOptions listVpnGatewayConnectionsOptions = new ListVpnGatewayConnectionsOptions.Builder() - .vpnGatewayId("testString") + ListVolumeInstanceProfilesOptions listVolumeInstanceProfilesOptions = new ListVolumeInstanceProfilesOptions.Builder() + .id("testString") .limit(Long.valueOf("10")) - .status("down") .build(); - VpnGatewayConnectionsPager pager = new VpnGatewayConnectionsPager(vpcService, listVpnGatewayConnectionsOptions); - List allResults = pager.getAll(); + VolumeInstanceProfilesPager pager = new VolumeInstanceProfilesPager(vpcService, listVolumeInstanceProfilesOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the createVpnGatewayConnection operation with a valid options model parameter + // Test the listVolumeProfiles operation with a valid options model parameter @Test - public void testCreateVpnGatewayConnectionWOptions() throws Throwable { + public void testListVolumeProfilesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"admin_state_up\": true, \"authentication_mode\": \"psk\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"dead_peer_detection\": {\"action\": \"restart\", \"interval\": 30, \"timeout\": 120}, \"establish_mode\": \"bidirectional\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"ike_policy\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"id\": \"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"name\": \"my-ike-policy\", \"resource_type\": \"ike_policy\"}, \"ipsec_policy\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"id\": \"r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"name\": \"my-ipsec-policy\", \"resource_type\": \"ipsec_policy\"}, \"mode\": \"policy\", \"name\": \"my-vpn-gateway-connection\", \"psk\": \"lkj14b1oi0alcniejkso\", \"resource_type\": \"vpn_gateway_connection\", \"status\": \"down\", \"status_reasons\": [{\"code\": \"cannot_authenticate_connection\", \"message\": \"Failed to authenticate a connection because of mismatched IKE ID and PSK.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}], \"distribute_traffic\": false, \"local\": {\"ike_identities\": [{\"type\": \"fqdn\", \"value\": \"my-service.example.com\"}]}, \"peer\": {\"ike_identity\": {\"type\": \"fqdn\", \"value\": \"my-service.example.com\"}, \"type\": \"address\", \"address\": \"192.0.2.5\"}, \"routing_protocol\": \"none\", \"tunnels\": [{\"public_ip\": {\"address\": \"192.168.3.4\"}, \"status\": \"down\", \"status_reasons\": [{\"code\": \"cannot_authenticate_connection\", \"message\": \"Failed to authenticate a connection because of mismatched IKE ID and PSK.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}"; - String createVpnGatewayConnectionPath = "/vpn_gateways/testString/connections"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"profiles\": [{\"adjustable_capacity_states\": {\"type\": \"enum\", \"values\": [\"attached\"]}, \"adjustable_iops_states\": {\"type\": \"enum\", \"values\": [\"attached\"]}, \"bandwidth\": {\"type\": \"fixed\", \"value\": 4000}, \"boot_capacity\": {\"type\": \"fixed\", \"value\": 4800}, \"capacity\": {\"type\": \"fixed\", \"value\": 4800}, \"family\": \"tiered\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\", \"iops\": {\"type\": \"fixed\", \"value\": 4000}, \"name\": \"general-purpose\", \"storage_generation\": {\"type\": \"fixed\", \"value\": 1}}], \"total_count\": 132}"; + String listVolumeProfilesPath = "/volume/profiles"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the VPNGatewayConnectionDPDPrototype model - VPNGatewayConnectionDPDPrototype vpnGatewayConnectionDpdPrototypeModel = new VPNGatewayConnectionDPDPrototype.Builder() - .action("restart") - .interval(Long.valueOf("30")) - .timeout(Long.valueOf("120")) - .build(); - - // Construct an instance of the VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById model - VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById vpnGatewayConnectionIkePolicyPrototypeModel = new VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById.Builder() - .id("r006-e98f46a3-1e4e-4195-b4e5-b8155192689d") - .build(); - - // Construct an instance of the VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById model - VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById vpnGatewayConnectionIPsecPolicyPrototypeModel = new VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById.Builder() - .id("r006-51eae621-dbbc-4c47-b623-b57a43c19876") - .build(); - - // Construct an instance of the VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN model - VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN vpnGatewayConnectionIkeIdentityPrototypeModel = new VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN.Builder() - .type("fqdn") - .value("my-service.example.com") - .build(); - - // Construct an instance of the VPNGatewayConnectionStaticRouteModeLocalPrototype model - VPNGatewayConnectionStaticRouteModeLocalPrototype vpnGatewayConnectionStaticRouteModeLocalPrototypeModel = new VPNGatewayConnectionStaticRouteModeLocalPrototype.Builder() - .ikeIdentities(java.util.Arrays.asList(vpnGatewayConnectionIkeIdentityPrototypeModel)) - .build(); - - // Construct an instance of the VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress model - VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress vpnGatewayConnectionStaticRouteModePeerPrototypeModel = new VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress.Builder() - .ikeIdentity(vpnGatewayConnectionIkeIdentityPrototypeModel) - .address("192.0.2.5") - .build(); - - // Construct an instance of the VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype model - VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype vpnGatewayConnectionPrototypeModel = new VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype.Builder() - .adminStateUp(true) - .deadPeerDetection(vpnGatewayConnectionDpdPrototypeModel) - .establishMode("bidirectional") - .ikePolicy(vpnGatewayConnectionIkePolicyPrototypeModel) - .ipsecPolicy(vpnGatewayConnectionIPsecPolicyPrototypeModel) - .name("my-vpn-gateway-connection") - .psk("lkj14b1oi0alcniejkso") - .distributeTraffic(false) - .local(vpnGatewayConnectionStaticRouteModeLocalPrototypeModel) - .peer(vpnGatewayConnectionStaticRouteModePeerPrototypeModel) - .routingProtocol("none") - .build(); - - // Construct an instance of the CreateVpnGatewayConnectionOptions model - CreateVpnGatewayConnectionOptions createVpnGatewayConnectionOptionsModel = new CreateVpnGatewayConnectionOptions.Builder() - .vpnGatewayId("testString") - .vpnGatewayConnectionPrototype(vpnGatewayConnectionPrototypeModel) + // Construct an instance of the ListVolumeProfilesOptions model + ListVolumeProfilesOptions listVolumeProfilesOptionsModel = new ListVolumeProfilesOptions.Builder() + .start("testString") + .limit(Long.valueOf("10")) .build(); - // Invoke createVpnGatewayConnection() with a valid options model and verify the result - Response response = vpcService.createVpnGatewayConnection(createVpnGatewayConnectionOptionsModel).execute(); + // Invoke listVolumeProfiles() with a valid options model and verify the result + Response response = vpcService.listVolumeProfiles(listVolumeProfilesOptionsModel).execute(); assertNotNull(response); - VPNGatewayConnection responseObj = response.getResult(); + VolumeProfileCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createVpnGatewayConnectionPath); + assertEquals(parsedPath, listVolumeProfilesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the createVpnGatewayConnection operation with and without retries enabled + // Test the listVolumeProfiles operation with and without retries enabled @Test - public void testCreateVpnGatewayConnectionWRetries() throws Throwable { + public void testListVolumeProfilesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateVpnGatewayConnectionWOptions(); + testListVolumeProfilesWOptions(); vpcService.disableRetries(); - testCreateVpnGatewayConnectionWOptions(); - } - - // Test the createVpnGatewayConnection operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateVpnGatewayConnectionNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.createVpnGatewayConnection(null).execute(); + testListVolumeProfilesWOptions(); } - // Test the deleteVpnGatewayConnection operation with a valid options model parameter + // Test the listVolumeProfiles operation using the VolumeProfilesPager.getNext() method @Test - public void testDeleteVpnGatewayConnectionWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = ""; - String deleteVpnGatewayConnectionPath = "/vpn_gateways/testString/connections/testString"; + public void testListVolumeProfilesWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"profiles\":[{\"adjustable_capacity_states\":{\"type\":\"enum\",\"values\":[\"attached\"]},\"adjustable_iops_states\":{\"type\":\"enum\",\"values\":[\"attached\"]},\"bandwidth\":{\"type\":\"fixed\",\"value\":4000},\"boot_capacity\":{\"type\":\"fixed\",\"value\":4800},\"capacity\":{\"type\":\"fixed\",\"value\":4800},\"family\":\"tiered\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\",\"iops\":{\"type\":\"fixed\",\"value\":4000},\"name\":\"general-purpose\",\"storage_generation\":{\"type\":\"fixed\",\"value\":1}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"profiles\":[{\"adjustable_capacity_states\":{\"type\":\"enum\",\"values\":[\"attached\"]},\"adjustable_iops_states\":{\"type\":\"enum\",\"values\":[\"attached\"]},\"bandwidth\":{\"type\":\"fixed\",\"value\":4000},\"boot_capacity\":{\"type\":\"fixed\",\"value\":4800},\"capacity\":{\"type\":\"fixed\",\"value\":4800},\"family\":\"tiered\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\",\"iops\":{\"type\":\"fixed\",\"value\":4000},\"name\":\"general-purpose\",\"storage_generation\":{\"type\":\"fixed\",\"value\":1}}]}"; server.enqueue(new MockResponse() - .setResponseCode(202) - .setBody(mockResponseBody)); + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the DeleteVpnGatewayConnectionOptions model - DeleteVpnGatewayConnectionOptions deleteVpnGatewayConnectionOptionsModel = new DeleteVpnGatewayConnectionOptions.Builder() - .vpnGatewayId("testString") - .id("testString") + ListVolumeProfilesOptions listVolumeProfilesOptions = new ListVolumeProfilesOptions.Builder() + .limit(Long.valueOf("10")) .build(); - // Invoke deleteVpnGatewayConnection() with a valid options model and verify the result - Response response = vpcService.deleteVpnGatewayConnection(deleteVpnGatewayConnectionOptionsModel).execute(); - assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteVpnGatewayConnectionPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + List allResults = new ArrayList<>(); + VolumeProfilesPager pager = new VolumeProfilesPager(vpcService, listVolumeProfilesOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } - - // Test the deleteVpnGatewayConnection operation with and without retries enabled + + // Test the listVolumeProfiles operation using the VolumeProfilesPager.getAll() method @Test - public void testDeleteVpnGatewayConnectionWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testDeleteVpnGatewayConnectionWOptions(); + public void testListVolumeProfilesWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"profiles\":[{\"adjustable_capacity_states\":{\"type\":\"enum\",\"values\":[\"attached\"]},\"adjustable_iops_states\":{\"type\":\"enum\",\"values\":[\"attached\"]},\"bandwidth\":{\"type\":\"fixed\",\"value\":4000},\"boot_capacity\":{\"type\":\"fixed\",\"value\":4800},\"capacity\":{\"type\":\"fixed\",\"value\":4800},\"family\":\"tiered\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\",\"iops\":{\"type\":\"fixed\",\"value\":4000},\"name\":\"general-purpose\",\"storage_generation\":{\"type\":\"fixed\",\"value\":1}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"profiles\":[{\"adjustable_capacity_states\":{\"type\":\"enum\",\"values\":[\"attached\"]},\"adjustable_iops_states\":{\"type\":\"enum\",\"values\":[\"attached\"]},\"bandwidth\":{\"type\":\"fixed\",\"value\":4000},\"boot_capacity\":{\"type\":\"fixed\",\"value\":4800},\"capacity\":{\"type\":\"fixed\",\"value\":4800},\"family\":\"tiered\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\",\"iops\":{\"type\":\"fixed\",\"value\":4000},\"name\":\"general-purpose\",\"storage_generation\":{\"type\":\"fixed\",\"value\":1}}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - vpcService.disableRetries(); - testDeleteVpnGatewayConnectionWOptions(); - } + ListVolumeProfilesOptions listVolumeProfilesOptions = new ListVolumeProfilesOptions.Builder() + .limit(Long.valueOf("10")) + .build(); - // Test the deleteVpnGatewayConnection operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteVpnGatewayConnectionNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.deleteVpnGatewayConnection(null).execute(); + VolumeProfilesPager pager = new VolumeProfilesPager(vpcService, listVolumeProfilesOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); } - - // Test the getVpnGatewayConnection operation with a valid options model parameter + + // Test the listVolumes operation with a valid options model parameter @Test - public void testGetVpnGatewayConnectionWOptions() throws Throwable { + public void testListVolumesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"admin_state_up\": true, \"authentication_mode\": \"psk\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"dead_peer_detection\": {\"action\": \"restart\", \"interval\": 30, \"timeout\": 120}, \"establish_mode\": \"bidirectional\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"ike_policy\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"id\": \"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"name\": \"my-ike-policy\", \"resource_type\": \"ike_policy\"}, \"ipsec_policy\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"id\": \"r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"name\": \"my-ipsec-policy\", \"resource_type\": \"ipsec_policy\"}, \"mode\": \"policy\", \"name\": \"my-vpn-gateway-connection\", \"psk\": \"lkj14b1oi0alcniejkso\", \"resource_type\": \"vpn_gateway_connection\", \"status\": \"down\", \"status_reasons\": [{\"code\": \"cannot_authenticate_connection\", \"message\": \"Failed to authenticate a connection because of mismatched IKE ID and PSK.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}], \"distribute_traffic\": false, \"local\": {\"ike_identities\": [{\"type\": \"fqdn\", \"value\": \"my-service.example.com\"}]}, \"peer\": {\"ike_identity\": {\"type\": \"fqdn\", \"value\": \"my-service.example.com\"}, \"type\": \"address\", \"address\": \"192.0.2.5\"}, \"routing_protocol\": \"none\", \"tunnels\": [{\"public_ip\": {\"address\": \"192.168.3.4\"}, \"status\": \"down\", \"status_reasons\": [{\"code\": \"cannot_authenticate_connection\", \"message\": \"Failed to authenticate a connection because of mismatched IKE ID and PSK.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}"; - String getVpnGatewayConnectionPath = "/vpn_gateways/testString/connections/testString"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132, \"volumes\": [{\"active\": true, \"adjustable_capacity_states\": [\"attached\"], \"adjustable_iops_states\": [\"attached\"], \"allowed_use\": {\"api_version\": \"2024-06-23\", \"bare_metal_server\": \"enable_secure_boot == true\", \"instance\": \"gpu.count > 0 && enable_secure_boot == true\"}, \"attachment_state\": \"attached\", \"bandwidth\": 100, \"busy\": true, \"capacity\": 1000, \"catalog_offering\": {\"plan\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}}, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"health_reasons\": [{\"code\": \"initializing_from_snapshot\", \"message\": \"Performance will be degraded while this volume is being initialized from its snapshot\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"iops\": 10000, \"name\": \"my-volume\", \"operating_system\": {\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\", \"name\": \"general-purpose\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"volume\", \"source_image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}, \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"storage_generation\": 1, \"user_tags\": [\"userTags\"], \"volume_attachments\": [{\"delete_volume_on_instance_delete\": true, \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"instance\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}, \"name\": \"my-volume-attachment\", \"type\": \"boot\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}]}"; + String listVolumesPath = "/volumes"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - - // Construct an instance of the GetVpnGatewayConnectionOptions model - GetVpnGatewayConnectionOptions getVpnGatewayConnectionOptionsModel = new GetVpnGatewayConnectionOptions.Builder() - .vpnGatewayId("testString") - .id("testString") + + // Construct an instance of the ListVolumesOptions model + ListVolumesOptions listVolumesOptionsModel = new ListVolumesOptions.Builder() + .start("testString") + .limit(Long.valueOf("10")) + .attachmentState("attached") + .encryption("provider_managed") + .name("my-name") + .operatingSystemFamily("Ubuntu Server") + .operatingSystemArchitecture("amd64") + .tag("testString") + .zoneName("us-south-1") .build(); - // Invoke getVpnGatewayConnection() with a valid options model and verify the result - Response response = vpcService.getVpnGatewayConnection(getVpnGatewayConnectionOptionsModel).execute(); + // Invoke listVolumes() with a valid options model and verify the result + Response response = vpcService.listVolumes(listVolumesOptionsModel).execute(); assertNotNull(response); - VPNGatewayConnection responseObj = response.getResult(); + VolumeCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -27661,89 +28737,155 @@ public void testGetVpnGatewayConnectionWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getVpnGatewayConnectionPath); + assertEquals(parsedPath, listVolumesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("attachment_state"), "attached"); + assertEquals(query.get("encryption"), "provider_managed"); + assertEquals(query.get("name"), "my-name"); + assertEquals(query.get("operating_system.family"), "Ubuntu Server"); + assertEquals(query.get("operating_system.architecture"), "amd64"); + assertEquals(query.get("tag"), "testString"); + assertEquals(query.get("zone.name"), "us-south-1"); } - // Test the getVpnGatewayConnection operation with and without retries enabled + // Test the listVolumes operation with and without retries enabled @Test - public void testGetVpnGatewayConnectionWRetries() throws Throwable { + public void testListVolumesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetVpnGatewayConnectionWOptions(); + testListVolumesWOptions(); vpcService.disableRetries(); - testGetVpnGatewayConnectionWOptions(); - } - - // Test the getVpnGatewayConnection operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetVpnGatewayConnectionNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.getVpnGatewayConnection(null).execute(); + testListVolumesWOptions(); } - // Test the updateVpnGatewayConnection operation with a valid options model parameter + // Test the listVolumes operation using the VolumesPager.getNext() method @Test - public void testUpdateVpnGatewayConnectionWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"admin_state_up\": true, \"authentication_mode\": \"psk\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"dead_peer_detection\": {\"action\": \"restart\", \"interval\": 30, \"timeout\": 120}, \"establish_mode\": \"bidirectional\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"ike_policy\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"id\": \"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"name\": \"my-ike-policy\", \"resource_type\": \"ike_policy\"}, \"ipsec_policy\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"id\": \"r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"name\": \"my-ipsec-policy\", \"resource_type\": \"ipsec_policy\"}, \"mode\": \"policy\", \"name\": \"my-vpn-gateway-connection\", \"psk\": \"lkj14b1oi0alcniejkso\", \"resource_type\": \"vpn_gateway_connection\", \"status\": \"down\", \"status_reasons\": [{\"code\": \"cannot_authenticate_connection\", \"message\": \"Failed to authenticate a connection because of mismatched IKE ID and PSK.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}], \"distribute_traffic\": false, \"local\": {\"ike_identities\": [{\"type\": \"fqdn\", \"value\": \"my-service.example.com\"}]}, \"peer\": {\"ike_identity\": {\"type\": \"fqdn\", \"value\": \"my-service.example.com\"}, \"type\": \"address\", \"address\": \"192.0.2.5\"}, \"routing_protocol\": \"none\", \"tunnels\": [{\"public_ip\": {\"address\": \"192.168.3.4\"}, \"status\": \"down\", \"status_reasons\": [{\"code\": \"cannot_authenticate_connection\", \"message\": \"Failed to authenticate a connection because of mismatched IKE ID and PSK.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}"; - String updateVpnGatewayConnectionPath = "/vpn_gateways/testString/connections/testString"; + public void testListVolumesWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"volumes\":[{\"active\":true,\"adjustable_capacity_states\":[\"attached\"],\"adjustable_iops_states\":[\"attached\"],\"allowed_use\":{\"api_version\":\"2024-06-23\",\"bare_metal_server\":\"enable_secure_boot == true\",\"instance\":\"gpu.count > 0 && enable_secure_boot == true\"},\"attachment_state\":\"attached\",\"bandwidth\":100,\"busy\":true,\"capacity\":1000,\"catalog_offering\":{\"plan\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}},\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"encryption\":\"provider_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"health_reasons\":[{\"code\":\"initializing_from_snapshot\",\"message\":\"Performance will be degraded while this volume is being initialized from its snapshot\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"iops\":10000,\"name\":\"my-volume\",\"operating_system\":{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\",\"name\":\"general-purpose\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"volume\",\"source_image\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"name\":\"my-image\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"image\"},\"source_snapshot\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"},\"status\":\"available\",\"status_reasons\":[{\"code\":\"encryption_key_deleted\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"storage_generation\":1,\"user_tags\":[\"userTags\"],\"volume_attachments\":[{\"delete_volume_on_instance_delete\":true,\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"device\":{\"id\":\"id\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"id\":\"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"instance\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"name\":\"my-instance\"},\"name\":\"my-volume-attachment\",\"type\":\"boot\"}],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"volumes\":[{\"active\":true,\"adjustable_capacity_states\":[\"attached\"],\"adjustable_iops_states\":[\"attached\"],\"allowed_use\":{\"api_version\":\"2024-06-23\",\"bare_metal_server\":\"enable_secure_boot == true\",\"instance\":\"gpu.count > 0 && enable_secure_boot == true\"},\"attachment_state\":\"attached\",\"bandwidth\":100,\"busy\":true,\"capacity\":1000,\"catalog_offering\":{\"plan\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}},\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"encryption\":\"provider_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"health_reasons\":[{\"code\":\"initializing_from_snapshot\",\"message\":\"Performance will be degraded while this volume is being initialized from its snapshot\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"iops\":10000,\"name\":\"my-volume\",\"operating_system\":{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\",\"name\":\"general-purpose\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"volume\",\"source_image\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"name\":\"my-image\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"image\"},\"source_snapshot\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"},\"status\":\"available\",\"status_reasons\":[{\"code\":\"encryption_key_deleted\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"storage_generation\":1,\"user_tags\":[\"userTags\"],\"volume_attachments\":[{\"delete_volume_on_instance_delete\":true,\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"device\":{\"id\":\"id\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"id\":\"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"instance\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"name\":\"my-instance\"},\"name\":\"my-volume-attachment\",\"type\":\"boot\"}],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) - .setBody(mockResponseBody)); + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the VPNGatewayConnectionDPDPatch model - VPNGatewayConnectionDPDPatch vpnGatewayConnectionDpdPatchModel = new VPNGatewayConnectionDPDPatch.Builder() - .action("restart") - .interval(Long.valueOf("30")) - .timeout(Long.valueOf("120")) + ListVolumesOptions listVolumesOptions = new ListVolumesOptions.Builder() + .limit(Long.valueOf("10")) + .attachmentState("attached") + .encryption("provider_managed") + .name("my-name") + .operatingSystemFamily("Ubuntu Server") + .operatingSystemArchitecture("amd64") + .tag("testString") + .zoneName("us-south-1") .build(); - // Construct an instance of the VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById model - VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById vpnGatewayConnectionIkePolicyPatchModel = new VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById.Builder() - .id("r006-e98f46a3-1e4e-4195-b4e5-b8155192689d") + List allResults = new ArrayList<>(); + VolumesPager pager = new VolumesPager(vpcService, listVolumesOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); + } + + // Test the listVolumes operation using the VolumesPager.getAll() method + @Test + public void testListVolumesWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"volumes\":[{\"active\":true,\"adjustable_capacity_states\":[\"attached\"],\"adjustable_iops_states\":[\"attached\"],\"allowed_use\":{\"api_version\":\"2024-06-23\",\"bare_metal_server\":\"enable_secure_boot == true\",\"instance\":\"gpu.count > 0 && enable_secure_boot == true\"},\"attachment_state\":\"attached\",\"bandwidth\":100,\"busy\":true,\"capacity\":1000,\"catalog_offering\":{\"plan\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}},\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"encryption\":\"provider_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"health_reasons\":[{\"code\":\"initializing_from_snapshot\",\"message\":\"Performance will be degraded while this volume is being initialized from its snapshot\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"iops\":10000,\"name\":\"my-volume\",\"operating_system\":{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\",\"name\":\"general-purpose\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"volume\",\"source_image\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"name\":\"my-image\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"image\"},\"source_snapshot\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"},\"status\":\"available\",\"status_reasons\":[{\"code\":\"encryption_key_deleted\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"storage_generation\":1,\"user_tags\":[\"userTags\"],\"volume_attachments\":[{\"delete_volume_on_instance_delete\":true,\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"device\":{\"id\":\"id\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"id\":\"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"instance\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"name\":\"my-instance\"},\"name\":\"my-volume-attachment\",\"type\":\"boot\"}],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"volumes\":[{\"active\":true,\"adjustable_capacity_states\":[\"attached\"],\"adjustable_iops_states\":[\"attached\"],\"allowed_use\":{\"api_version\":\"2024-06-23\",\"bare_metal_server\":\"enable_secure_boot == true\",\"instance\":\"gpu.count > 0 && enable_secure_boot == true\"},\"attachment_state\":\"attached\",\"bandwidth\":100,\"busy\":true,\"capacity\":1000,\"catalog_offering\":{\"plan\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}},\"version\":{\"crn\":\"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"encryption\":\"provider_managed\",\"encryption_key\":{\"crn\":\"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"},\"health_reasons\":[{\"code\":\"initializing_from_snapshot\",\"message\":\"Performance will be degraded while this volume is being initialized from its snapshot\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"id\":\"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\",\"iops\":10000,\"name\":\"my-volume\",\"operating_system\":{\"allow_user_image_creation\":true,\"architecture\":\"amd64\",\"dedicated_host_only\":false,\"display_name\":\"Ubuntu Server 16.04 LTS amd64\",\"family\":\"Ubuntu Server\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\",\"name\":\"ubuntu-24-04-amd64\",\"user_data_format\":\"cloud_init\",\"vendor\":\"Canonical\",\"version\":\"16.04 LTS\"},\"profile\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\",\"name\":\"general-purpose\"},\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"volume\",\"source_image\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"id\":\"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\",\"name\":\"my-image\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"image\"},\"source_snapshot\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"id\":\"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\",\"name\":\"my-snapshot\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"snapshot\"},\"status\":\"available\",\"status_reasons\":[{\"code\":\"encryption_key_deleted\",\"message\":\"message\",\"more_info\":\"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}],\"storage_generation\":1,\"user_tags\":[\"userTags\"],\"volume_attachments\":[{\"delete_volume_on_instance_delete\":true,\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"device\":{\"id\":\"id\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"id\":\"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\",\"instance\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"id\":\"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\",\"name\":\"my-instance\"},\"name\":\"my-volume-attachment\",\"type\":\"boot\"}],\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListVolumesOptions listVolumesOptions = new ListVolumesOptions.Builder() + .limit(Long.valueOf("10")) + .attachmentState("attached") + .encryption("provider_managed") + .name("my-name") + .operatingSystemFamily("Ubuntu Server") + .operatingSystemArchitecture("amd64") + .tag("testString") + .zoneName("us-south-1") .build(); - // Construct an instance of the VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById model - VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById vpnGatewayConnectionIPsecPolicyPatchModel = new VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById.Builder() - .id("r006-51eae621-dbbc-4c47-b623-b57a43c19876") + VolumesPager pager = new VolumesPager(vpcService, listVolumesOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); + } + + // Test the updateVolume operation with a valid options model parameter + @Test + public void testUpdateVolumeWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"active\": true, \"adjustable_capacity_states\": [\"attached\"], \"adjustable_iops_states\": [\"attached\"], \"allowed_use\": {\"api_version\": \"2024-06-23\", \"bare_metal_server\": \"enable_secure_boot == true\", \"instance\": \"gpu.count > 0 && enable_secure_boot == true\"}, \"attachment_state\": \"attached\", \"bandwidth\": 100, \"busy\": true, \"capacity\": 1000, \"catalog_offering\": {\"plan\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}}, \"version\": {\"crn\": \"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d\"}}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"encryption\": \"provider_managed\", \"encryption_key\": {\"crn\": \"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179\"}, \"health_reasons\": [{\"code\": \"initializing_from_snapshot\", \"message\": \"Performance will be degraded while this volume is being initialized from its snapshot\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"id\": \"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5\", \"iops\": 10000, \"name\": \"my-volume\", \"operating_system\": {\"allow_user_image_creation\": true, \"architecture\": \"amd64\", \"dedicated_host_only\": false, \"display_name\": \"Ubuntu Server 16.04 LTS amd64\", \"family\": \"Ubuntu Server\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64\", \"name\": \"ubuntu-24-04-amd64\", \"user_data_format\": \"cloud_init\", \"vendor\": \"Canonical\", \"version\": \"16.04 LTS\"}, \"profile\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose\", \"name\": \"general-purpose\"}, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"volume\", \"source_image\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"id\": \"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8\", \"name\": \"my-image\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"image\"}, \"source_snapshot\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"id\": \"r006-f6bfa329-0e36-433f-a3bb-0df632e79263\", \"name\": \"my-snapshot\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"snapshot\"}, \"status\": \"available\", \"status_reasons\": [{\"code\": \"encryption_key_deleted\", \"message\": \"message\", \"more_info\": \"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys\"}], \"storage_generation\": 1, \"user_tags\": [\"userTags\"], \"volume_attachments\": [{\"delete_volume_on_instance_delete\": true, \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"device\": {\"id\": \"id\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"id\": \"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a\", \"instance\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}, \"name\": \"my-volume-attachment\", \"type\": \"boot\"}], \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String updateVolumePath = "/volumes/testString"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the VolumeAllowedUsePatch model + VolumeAllowedUsePatch volumeAllowedUsePatchModel = new VolumeAllowedUsePatch.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") .build(); - // Construct an instance of the VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch model - VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch vpnGatewayConnectionPeerPatchModel = new VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch.Builder() - .address("192.0.2.5") + // Construct an instance of the VolumeProfileIdentityByName model + VolumeProfileIdentityByName volumeProfileIdentityModel = new VolumeProfileIdentityByName.Builder() + .name("general-purpose") .build(); - // Construct an instance of the VPNGatewayConnectionPatch model - VPNGatewayConnectionPatch vpnGatewayConnectionPatchModel = new VPNGatewayConnectionPatch.Builder() - .adminStateUp(true) - .deadPeerDetection(vpnGatewayConnectionDpdPatchModel) - .distributeTraffic(true) - .establishMode("bidirectional") - .ikePolicy(vpnGatewayConnectionIkePolicyPatchModel) - .ipsecPolicy(vpnGatewayConnectionIPsecPolicyPatchModel) - .name("my-vpn-gateway-connection") - .peer(vpnGatewayConnectionPeerPatchModel) - .psk("lkj14b1oi0alcniejkso") + // Construct an instance of the VolumePatch model + VolumePatch volumePatchModel = new VolumePatch.Builder() + .allowedUse(volumeAllowedUsePatchModel) + .bandwidth(Long.valueOf("1000")) + .capacity(Long.valueOf("100")) + .iops(Long.valueOf("10000")) + .name("my-volume") + .profile(volumeProfileIdentityModel) + .userTags(java.util.Arrays.asList("testString")) .build(); - Map vpnGatewayConnectionPatchModelAsPatch = vpnGatewayConnectionPatchModel.asPatch(); + Map volumePatchModelAsPatch = volumePatchModel.asPatch(); - // Construct an instance of the UpdateVpnGatewayConnectionOptions model - UpdateVpnGatewayConnectionOptions updateVpnGatewayConnectionOptionsModel = new UpdateVpnGatewayConnectionOptions.Builder() - .vpnGatewayId("testString") + // Construct an instance of the UpdateVolumeOptions model + UpdateVolumeOptions updateVolumeOptionsModel = new UpdateVolumeOptions.Builder() .id("testString") - .vpnGatewayConnectionPatch(vpnGatewayConnectionPatchModelAsPatch) + .volumePatch(volumePatchModelAsPatch) + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke updateVpnGatewayConnection() with a valid options model and verify the result - Response response = vpcService.updateVpnGatewayConnection(updateVpnGatewayConnectionOptionsModel).execute(); + // Invoke updateVolume() with a valid options model and verify the result + Response response = vpcService.updateVolume(updateVolumeOptionsModel).execute(); assertNotNull(response); - VPNGatewayConnection responseObj = response.getResult(); + Volume responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -27752,428 +28894,477 @@ public void testUpdateVpnGatewayConnectionWOptions() throws Throwable { assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateVpnGatewayConnectionPath); + assertEquals(parsedPath, updateVolumePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateVpnGatewayConnection operation with and without retries enabled + // Test the updateVolume operation with and without retries enabled @Test - public void testUpdateVpnGatewayConnectionWRetries() throws Throwable { + public void testUpdateVolumeWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateVpnGatewayConnectionWOptions(); + testUpdateVolumeWOptions(); vpcService.disableRetries(); - testUpdateVpnGatewayConnectionWOptions(); + testUpdateVolumeWOptions(); } - // Test the updateVpnGatewayConnection operation with a null options model (negative test) + // Test the updateVolume operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateVpnGatewayConnectionNoOptions() throws Throwable { + public void testUpdateVolumeNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateVpnGatewayConnection(null).execute(); + vpcService.updateVolume(null).execute(); } - // Test the listVpnGatewayConnectionsLocalCidrs operation with a valid options model parameter + // Test the createVpc operation with a valid options model parameter @Test - public void testListVpnGatewayConnectionsLocalCidrsWOptions() throws Throwable { + public void testCreateVpcWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"cidrs\": [\"192.0.2.0/24\"]}"; - String listVpnGatewayConnectionsLocalCidrsPath = "/vpn_gateways/testString/connections/testString/local/cidrs"; + String mockResponseBody = "{\"classic_access\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"cse_source_ips\": [{\"ip\": {\"address\": \"192.168.3.4\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"default_network_acl\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\"}, \"default_routing_table\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"name\": \"my-routing-table-1\", \"resource_type\": \"routing_table\"}, \"default_security_group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}, \"dns\": {\"enable_hub\": false, \"resolution_binding_count\": 0, \"resolver\": {\"servers\": [{\"address\": \"192.168.3.4\", \"zone_affinity\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"type\": \"delegated\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"vpc\"}}}, \"health_reasons\": [{\"code\": \"dns_resolution_binding_failed\", \"message\": \"The VPC specified in the DNS resolution binding has been disconnected.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"public_address_ranges\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"id\": \"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"name\": \"my-public-address-range\", \"resource_type\": \"public_address_range\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"vpc\", \"status\": \"available\"}"; + String createVpcPath = "/vpcs"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the ListVpnGatewayConnectionsLocalCidrsOptions model - ListVpnGatewayConnectionsLocalCidrsOptions listVpnGatewayConnectionsLocalCidrsOptionsModel = new ListVpnGatewayConnectionsLocalCidrsOptions.Builder() - .vpnGatewayId("testString") - .id("testString") + // Construct an instance of the ZoneIdentityByName model + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() + .name("us-south-1") .build(); - // Invoke listVpnGatewayConnectionsLocalCidrs() with a valid options model and verify the result - Response response = vpcService.listVpnGatewayConnectionsLocalCidrs(listVpnGatewayConnectionsLocalCidrsOptionsModel).execute(); - assertNotNull(response); - VPNGatewayConnectionCIDRs responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listVpnGatewayConnectionsLocalCidrsPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - } - - // Test the listVpnGatewayConnectionsLocalCidrs operation with and without retries enabled - @Test - public void testListVpnGatewayConnectionsLocalCidrsWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testListVpnGatewayConnectionsLocalCidrsWOptions(); + // Construct an instance of the DNSServerPrototype model + DNSServerPrototype dnsServerPrototypeModel = new DNSServerPrototype.Builder() + .address("192.168.3.4") + .zoneAffinity(zoneIdentityModel) + .build(); - vpcService.disableRetries(); - testListVpnGatewayConnectionsLocalCidrsWOptions(); - } + // Construct an instance of the VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype model + VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype vpcdnsResolverPrototypeModel = new VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype.Builder() + .manualServers(java.util.Arrays.asList(dnsServerPrototypeModel)) + .type("manual") + .build(); - // Test the listVpnGatewayConnectionsLocalCidrs operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testListVpnGatewayConnectionsLocalCidrsNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.listVpnGatewayConnectionsLocalCidrs(null).execute(); - } + // Construct an instance of the VPCDNSPrototype model + VPCDNSPrototype vpcdnsPrototypeModel = new VPCDNSPrototype.Builder() + .enableHub(false) + .resolver(vpcdnsResolverPrototypeModel) + .build(); - // Test the removeVpnGatewayConnectionsLocalCidr operation with a valid options model parameter - @Test - public void testRemoveVpnGatewayConnectionsLocalCidrWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = ""; - String removeVpnGatewayConnectionsLocalCidrPath = "/vpn_gateways/testString/connections/testString/local/cidrs/192.168.1.0%2F24"; - server.enqueue(new MockResponse() - .setResponseCode(204) - .setBody(mockResponseBody)); + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") + .build(); - // Construct an instance of the RemoveVpnGatewayConnectionsLocalCidrOptions model - RemoveVpnGatewayConnectionsLocalCidrOptions removeVpnGatewayConnectionsLocalCidrOptionsModel = new RemoveVpnGatewayConnectionsLocalCidrOptions.Builder() - .vpnGatewayId("testString") - .id("testString") - .cidr("192.168.1.0/24") + // Construct an instance of the CreateVpcOptions model + CreateVpcOptions createVpcOptionsModel = new CreateVpcOptions.Builder() + .addressPrefixManagement("auto") + .classicAccess(false) + .dns(vpcdnsPrototypeModel) + .name("my-vpc") + .resourceGroup(resourceGroupIdentityModel) .build(); - // Invoke removeVpnGatewayConnectionsLocalCidr() with a valid options model and verify the result - Response response = vpcService.removeVpnGatewayConnectionsLocalCidr(removeVpnGatewayConnectionsLocalCidrOptionsModel).execute(); + // Invoke createVpc() with a valid options model and verify the result + Response response = vpcService.createVpc(createVpcOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + VPC 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(), "DELETE"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, removeVpnGatewayConnectionsLocalCidrPath); + assertEquals(parsedPath, createVpcPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the removeVpnGatewayConnectionsLocalCidr operation with and without retries enabled + // Test the createVpc operation with and without retries enabled @Test - public void testRemoveVpnGatewayConnectionsLocalCidrWRetries() throws Throwable { + public void testCreateVpcWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testRemoveVpnGatewayConnectionsLocalCidrWOptions(); + testCreateVpcWOptions(); vpcService.disableRetries(); - testRemoveVpnGatewayConnectionsLocalCidrWOptions(); - } - - // Test the removeVpnGatewayConnectionsLocalCidr operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testRemoveVpnGatewayConnectionsLocalCidrNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.removeVpnGatewayConnectionsLocalCidr(null).execute(); + testCreateVpcWOptions(); } - // Test the checkVpnGatewayConnectionsLocalCidr operation with a valid options model parameter + // Test the createVpcAddressPrefix operation with a valid options model parameter @Test - public void testCheckVpnGatewayConnectionsLocalCidrWOptions() throws Throwable { + public void testCreateVpcAddressPrefixWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String checkVpnGatewayConnectionsLocalCidrPath = "/vpn_gateways/testString/connections/testString/local/cidrs/192.168.1.0%2F24"; + String mockResponseBody = "{\"cidr\": \"192.168.3.0/24\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"has_subnets\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/address_prefixes/r006-68574057-c5e0-4675-ada4-99377d8f4789\", \"id\": \"r006-68574057-c5e0-4675-ada4-99377d8f4789\", \"is_default\": false, \"name\": \"my-vpc-address-prefix-zone-1\", \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String createVpcAddressPrefixPath = "/vpcs/testString/address_prefixes"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the CheckVpnGatewayConnectionsLocalCidrOptions model - CheckVpnGatewayConnectionsLocalCidrOptions checkVpnGatewayConnectionsLocalCidrOptionsModel = new CheckVpnGatewayConnectionsLocalCidrOptions.Builder() - .vpnGatewayId("testString") - .id("testString") - .cidr("192.168.1.0/24") + // Construct an instance of the ZoneIdentityByName model + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() + .name("us-south-1") .build(); - // Invoke checkVpnGatewayConnectionsLocalCidr() with a valid options model and verify the result - Response response = vpcService.checkVpnGatewayConnectionsLocalCidr(checkVpnGatewayConnectionsLocalCidrOptionsModel).execute(); + // Construct an instance of the CreateVpcAddressPrefixOptions model + CreateVpcAddressPrefixOptions createVpcAddressPrefixOptionsModel = new CreateVpcAddressPrefixOptions.Builder() + .vpcId("testString") + .cidr("10.240.0.0/18") + .zone(zoneIdentityModel) + .isDefault(true) + .name("my-vpc-address-prefix-zone-1") + .build(); + + // Invoke createVpcAddressPrefix() with a valid options model and verify the result + Response response = vpcService.createVpcAddressPrefix(createVpcAddressPrefixOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + AddressPrefix responseObj = response.getResult(); + assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, checkVpnGatewayConnectionsLocalCidrPath); + assertEquals(parsedPath, createVpcAddressPrefixPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the checkVpnGatewayConnectionsLocalCidr operation with and without retries enabled + // Test the createVpcAddressPrefix operation with and without retries enabled @Test - public void testCheckVpnGatewayConnectionsLocalCidrWRetries() throws Throwable { + public void testCreateVpcAddressPrefixWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCheckVpnGatewayConnectionsLocalCidrWOptions(); + testCreateVpcAddressPrefixWOptions(); vpcService.disableRetries(); - testCheckVpnGatewayConnectionsLocalCidrWOptions(); + testCreateVpcAddressPrefixWOptions(); } - // Test the checkVpnGatewayConnectionsLocalCidr operation with a null options model (negative test) + // Test the createVpcAddressPrefix operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCheckVpnGatewayConnectionsLocalCidrNoOptions() throws Throwable { + public void testCreateVpcAddressPrefixNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.checkVpnGatewayConnectionsLocalCidr(null).execute(); + vpcService.createVpcAddressPrefix(null).execute(); } - // Test the addVpnGatewayConnectionsLocalCidr operation with a valid options model parameter + // Test the createVpcDnsResolutionBinding operation with a valid options model parameter @Test - public void testAddVpnGatewayConnectionsLocalCidrWOptions() throws Throwable { + public void testCreateVpcDnsResolutionBindingWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String addVpnGatewayConnectionsLocalCidrPath = "/vpn_gateways/testString/connections/testString/local/cidrs/192.168.1.0%2F24"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"endpoint_gateways\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"endpoint_gateway\"}], \"health_reasons\": [{\"code\": \"disconnected_from_bound_vpc\", \"message\": \"The VPC specified in the DNS resolution binding has been disconnected.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\", \"id\": \"r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\", \"lifecycle_state\": \"stable\", \"name\": \"my-dns-resolution-binding\", \"resource_type\": \"vpc_dns_resolution_binding\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"vpc\"}}"; + String createVpcDnsResolutionBindingPath = "/vpcs/testString/dns_resolution_bindings"; server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the AddVpnGatewayConnectionsLocalCidrOptions model - AddVpnGatewayConnectionsLocalCidrOptions addVpnGatewayConnectionsLocalCidrOptionsModel = new AddVpnGatewayConnectionsLocalCidrOptions.Builder() - .vpnGatewayId("testString") - .id("testString") - .cidr("192.168.1.0/24") + // Construct an instance of the VPCIdentityById model + VPCIdentityById vpcIdentityModel = new VPCIdentityById.Builder() + .id("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") .build(); - // Invoke addVpnGatewayConnectionsLocalCidr() with a valid options model and verify the result - Response response = vpcService.addVpnGatewayConnectionsLocalCidr(addVpnGatewayConnectionsLocalCidrOptionsModel).execute(); + // Construct an instance of the CreateVpcDnsResolutionBindingOptions model + CreateVpcDnsResolutionBindingOptions createVpcDnsResolutionBindingOptionsModel = new CreateVpcDnsResolutionBindingOptions.Builder() + .vpcId("testString") + .vpc(vpcIdentityModel) + .name("my-dns-resolution-binding") + .build(); + + // Invoke createVpcDnsResolutionBinding() with a valid options model and verify the result + Response response = vpcService.createVpcDnsResolutionBinding(createVpcDnsResolutionBindingOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + VPCDNSResolutionBinding 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"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, addVpnGatewayConnectionsLocalCidrPath); + assertEquals(parsedPath, createVpcDnsResolutionBindingPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the addVpnGatewayConnectionsLocalCidr operation with and without retries enabled + // Test the createVpcDnsResolutionBinding operation with and without retries enabled @Test - public void testAddVpnGatewayConnectionsLocalCidrWRetries() throws Throwable { + public void testCreateVpcDnsResolutionBindingWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testAddVpnGatewayConnectionsLocalCidrWOptions(); + testCreateVpcDnsResolutionBindingWOptions(); vpcService.disableRetries(); - testAddVpnGatewayConnectionsLocalCidrWOptions(); + testCreateVpcDnsResolutionBindingWOptions(); } - // Test the addVpnGatewayConnectionsLocalCidr operation with a null options model (negative test) + // Test the createVpcDnsResolutionBinding operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testAddVpnGatewayConnectionsLocalCidrNoOptions() throws Throwable { + public void testCreateVpcDnsResolutionBindingNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.addVpnGatewayConnectionsLocalCidr(null).execute(); + vpcService.createVpcDnsResolutionBinding(null).execute(); } - // Test the listVpnGatewayConnectionsPeerCidrs operation with a valid options model parameter + // Test the createVpcRoute operation with a valid options model parameter @Test - public void testListVpnGatewayConnectionsPeerCidrsWOptions() throws Throwable { + public void testCreateVpcRouteWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"cidrs\": [\"192.0.2.0/24\"]}"; - String listVpnGatewayConnectionsPeerCidrsPath = "/vpn_gateways/testString/connections/testString/peer/cidrs"; + String mockResponseBody = "{\"action\": \"delegate\", \"advertise\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"creator\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"id\": \"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"name\": \"my-vpn-gateway\", \"resource_type\": \"vpn_gateway\"}, \"destination\": \"192.168.3.0/24\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"lifecycle_state\": \"stable\", \"name\": \"my-vpc-routing-table-route\", \"next_hop\": {\"address\": \"192.168.3.4\"}, \"origin\": \"service\", \"priority\": 1, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String createVpcRoutePath = "/vpcs/testString/routes"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the ListVpnGatewayConnectionsPeerCidrsOptions model - ListVpnGatewayConnectionsPeerCidrsOptions listVpnGatewayConnectionsPeerCidrsOptionsModel = new ListVpnGatewayConnectionsPeerCidrsOptions.Builder() - .vpnGatewayId("testString") - .id("testString") + // Construct an instance of the ZoneIdentityByName model + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() + .name("us-south-1") .build(); - // Invoke listVpnGatewayConnectionsPeerCidrs() with a valid options model and verify the result - Response response = vpcService.listVpnGatewayConnectionsPeerCidrs(listVpnGatewayConnectionsPeerCidrsOptionsModel).execute(); + // Construct an instance of the RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP model + RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP routeNextHopPrototypeModel = new RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP.Builder() + .address("0.0.0.0") + .build(); + + // Construct an instance of the CreateVpcRouteOptions model + CreateVpcRouteOptions createVpcRouteOptionsModel = new CreateVpcRouteOptions.Builder() + .vpcId("testString") + .destination("192.168.3.0/24") + .zone(zoneIdentityModel) + .action("deliver") + .advertise(false) + .name("my-vpc-routing-table-route") + .nextHop(routeNextHopPrototypeModel) + .priority(Long.valueOf("1")) + .build(); + + // Invoke createVpcRoute() with a valid options model and verify the result + Response response = vpcService.createVpcRoute(createVpcRouteOptionsModel).execute(); assertNotNull(response); - VPNGatewayConnectionCIDRs responseObj = response.getResult(); + CreateVpcRouteResponse responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listVpnGatewayConnectionsPeerCidrsPath); + assertEquals(parsedPath, createVpcRoutePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the listVpnGatewayConnectionsPeerCidrs operation with and without retries enabled + // Test the createVpcRoute operation with and without retries enabled @Test - public void testListVpnGatewayConnectionsPeerCidrsWRetries() throws Throwable { + public void testCreateVpcRouteWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListVpnGatewayConnectionsPeerCidrsWOptions(); + testCreateVpcRouteWOptions(); vpcService.disableRetries(); - testListVpnGatewayConnectionsPeerCidrsWOptions(); + testCreateVpcRouteWOptions(); } - // Test the listVpnGatewayConnectionsPeerCidrs operation with a null options model (negative test) + // Test the createVpcRoute operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListVpnGatewayConnectionsPeerCidrsNoOptions() throws Throwable { + public void testCreateVpcRouteNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listVpnGatewayConnectionsPeerCidrs(null).execute(); + vpcService.createVpcRoute(null).execute(); } - // Test the removeVpnGatewayConnectionsPeerCidr operation with a valid options model parameter + // Test the createVpcRoutingTable operation with a valid options model parameter @Test - public void testRemoveVpnGatewayConnectionsPeerCidrWOptions() throws Throwable { + public void testCreateVpcRoutingTableWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String removeVpnGatewayConnectionsPeerCidrPath = "/vpn_gateways/testString/connections/testString/peer/cidrs/192.168.1.0%2F24"; + String mockResponseBody = "{\"accept_routes_from\": [{\"resource_type\": \"vpn_server\"}], \"advertise_routes_to\": [\"transit_gateway\"], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"is_default\": false, \"lifecycle_state\": \"stable\", \"name\": \"my-routing-table-1\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"routing_table\", \"route_direct_link_ingress\": true, \"route_internet_ingress\": true, \"route_transit_gateway_ingress\": true, \"route_vpc_zone_ingress\": false, \"routes\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"name\": \"my-vpc-routing-table-route\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}]}"; + String createVpcRoutingTablePath = "/vpcs/testString/routing_tables"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the RemoveVpnGatewayConnectionsPeerCidrOptions model - RemoveVpnGatewayConnectionsPeerCidrOptions removeVpnGatewayConnectionsPeerCidrOptionsModel = new RemoveVpnGatewayConnectionsPeerCidrOptions.Builder() - .vpnGatewayId("testString") - .id("testString") - .cidr("192.168.1.0/24") + // Construct an instance of the ResourceFilter model + ResourceFilter resourceFilterModel = new ResourceFilter.Builder() + .resourceType("vpn_server") + .build(); + + // Construct an instance of the RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP model + RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP routeNextHopPrototypeModel = new RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP.Builder() + .address("0.0.0.0") + .build(); + + // Construct an instance of the ZoneIdentityByName model + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() + .name("us-south-1") + .build(); + + // Construct an instance of the RoutePrototype model + RoutePrototype routePrototypeModel = new RoutePrototype.Builder() + .action("deliver") + .advertise(false) + .destination("192.168.3.0/24") + .name("my-vpc-routing-table-route") + .nextHop(routeNextHopPrototypeModel) + .priority(Long.valueOf("1")) + .zone(zoneIdentityModel) + .build(); + + // Construct an instance of the CreateVpcRoutingTableOptions model + CreateVpcRoutingTableOptions createVpcRoutingTableOptionsModel = new CreateVpcRoutingTableOptions.Builder() + .vpcId("testString") + .acceptRoutesFrom(java.util.Arrays.asList(resourceFilterModel)) + .advertiseRoutesTo(java.util.Arrays.asList()) + .name("my-routing-table-1") + .routeDirectLinkIngress(false) + .routeInternetIngress(false) + .routeTransitGatewayIngress(false) + .routeVpcZoneIngress(false) + .routes(java.util.Arrays.asList(routePrototypeModel)) .build(); - // Invoke removeVpnGatewayConnectionsPeerCidr() with a valid options model and verify the result - Response response = vpcService.removeVpnGatewayConnectionsPeerCidr(removeVpnGatewayConnectionsPeerCidrOptionsModel).execute(); + // Invoke createVpcRoutingTable() with a valid options model and verify the result + Response response = vpcService.createVpcRoutingTable(createVpcRoutingTableOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + RoutingTable 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(), "DELETE"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, removeVpnGatewayConnectionsPeerCidrPath); + assertEquals(parsedPath, createVpcRoutingTablePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the removeVpnGatewayConnectionsPeerCidr operation with and without retries enabled + // Test the createVpcRoutingTable operation with and without retries enabled @Test - public void testRemoveVpnGatewayConnectionsPeerCidrWRetries() throws Throwable { + public void testCreateVpcRoutingTableWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testRemoveVpnGatewayConnectionsPeerCidrWOptions(); + testCreateVpcRoutingTableWOptions(); vpcService.disableRetries(); - testRemoveVpnGatewayConnectionsPeerCidrWOptions(); + testCreateVpcRoutingTableWOptions(); } - // Test the removeVpnGatewayConnectionsPeerCidr operation with a null options model (negative test) + // Test the createVpcRoutingTable operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testRemoveVpnGatewayConnectionsPeerCidrNoOptions() throws Throwable { + public void testCreateVpcRoutingTableNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.removeVpnGatewayConnectionsPeerCidr(null).execute(); + vpcService.createVpcRoutingTable(null).execute(); } - // Test the checkVpnGatewayConnectionsPeerCidr operation with a valid options model parameter + // Test the createVpcRoutingTableRoute operation with a valid options model parameter @Test - public void testCheckVpnGatewayConnectionsPeerCidrWOptions() throws Throwable { + public void testCreateVpcRoutingTableRouteWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String checkVpnGatewayConnectionsPeerCidrPath = "/vpn_gateways/testString/connections/testString/peer/cidrs/192.168.1.0%2F24"; + String mockResponseBody = "{\"action\": \"delegate\", \"advertise\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"creator\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"id\": \"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"name\": \"my-vpn-gateway\", \"resource_type\": \"vpn_gateway\"}, \"destination\": \"192.168.3.0/24\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"lifecycle_state\": \"stable\", \"name\": \"my-vpc-routing-table-route\", \"next_hop\": {\"address\": \"192.168.3.4\"}, \"origin\": \"service\", \"priority\": 1, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String createVpcRoutingTableRoutePath = "/vpcs/testString/routing_tables/testString/routes"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the CheckVpnGatewayConnectionsPeerCidrOptions model - CheckVpnGatewayConnectionsPeerCidrOptions checkVpnGatewayConnectionsPeerCidrOptionsModel = new CheckVpnGatewayConnectionsPeerCidrOptions.Builder() - .vpnGatewayId("testString") - .id("testString") - .cidr("192.168.1.0/24") + // Construct an instance of the ZoneIdentityByName model + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() + .name("us-south-1") .build(); - // Invoke checkVpnGatewayConnectionsPeerCidr() with a valid options model and verify the result - Response response = vpcService.checkVpnGatewayConnectionsPeerCidr(checkVpnGatewayConnectionsPeerCidrOptionsModel).execute(); + // Construct an instance of the RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP model + RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP routeNextHopPrototypeModel = new RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP.Builder() + .address("0.0.0.0") + .build(); + + // Construct an instance of the CreateVpcRoutingTableRouteOptions model + CreateVpcRoutingTableRouteOptions createVpcRoutingTableRouteOptionsModel = new CreateVpcRoutingTableRouteOptions.Builder() + .vpcId("testString") + .routingTableId("testString") + .destination("192.168.3.0/24") + .zone(zoneIdentityModel) + .action("deliver") + .advertise(false) + .name("my-vpc-routing-table-route") + .nextHop(routeNextHopPrototypeModel) + .priority(Long.valueOf("1")) + .build(); + + // Invoke createVpcRoutingTableRoute() with a valid options model and verify the result + Response response = vpcService.createVpcRoutingTableRoute(createVpcRoutingTableRouteOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + Route responseObj = response.getResult(); + assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, checkVpnGatewayConnectionsPeerCidrPath); + assertEquals(parsedPath, createVpcRoutingTableRoutePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the checkVpnGatewayConnectionsPeerCidr operation with and without retries enabled + // Test the createVpcRoutingTableRoute operation with and without retries enabled @Test - public void testCheckVpnGatewayConnectionsPeerCidrWRetries() throws Throwable { + public void testCreateVpcRoutingTableRouteWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCheckVpnGatewayConnectionsPeerCidrWOptions(); + testCreateVpcRoutingTableRouteWOptions(); vpcService.disableRetries(); - testCheckVpnGatewayConnectionsPeerCidrWOptions(); + testCreateVpcRoutingTableRouteWOptions(); } - // Test the checkVpnGatewayConnectionsPeerCidr operation with a null options model (negative test) + // Test the createVpcRoutingTableRoute operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCheckVpnGatewayConnectionsPeerCidrNoOptions() throws Throwable { + public void testCreateVpcRoutingTableRouteNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.checkVpnGatewayConnectionsPeerCidr(null).execute(); + vpcService.createVpcRoutingTableRoute(null).execute(); } - // Test the addVpnGatewayConnectionsPeerCidr operation with a valid options model parameter + // Test the deleteVpc operation with a valid options model parameter @Test - public void testAddVpnGatewayConnectionsPeerCidrWOptions() throws Throwable { + public void testDeleteVpcWOptions() throws Throwable { // Register a mock response String mockResponseBody = ""; - String addVpnGatewayConnectionsPeerCidrPath = "/vpn_gateways/testString/connections/testString/peer/cidrs/192.168.1.0%2F24"; + String deleteVpcPath = "/vpcs/testString"; server.enqueue(new MockResponse() - .setResponseCode(201) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the AddVpnGatewayConnectionsPeerCidrOptions model - AddVpnGatewayConnectionsPeerCidrOptions addVpnGatewayConnectionsPeerCidrOptionsModel = new AddVpnGatewayConnectionsPeerCidrOptions.Builder() - .vpnGatewayId("testString") + // Construct an instance of the DeleteVpcOptions model + DeleteVpcOptions deleteVpcOptionsModel = new DeleteVpcOptions.Builder() .id("testString") - .cidr("192.168.1.0/24") + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke addVpnGatewayConnectionsPeerCidr() with a valid options model and verify the result - Response response = vpcService.addVpnGatewayConnectionsPeerCidr(addVpnGatewayConnectionsPeerCidrOptionsModel).execute(); + // Invoke deleteVpc() with a valid options model and verify the result + Response response = vpcService.deleteVpc(deleteVpcOptionsModel).execute(); assertNotNull(response); Void responseObj = response.getResult(); assertNull(responseObj); @@ -28181,275 +29372,159 @@ public void testAddVpnGatewayConnectionsPeerCidrWOptions() throws Throwable { // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PUT"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, addVpnGatewayConnectionsPeerCidrPath); + assertEquals(parsedPath, deleteVpcPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the addVpnGatewayConnectionsPeerCidr operation with and without retries enabled + // Test the deleteVpc operation with and without retries enabled @Test - public void testAddVpnGatewayConnectionsPeerCidrWRetries() throws Throwable { + public void testDeleteVpcWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testAddVpnGatewayConnectionsPeerCidrWOptions(); + testDeleteVpcWOptions(); vpcService.disableRetries(); - testAddVpnGatewayConnectionsPeerCidrWOptions(); + testDeleteVpcWOptions(); } - // Test the addVpnGatewayConnectionsPeerCidr operation with a null options model (negative test) + // Test the deleteVpc operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testAddVpnGatewayConnectionsPeerCidrNoOptions() throws Throwable { + public void testDeleteVpcNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.addVpnGatewayConnectionsPeerCidr(null).execute(); + vpcService.deleteVpc(null).execute(); } - // Test the listVpnServers operation with a valid options model parameter + // Test the deleteVpcAddressPrefix operation with a valid options model parameter @Test - public void testListVpnServersWOptions() throws Throwable { + public void testDeleteVpcAddressPrefixWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132, \"vpn_servers\": [{\"certificate\": {\"crn\": \"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5\"}, \"client_authentication\": [{\"method\": \"certificate\", \"identity_provider\": {\"provider_type\": \"iam\"}}], \"client_auto_delete\": true, \"client_auto_delete_timeout\": 1, \"client_dns_server_ips\": [{\"address\": \"192.168.3.4\"}], \"client_idle_timeout\": 600, \"client_ip_pool\": \"172.16.0.0/16\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\", \"enable_split_tunneling\": true, \"health_reasons\": [{\"code\": \"cannot_access_server_certificate\", \"message\": \"Failed to get VPN server's server certificate from Secrets Manager.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health\"}], \"health_state\": \"ok\", \"hostname\": \"a8506291.us-south.vpn-server.appdomain.cloud\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\", \"id\": \"r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-vpn-server\", \"port\": 443, \"private_ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"protocol\": \"tcp\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"vpn_server\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}]}"; - String listVpnServersPath = "/vpn_servers"; + String mockResponseBody = ""; + String deleteVpcAddressPrefixPath = "/vpcs/testString/address_prefixes/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the ListVpnServersOptions model - ListVpnServersOptions listVpnServersOptionsModel = new ListVpnServersOptions.Builder() - .name("my-name") - .start("testString") - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .sort("name") + // Construct an instance of the DeleteVpcAddressPrefixOptions model + DeleteVpcAddressPrefixOptions deleteVpcAddressPrefixOptionsModel = new DeleteVpcAddressPrefixOptions.Builder() + .vpcId("testString") + .id("testString") .build(); - // Invoke listVpnServers() with a valid options model and verify the result - Response response = vpcService.listVpnServers(listVpnServersOptionsModel).execute(); + // Invoke deleteVpcAddressPrefix() with a valid options model and verify the result + Response response = vpcService.deleteVpcAddressPrefix(deleteVpcAddressPrefixOptionsModel).execute(); assertNotNull(response); - VPNServerCollection responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listVpnServersPath); + assertEquals(parsedPath, deleteVpcAddressPrefixPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("name"), "my-name"); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("resource_group.id"), "testString"); - assertEquals(query.get("sort"), "name"); } - // Test the listVpnServers operation with and without retries enabled + // Test the deleteVpcAddressPrefix operation with and without retries enabled @Test - public void testListVpnServersWRetries() throws Throwable { + public void testDeleteVpcAddressPrefixWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListVpnServersWOptions(); + testDeleteVpcAddressPrefixWOptions(); vpcService.disableRetries(); - testListVpnServersWOptions(); + testDeleteVpcAddressPrefixWOptions(); } - // Test the listVpnServers operation using the VpnServersPager.getNext() method - @Test - public void testListVpnServersWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"vpn_servers\":[{\"certificate\":{\"crn\":\"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5\"},\"client_authentication\":[{\"method\":\"certificate\",\"identity_provider\":{\"provider_type\":\"iam\"}}],\"client_auto_delete\":true,\"client_auto_delete_timeout\":1,\"client_dns_server_ips\":[{\"address\":\"192.168.3.4\"}],\"client_idle_timeout\":600,\"client_ip_pool\":\"172.16.0.0/16\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\",\"enable_split_tunneling\":true,\"health_reasons\":[{\"code\":\"cannot_access_server_certificate\",\"message\":\"Failed to get VPN server's server certificate from Secrets Manager.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health\"}],\"health_state\":\"ok\",\"hostname\":\"a8506291.us-south.vpn-server.appdomain.cloud\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\",\"id\":\"r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-vpn-server\",\"port\":443,\"private_ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"protocol\":\"tcp\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"vpn_server\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"vpn_servers\":[{\"certificate\":{\"crn\":\"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5\"},\"client_authentication\":[{\"method\":\"certificate\",\"identity_provider\":{\"provider_type\":\"iam\"}}],\"client_auto_delete\":true,\"client_auto_delete_timeout\":1,\"client_dns_server_ips\":[{\"address\":\"192.168.3.4\"}],\"client_idle_timeout\":600,\"client_ip_pool\":\"172.16.0.0/16\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\",\"enable_split_tunneling\":true,\"health_reasons\":[{\"code\":\"cannot_access_server_certificate\",\"message\":\"Failed to get VPN server's server certificate from Secrets Manager.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health\"}],\"health_state\":\"ok\",\"hostname\":\"a8506291.us-south.vpn-server.appdomain.cloud\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\",\"id\":\"r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-vpn-server\",\"port\":443,\"private_ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"protocol\":\"tcp\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"vpn_server\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListVpnServersOptions listVpnServersOptions = new ListVpnServersOptions.Builder() - .name("my-name") - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .sort("name") - .build(); - - List allResults = new ArrayList<>(); - VpnServersPager pager = new VpnServersPager(vpcService, listVpnServersOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + // Test the deleteVpcAddressPrefix operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testDeleteVpcAddressPrefixNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.deleteVpcAddressPrefix(null).execute(); } - - // Test the listVpnServers operation using the VpnServersPager.getAll() method - @Test - public void testListVpnServersWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"vpn_servers\":[{\"certificate\":{\"crn\":\"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5\"},\"client_authentication\":[{\"method\":\"certificate\",\"identity_provider\":{\"provider_type\":\"iam\"}}],\"client_auto_delete\":true,\"client_auto_delete_timeout\":1,\"client_dns_server_ips\":[{\"address\":\"192.168.3.4\"}],\"client_idle_timeout\":600,\"client_ip_pool\":\"172.16.0.0/16\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\",\"enable_split_tunneling\":true,\"health_reasons\":[{\"code\":\"cannot_access_server_certificate\",\"message\":\"Failed to get VPN server's server certificate from Secrets Manager.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health\"}],\"health_state\":\"ok\",\"hostname\":\"a8506291.us-south.vpn-server.appdomain.cloud\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\",\"id\":\"r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-vpn-server\",\"port\":443,\"private_ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"protocol\":\"tcp\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"vpn_server\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"vpn_servers\":[{\"certificate\":{\"crn\":\"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5\"},\"client_authentication\":[{\"method\":\"certificate\",\"identity_provider\":{\"provider_type\":\"iam\"}}],\"client_auto_delete\":true,\"client_auto_delete_timeout\":1,\"client_dns_server_ips\":[{\"address\":\"192.168.3.4\"}],\"client_idle_timeout\":600,\"client_ip_pool\":\"172.16.0.0/16\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\",\"enable_split_tunneling\":true,\"health_reasons\":[{\"code\":\"cannot_access_server_certificate\",\"message\":\"Failed to get VPN server's server certificate from Secrets Manager.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health\"}],\"health_state\":\"ok\",\"hostname\":\"a8506291.us-south.vpn-server.appdomain.cloud\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\",\"id\":\"r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-vpn-server\",\"port\":443,\"private_ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"protocol\":\"tcp\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"vpn_server\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListVpnServersOptions listVpnServersOptions = new ListVpnServersOptions.Builder() - .name("my-name") - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .sort("name") - .build(); - VpnServersPager pager = new VpnServersPager(vpcService, listVpnServersOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the createVpnServer operation with a valid options model parameter + // Test the deleteVpcDnsResolutionBinding operation with a valid options model parameter @Test - public void testCreateVpnServerWOptions() throws Throwable { + public void testDeleteVpcDnsResolutionBindingWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"certificate\": {\"crn\": \"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5\"}, \"client_authentication\": [{\"method\": \"certificate\", \"identity_provider\": {\"provider_type\": \"iam\"}}], \"client_auto_delete\": true, \"client_auto_delete_timeout\": 1, \"client_dns_server_ips\": [{\"address\": \"192.168.3.4\"}], \"client_idle_timeout\": 600, \"client_ip_pool\": \"172.16.0.0/16\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\", \"enable_split_tunneling\": true, \"health_reasons\": [{\"code\": \"cannot_access_server_certificate\", \"message\": \"Failed to get VPN server's server certificate from Secrets Manager.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health\"}], \"health_state\": \"ok\", \"hostname\": \"a8506291.us-south.vpn-server.appdomain.cloud\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\", \"id\": \"r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-vpn-server\", \"port\": 443, \"private_ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"protocol\": \"tcp\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"vpn_server\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String createVpnServerPath = "/vpn_servers"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"endpoint_gateways\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"endpoint_gateway\"}], \"health_reasons\": [{\"code\": \"disconnected_from_bound_vpc\", \"message\": \"The VPC specified in the DNS resolution binding has been disconnected.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\", \"id\": \"r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\", \"lifecycle_state\": \"stable\", \"name\": \"my-dns-resolution-binding\", \"resource_type\": \"vpc_dns_resolution_binding\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"vpc\"}}"; + String deleteVpcDnsResolutionBindingPath = "/vpcs/testString/dns_resolution_bindings/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the CertificateInstanceIdentityByCRN model - CertificateInstanceIdentityByCRN certificateInstanceIdentityModel = new CertificateInstanceIdentityByCRN.Builder() - .crn("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") - .build(); - - // Construct an instance of the VPNServerAuthenticationByUsernameIdProviderByIAM model - VPNServerAuthenticationByUsernameIdProviderByIAM vpnServerAuthenticationByUsernameIdProviderModel = new VPNServerAuthenticationByUsernameIdProviderByIAM.Builder() - .providerType("iam") - .build(); - - // Construct an instance of the VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype model - VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype vpnServerAuthenticationPrototypeModel = new VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype.Builder() - .method("username") - .identityProvider(vpnServerAuthenticationByUsernameIdProviderModel) - .build(); - - // Construct an instance of the SubnetIdentityById model - SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() - .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") - .build(); - - // Construct an instance of the IP model - IP ipModel = new IP.Builder() - .address("192.168.3.4") - .build(); - - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); - - // Construct an instance of the SecurityGroupIdentityById model - SecurityGroupIdentityById securityGroupIdentityModel = new SecurityGroupIdentityById.Builder() - .id("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") - .build(); - - // Construct an instance of the CreateVpnServerOptions model - CreateVpnServerOptions createVpnServerOptionsModel = new CreateVpnServerOptions.Builder() - .certificate(certificateInstanceIdentityModel) - .clientAuthentication(java.util.Arrays.asList(vpnServerAuthenticationPrototypeModel)) - .clientIpPool("172.16.0.0/16") - .subnets(java.util.Arrays.asList(subnetIdentityModel)) - .clientDnsServerIps(java.util.Arrays.asList(ipModel)) - .clientIdleTimeout(Long.valueOf("600")) - .enableSplitTunneling(false) - .name("my-vpn-server") - .port(Long.valueOf("443")) - .protocol("udp") - .resourceGroup(resourceGroupIdentityModel) - .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) + // Construct an instance of the DeleteVpcDnsResolutionBindingOptions model + DeleteVpcDnsResolutionBindingOptions deleteVpcDnsResolutionBindingOptionsModel = new DeleteVpcDnsResolutionBindingOptions.Builder() + .vpcId("testString") + .id("testString") .build(); - // Invoke createVpnServer() with a valid options model and verify the result - Response response = vpcService.createVpnServer(createVpnServerOptionsModel).execute(); + // Invoke deleteVpcDnsResolutionBinding() with a valid options model and verify the result + Response response = vpcService.deleteVpcDnsResolutionBinding(deleteVpcDnsResolutionBindingOptionsModel).execute(); assertNotNull(response); - VPNServer responseObj = response.getResult(); + VPCDNSResolutionBinding responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createVpnServerPath); + assertEquals(parsedPath, deleteVpcDnsResolutionBindingPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createVpnServer operation with and without retries enabled + // Test the deleteVpcDnsResolutionBinding operation with and without retries enabled @Test - public void testCreateVpnServerWRetries() throws Throwable { + public void testDeleteVpcDnsResolutionBindingWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateVpnServerWOptions(); + testDeleteVpcDnsResolutionBindingWOptions(); vpcService.disableRetries(); - testCreateVpnServerWOptions(); + testDeleteVpcDnsResolutionBindingWOptions(); } - // Test the createVpnServer operation with a null options model (negative test) + // Test the deleteVpcDnsResolutionBinding operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateVpnServerNoOptions() throws Throwable { + public void testDeleteVpcDnsResolutionBindingNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createVpnServer(null).execute(); + vpcService.deleteVpcDnsResolutionBinding(null).execute(); } - // Test the deleteVpnServer operation with a valid options model parameter + // Test the deleteVpcRoute operation with a valid options model parameter @Test - public void testDeleteVpnServerWOptions() throws Throwable { + public void testDeleteVpcRouteWOptions() throws Throwable { // Register a mock response String mockResponseBody = ""; - String deleteVpnServerPath = "/vpn_servers/testString"; + String deleteVpcRoutePath = "/vpcs/testString/routes/testString"; server.enqueue(new MockResponse() - .setResponseCode(202) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the DeleteVpnServerOptions model - DeleteVpnServerOptions deleteVpnServerOptionsModel = new DeleteVpnServerOptions.Builder() + // Construct an instance of the DeleteVpcRouteOptions model + DeleteVpcRouteOptions deleteVpcRouteOptionsModel = new DeleteVpcRouteOptions.Builder() + .vpcId("testString") .id("testString") - .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke deleteVpnServer() with a valid options model and verify the result - Response response = vpcService.deleteVpnServer(deleteVpnServerOptionsModel).execute(); + // Invoke deleteVpcRoute() with a valid options model and verify the result + Response response = vpcService.deleteVpcRoute(deleteVpcRouteOptionsModel).execute(); assertNotNull(response); Void responseObj = response.getResult(); assertNull(responseObj); @@ -28460,256 +29535,159 @@ public void testDeleteVpnServerWOptions() throws Throwable { assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteVpnServerPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - } - - // Test the deleteVpnServer operation with and without retries enabled - @Test - public void testDeleteVpnServerWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testDeleteVpnServerWOptions(); - - vpcService.disableRetries(); - testDeleteVpnServerWOptions(); - } - - // Test the deleteVpnServer operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteVpnServerNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.deleteVpnServer(null).execute(); - } - - // Test the getVpnServer operation with a valid options model parameter - @Test - public void testGetVpnServerWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"certificate\": {\"crn\": \"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5\"}, \"client_authentication\": [{\"method\": \"certificate\", \"identity_provider\": {\"provider_type\": \"iam\"}}], \"client_auto_delete\": true, \"client_auto_delete_timeout\": 1, \"client_dns_server_ips\": [{\"address\": \"192.168.3.4\"}], \"client_idle_timeout\": 600, \"client_ip_pool\": \"172.16.0.0/16\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\", \"enable_split_tunneling\": true, \"health_reasons\": [{\"code\": \"cannot_access_server_certificate\", \"message\": \"Failed to get VPN server's server certificate from Secrets Manager.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health\"}], \"health_state\": \"ok\", \"hostname\": \"a8506291.us-south.vpn-server.appdomain.cloud\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\", \"id\": \"r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-vpn-server\", \"port\": 443, \"private_ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"protocol\": \"tcp\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"vpn_server\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String getVpnServerPath = "/vpn_servers/testString"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the GetVpnServerOptions model - GetVpnServerOptions getVpnServerOptionsModel = new GetVpnServerOptions.Builder() - .id("testString") - .build(); - - // Invoke getVpnServer() with a valid options model and verify the result - Response response = vpcService.getVpnServer(getVpnServerOptionsModel).execute(); - assertNotNull(response); - VPNServer responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getVpnServerPath); + assertEquals(parsedPath, deleteVpcRoutePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getVpnServer operation with and without retries enabled + // Test the deleteVpcRoute operation with and without retries enabled @Test - public void testGetVpnServerWRetries() throws Throwable { + public void testDeleteVpcRouteWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetVpnServerWOptions(); + testDeleteVpcRouteWOptions(); vpcService.disableRetries(); - testGetVpnServerWOptions(); + testDeleteVpcRouteWOptions(); } - // Test the getVpnServer operation with a null options model (negative test) + // Test the deleteVpcRoute operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetVpnServerNoOptions() throws Throwable { + public void testDeleteVpcRouteNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getVpnServer(null).execute(); + vpcService.deleteVpcRoute(null).execute(); } - // Test the updateVpnServer operation with a valid options model parameter + // Test the deleteVpcRoutingTable operation with a valid options model parameter @Test - public void testUpdateVpnServerWOptions() throws Throwable { + public void testDeleteVpcRoutingTableWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"certificate\": {\"crn\": \"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5\"}, \"client_authentication\": [{\"method\": \"certificate\", \"identity_provider\": {\"provider_type\": \"iam\"}}], \"client_auto_delete\": true, \"client_auto_delete_timeout\": 1, \"client_dns_server_ips\": [{\"address\": \"192.168.3.4\"}], \"client_idle_timeout\": 600, \"client_ip_pool\": \"172.16.0.0/16\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\", \"enable_split_tunneling\": true, \"health_reasons\": [{\"code\": \"cannot_access_server_certificate\", \"message\": \"Failed to get VPN server's server certificate from Secrets Manager.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health\"}], \"health_state\": \"ok\", \"hostname\": \"a8506291.us-south.vpn-server.appdomain.cloud\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\", \"id\": \"r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-vpn-server\", \"port\": 443, \"private_ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"protocol\": \"tcp\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"vpn_server\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String updateVpnServerPath = "/vpn_servers/testString"; + String mockResponseBody = ""; + String deleteVpcRoutingTablePath = "/vpcs/testString/routing_tables/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the CertificateInstanceIdentityByCRN model - CertificateInstanceIdentityByCRN certificateInstanceIdentityModel = new CertificateInstanceIdentityByCRN.Builder() - .crn("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") - .build(); - - // Construct an instance of the VPNServerAuthenticationByUsernameIdProviderByIAM model - VPNServerAuthenticationByUsernameIdProviderByIAM vpnServerAuthenticationByUsernameIdProviderModel = new VPNServerAuthenticationByUsernameIdProviderByIAM.Builder() - .providerType("iam") - .build(); - - // Construct an instance of the VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype model - VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype vpnServerAuthenticationPrototypeModel = new VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype.Builder() - .method("username") - .identityProvider(vpnServerAuthenticationByUsernameIdProviderModel) - .build(); - - // Construct an instance of the IP model - IP ipModel = new IP.Builder() - .address("192.168.3.4") - .build(); - - // Construct an instance of the SubnetIdentityById model - SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() - .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") - .build(); - - // Construct an instance of the VPNServerPatch model - VPNServerPatch vpnServerPatchModel = new VPNServerPatch.Builder() - .certificate(certificateInstanceIdentityModel) - .clientAuthentication(java.util.Arrays.asList(vpnServerAuthenticationPrototypeModel)) - .clientDnsServerIps(java.util.Arrays.asList(ipModel)) - .clientIdleTimeout(Long.valueOf("600")) - .clientIpPool("172.16.0.0/16") - .enableSplitTunneling(true) - .name("my-vpn-server-updated") - .port(Long.valueOf("443")) - .protocol("tcp") - .subnets(java.util.Arrays.asList(subnetIdentityModel)) - .build(); - Map vpnServerPatchModelAsPatch = vpnServerPatchModel.asPatch(); - - // Construct an instance of the UpdateVpnServerOptions model - UpdateVpnServerOptions updateVpnServerOptionsModel = new UpdateVpnServerOptions.Builder() + // Construct an instance of the DeleteVpcRoutingTableOptions model + DeleteVpcRoutingTableOptions deleteVpcRoutingTableOptionsModel = new DeleteVpcRoutingTableOptions.Builder() + .vpcId("testString") .id("testString") - .vpnServerPatch(vpnServerPatchModelAsPatch) .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke updateVpnServer() with a valid options model and verify the result - Response response = vpcService.updateVpnServer(updateVpnServerOptionsModel).execute(); + // Invoke deleteVpcRoutingTable() with a valid options model and verify the result + Response response = vpcService.deleteVpcRoutingTable(deleteVpcRoutingTableOptionsModel).execute(); assertNotNull(response); - VPNServer responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateVpnServerPath); + assertEquals(parsedPath, deleteVpcRoutingTablePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateVpnServer operation with and without retries enabled + // Test the deleteVpcRoutingTable operation with and without retries enabled @Test - public void testUpdateVpnServerWRetries() throws Throwable { + public void testDeleteVpcRoutingTableWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateVpnServerWOptions(); + testDeleteVpcRoutingTableWOptions(); vpcService.disableRetries(); - testUpdateVpnServerWOptions(); + testDeleteVpcRoutingTableWOptions(); } - // Test the updateVpnServer operation with a null options model (negative test) + // Test the deleteVpcRoutingTable operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateVpnServerNoOptions() throws Throwable { + public void testDeleteVpcRoutingTableNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateVpnServer(null).execute(); + vpcService.deleteVpcRoutingTable(null).execute(); } - // Test the getVpnServerClientConfiguration operation with a valid options model parameter + // Test the deleteVpcRoutingTableRoute operation with a valid options model parameter @Test - public void testGetVpnServerClientConfigurationWOptions() throws Throwable { + public void testDeleteVpcRoutingTableRouteWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "\"client\nproto udp\nremote a8506291.us-south.vpn-server.appdomain.cloud\nport 443\n\ndev tun\nnobind\n\n-----BEGIN CERTIFICATE-----\nxxxxxx\n-----END CERTIFICATE-----\n\""; - String getVpnServerClientConfigurationPath = "/vpn_servers/testString/client_configuration"; + String mockResponseBody = ""; + String deleteVpcRoutingTableRoutePath = "/vpcs/testString/routing_tables/testString/routes/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "text/plain") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the GetVpnServerClientConfigurationOptions model - GetVpnServerClientConfigurationOptions getVpnServerClientConfigurationOptionsModel = new GetVpnServerClientConfigurationOptions.Builder() + // Construct an instance of the DeleteVpcRoutingTableRouteOptions model + DeleteVpcRoutingTableRouteOptions deleteVpcRoutingTableRouteOptionsModel = new DeleteVpcRoutingTableRouteOptions.Builder() + .vpcId("testString") + .routingTableId("testString") .id("testString") .build(); - // Invoke getVpnServerClientConfiguration() with a valid options model and verify the result - Response response = vpcService.getVpnServerClientConfiguration(getVpnServerClientConfigurationOptionsModel).execute(); + // Invoke deleteVpcRoutingTableRoute() with a valid options model and verify the result + Response response = vpcService.deleteVpcRoutingTableRoute(deleteVpcRoutingTableRouteOptionsModel).execute(); assertNotNull(response); - String responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getVpnServerClientConfigurationPath); + assertEquals(parsedPath, deleteVpcRoutingTableRoutePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getVpnServerClientConfiguration operation with and without retries enabled + // Test the deleteVpcRoutingTableRoute operation with and without retries enabled @Test - public void testGetVpnServerClientConfigurationWRetries() throws Throwable { + public void testDeleteVpcRoutingTableRouteWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetVpnServerClientConfigurationWOptions(); + testDeleteVpcRoutingTableRouteWOptions(); vpcService.disableRetries(); - testGetVpnServerClientConfigurationWOptions(); + testDeleteVpcRoutingTableRouteWOptions(); } - // Test the getVpnServerClientConfiguration operation with a null options model (negative test) + // Test the deleteVpcRoutingTableRoute operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetVpnServerClientConfigurationNoOptions() throws Throwable { + public void testDeleteVpcRoutingTableRouteNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getVpnServerClientConfiguration(null).execute(); + vpcService.deleteVpcRoutingTableRoute(null).execute(); } - // Test the listVpnServerClients operation with a valid options model parameter + // Test the getVpc operation with a valid options model parameter @Test - public void testListVpnServerClientsWOptions() throws Throwable { + public void testGetVpcWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"clients\": [{\"client_ip\": {\"address\": \"192.168.3.4\"}, \"common_name\": \"commonName\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"disconnected_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/clients/r006-b37832e2-7abe-4b20-a292-c70b007569c6\", \"id\": \"r006-b37832e2-7abe-4b20-a292-c70b007569c6\", \"remote_ip\": {\"address\": \"192.168.3.4\"}, \"remote_port\": 22, \"resource_type\": \"vpn_server_client\", \"status\": \"connected\", \"username\": \"username\"}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listVpnServerClientsPath = "/vpn_servers/testString/clients"; + String mockResponseBody = "{\"classic_access\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"cse_source_ips\": [{\"ip\": {\"address\": \"192.168.3.4\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"default_network_acl\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\"}, \"default_routing_table\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"name\": \"my-routing-table-1\", \"resource_type\": \"routing_table\"}, \"default_security_group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}, \"dns\": {\"enable_hub\": false, \"resolution_binding_count\": 0, \"resolver\": {\"servers\": [{\"address\": \"192.168.3.4\", \"zone_affinity\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"type\": \"delegated\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"vpc\"}}}, \"health_reasons\": [{\"code\": \"dns_resolution_binding_failed\", \"message\": \"The VPC specified in the DNS resolution binding has been disconnected.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"public_address_ranges\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"id\": \"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"name\": \"my-public-address-range\", \"resource_type\": \"public_address_range\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"vpc\", \"status\": \"available\"}"; + String getVpcPath = "/vpcs/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListVpnServerClientsOptions model - ListVpnServerClientsOptions listVpnServerClientsOptionsModel = new ListVpnServerClientsOptions.Builder() - .vpnServerId("testString") - .start("testString") - .limit(Long.valueOf("10")) - .sort("created_at") + // Construct an instance of the GetVpcOptions model + GetVpcOptions getVpcOptionsModel = new GetVpcOptions.Builder() + .id("testString") .build(); - // Invoke listVpnServerClients() with a valid options model and verify the result - Response response = vpcService.listVpnServerClients(listVpnServerClientsOptionsModel).execute(); + // Invoke getVpc() with a valid options model and verify the result + Response response = vpcService.getVpc(getVpcOptionsModel).execute(); assertNotNull(response); - VPNServerClientCollection responseObj = response.getResult(); + VPC responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -28718,174 +29696,105 @@ public void testListVpnServerClientsWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listVpnServerClientsPath); + assertEquals(parsedPath, getVpcPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("sort"), "created_at"); } - // Test the listVpnServerClients operation with and without retries enabled + // Test the getVpc operation with and without retries enabled @Test - public void testListVpnServerClientsWRetries() throws Throwable { + public void testGetVpcWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListVpnServerClientsWOptions(); + testGetVpcWOptions(); vpcService.disableRetries(); - testListVpnServerClientsWOptions(); + testGetVpcWOptions(); } - // Test the listVpnServerClients operation with a null options model (negative test) + // Test the getVpc operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListVpnServerClientsNoOptions() throws Throwable { + public void testGetVpcNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listVpnServerClients(null).execute(); + vpcService.getVpc(null).execute(); } - // Test the listVpnServerClients operation using the VpnServerClientsPager.getNext() method - @Test - public void testListVpnServerClientsWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"clients\":[{\"client_ip\":{\"address\":\"192.168.3.4\"},\"common_name\":\"commonName\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"disconnected_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/clients/r006-b37832e2-7abe-4b20-a292-c70b007569c6\",\"id\":\"r006-b37832e2-7abe-4b20-a292-c70b007569c6\",\"remote_ip\":{\"address\":\"192.168.3.4\"},\"remote_port\":22,\"resource_type\":\"vpn_server_client\",\"status\":\"connected\",\"username\":\"username\"}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"clients\":[{\"client_ip\":{\"address\":\"192.168.3.4\"},\"common_name\":\"commonName\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"disconnected_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/clients/r006-b37832e2-7abe-4b20-a292-c70b007569c6\",\"id\":\"r006-b37832e2-7abe-4b20-a292-c70b007569c6\",\"remote_ip\":{\"address\":\"192.168.3.4\"},\"remote_port\":22,\"resource_type\":\"vpn_server_client\",\"status\":\"connected\",\"username\":\"username\"}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListVpnServerClientsOptions listVpnServerClientsOptions = new ListVpnServerClientsOptions.Builder() - .vpnServerId("testString") - .limit(Long.valueOf("10")) - .sort("created_at") - .build(); - - List allResults = new ArrayList<>(); - VpnServerClientsPager pager = new VpnServerClientsPager(vpcService, listVpnServerClientsOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); - } - - // Test the listVpnServerClients operation using the VpnServerClientsPager.getAll() method + // Test the getVpcAddressPrefix operation with a valid options model parameter @Test - public void testListVpnServerClientsWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"clients\":[{\"client_ip\":{\"address\":\"192.168.3.4\"},\"common_name\":\"commonName\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"disconnected_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/clients/r006-b37832e2-7abe-4b20-a292-c70b007569c6\",\"id\":\"r006-b37832e2-7abe-4b20-a292-c70b007569c6\",\"remote_ip\":{\"address\":\"192.168.3.4\"},\"remote_port\":22,\"resource_type\":\"vpn_server_client\",\"status\":\"connected\",\"username\":\"username\"}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"clients\":[{\"client_ip\":{\"address\":\"192.168.3.4\"},\"common_name\":\"commonName\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"disconnected_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/clients/r006-b37832e2-7abe-4b20-a292-c70b007569c6\",\"id\":\"r006-b37832e2-7abe-4b20-a292-c70b007569c6\",\"remote_ip\":{\"address\":\"192.168.3.4\"},\"remote_port\":22,\"resource_type\":\"vpn_server_client\",\"status\":\"connected\",\"username\":\"username\"}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); + public void testGetVpcAddressPrefixWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"cidr\": \"192.168.3.0/24\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"has_subnets\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/address_prefixes/r006-68574057-c5e0-4675-ada4-99377d8f4789\", \"id\": \"r006-68574057-c5e0-4675-ada4-99377d8f4789\", \"is_default\": false, \"name\": \"my-vpc-address-prefix-zone-1\", \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String getVpcAddressPrefixPath = "/vpcs/testString/address_prefixes/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListVpnServerClientsOptions listVpnServerClientsOptions = new ListVpnServerClientsOptions.Builder() - .vpnServerId("testString") - .limit(Long.valueOf("10")) - .sort("created_at") - .build(); - - VpnServerClientsPager pager = new VpnServerClientsPager(vpcService, listVpnServerClientsOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the deleteVpnServerClient operation with a valid options model parameter - @Test - public void testDeleteVpnServerClientWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = ""; - String deleteVpnServerClientPath = "/vpn_servers/testString/clients/testString"; - server.enqueue(new MockResponse() - .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the DeleteVpnServerClientOptions model - DeleteVpnServerClientOptions deleteVpnServerClientOptionsModel = new DeleteVpnServerClientOptions.Builder() - .vpnServerId("testString") + // Construct an instance of the GetVpcAddressPrefixOptions model + GetVpcAddressPrefixOptions getVpcAddressPrefixOptionsModel = new GetVpcAddressPrefixOptions.Builder() + .vpcId("testString") .id("testString") .build(); - // Invoke deleteVpnServerClient() with a valid options model and verify the result - Response response = vpcService.deleteVpnServerClient(deleteVpnServerClientOptionsModel).execute(); + // Invoke getVpcAddressPrefix() with a valid options model and verify the result + Response response = vpcService.getVpcAddressPrefix(getVpcAddressPrefixOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + AddressPrefix 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteVpnServerClientPath); + assertEquals(parsedPath, getVpcAddressPrefixPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteVpnServerClient operation with and without retries enabled + // Test the getVpcAddressPrefix operation with and without retries enabled @Test - public void testDeleteVpnServerClientWRetries() throws Throwable { + public void testGetVpcAddressPrefixWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteVpnServerClientWOptions(); + testGetVpcAddressPrefixWOptions(); vpcService.disableRetries(); - testDeleteVpnServerClientWOptions(); + testGetVpcAddressPrefixWOptions(); } - // Test the deleteVpnServerClient operation with a null options model (negative test) + // Test the getVpcAddressPrefix operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteVpnServerClientNoOptions() throws Throwable { + public void testGetVpcAddressPrefixNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteVpnServerClient(null).execute(); + vpcService.getVpcAddressPrefix(null).execute(); } - // Test the getVpnServerClient operation with a valid options model parameter + // Test the getVpcDefaultNetworkAcl operation with a valid options model parameter @Test - public void testGetVpnServerClientWOptions() throws Throwable { + public void testGetVpcDefaultNetworkAclWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"client_ip\": {\"address\": \"192.168.3.4\"}, \"common_name\": \"commonName\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"disconnected_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/clients/r006-b37832e2-7abe-4b20-a292-c70b007569c6\", \"id\": \"r006-b37832e2-7abe-4b20-a292-c70b007569c6\", \"remote_ip\": {\"address\": \"192.168.3.4\"}, \"remote_port\": 22, \"resource_type\": \"vpn_server_client\", \"status\": \"connected\", \"username\": \"username\"}"; - String getVpnServerClientPath = "/vpn_servers/testString/clients/testString"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"mnemonic-ersatz-eatery-mythology\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"rules\": [{\"action\": \"allow\", \"before\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"name\": \"my-network-acl-rule\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"id\": \"r006-8daca77a-4980-4d33-8f3e-7038797be8f9\", \"ip_version\": \"ipv4\", \"name\": \"my-network-acl-rule\", \"source\": \"192.168.3.0/24\", \"protocol\": \"all\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String getVpcDefaultNetworkAclPath = "/vpcs/testString/default_network_acl"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetVpnServerClientOptions model - GetVpnServerClientOptions getVpnServerClientOptionsModel = new GetVpnServerClientOptions.Builder() - .vpnServerId("testString") + // Construct an instance of the GetVpcDefaultNetworkAclOptions model + GetVpcDefaultNetworkAclOptions getVpcDefaultNetworkAclOptionsModel = new GetVpcDefaultNetworkAclOptions.Builder() .id("testString") .build(); - // Invoke getVpnServerClient() with a valid options model and verify the result - Response response = vpcService.getVpnServerClient(getVpnServerClientOptionsModel).execute(); + // Invoke getVpcDefaultNetworkAcl() with a valid options model and verify the result + Response response = vpcService.getVpcDefaultNetworkAcl(getVpcDefaultNetworkAclOptionsModel).execute(); assertNotNull(response); - VPNServerClient responseObj = response.getResult(); + DefaultNetworkACL responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -28894,107 +29803,104 @@ public void testGetVpnServerClientWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getVpnServerClientPath); + assertEquals(parsedPath, getVpcDefaultNetworkAclPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getVpnServerClient operation with and without retries enabled + // Test the getVpcDefaultNetworkAcl operation with and without retries enabled @Test - public void testGetVpnServerClientWRetries() throws Throwable { + public void testGetVpcDefaultNetworkAclWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetVpnServerClientWOptions(); + testGetVpcDefaultNetworkAclWOptions(); vpcService.disableRetries(); - testGetVpnServerClientWOptions(); + testGetVpcDefaultNetworkAclWOptions(); } - // Test the getVpnServerClient operation with a null options model (negative test) + // Test the getVpcDefaultNetworkAcl operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetVpnServerClientNoOptions() throws Throwable { + public void testGetVpcDefaultNetworkAclNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getVpnServerClient(null).execute(); + vpcService.getVpcDefaultNetworkAcl(null).execute(); } - // Test the disconnectVpnClient operation with a valid options model parameter + // Test the getVpcDefaultRoutingTable operation with a valid options model parameter @Test - public void testDisconnectVpnClientWOptions() throws Throwable { + public void testGetVpcDefaultRoutingTableWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String disconnectVpnClientPath = "/vpn_servers/testString/clients/testString/disconnect"; + String mockResponseBody = "{\"accept_routes_from\": [{\"resource_type\": \"vpn_server\"}], \"advertise_routes_to\": [\"transit_gateway\"], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"is_default\": false, \"lifecycle_state\": \"stable\", \"name\": \"milled-easy-equine-machines\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"routing_table\", \"route_direct_link_ingress\": true, \"route_internet_ingress\": true, \"route_transit_gateway_ingress\": true, \"route_vpc_zone_ingress\": false, \"routes\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"name\": \"my-vpc-routing-table-route\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}]}"; + String getVpcDefaultRoutingTablePath = "/vpcs/testString/default_routing_table"; server.enqueue(new MockResponse() - .setResponseCode(202) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DisconnectVpnClientOptions model - DisconnectVpnClientOptions disconnectVpnClientOptionsModel = new DisconnectVpnClientOptions.Builder() - .vpnServerId("testString") + // Construct an instance of the GetVpcDefaultRoutingTableOptions model + GetVpcDefaultRoutingTableOptions getVpcDefaultRoutingTableOptionsModel = new GetVpcDefaultRoutingTableOptions.Builder() .id("testString") .build(); - // Invoke disconnectVpnClient() with a valid options model and verify the result - Response response = vpcService.disconnectVpnClient(disconnectVpnClientOptionsModel).execute(); + // Invoke getVpcDefaultRoutingTable() with a valid options model and verify the result + Response response = vpcService.getVpcDefaultRoutingTable(getVpcDefaultRoutingTableOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + DefaultRoutingTable responseObj = response.getResult(); + assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, disconnectVpnClientPath); + assertEquals(parsedPath, getVpcDefaultRoutingTablePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the disconnectVpnClient operation with and without retries enabled + // Test the getVpcDefaultRoutingTable operation with and without retries enabled @Test - public void testDisconnectVpnClientWRetries() throws Throwable { + public void testGetVpcDefaultRoutingTableWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDisconnectVpnClientWOptions(); + testGetVpcDefaultRoutingTableWOptions(); vpcService.disableRetries(); - testDisconnectVpnClientWOptions(); + testGetVpcDefaultRoutingTableWOptions(); } - // Test the disconnectVpnClient operation with a null options model (negative test) + // Test the getVpcDefaultRoutingTable operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDisconnectVpnClientNoOptions() throws Throwable { + public void testGetVpcDefaultRoutingTableNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.disconnectVpnClient(null).execute(); + vpcService.getVpcDefaultRoutingTable(null).execute(); } - // Test the listVpnServerRoutes operation with a valid options model parameter + // Test the getVpcDefaultSecurityGroup operation with a valid options model parameter @Test - public void testListVpnServerRoutesWOptions() throws Throwable { + public void testGetVpcDefaultSecurityGroupWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"routes\": [{\"action\": \"deliver\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"health_reasons\": [{\"code\": \"internal_error\", \"message\": \"Internal error (contact IBM support).\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"id\": \"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-vpn-route-1\", \"resource_type\": \"vpn_server_route\"}], \"total_count\": 132}"; - String listVpnServerRoutesPath = "/vpn_servers/testString/routes"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"observant-chip-emphatic-engraver\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"rules\": [{\"direction\": \"inbound\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"id\": \"r006-6f2a6efe-21e2-401c-b237-620aa26ba16a\", \"ip_version\": \"ipv4\", \"local\": {\"address\": \"192.168.3.4\"}, \"remote\": {\"address\": \"192.168.3.4\"}, \"protocol\": \"all\"}], \"targets\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"id\": \"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6\", \"name\": \"my-bare-metal-server-network-interface\", \"resource_type\": \"network_interface\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String getVpcDefaultSecurityGroupPath = "/vpcs/testString/default_security_group"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListVpnServerRoutesOptions model - ListVpnServerRoutesOptions listVpnServerRoutesOptionsModel = new ListVpnServerRoutesOptions.Builder() - .vpnServerId("testString") - .start("testString") - .limit(Long.valueOf("10")) - .sort("name") + // Construct an instance of the GetVpcDefaultSecurityGroupOptions model + GetVpcDefaultSecurityGroupOptions getVpcDefaultSecurityGroupOptionsModel = new GetVpcDefaultSecurityGroupOptions.Builder() + .id("testString") .build(); - // Invoke listVpnServerRoutes() with a valid options model and verify the result - Response response = vpcService.listVpnServerRoutes(listVpnServerRoutesOptionsModel).execute(); + // Invoke getVpcDefaultSecurityGroup() with a valid options model and verify the result + Response response = vpcService.getVpcDefaultSecurityGroup(getVpcDefaultSecurityGroupOptionsModel).execute(); assertNotNull(response); - VPNServerRouteCollection responseObj = response.getResult(); + DefaultSecurityGroup responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -29003,230 +29909,160 @@ public void testListVpnServerRoutesWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listVpnServerRoutesPath); + assertEquals(parsedPath, getVpcDefaultSecurityGroupPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("sort"), "name"); } - // Test the listVpnServerRoutes operation with and without retries enabled + // Test the getVpcDefaultSecurityGroup operation with and without retries enabled @Test - public void testListVpnServerRoutesWRetries() throws Throwable { + public void testGetVpcDefaultSecurityGroupWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListVpnServerRoutesWOptions(); + testGetVpcDefaultSecurityGroupWOptions(); vpcService.disableRetries(); - testListVpnServerRoutesWOptions(); + testGetVpcDefaultSecurityGroupWOptions(); } - // Test the listVpnServerRoutes operation with a null options model (negative test) + // Test the getVpcDefaultSecurityGroup operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListVpnServerRoutesNoOptions() throws Throwable { + public void testGetVpcDefaultSecurityGroupNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listVpnServerRoutes(null).execute(); - } - - // Test the listVpnServerRoutes operation using the VpnServerRoutesPager.getNext() method - @Test - public void testListVpnServerRoutesWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"routes\":[{\"action\":\"deliver\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"destination\":\"192.168.3.0/24\",\"health_reasons\":[{\"code\":\"internal_error\",\"message\":\"Internal error (contact IBM support).\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"id\":\"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-vpn-route-1\",\"resource_type\":\"vpn_server_route\"}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"routes\":[{\"action\":\"deliver\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"destination\":\"192.168.3.0/24\",\"health_reasons\":[{\"code\":\"internal_error\",\"message\":\"Internal error (contact IBM support).\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"id\":\"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-vpn-route-1\",\"resource_type\":\"vpn_server_route\"}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListVpnServerRoutesOptions listVpnServerRoutesOptions = new ListVpnServerRoutesOptions.Builder() - .vpnServerId("testString") - .limit(Long.valueOf("10")) - .sort("name") - .build(); - - List allResults = new ArrayList<>(); - VpnServerRoutesPager pager = new VpnServerRoutesPager(vpcService, listVpnServerRoutesOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + vpcService.getVpcDefaultSecurityGroup(null).execute(); } - - // Test the listVpnServerRoutes operation using the VpnServerRoutesPager.getAll() method - @Test - public void testListVpnServerRoutesWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"routes\":[{\"action\":\"deliver\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"destination\":\"192.168.3.0/24\",\"health_reasons\":[{\"code\":\"internal_error\",\"message\":\"Internal error (contact IBM support).\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"id\":\"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-vpn-route-1\",\"resource_type\":\"vpn_server_route\"}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"routes\":[{\"action\":\"deliver\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"destination\":\"192.168.3.0/24\",\"health_reasons\":[{\"code\":\"internal_error\",\"message\":\"Internal error (contact IBM support).\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"id\":\"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-vpn-route-1\",\"resource_type\":\"vpn_server_route\"}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListVpnServerRoutesOptions listVpnServerRoutesOptions = new ListVpnServerRoutesOptions.Builder() - .vpnServerId("testString") - .limit(Long.valueOf("10")) - .sort("name") - .build(); - VpnServerRoutesPager pager = new VpnServerRoutesPager(vpcService, listVpnServerRoutesOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the createVpnServerRoute operation with a valid options model parameter + // Test the getVpcDnsResolutionBinding operation with a valid options model parameter @Test - public void testCreateVpnServerRouteWOptions() throws Throwable { + public void testGetVpcDnsResolutionBindingWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"action\": \"deliver\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"health_reasons\": [{\"code\": \"internal_error\", \"message\": \"Internal error (contact IBM support).\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"id\": \"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-vpn-route-1\", \"resource_type\": \"vpn_server_route\"}"; - String createVpnServerRoutePath = "/vpn_servers/testString/routes"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"endpoint_gateways\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"endpoint_gateway\"}], \"health_reasons\": [{\"code\": \"disconnected_from_bound_vpc\", \"message\": \"The VPC specified in the DNS resolution binding has been disconnected.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\", \"id\": \"r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\", \"lifecycle_state\": \"stable\", \"name\": \"my-dns-resolution-binding\", \"resource_type\": \"vpc_dns_resolution_binding\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"vpc\"}}"; + String getVpcDnsResolutionBindingPath = "/vpcs/testString/dns_resolution_bindings/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the CreateVpnServerRouteOptions model - CreateVpnServerRouteOptions createVpnServerRouteOptionsModel = new CreateVpnServerRouteOptions.Builder() - .vpnServerId("testString") - .destination("172.16.0.0/16") - .action("deliver") - .name("my-vpn-route-2") + // Construct an instance of the GetVpcDnsResolutionBindingOptions model + GetVpcDnsResolutionBindingOptions getVpcDnsResolutionBindingOptionsModel = new GetVpcDnsResolutionBindingOptions.Builder() + .vpcId("testString") + .id("testString") .build(); - // Invoke createVpnServerRoute() with a valid options model and verify the result - Response response = vpcService.createVpnServerRoute(createVpnServerRouteOptionsModel).execute(); + // Invoke getVpcDnsResolutionBinding() with a valid options model and verify the result + Response response = vpcService.getVpcDnsResolutionBinding(getVpcDnsResolutionBindingOptionsModel).execute(); assertNotNull(response); - VPNServerRoute responseObj = response.getResult(); + VPCDNSResolutionBinding responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createVpnServerRoutePath); + assertEquals(parsedPath, getVpcDnsResolutionBindingPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createVpnServerRoute operation with and without retries enabled + // Test the getVpcDnsResolutionBinding operation with and without retries enabled @Test - public void testCreateVpnServerRouteWRetries() throws Throwable { + public void testGetVpcDnsResolutionBindingWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateVpnServerRouteWOptions(); + testGetVpcDnsResolutionBindingWOptions(); vpcService.disableRetries(); - testCreateVpnServerRouteWOptions(); + testGetVpcDnsResolutionBindingWOptions(); } - // Test the createVpnServerRoute operation with a null options model (negative test) + // Test the getVpcDnsResolutionBinding operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateVpnServerRouteNoOptions() throws Throwable { + public void testGetVpcDnsResolutionBindingNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createVpnServerRoute(null).execute(); + vpcService.getVpcDnsResolutionBinding(null).execute(); } - // Test the deleteVpnServerRoute operation with a valid options model parameter + // Test the getVpcRoute operation with a valid options model parameter @Test - public void testDeleteVpnServerRouteWOptions() throws Throwable { + public void testGetVpcRouteWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteVpnServerRoutePath = "/vpn_servers/testString/routes/testString"; + String mockResponseBody = "{\"action\": \"delegate\", \"advertise\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"creator\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"id\": \"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"name\": \"my-vpn-gateway\", \"resource_type\": \"vpn_gateway\"}, \"destination\": \"192.168.3.0/24\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"lifecycle_state\": \"stable\", \"name\": \"my-vpc-routing-table-route\", \"next_hop\": {\"address\": \"192.168.3.4\"}, \"origin\": \"service\", \"priority\": 1, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String getVpcRoutePath = "/vpcs/testString/routes/testString"; server.enqueue(new MockResponse() - .setResponseCode(202) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteVpnServerRouteOptions model - DeleteVpnServerRouteOptions deleteVpnServerRouteOptionsModel = new DeleteVpnServerRouteOptions.Builder() - .vpnServerId("testString") + // Construct an instance of the GetVpcRouteOptions model + GetVpcRouteOptions getVpcRouteOptionsModel = new GetVpcRouteOptions.Builder() + .vpcId("testString") .id("testString") .build(); - // Invoke deleteVpnServerRoute() with a valid options model and verify the result - Response response = vpcService.deleteVpnServerRoute(deleteVpnServerRouteOptionsModel).execute(); + // Invoke getVpcRoute() with a valid options model and verify the result + Response response = vpcService.getVpcRoute(getVpcRouteOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + GetVpcRouteResponse 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteVpnServerRoutePath); + assertEquals(parsedPath, getVpcRoutePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteVpnServerRoute operation with and without retries enabled + // Test the getVpcRoute operation with and without retries enabled @Test - public void testDeleteVpnServerRouteWRetries() throws Throwable { + public void testGetVpcRouteWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteVpnServerRouteWOptions(); + testGetVpcRouteWOptions(); vpcService.disableRetries(); - testDeleteVpnServerRouteWOptions(); + testGetVpcRouteWOptions(); } - // Test the deleteVpnServerRoute operation with a null options model (negative test) + // Test the getVpcRoute operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteVpnServerRouteNoOptions() throws Throwable { + public void testGetVpcRouteNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteVpnServerRoute(null).execute(); + vpcService.getVpcRoute(null).execute(); } - // Test the getVpnServerRoute operation with a valid options model parameter + // Test the getVpcRoutingTable operation with a valid options model parameter @Test - public void testGetVpnServerRouteWOptions() throws Throwable { + public void testGetVpcRoutingTableWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"action\": \"deliver\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"health_reasons\": [{\"code\": \"internal_error\", \"message\": \"Internal error (contact IBM support).\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"id\": \"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-vpn-route-1\", \"resource_type\": \"vpn_server_route\"}"; - String getVpnServerRoutePath = "/vpn_servers/testString/routes/testString"; + String mockResponseBody = "{\"accept_routes_from\": [{\"resource_type\": \"vpn_server\"}], \"advertise_routes_to\": [\"transit_gateway\"], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"is_default\": false, \"lifecycle_state\": \"stable\", \"name\": \"my-routing-table-1\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"routing_table\", \"route_direct_link_ingress\": true, \"route_internet_ingress\": true, \"route_transit_gateway_ingress\": true, \"route_vpc_zone_ingress\": false, \"routes\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"name\": \"my-vpc-routing-table-route\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}]}"; + String getVpcRoutingTablePath = "/vpcs/testString/routing_tables/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetVpnServerRouteOptions model - GetVpnServerRouteOptions getVpnServerRouteOptionsModel = new GetVpnServerRouteOptions.Builder() - .vpnServerId("testString") + // Construct an instance of the GetVpcRoutingTableOptions model + GetVpcRoutingTableOptions getVpcRoutingTableOptionsModel = new GetVpcRoutingTableOptions.Builder() + .vpcId("testString") .id("testString") .build(); - // Invoke getVpnServerRoute() with a valid options model and verify the result - Response response = vpcService.getVpnServerRoute(getVpnServerRouteOptionsModel).execute(); + // Invoke getVpcRoutingTable() with a valid options model and verify the result + Response response = vpcService.getVpcRoutingTable(getVpcRoutingTableOptionsModel).execute(); assertNotNull(response); - VPNServerRoute responseObj = response.getResult(); + RoutingTable responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -29235,113 +30071,108 @@ public void testGetVpnServerRouteWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getVpnServerRoutePath); + assertEquals(parsedPath, getVpcRoutingTablePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getVpnServerRoute operation with and without retries enabled + // Test the getVpcRoutingTable operation with and without retries enabled @Test - public void testGetVpnServerRouteWRetries() throws Throwable { + public void testGetVpcRoutingTableWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetVpnServerRouteWOptions(); + testGetVpcRoutingTableWOptions(); vpcService.disableRetries(); - testGetVpnServerRouteWOptions(); + testGetVpcRoutingTableWOptions(); } - // Test the getVpnServerRoute operation with a null options model (negative test) + // Test the getVpcRoutingTable operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetVpnServerRouteNoOptions() throws Throwable { + public void testGetVpcRoutingTableNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getVpnServerRoute(null).execute(); + vpcService.getVpcRoutingTable(null).execute(); } - // Test the updateVpnServerRoute operation with a valid options model parameter + // Test the getVpcRoutingTableRoute operation with a valid options model parameter @Test - public void testUpdateVpnServerRouteWOptions() throws Throwable { + public void testGetVpcRoutingTableRouteWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"action\": \"deliver\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"health_reasons\": [{\"code\": \"internal_error\", \"message\": \"Internal error (contact IBM support).\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"id\": \"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-vpn-route-1\", \"resource_type\": \"vpn_server_route\"}"; - String updateVpnServerRoutePath = "/vpn_servers/testString/routes/testString"; + String mockResponseBody = "{\"action\": \"delegate\", \"advertise\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"creator\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"id\": \"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"name\": \"my-vpn-gateway\", \"resource_type\": \"vpn_gateway\"}, \"destination\": \"192.168.3.0/24\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"lifecycle_state\": \"stable\", \"name\": \"my-vpc-routing-table-route\", \"next_hop\": {\"address\": \"192.168.3.4\"}, \"origin\": \"service\", \"priority\": 1, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String getVpcRoutingTableRoutePath = "/vpcs/testString/routing_tables/testString/routes/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the VPNServerRoutePatch model - VPNServerRoutePatch vpnServerRoutePatchModel = new VPNServerRoutePatch.Builder() - .name("my-vpn-server-route-updated") - .build(); - Map vpnServerRoutePatchModelAsPatch = vpnServerRoutePatchModel.asPatch(); + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); - // Construct an instance of the UpdateVpnServerRouteOptions model - UpdateVpnServerRouteOptions updateVpnServerRouteOptionsModel = new UpdateVpnServerRouteOptions.Builder() - .vpnServerId("testString") + // Construct an instance of the GetVpcRoutingTableRouteOptions model + GetVpcRoutingTableRouteOptions getVpcRoutingTableRouteOptionsModel = new GetVpcRoutingTableRouteOptions.Builder() + .vpcId("testString") + .routingTableId("testString") .id("testString") - .vpnServerRoutePatch(vpnServerRoutePatchModelAsPatch) .build(); - // Invoke updateVpnServerRoute() with a valid options model and verify the result - Response response = vpcService.updateVpnServerRoute(updateVpnServerRouteOptionsModel).execute(); + // Invoke getVpcRoutingTableRoute() with a valid options model and verify the result + Response response = vpcService.getVpcRoutingTableRoute(getVpcRoutingTableRouteOptionsModel).execute(); assertNotNull(response); - VPNServerRoute responseObj = response.getResult(); + Route responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateVpnServerRoutePath); + assertEquals(parsedPath, getVpcRoutingTableRoutePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateVpnServerRoute operation with and without retries enabled + // Test the getVpcRoutingTableRoute operation with and without retries enabled @Test - public void testUpdateVpnServerRouteWRetries() throws Throwable { + public void testGetVpcRoutingTableRouteWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateVpnServerRouteWOptions(); + testGetVpcRoutingTableRouteWOptions(); vpcService.disableRetries(); - testUpdateVpnServerRouteWOptions(); + testGetVpcRoutingTableRouteWOptions(); } - // Test the updateVpnServerRoute operation with a null options model (negative test) + // Test the getVpcRoutingTableRoute operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateVpnServerRouteNoOptions() throws Throwable { + public void testGetVpcRoutingTableRouteNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateVpnServerRoute(null).execute(); + vpcService.getVpcRoutingTableRoute(null).execute(); } - // Test the listLoadBalancerProfiles operation with a valid options model parameter + // Test the listVpcAddressPrefixes operation with a valid options model parameter @Test - public void testListLoadBalancerProfilesWOptions() throws Throwable { + public void testListVpcAddressPrefixesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"profiles\": [{\"access_modes\": {\"type\": \"enum\", \"values\": [\"private\"]}, \"availability\": {\"type\": \"fixed\", \"value\": \"region\"}, \"failsafe_policy_actions\": {\"default\": \"fail\", \"type\": \"enum\", \"values\": [\"forward\"]}, \"family\": \"application\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\", \"instance_groups_supported\": {\"type\": \"fixed\", \"value\": true}, \"logging_supported\": {\"type\": \"fixed\", \"value\": [\"datapath\"]}, \"name\": \"network-fixed\", \"route_mode_supported\": {\"type\": \"fixed\", \"value\": true}, \"security_groups_supported\": {\"type\": \"fixed\", \"value\": true}, \"source_ip_session_persistence_supported\": {\"type\": \"fixed\", \"value\": true}, \"targetable_load_balancer_profiles\": [{\"family\": \"application\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\", \"name\": \"network-fixed\"}], \"udp_supported\": {\"type\": \"fixed\", \"value\": true}}], \"total_count\": 132}"; - String listLoadBalancerProfilesPath = "/load_balancer/profiles"; + String mockResponseBody = "{\"address_prefixes\": [{\"cidr\": \"192.168.3.0/24\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"has_subnets\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/address_prefixes/r006-68574057-c5e0-4675-ada4-99377d8f4789\", \"id\": \"r006-68574057-c5e0-4675-ada4-99377d8f4789\", \"is_default\": false, \"name\": \"my-vpc-address-prefix-zone-1\", \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listVpcAddressPrefixesPath = "/vpcs/testString/address_prefixes"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListLoadBalancerProfilesOptions model - ListLoadBalancerProfilesOptions listLoadBalancerProfilesOptionsModel = new ListLoadBalancerProfilesOptions.Builder() + // Construct an instance of the ListVpcAddressPrefixesOptions model + ListVpcAddressPrefixesOptions listVpcAddressPrefixesOptionsModel = new ListVpcAddressPrefixesOptions.Builder() + .vpcId("testString") .start("testString") .limit(Long.valueOf("10")) .build(); - // Invoke listLoadBalancerProfiles() with a valid options model and verify the result - Response response = vpcService.listLoadBalancerProfiles(listLoadBalancerProfilesOptionsModel).execute(); + // Invoke listVpcAddressPrefixes() with a valid options model and verify the result + Response response = vpcService.listVpcAddressPrefixes(listVpcAddressPrefixesOptionsModel).execute(); assertNotNull(response); - LoadBalancerProfileCollection responseObj = response.getResult(); + AddressPrefixCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -29350,32 +30181,39 @@ public void testListLoadBalancerProfilesWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listLoadBalancerProfilesPath); + assertEquals(parsedPath, listVpcAddressPrefixesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the listLoadBalancerProfiles operation with and without retries enabled + // Test the listVpcAddressPrefixes operation with and without retries enabled @Test - public void testListLoadBalancerProfilesWRetries() throws Throwable { + public void testListVpcAddressPrefixesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListLoadBalancerProfilesWOptions(); + testListVpcAddressPrefixesWOptions(); vpcService.disableRetries(); - testListLoadBalancerProfilesWOptions(); + testListVpcAddressPrefixesWOptions(); } - // Test the listLoadBalancerProfiles operation using the LoadBalancerProfilesPager.getNext() method + // Test the listVpcAddressPrefixes operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testListVpcAddressPrefixesNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.listVpcAddressPrefixes(null).execute(); + } + + // Test the listVpcAddressPrefixes operation using the VpcAddressPrefixesPager.getNext() method @Test - public void testListLoadBalancerProfilesWithPagerGetNext() throws Throwable { + public void testListVpcAddressPrefixesWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"profiles\":[{\"access_modes\":{\"type\":\"enum\",\"values\":[\"private\"]},\"availability\":{\"type\":\"fixed\",\"value\":\"region\"},\"failsafe_policy_actions\":{\"default\":\"fail\",\"type\":\"enum\",\"values\":[\"forward\"]},\"family\":\"application\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\",\"instance_groups_supported\":{\"type\":\"fixed\",\"value\":true},\"logging_supported\":{\"type\":\"fixed\",\"value\":[\"datapath\"]},\"name\":\"network-fixed\",\"route_mode_supported\":{\"type\":\"fixed\",\"value\":true},\"security_groups_supported\":{\"type\":\"fixed\",\"value\":true},\"source_ip_session_persistence_supported\":{\"type\":\"fixed\",\"value\":true},\"targetable_load_balancer_profiles\":[{\"family\":\"application\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\",\"name\":\"network-fixed\"}],\"udp_supported\":{\"type\":\"fixed\",\"value\":true}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"profiles\":[{\"access_modes\":{\"type\":\"enum\",\"values\":[\"private\"]},\"availability\":{\"type\":\"fixed\",\"value\":\"region\"},\"failsafe_policy_actions\":{\"default\":\"fail\",\"type\":\"enum\",\"values\":[\"forward\"]},\"family\":\"application\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\",\"instance_groups_supported\":{\"type\":\"fixed\",\"value\":true},\"logging_supported\":{\"type\":\"fixed\",\"value\":[\"datapath\"]},\"name\":\"network-fixed\",\"route_mode_supported\":{\"type\":\"fixed\",\"value\":true},\"security_groups_supported\":{\"type\":\"fixed\",\"value\":true},\"source_ip_session_persistence_supported\":{\"type\":\"fixed\",\"value\":true},\"targetable_load_balancer_profiles\":[{\"family\":\"application\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\",\"name\":\"network-fixed\"}],\"udp_supported\":{\"type\":\"fixed\",\"value\":true}}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"address_prefixes\":[{\"cidr\":\"192.168.3.0/24\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"has_subnets\":true,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/address_prefixes/r006-68574057-c5e0-4675-ada4-99377d8f4789\",\"id\":\"r006-68574057-c5e0-4675-ada4-99377d8f4789\",\"is_default\":false,\"name\":\"my-vpc-address-prefix-zone-1\",\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"address_prefixes\":[{\"cidr\":\"192.168.3.0/24\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"has_subnets\":true,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/address_prefixes/r006-68574057-c5e0-4675-ada4-99377d8f4789\",\"id\":\"r006-68574057-c5e0-4675-ada4-99377d8f4789\",\"is_default\":false,\"name\":\"my-vpc-address-prefix-zone-1\",\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -29389,26 +30227,27 @@ public void testListLoadBalancerProfilesWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListLoadBalancerProfilesOptions listLoadBalancerProfilesOptions = new ListLoadBalancerProfilesOptions.Builder() + ListVpcAddressPrefixesOptions listVpcAddressPrefixesOptions = new ListVpcAddressPrefixesOptions.Builder() + .vpcId("testString") .limit(Long.valueOf("10")) .build(); - List allResults = new ArrayList<>(); - LoadBalancerProfilesPager pager = new LoadBalancerProfilesPager(vpcService, listLoadBalancerProfilesOptions); + List allResults = new ArrayList<>(); + VpcAddressPrefixesPager pager = new VpcAddressPrefixesPager(vpcService, listVpcAddressPrefixesOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listLoadBalancerProfiles operation using the LoadBalancerProfilesPager.getAll() method + // Test the listVpcAddressPrefixes operation using the VpcAddressPrefixesPager.getAll() method @Test - public void testListLoadBalancerProfilesWithPagerGetAll() throws Throwable { + public void testListVpcAddressPrefixesWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"profiles\":[{\"access_modes\":{\"type\":\"enum\",\"values\":[\"private\"]},\"availability\":{\"type\":\"fixed\",\"value\":\"region\"},\"failsafe_policy_actions\":{\"default\":\"fail\",\"type\":\"enum\",\"values\":[\"forward\"]},\"family\":\"application\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\",\"instance_groups_supported\":{\"type\":\"fixed\",\"value\":true},\"logging_supported\":{\"type\":\"fixed\",\"value\":[\"datapath\"]},\"name\":\"network-fixed\",\"route_mode_supported\":{\"type\":\"fixed\",\"value\":true},\"security_groups_supported\":{\"type\":\"fixed\",\"value\":true},\"source_ip_session_persistence_supported\":{\"type\":\"fixed\",\"value\":true},\"targetable_load_balancer_profiles\":[{\"family\":\"application\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\",\"name\":\"network-fixed\"}],\"udp_supported\":{\"type\":\"fixed\",\"value\":true}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"profiles\":[{\"access_modes\":{\"type\":\"enum\",\"values\":[\"private\"]},\"availability\":{\"type\":\"fixed\",\"value\":\"region\"},\"failsafe_policy_actions\":{\"default\":\"fail\",\"type\":\"enum\",\"values\":[\"forward\"]},\"family\":\"application\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\",\"instance_groups_supported\":{\"type\":\"fixed\",\"value\":true},\"logging_supported\":{\"type\":\"fixed\",\"value\":[\"datapath\"]},\"name\":\"network-fixed\",\"route_mode_supported\":{\"type\":\"fixed\",\"value\":true},\"security_groups_supported\":{\"type\":\"fixed\",\"value\":true},\"source_ip_session_persistence_supported\":{\"type\":\"fixed\",\"value\":true},\"targetable_load_balancer_profiles\":[{\"family\":\"application\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\",\"name\":\"network-fixed\"}],\"udp_supported\":{\"type\":\"fixed\",\"value\":true}}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"address_prefixes\":[{\"cidr\":\"192.168.3.0/24\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"has_subnets\":true,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/address_prefixes/r006-68574057-c5e0-4675-ada4-99377d8f4789\",\"id\":\"r006-68574057-c5e0-4675-ada4-99377d8f4789\",\"is_default\":false,\"name\":\"my-vpc-address-prefix-zone-1\",\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"address_prefixes\":[{\"cidr\":\"192.168.3.0/24\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"has_subnets\":true,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/address_prefixes/r006-68574057-c5e0-4675-ada4-99377d8f4789\",\"id\":\"r006-68574057-c5e0-4675-ada4-99377d8f4789\",\"is_default\":false,\"name\":\"my-vpc-address-prefix-zone-1\",\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -29422,36 +30261,44 @@ public void testListLoadBalancerProfilesWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListLoadBalancerProfilesOptions listLoadBalancerProfilesOptions = new ListLoadBalancerProfilesOptions.Builder() + ListVpcAddressPrefixesOptions listVpcAddressPrefixesOptions = new ListVpcAddressPrefixesOptions.Builder() + .vpcId("testString") .limit(Long.valueOf("10")) .build(); - LoadBalancerProfilesPager pager = new LoadBalancerProfilesPager(vpcService, listLoadBalancerProfilesOptions); - List allResults = pager.getAll(); + VpcAddressPrefixesPager pager = new VpcAddressPrefixesPager(vpcService, listVpcAddressPrefixesOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the getLoadBalancerProfile operation with a valid options model parameter + // Test the listVpcDnsResolutionBindings operation with a valid options model parameter @Test - public void testGetLoadBalancerProfileWOptions() throws Throwable { + public void testListVpcDnsResolutionBindingsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"access_modes\": {\"type\": \"enum\", \"values\": [\"private\"]}, \"availability\": {\"type\": \"fixed\", \"value\": \"region\"}, \"failsafe_policy_actions\": {\"default\": \"fail\", \"type\": \"enum\", \"values\": [\"forward\"]}, \"family\": \"application\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\", \"instance_groups_supported\": {\"type\": \"fixed\", \"value\": true}, \"logging_supported\": {\"type\": \"fixed\", \"value\": [\"datapath\"]}, \"name\": \"network-fixed\", \"route_mode_supported\": {\"type\": \"fixed\", \"value\": true}, \"security_groups_supported\": {\"type\": \"fixed\", \"value\": true}, \"source_ip_session_persistence_supported\": {\"type\": \"fixed\", \"value\": true}, \"targetable_load_balancer_profiles\": [{\"family\": \"application\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\", \"name\": \"network-fixed\"}], \"udp_supported\": {\"type\": \"fixed\", \"value\": true}}"; - String getLoadBalancerProfilePath = "/load_balancer/profiles/network-fixed"; + String mockResponseBody = "{\"dns_resolution_bindings\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"endpoint_gateways\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"endpoint_gateway\"}], \"health_reasons\": [{\"code\": \"disconnected_from_bound_vpc\", \"message\": \"The VPC specified in the DNS resolution binding has been disconnected.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\", \"id\": \"r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\", \"lifecycle_state\": \"stable\", \"name\": \"my-dns-resolution-binding\", \"resource_type\": \"vpc_dns_resolution_binding\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"vpc\"}}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listVpcDnsResolutionBindingsPath = "/vpcs/testString/dns_resolution_bindings"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetLoadBalancerProfileOptions model - GetLoadBalancerProfileOptions getLoadBalancerProfileOptionsModel = new GetLoadBalancerProfileOptions.Builder() - .name("network-fixed") + // Construct an instance of the ListVpcDnsResolutionBindingsOptions model + ListVpcDnsResolutionBindingsOptions listVpcDnsResolutionBindingsOptionsModel = new ListVpcDnsResolutionBindingsOptions.Builder() + .vpcId("testString") + .sort("name") + .start("testString") + .limit(Long.valueOf("10")) + .name("my-name") + .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .vpcName("my-vpc") + .accountId("bb1b52262f7441a586f49068482f1e60") .build(); - // Invoke getLoadBalancerProfile() with a valid options model and verify the result - Response response = vpcService.getLoadBalancerProfile(getLoadBalancerProfileOptionsModel).execute(); + // Invoke listVpcDnsResolutionBindings() with a valid options model and verify the result + Response response = vpcService.listVpcDnsResolutionBindings(listVpcDnsResolutionBindingsOptionsModel).execute(); assertNotNull(response); - LoadBalancerProfile responseObj = response.getResult(); + VPCDNSResolutionBindingCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -29460,52 +30307,135 @@ public void testGetLoadBalancerProfileWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getLoadBalancerProfilePath); + assertEquals(parsedPath, listVpcDnsResolutionBindingsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("sort"), "name"); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("name"), "my-name"); + assertEquals(query.get("vpc.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); + assertEquals(query.get("vpc.name"), "my-vpc"); + assertEquals(query.get("account.id"), "bb1b52262f7441a586f49068482f1e60"); } - // Test the getLoadBalancerProfile operation with and without retries enabled + // Test the listVpcDnsResolutionBindings operation with and without retries enabled @Test - public void testGetLoadBalancerProfileWRetries() throws Throwable { + public void testListVpcDnsResolutionBindingsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetLoadBalancerProfileWOptions(); + testListVpcDnsResolutionBindingsWOptions(); vpcService.disableRetries(); - testGetLoadBalancerProfileWOptions(); + testListVpcDnsResolutionBindingsWOptions(); } - // Test the getLoadBalancerProfile operation with a null options model (negative test) + // Test the listVpcDnsResolutionBindings operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetLoadBalancerProfileNoOptions() throws Throwable { + public void testListVpcDnsResolutionBindingsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getLoadBalancerProfile(null).execute(); + vpcService.listVpcDnsResolutionBindings(null).execute(); } - // Test the listLoadBalancers operation with a valid options model parameter + // Test the listVpcDnsResolutionBindings operation using the VpcDnsResolutionBindingsPager.getNext() method @Test - public void testListLoadBalancersWOptions() throws Throwable { + public void testListVpcDnsResolutionBindingsWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"dns_resolution_bindings\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"endpoint_gateways\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"endpoint_gateway\"}],\"health_reasons\":[{\"code\":\"disconnected_from_bound_vpc\",\"message\":\"The VPC specified in the DNS resolution binding has been disconnected.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\",\"id\":\"r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\",\"lifecycle_state\":\"stable\",\"name\":\"my-dns-resolution-binding\",\"resource_type\":\"vpc_dns_resolution_binding\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"vpc\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"dns_resolution_bindings\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"endpoint_gateways\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"endpoint_gateway\"}],\"health_reasons\":[{\"code\":\"disconnected_from_bound_vpc\",\"message\":\"The VPC specified in the DNS resolution binding has been disconnected.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\",\"id\":\"r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\",\"lifecycle_state\":\"stable\",\"name\":\"my-dns-resolution-binding\",\"resource_type\":\"vpc_dns_resolution_binding\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"vpc\"}}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListVpcDnsResolutionBindingsOptions listVpcDnsResolutionBindingsOptions = new ListVpcDnsResolutionBindingsOptions.Builder() + .vpcId("testString") + .sort("name") + .limit(Long.valueOf("10")) + .name("my-name") + .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .vpcName("my-vpc") + .accountId("bb1b52262f7441a586f49068482f1e60") + .build(); + + List allResults = new ArrayList<>(); + VpcDnsResolutionBindingsPager pager = new VpcDnsResolutionBindingsPager(vpcService, listVpcDnsResolutionBindingsOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); + } + + // Test the listVpcDnsResolutionBindings operation using the VpcDnsResolutionBindingsPager.getAll() method + @Test + public void testListVpcDnsResolutionBindingsWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"dns_resolution_bindings\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"endpoint_gateways\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"endpoint_gateway\"}],\"health_reasons\":[{\"code\":\"disconnected_from_bound_vpc\",\"message\":\"The VPC specified in the DNS resolution binding has been disconnected.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\",\"id\":\"r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\",\"lifecycle_state\":\"stable\",\"name\":\"my-dns-resolution-binding\",\"resource_type\":\"vpc_dns_resolution_binding\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"vpc\"}}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"dns_resolution_bindings\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"endpoint_gateways\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"endpoint_gateway\"}],\"health_reasons\":[{\"code\":\"disconnected_from_bound_vpc\",\"message\":\"The VPC specified in the DNS resolution binding has been disconnected.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\",\"id\":\"r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\",\"lifecycle_state\":\"stable\",\"name\":\"my-dns-resolution-binding\",\"resource_type\":\"vpc_dns_resolution_binding\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"vpc\"}}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListVpcDnsResolutionBindingsOptions listVpcDnsResolutionBindingsOptions = new ListVpcDnsResolutionBindingsOptions.Builder() + .vpcId("testString") + .sort("name") + .limit(Long.valueOf("10")) + .name("my-name") + .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + .vpcName("my-vpc") + .accountId("bb1b52262f7441a586f49068482f1e60") + .build(); + + VpcDnsResolutionBindingsPager pager = new VpcDnsResolutionBindingsPager(vpcService, listVpcDnsResolutionBindingsOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); + } + + // Test the listVpcRoutes operation with a valid options model parameter + @Test + public void testListVpcRoutesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"load_balancers\": [{\"access_mode\": \"private\", \"attached_load_balancer_pool_members\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}], \"availability\": \"region\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"dns\": {\"instance\": {\"crn\": \"crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::\"}, \"zone\": {\"id\": \"d66662cc-aa23-4fe1-9987-858487a61f45\"}}, \"failsafe_policy_actions\": [\"forward\"], \"hostname\": \"6b88d615-us-south.lb.appdomain.cloud\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"id\": \"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"instance_groups_supported\": true, \"is_private_path\": true, \"is_public\": true, \"listeners\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"id\": \"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\"}], \"logging\": {\"datapath\": {\"active\": true}}, \"name\": \"my-load-balancer\", \"operating_status\": \"offline\", \"pools\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}], \"private_ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"profile\": {\"family\": \"application\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\", \"name\": \"network-fixed\"}, \"provisioning_status\": \"active\", \"public_ips\": [{\"address\": \"192.168.3.4\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"load_balancer\", \"route_mode\": true, \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"security_groups_supported\": false, \"source_ip_session_persistence_supported\": true, \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"udp_supported\": true}], \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listLoadBalancersPath = "/load_balancers"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"routes\": [{\"action\": \"delegate\", \"advertise\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"creator\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"id\": \"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"name\": \"my-vpn-gateway\", \"resource_type\": \"vpn_gateway\"}, \"destination\": \"192.168.3.0/24\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"lifecycle_state\": \"stable\", \"name\": \"my-vpc-routing-table-route\", \"next_hop\": {\"address\": \"192.168.3.4\"}, \"origin\": \"service\", \"priority\": 1, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"total_count\": 132}"; + String listVpcRoutesPath = "/vpcs/testString/routes"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListLoadBalancersOptions model - ListLoadBalancersOptions listLoadBalancersOptionsModel = new ListLoadBalancersOptions.Builder() + // Construct an instance of the ListVpcRoutesOptions model + ListVpcRoutesOptions listVpcRoutesOptionsModel = new ListVpcRoutesOptions.Builder() + .vpcId("testString") + .zoneName("us-south-1") .start("testString") .limit(Long.valueOf("10")) .build(); - // Invoke listLoadBalancers() with a valid options model and verify the result - Response response = vpcService.listLoadBalancers(listLoadBalancersOptionsModel).execute(); + // Invoke listVpcRoutes() with a valid options model and verify the result + Response response = vpcService.listVpcRoutes(listVpcRoutesOptionsModel).execute(); assertNotNull(response); - LoadBalancerCollection responseObj = response.getResult(); + RouteCollectionVPCContext responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -29514,32 +30444,40 @@ public void testListLoadBalancersWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listLoadBalancersPath); + assertEquals(parsedPath, listVpcRoutesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("zone.name"), "us-south-1"); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the listLoadBalancers operation with and without retries enabled + // Test the listVpcRoutes operation with and without retries enabled @Test - public void testListLoadBalancersWRetries() throws Throwable { + public void testListVpcRoutesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListLoadBalancersWOptions(); + testListVpcRoutesWOptions(); vpcService.disableRetries(); - testListLoadBalancersWOptions(); + testListVpcRoutesWOptions(); } - // Test the listLoadBalancers operation using the LoadBalancersPager.getNext() method + // Test the listVpcRoutes operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testListVpcRoutesNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.listVpcRoutes(null).execute(); + } + + // Test the listVpcRoutes operation using the VpcRoutesPager.getNext() method @Test - public void testListLoadBalancersWithPagerGetNext() throws Throwable { + public void testListVpcRoutesWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"load_balancers\":[{\"access_mode\":\"private\",\"attached_load_balancer_pool_members\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\",\"id\":\"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}],\"availability\":\"region\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"dns\":{\"instance\":{\"crn\":\"crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::\"},\"zone\":{\"id\":\"d66662cc-aa23-4fe1-9987-858487a61f45\"}},\"failsafe_policy_actions\":[\"forward\"],\"hostname\":\"6b88d615-us-south.lb.appdomain.cloud\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"id\":\"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"instance_groups_supported\":true,\"is_private_path\":true,\"is_public\":true,\"listeners\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\",\"id\":\"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\"}],\"logging\":{\"datapath\":{\"active\":true}},\"name\":\"my-load-balancer\",\"operating_status\":\"offline\",\"pools\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"id\":\"r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"name\":\"my-load-balancer-pool\"}],\"private_ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"profile\":{\"family\":\"application\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\",\"name\":\"network-fixed\"},\"provisioning_status\":\"active\",\"public_ips\":[{\"address\":\"192.168.3.4\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"load_balancer\",\"route_mode\":true,\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"security_groups_supported\":false,\"source_ip_session_persistence_supported\":true,\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"udp_supported\":true}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"load_balancers\":[{\"access_mode\":\"private\",\"attached_load_balancer_pool_members\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\",\"id\":\"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}],\"availability\":\"region\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"dns\":{\"instance\":{\"crn\":\"crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::\"},\"zone\":{\"id\":\"d66662cc-aa23-4fe1-9987-858487a61f45\"}},\"failsafe_policy_actions\":[\"forward\"],\"hostname\":\"6b88d615-us-south.lb.appdomain.cloud\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"id\":\"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"instance_groups_supported\":true,\"is_private_path\":true,\"is_public\":true,\"listeners\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\",\"id\":\"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\"}],\"logging\":{\"datapath\":{\"active\":true}},\"name\":\"my-load-balancer\",\"operating_status\":\"offline\",\"pools\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"id\":\"r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"name\":\"my-load-balancer-pool\"}],\"private_ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"profile\":{\"family\":\"application\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\",\"name\":\"network-fixed\"},\"provisioning_status\":\"active\",\"public_ips\":[{\"address\":\"192.168.3.4\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"load_balancer\",\"route_mode\":true,\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"security_groups_supported\":false,\"source_ip_session_persistence_supported\":true,\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"udp_supported\":true}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"routes\":[{\"action\":\"delegate\",\"advertise\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"creator\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"id\":\"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"name\":\"my-vpn-gateway\",\"resource_type\":\"vpn_gateway\"},\"destination\":\"192.168.3.0/24\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"id\":\"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"lifecycle_state\":\"stable\",\"name\":\"my-vpc-routing-table-route\",\"next_hop\":{\"address\":\"192.168.3.4\"},\"origin\":\"service\",\"priority\":1,\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"routes\":[{\"action\":\"delegate\",\"advertise\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"creator\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"id\":\"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"name\":\"my-vpn-gateway\",\"resource_type\":\"vpn_gateway\"},\"destination\":\"192.168.3.0/24\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"id\":\"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"lifecycle_state\":\"stable\",\"name\":\"my-vpc-routing-table-route\",\"next_hop\":{\"address\":\"192.168.3.4\"},\"origin\":\"service\",\"priority\":1,\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -29553,26 +30491,28 @@ public void testListLoadBalancersWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListLoadBalancersOptions listLoadBalancersOptions = new ListLoadBalancersOptions.Builder() + ListVpcRoutesOptions listVpcRoutesOptions = new ListVpcRoutesOptions.Builder() + .vpcId("testString") + .zoneName("us-south-1") .limit(Long.valueOf("10")) .build(); - List allResults = new ArrayList<>(); - LoadBalancersPager pager = new LoadBalancersPager(vpcService, listLoadBalancersOptions); + List allResults = new ArrayList<>(); + VpcRoutesPager pager = new VpcRoutesPager(vpcService, listVpcRoutesOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listLoadBalancers operation using the LoadBalancersPager.getAll() method + // Test the listVpcRoutes operation using the VpcRoutesPager.getAll() method @Test - public void testListLoadBalancersWithPagerGetAll() throws Throwable { + public void testListVpcRoutesWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"load_balancers\":[{\"access_mode\":\"private\",\"attached_load_balancer_pool_members\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\",\"id\":\"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}],\"availability\":\"region\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"dns\":{\"instance\":{\"crn\":\"crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::\"},\"zone\":{\"id\":\"d66662cc-aa23-4fe1-9987-858487a61f45\"}},\"failsafe_policy_actions\":[\"forward\"],\"hostname\":\"6b88d615-us-south.lb.appdomain.cloud\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"id\":\"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"instance_groups_supported\":true,\"is_private_path\":true,\"is_public\":true,\"listeners\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\",\"id\":\"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\"}],\"logging\":{\"datapath\":{\"active\":true}},\"name\":\"my-load-balancer\",\"operating_status\":\"offline\",\"pools\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"id\":\"r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"name\":\"my-load-balancer-pool\"}],\"private_ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"profile\":{\"family\":\"application\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\",\"name\":\"network-fixed\"},\"provisioning_status\":\"active\",\"public_ips\":[{\"address\":\"192.168.3.4\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"load_balancer\",\"route_mode\":true,\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"security_groups_supported\":false,\"source_ip_session_persistence_supported\":true,\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"udp_supported\":true}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"load_balancers\":[{\"access_mode\":\"private\",\"attached_load_balancer_pool_members\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\",\"id\":\"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}],\"availability\":\"region\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"dns\":{\"instance\":{\"crn\":\"crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::\"},\"zone\":{\"id\":\"d66662cc-aa23-4fe1-9987-858487a61f45\"}},\"failsafe_policy_actions\":[\"forward\"],\"hostname\":\"6b88d615-us-south.lb.appdomain.cloud\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"id\":\"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"instance_groups_supported\":true,\"is_private_path\":true,\"is_public\":true,\"listeners\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\",\"id\":\"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\"}],\"logging\":{\"datapath\":{\"active\":true}},\"name\":\"my-load-balancer\",\"operating_status\":\"offline\",\"pools\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"id\":\"r006-70294e14-4e61-11e8-bcf4-0242ac110004\",\"name\":\"my-load-balancer-pool\"}],\"private_ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"profile\":{\"family\":\"application\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\",\"name\":\"network-fixed\"},\"provisioning_status\":\"active\",\"public_ips\":[{\"address\":\"192.168.3.4\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"load_balancer\",\"route_mode\":true,\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"security_groups_supported\":false,\"source_ip_session_persistence_supported\":true,\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"udp_supported\":true}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"routes\":[{\"action\":\"delegate\",\"advertise\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"creator\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"id\":\"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"name\":\"my-vpn-gateway\",\"resource_type\":\"vpn_gateway\"},\"destination\":\"192.168.3.0/24\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"id\":\"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"lifecycle_state\":\"stable\",\"name\":\"my-vpc-routing-table-route\",\"next_hop\":{\"address\":\"192.168.3.4\"},\"origin\":\"service\",\"priority\":1,\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"routes\":[{\"action\":\"delegate\",\"advertise\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"creator\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"id\":\"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"name\":\"my-vpn-gateway\",\"resource_type\":\"vpn_gateway\"},\"destination\":\"192.168.3.0/24\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"id\":\"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"lifecycle_state\":\"stable\",\"name\":\"my-vpc-routing-table-route\",\"next_hop\":{\"address\":\"192.168.3.4\"},\"origin\":\"service\",\"priority\":1,\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -29586,273 +30526,290 @@ public void testListLoadBalancersWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListLoadBalancersOptions listLoadBalancersOptions = new ListLoadBalancersOptions.Builder() + ListVpcRoutesOptions listVpcRoutesOptions = new ListVpcRoutesOptions.Builder() + .vpcId("testString") + .zoneName("us-south-1") .limit(Long.valueOf("10")) .build(); - LoadBalancersPager pager = new LoadBalancersPager(vpcService, listLoadBalancersOptions); - List allResults = pager.getAll(); + VpcRoutesPager pager = new VpcRoutesPager(vpcService, listVpcRoutesOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the createLoadBalancer operation with a valid options model parameter + // Test the listVpcRoutingTableRoutes operation with a valid options model parameter @Test - public void testCreateLoadBalancerWOptions() throws Throwable { + public void testListVpcRoutingTableRoutesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"access_mode\": \"private\", \"attached_load_balancer_pool_members\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}], \"availability\": \"region\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"dns\": {\"instance\": {\"crn\": \"crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::\"}, \"zone\": {\"id\": \"d66662cc-aa23-4fe1-9987-858487a61f45\"}}, \"failsafe_policy_actions\": [\"forward\"], \"hostname\": \"6b88d615-us-south.lb.appdomain.cloud\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"id\": \"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"instance_groups_supported\": true, \"is_private_path\": true, \"is_public\": true, \"listeners\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"id\": \"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\"}], \"logging\": {\"datapath\": {\"active\": true}}, \"name\": \"my-load-balancer\", \"operating_status\": \"offline\", \"pools\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}], \"private_ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"profile\": {\"family\": \"application\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\", \"name\": \"network-fixed\"}, \"provisioning_status\": \"active\", \"public_ips\": [{\"address\": \"192.168.3.4\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"load_balancer\", \"route_mode\": true, \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"security_groups_supported\": false, \"source_ip_session_persistence_supported\": true, \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"udp_supported\": true}"; - String createLoadBalancerPath = "/load_balancers"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"routes\": [{\"action\": \"delegate\", \"advertise\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"creator\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"id\": \"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"name\": \"my-vpn-gateway\", \"resource_type\": \"vpn_gateway\"}, \"destination\": \"192.168.3.0/24\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"lifecycle_state\": \"stable\", \"name\": \"my-vpc-routing-table-route\", \"next_hop\": {\"address\": \"192.168.3.4\"}, \"origin\": \"service\", \"priority\": 1, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"total_count\": 132}"; + String listVpcRoutingTableRoutesPath = "/vpcs/testString/routing_tables/testString/routes"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the SubnetIdentityById model - SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() - .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") - .build(); - - // Construct an instance of the DNSInstanceIdentityByCRN model - DNSInstanceIdentityByCRN dnsInstanceIdentityModel = new DNSInstanceIdentityByCRN.Builder() - .crn("crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::") - .build(); - - // Construct an instance of the DNSZoneIdentityById model - DNSZoneIdentityById dnsZoneIdentityModel = new DNSZoneIdentityById.Builder() - .id("d66662cc-aa23-4fe1-9987-858487a61f45") - .build(); - - // Construct an instance of the LoadBalancerDNSPrototype model - LoadBalancerDNSPrototype loadBalancerDnsPrototypeModel = new LoadBalancerDNSPrototype.Builder() - .instance(dnsInstanceIdentityModel) - .zone(dnsZoneIdentityModel) - .build(); - - // Construct an instance of the CertificateInstanceIdentityByCRN model - CertificateInstanceIdentityByCRN certificateInstanceIdentityModel = new CertificateInstanceIdentityByCRN.Builder() - .crn("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") - .build(); - - // Construct an instance of the LoadBalancerPoolIdentityByName model - LoadBalancerPoolIdentityByName loadBalancerPoolIdentityByNameModel = new LoadBalancerPoolIdentityByName.Builder() - .name("my-load-balancer-pool") - .build(); - - // Construct an instance of the LoadBalancerListenerIdentityById model - LoadBalancerListenerIdentityById loadBalancerListenerIdentityModel = new LoadBalancerListenerIdentityById.Builder() - .id("r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091") - .build(); - - // Construct an instance of the LoadBalancerListenerHTTPSRedirectPrototype model - LoadBalancerListenerHTTPSRedirectPrototype loadBalancerListenerHttpsRedirectPrototypeModel = new LoadBalancerListenerHTTPSRedirectPrototype.Builder() - .httpStatusCode(Long.valueOf("301")) - .listener(loadBalancerListenerIdentityModel) - .uri("/example?doc=get") - .build(); - - // Construct an instance of the LoadBalancerListenerPrototypeLoadBalancerContext model - LoadBalancerListenerPrototypeLoadBalancerContext loadBalancerListenerPrototypeLoadBalancerContextModel = new LoadBalancerListenerPrototypeLoadBalancerContext.Builder() - .acceptProxyProtocol(true) - .certificateInstance(certificateInstanceIdentityModel) - .connectionLimit(Long.valueOf("2000")) - .defaultPool(loadBalancerPoolIdentityByNameModel) - .httpsRedirect(loadBalancerListenerHttpsRedirectPrototypeModel) - .idleConnectionTimeout(Long.valueOf("100")) - .port(Long.valueOf("443")) - .portMax(Long.valueOf("499")) - .portMin(Long.valueOf("443")) - .protocol("http") + // Construct an instance of the ListVpcRoutingTableRoutesOptions model + ListVpcRoutingTableRoutesOptions listVpcRoutingTableRoutesOptionsModel = new ListVpcRoutingTableRoutesOptions.Builder() + .vpcId("testString") + .routingTableId("testString") + .start("testString") + .limit(Long.valueOf("10")) .build(); - // Construct an instance of the LoadBalancerLoggingDatapathPrototype model - LoadBalancerLoggingDatapathPrototype loadBalancerLoggingDatapathPrototypeModel = new LoadBalancerLoggingDatapathPrototype.Builder() - .active(true) - .build(); + // Invoke listVpcRoutingTableRoutes() with a valid options model and verify the result + Response response = vpcService.listVpcRoutingTableRoutes(listVpcRoutingTableRoutesOptionsModel).execute(); + assertNotNull(response); + RouteCollection responseObj = response.getResult(); + assertNotNull(responseObj); - // Construct an instance of the LoadBalancerLoggingPrototype model - LoadBalancerLoggingPrototype loadBalancerLoggingPrototypeModel = new LoadBalancerLoggingPrototype.Builder() - .datapath(loadBalancerLoggingDatapathPrototypeModel) - .build(); + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "GET"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, listVpcRoutingTableRoutesPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + } - // Construct an instance of the LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeTCPPrototype model - LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeTCPPrototype loadBalancerPoolHealthMonitorPrototypeModel = new LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeTCPPrototype.Builder() - .delay(Long.valueOf("5")) - .maxRetries(Long.valueOf("2")) - .port(Long.valueOf("22")) - .timeout(Long.valueOf("2")) - .type("tcp") - .build(); + // Test the listVpcRoutingTableRoutes operation with and without retries enabled + @Test + public void testListVpcRoutingTableRoutesWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testListVpcRoutingTableRoutesWOptions(); - // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model - LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById loadBalancerPoolMemberTargetPrototypeModel = new LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById.Builder() - .id("0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0") - .build(); + vpcService.disableRetries(); + testListVpcRoutingTableRoutesWOptions(); + } - // Construct an instance of the LoadBalancerPoolMemberPrototype model - LoadBalancerPoolMemberPrototype loadBalancerPoolMemberPrototypeModel = new LoadBalancerPoolMemberPrototype.Builder() - .port(Long.valueOf("80")) - .target(loadBalancerPoolMemberTargetPrototypeModel) - .weight(Long.valueOf("50")) - .build(); + // Test the listVpcRoutingTableRoutes operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testListVpcRoutingTableRoutesNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.listVpcRoutingTableRoutes(null).execute(); + } - // Construct an instance of the LoadBalancerPoolSessionPersistencePrototype model - LoadBalancerPoolSessionPersistencePrototype loadBalancerPoolSessionPersistencePrototypeModel = new LoadBalancerPoolSessionPersistencePrototype.Builder() - .cookieName("my-cookie-name") - .type("app_cookie") - .build(); + // Test the listVpcRoutingTableRoutes operation using the VpcRoutingTableRoutesPager.getNext() method + @Test + public void testListVpcRoutingTableRoutesWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"routes\":[{\"action\":\"delegate\",\"advertise\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"creator\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"id\":\"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"name\":\"my-vpn-gateway\",\"resource_type\":\"vpn_gateway\"},\"destination\":\"192.168.3.0/24\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"id\":\"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"lifecycle_state\":\"stable\",\"name\":\"my-vpc-routing-table-route\",\"next_hop\":{\"address\":\"192.168.3.4\"},\"origin\":\"service\",\"priority\":1,\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"routes\":[{\"action\":\"delegate\",\"advertise\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"creator\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"id\":\"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"name\":\"my-vpn-gateway\",\"resource_type\":\"vpn_gateway\"},\"destination\":\"192.168.3.0/24\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"id\":\"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"lifecycle_state\":\"stable\",\"name\":\"my-vpc-routing-table-route\",\"next_hop\":{\"address\":\"192.168.3.4\"},\"origin\":\"service\",\"priority\":1,\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the LoadBalancerPoolPrototypeLoadBalancerContext model - LoadBalancerPoolPrototypeLoadBalancerContext loadBalancerPoolPrototypeLoadBalancerContextModel = new LoadBalancerPoolPrototypeLoadBalancerContext.Builder() - .algorithm("least_connections") - .healthMonitor(loadBalancerPoolHealthMonitorPrototypeModel) - .members(java.util.Arrays.asList(loadBalancerPoolMemberPrototypeModel)) - .name("my-load-balancer-pool") - .protocol("http") - .proxyProtocol("disabled") - .sessionPersistence(loadBalancerPoolSessionPersistencePrototypeModel) + ListVpcRoutingTableRoutesOptions listVpcRoutingTableRoutesOptions = new ListVpcRoutingTableRoutesOptions.Builder() + .vpcId("testString") + .routingTableId("testString") + .limit(Long.valueOf("10")) .build(); - // Construct an instance of the LoadBalancerProfileIdentityByName model - LoadBalancerProfileIdentityByName loadBalancerProfileIdentityModel = new LoadBalancerProfileIdentityByName.Builder() - .name("network-fixed") - .build(); + List allResults = new ArrayList<>(); + VpcRoutingTableRoutesPager pager = new VpcRoutingTableRoutesPager(vpcService, listVpcRoutingTableRoutesOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); + } + + // Test the listVpcRoutingTableRoutes operation using the VpcRoutingTableRoutesPager.getAll() method + @Test + public void testListVpcRoutingTableRoutesWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"routes\":[{\"action\":\"delegate\",\"advertise\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"creator\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"id\":\"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"name\":\"my-vpn-gateway\",\"resource_type\":\"vpn_gateway\"},\"destination\":\"192.168.3.0/24\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"id\":\"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"lifecycle_state\":\"stable\",\"name\":\"my-vpc-routing-table-route\",\"next_hop\":{\"address\":\"192.168.3.4\"},\"origin\":\"service\",\"priority\":1,\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"routes\":[{\"action\":\"delegate\",\"advertise\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"creator\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"id\":\"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"name\":\"my-vpn-gateway\",\"resource_type\":\"vpn_gateway\"},\"destination\":\"192.168.3.0/24\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"id\":\"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"lifecycle_state\":\"stable\",\"name\":\"my-vpc-routing-table-route\",\"next_hop\":{\"address\":\"192.168.3.4\"},\"origin\":\"service\",\"priority\":1,\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"total_count\":2,\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") + ListVpcRoutingTableRoutesOptions listVpcRoutingTableRoutesOptions = new ListVpcRoutingTableRoutesOptions.Builder() + .vpcId("testString") + .routingTableId("testString") + .limit(Long.valueOf("10")) .build(); - // Construct an instance of the SecurityGroupIdentityById model - SecurityGroupIdentityById securityGroupIdentityModel = new SecurityGroupIdentityById.Builder() - .id("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") - .build(); + VpcRoutingTableRoutesPager pager = new VpcRoutingTableRoutesPager(vpcService, listVpcRoutingTableRoutesOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); + } + + // Test the listVpcRoutingTables operation with a valid options model parameter + @Test + public void testListVpcRoutingTablesWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"routing_tables\": [{\"accept_routes_from\": [{\"resource_type\": \"vpn_server\"}], \"advertise_routes_to\": [\"transit_gateway\"], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"is_default\": false, \"lifecycle_state\": \"stable\", \"name\": \"my-routing-table-1\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"routing_table\", \"route_direct_link_ingress\": true, \"route_internet_ingress\": true, \"route_transit_gateway_ingress\": true, \"route_vpc_zone_ingress\": false, \"routes\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"name\": \"my-vpc-routing-table-route\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}]}], \"total_count\": 132}"; + String listVpcRoutingTablesPath = "/vpcs/testString/routing_tables"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); - // Construct an instance of the CreateLoadBalancerOptions model - CreateLoadBalancerOptions createLoadBalancerOptionsModel = new CreateLoadBalancerOptions.Builder() - .isPublic(true) - .subnets(java.util.Arrays.asList(subnetIdentityModel)) - .dns(loadBalancerDnsPrototypeModel) - .isPrivatePath(true) - .listeners(java.util.Arrays.asList(loadBalancerListenerPrototypeLoadBalancerContextModel)) - .logging(loadBalancerLoggingPrototypeModel) - .name("my-load-balancer") - .pools(java.util.Arrays.asList(loadBalancerPoolPrototypeLoadBalancerContextModel)) - .profile(loadBalancerProfileIdentityModel) - .resourceGroup(resourceGroupIdentityModel) - .routeMode(true) - .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) + // Construct an instance of the ListVpcRoutingTablesOptions model + ListVpcRoutingTablesOptions listVpcRoutingTablesOptionsModel = new ListVpcRoutingTablesOptions.Builder() + .vpcId("testString") + .start("testString") + .limit(Long.valueOf("10")) + .isDefault(true) .build(); - // Invoke createLoadBalancer() with a valid options model and verify the result - Response response = vpcService.createLoadBalancer(createLoadBalancerOptionsModel).execute(); + // Invoke listVpcRoutingTables() with a valid options model and verify the result + Response response = vpcService.listVpcRoutingTables(listVpcRoutingTablesOptionsModel).execute(); assertNotNull(response); - LoadBalancer responseObj = response.getResult(); + RoutingTableCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createLoadBalancerPath); + assertEquals(parsedPath, listVpcRoutingTablesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(Boolean.valueOf(query.get("is_default")), Boolean.valueOf(true)); } - // Test the createLoadBalancer operation with and without retries enabled + // Test the listVpcRoutingTables operation with and without retries enabled @Test - public void testCreateLoadBalancerWRetries() throws Throwable { + public void testListVpcRoutingTablesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateLoadBalancerWOptions(); + testListVpcRoutingTablesWOptions(); vpcService.disableRetries(); - testCreateLoadBalancerWOptions(); + testListVpcRoutingTablesWOptions(); } - // Test the createLoadBalancer operation with a null options model (negative test) + // Test the listVpcRoutingTables operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateLoadBalancerNoOptions() throws Throwable { + public void testListVpcRoutingTablesNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createLoadBalancer(null).execute(); + vpcService.listVpcRoutingTables(null).execute(); } - // Test the deleteLoadBalancer operation with a valid options model parameter + // Test the listVpcRoutingTables operation using the VpcRoutingTablesPager.getNext() method @Test - public void testDeleteLoadBalancerWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = ""; - String deleteLoadBalancerPath = "/load_balancers/testString"; + public void testListVpcRoutingTablesWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"routing_tables\":[{\"accept_routes_from\":[{\"resource_type\":\"vpn_server\"}],\"advertise_routes_to\":[\"transit_gateway\"],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"id\":\"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"is_default\":false,\"lifecycle_state\":\"stable\",\"name\":\"my-routing-table-1\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"routing_table\",\"route_direct_link_ingress\":true,\"route_internet_ingress\":true,\"route_transit_gateway_ingress\":true,\"route_vpc_zone_ingress\":false,\"routes\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"id\":\"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"name\":\"my-vpc-routing-table-route\"}],\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}]}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"routing_tables\":[{\"accept_routes_from\":[{\"resource_type\":\"vpn_server\"}],\"advertise_routes_to\":[\"transit_gateway\"],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"id\":\"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"is_default\":false,\"lifecycle_state\":\"stable\",\"name\":\"my-routing-table-1\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"routing_table\",\"route_direct_link_ingress\":true,\"route_internet_ingress\":true,\"route_transit_gateway_ingress\":true,\"route_vpc_zone_ingress\":false,\"routes\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"id\":\"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"name\":\"my-vpc-routing-table-route\"}],\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}]}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() - .setResponseCode(202) - .setBody(mockResponseBody)); + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the DeleteLoadBalancerOptions model - DeleteLoadBalancerOptions deleteLoadBalancerOptionsModel = new DeleteLoadBalancerOptions.Builder() - .id("testString") - .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") + ListVpcRoutingTablesOptions listVpcRoutingTablesOptions = new ListVpcRoutingTablesOptions.Builder() + .vpcId("testString") + .limit(Long.valueOf("10")) + .isDefault(true) .build(); - // Invoke deleteLoadBalancer() with a valid options model and verify the result - Response response = vpcService.deleteLoadBalancer(deleteLoadBalancerOptionsModel).execute(); - assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteLoadBalancerPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + List allResults = new ArrayList<>(); + VpcRoutingTablesPager pager = new VpcRoutingTablesPager(vpcService, listVpcRoutingTablesOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } - - // Test the deleteLoadBalancer operation with and without retries enabled + + // Test the listVpcRoutingTables operation using the VpcRoutingTablesPager.getAll() method @Test - public void testDeleteLoadBalancerWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testDeleteLoadBalancerWOptions(); + public void testListVpcRoutingTablesWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"routing_tables\":[{\"accept_routes_from\":[{\"resource_type\":\"vpn_server\"}],\"advertise_routes_to\":[\"transit_gateway\"],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"id\":\"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"is_default\":false,\"lifecycle_state\":\"stable\",\"name\":\"my-routing-table-1\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"routing_table\",\"route_direct_link_ingress\":true,\"route_internet_ingress\":true,\"route_transit_gateway_ingress\":true,\"route_vpc_zone_ingress\":false,\"routes\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"id\":\"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"name\":\"my-vpc-routing-table-route\"}],\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}]}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"routing_tables\":[{\"accept_routes_from\":[{\"resource_type\":\"vpn_server\"}],\"advertise_routes_to\":[\"transit_gateway\"],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"id\":\"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"is_default\":false,\"lifecycle_state\":\"stable\",\"name\":\"my-routing-table-1\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"routing_table\",\"route_direct_link_ingress\":true,\"route_internet_ingress\":true,\"route_transit_gateway_ingress\":true,\"route_vpc_zone_ingress\":false,\"routes\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"id\":\"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\",\"name\":\"my-vpc-routing-table-route\"}],\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}]}],\"total_count\":2,\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - vpcService.disableRetries(); - testDeleteLoadBalancerWOptions(); - } + ListVpcRoutingTablesOptions listVpcRoutingTablesOptions = new ListVpcRoutingTablesOptions.Builder() + .vpcId("testString") + .limit(Long.valueOf("10")) + .isDefault(true) + .build(); - // Test the deleteLoadBalancer operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteLoadBalancerNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.deleteLoadBalancer(null).execute(); + VpcRoutingTablesPager pager = new VpcRoutingTablesPager(vpcService, listVpcRoutingTablesOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); } - - // Test the getLoadBalancer operation with a valid options model parameter + + // Test the listVpcs operation with a valid options model parameter @Test - public void testGetLoadBalancerWOptions() throws Throwable { + public void testListVpcsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"access_mode\": \"private\", \"attached_load_balancer_pool_members\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}], \"availability\": \"region\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"dns\": {\"instance\": {\"crn\": \"crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::\"}, \"zone\": {\"id\": \"d66662cc-aa23-4fe1-9987-858487a61f45\"}}, \"failsafe_policy_actions\": [\"forward\"], \"hostname\": \"6b88d615-us-south.lb.appdomain.cloud\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"id\": \"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"instance_groups_supported\": true, \"is_private_path\": true, \"is_public\": true, \"listeners\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"id\": \"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\"}], \"logging\": {\"datapath\": {\"active\": true}}, \"name\": \"my-load-balancer\", \"operating_status\": \"offline\", \"pools\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}], \"private_ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"profile\": {\"family\": \"application\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\", \"name\": \"network-fixed\"}, \"provisioning_status\": \"active\", \"public_ips\": [{\"address\": \"192.168.3.4\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"load_balancer\", \"route_mode\": true, \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"security_groups_supported\": false, \"source_ip_session_persistence_supported\": true, \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"udp_supported\": true}"; - String getLoadBalancerPath = "/load_balancers/testString"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132, \"vpcs\": [{\"classic_access\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"cse_source_ips\": [{\"ip\": {\"address\": \"192.168.3.4\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"default_network_acl\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\"}, \"default_routing_table\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"name\": \"my-routing-table-1\", \"resource_type\": \"routing_table\"}, \"default_security_group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}, \"dns\": {\"enable_hub\": false, \"resolution_binding_count\": 0, \"resolver\": {\"servers\": [{\"address\": \"192.168.3.4\", \"zone_affinity\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"type\": \"delegated\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"vpc\"}}}, \"health_reasons\": [{\"code\": \"dns_resolution_binding_failed\", \"message\": \"The VPC specified in the DNS resolution binding has been disconnected.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"public_address_ranges\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"id\": \"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"name\": \"my-public-address-range\", \"resource_type\": \"public_address_range\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"vpc\", \"status\": \"available\"}]}"; + String listVpcsPath = "/vpcs"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetLoadBalancerOptions model - GetLoadBalancerOptions getLoadBalancerOptionsModel = new GetLoadBalancerOptions.Builder() - .id("testString") + // Construct an instance of the ListVpcsOptions model + ListVpcsOptions listVpcsOptionsModel = new ListVpcsOptions.Builder() + .start("testString") + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .classicAccess(true) .build(); - // Invoke getLoadBalancer() with a valid options model and verify the result - Response response = vpcService.getLoadBalancer(getLoadBalancerOptionsModel).execute(); + // Invoke listVpcs() with a valid options model and verify the result + Response response = vpcService.listVpcs(listVpcsOptionsModel).execute(); assertNotNull(response); - LoadBalancer responseObj = response.getResult(); + VPCCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -29861,93 +30818,152 @@ public void testGetLoadBalancerWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getLoadBalancerPath); + assertEquals(parsedPath, listVpcsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("resource_group.id"), "testString"); + assertEquals(Boolean.valueOf(query.get("classic_access")), Boolean.valueOf(true)); } - // Test the getLoadBalancer operation with and without retries enabled + // Test the listVpcs operation with and without retries enabled @Test - public void testGetLoadBalancerWRetries() throws Throwable { + public void testListVpcsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetLoadBalancerWOptions(); + testListVpcsWOptions(); vpcService.disableRetries(); - testGetLoadBalancerWOptions(); + testListVpcsWOptions(); } - // Test the getLoadBalancer operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetLoadBalancerNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.getLoadBalancer(null).execute(); + // Test the listVpcs operation using the VpcsPager.getNext() method + @Test + public void testListVpcsWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"vpcs\":[{\"classic_access\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"cse_source_ips\":[{\"ip\":{\"address\":\"192.168.3.4\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"default_network_acl\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"id\":\"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"name\":\"my-network-acl\"},\"default_routing_table\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"id\":\"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"name\":\"my-routing-table-1\",\"resource_type\":\"routing_table\"},\"default_security_group\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"},\"dns\":{\"enable_hub\":false,\"resolution_binding_count\":0,\"resolver\":{\"servers\":[{\"address\":\"192.168.3.4\",\"zone_affinity\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"type\":\"delegated\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"vpc\"}}},\"health_reasons\":[{\"code\":\"dns_resolution_binding_failed\",\"message\":\"The VPC specified in the DNS resolution binding has been disconnected.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"public_address_ranges\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"id\":\"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"name\":\"my-public-address-range\",\"resource_type\":\"public_address_range\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"vpc\",\"status\":\"available\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"vpcs\":[{\"classic_access\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"cse_source_ips\":[{\"ip\":{\"address\":\"192.168.3.4\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"default_network_acl\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"id\":\"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"name\":\"my-network-acl\"},\"default_routing_table\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"id\":\"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"name\":\"my-routing-table-1\",\"resource_type\":\"routing_table\"},\"default_security_group\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"},\"dns\":{\"enable_hub\":false,\"resolution_binding_count\":0,\"resolver\":{\"servers\":[{\"address\":\"192.168.3.4\",\"zone_affinity\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"type\":\"delegated\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"vpc\"}}},\"health_reasons\":[{\"code\":\"dns_resolution_binding_failed\",\"message\":\"The VPC specified in the DNS resolution binding has been disconnected.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"public_address_ranges\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"id\":\"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"name\":\"my-public-address-range\",\"resource_type\":\"public_address_range\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"vpc\",\"status\":\"available\"}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListVpcsOptions listVpcsOptions = new ListVpcsOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .classicAccess(true) + .build(); + + List allResults = new ArrayList<>(); + VpcsPager pager = new VpcsPager(vpcService, listVpcsOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } + + // Test the listVpcs operation using the VpcsPager.getAll() method + @Test + public void testListVpcsWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"vpcs\":[{\"classic_access\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"cse_source_ips\":[{\"ip\":{\"address\":\"192.168.3.4\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"default_network_acl\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"id\":\"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"name\":\"my-network-acl\"},\"default_routing_table\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"id\":\"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"name\":\"my-routing-table-1\",\"resource_type\":\"routing_table\"},\"default_security_group\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"},\"dns\":{\"enable_hub\":false,\"resolution_binding_count\":0,\"resolver\":{\"servers\":[{\"address\":\"192.168.3.4\",\"zone_affinity\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"type\":\"delegated\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"vpc\"}}},\"health_reasons\":[{\"code\":\"dns_resolution_binding_failed\",\"message\":\"The VPC specified in the DNS resolution binding has been disconnected.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"public_address_ranges\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"id\":\"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"name\":\"my-public-address-range\",\"resource_type\":\"public_address_range\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"vpc\",\"status\":\"available\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"vpcs\":[{\"classic_access\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"cse_source_ips\":[{\"ip\":{\"address\":\"192.168.3.4\"},\"zone\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"default_network_acl\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"id\":\"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\",\"name\":\"my-network-acl\"},\"default_routing_table\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"id\":\"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\",\"name\":\"my-routing-table-1\",\"resource_type\":\"routing_table\"},\"default_security_group\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"},\"dns\":{\"enable_hub\":false,\"resolution_binding_count\":0,\"resolver\":{\"servers\":[{\"address\":\"192.168.3.4\",\"zone_affinity\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\",\"name\":\"us-south-1\"}}],\"type\":\"delegated\",\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"vpc\"}}},\"health_reasons\":[{\"code\":\"dns_resolution_binding_failed\",\"message\":\"The VPC specified in the DNS resolution binding has been disconnected.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"public_address_ranges\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"id\":\"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\",\"name\":\"my-public-address-range\",\"resource_type\":\"public_address_range\"}],\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"vpc\",\"status\":\"available\"}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Test the updateLoadBalancer operation with a valid options model parameter + ListVpcsOptions listVpcsOptions = new ListVpcsOptions.Builder() + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .classicAccess(true) + .build(); + + VpcsPager pager = new VpcsPager(vpcService, listVpcsOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); + } + + // Test the updateVpc operation with a valid options model parameter @Test - public void testUpdateLoadBalancerWOptions() throws Throwable { + public void testUpdateVpcWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"access_mode\": \"private\", \"attached_load_balancer_pool_members\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}], \"availability\": \"region\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"dns\": {\"instance\": {\"crn\": \"crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::\"}, \"zone\": {\"id\": \"d66662cc-aa23-4fe1-9987-858487a61f45\"}}, \"failsafe_policy_actions\": [\"forward\"], \"hostname\": \"6b88d615-us-south.lb.appdomain.cloud\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"id\": \"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"instance_groups_supported\": true, \"is_private_path\": true, \"is_public\": true, \"listeners\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"id\": \"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\"}], \"logging\": {\"datapath\": {\"active\": true}}, \"name\": \"my-load-balancer\", \"operating_status\": \"offline\", \"pools\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}], \"private_ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"profile\": {\"family\": \"application\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed\", \"name\": \"network-fixed\"}, \"provisioning_status\": \"active\", \"public_ips\": [{\"address\": \"192.168.3.4\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"load_balancer\", \"route_mode\": true, \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"security_groups_supported\": false, \"source_ip_session_persistence_supported\": true, \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"udp_supported\": true}"; - String updateLoadBalancerPath = "/load_balancers/testString"; + String mockResponseBody = "{\"classic_access\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"cse_source_ips\": [{\"ip\": {\"address\": \"192.168.3.4\"}, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"default_network_acl\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"id\": \"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf\", \"name\": \"my-network-acl\"}, \"default_routing_table\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"name\": \"my-routing-table-1\", \"resource_type\": \"routing_table\"}, \"default_security_group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}, \"dns\": {\"enable_hub\": false, \"resolution_binding_count\": 0, \"resolver\": {\"servers\": [{\"address\": \"192.168.3.4\", \"zone_affinity\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}], \"type\": \"delegated\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"vpc\"}}}, \"health_reasons\": [{\"code\": \"dns_resolution_binding_failed\", \"message\": \"The VPC specified in the DNS resolution binding has been disconnected.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"public_address_ranges\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::public-address-range:r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/public_address_ranges/r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"id\": \"r006-a4841334-b584-4293-938e-3bc63b4a5b6a\", \"name\": \"my-public-address-range\", \"resource_type\": \"public_address_range\"}], \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"vpc\", \"status\": \"available\"}"; + String updateVpcPath = "/vpcs/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DNSInstanceIdentityByCRN model - DNSInstanceIdentityByCRN dnsInstanceIdentityModel = new DNSInstanceIdentityByCRN.Builder() - .crn("crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::") - .build(); - - // Construct an instance of the DNSZoneIdentityById model - DNSZoneIdentityById dnsZoneIdentityModel = new DNSZoneIdentityById.Builder() - .id("d66662cc-aa23-4fe1-9987-858487a61f45") + // Construct an instance of the ZoneIdentityByName model + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() + .name("us-south-1") .build(); - // Construct an instance of the LoadBalancerDNSPatch model - LoadBalancerDNSPatch loadBalancerDnsPatchModel = new LoadBalancerDNSPatch.Builder() - .instance(dnsInstanceIdentityModel) - .zone(dnsZoneIdentityModel) + // Construct an instance of the DNSServerPrototype model + DNSServerPrototype dnsServerPrototypeModel = new DNSServerPrototype.Builder() + .address("192.168.3.4") + .zoneAffinity(zoneIdentityModel) .build(); - // Construct an instance of the LoadBalancerLoggingDatapathPatch model - LoadBalancerLoggingDatapathPatch loadBalancerLoggingDatapathPatchModel = new LoadBalancerLoggingDatapathPatch.Builder() - .active(true) + // Construct an instance of the VPCDNSResolverVPCPatchVPCIdentityById model + VPCDNSResolverVPCPatchVPCIdentityById vpcdnsResolverVpcPatchModel = new VPCDNSResolverVPCPatchVPCIdentityById.Builder() + .id("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") .build(); - // Construct an instance of the LoadBalancerLoggingPatch model - LoadBalancerLoggingPatch loadBalancerLoggingPatchModel = new LoadBalancerLoggingPatch.Builder() - .datapath(loadBalancerLoggingDatapathPatchModel) + // Construct an instance of the VPCDNSResolverPatch model + VPCDNSResolverPatch vpcdnsResolverPatchModel = new VPCDNSResolverPatch.Builder() + .manualServers(java.util.Arrays.asList(dnsServerPrototypeModel)) + .type("delegated") + .vpc(vpcdnsResolverVpcPatchModel) .build(); - // Construct an instance of the SubnetIdentityById model - SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() - .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + // Construct an instance of the VPCDNSPatch model + VPCDNSPatch vpcdnsPatchModel = new VPCDNSPatch.Builder() + .enableHub(true) + .resolver(vpcdnsResolverPatchModel) .build(); - // Construct an instance of the LoadBalancerPatch model - LoadBalancerPatch loadBalancerPatchModel = new LoadBalancerPatch.Builder() - .dns(loadBalancerDnsPatchModel) - .logging(loadBalancerLoggingPatchModel) - .name("my-load-balancer") - .subnets(java.util.Arrays.asList(subnetIdentityModel)) + // Construct an instance of the VPCPatch model + VPCPatch vpcPatchModel = new VPCPatch.Builder() + .dns(vpcdnsPatchModel) + .name("my-vpc") .build(); - Map loadBalancerPatchModelAsPatch = loadBalancerPatchModel.asPatch(); + Map vpcPatchModelAsPatch = vpcPatchModel.asPatch(); - // Construct an instance of the UpdateLoadBalancerOptions model - UpdateLoadBalancerOptions updateLoadBalancerOptionsModel = new UpdateLoadBalancerOptions.Builder() + // Construct an instance of the UpdateVpcOptions model + UpdateVpcOptions updateVpcOptionsModel = new UpdateVpcOptions.Builder() .id("testString") - .loadBalancerPatch(loadBalancerPatchModelAsPatch) + .vpcPatch(vpcPatchModelAsPatch) .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke updateLoadBalancer() with a valid options model and verify the result - Response response = vpcService.updateLoadBalancer(updateLoadBalancerOptionsModel).execute(); + // Invoke updateVpc() with a valid options model and verify the result + Response response = vpcService.updateVpc(updateVpcOptionsModel).execute(); assertNotNull(response); - LoadBalancer responseObj = response.getResult(); + VPC responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -29956,589 +30972,545 @@ public void testUpdateLoadBalancerWOptions() throws Throwable { assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateLoadBalancerPath); + assertEquals(parsedPath, updateVpcPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateLoadBalancer operation with and without retries enabled + // Test the updateVpc operation with and without retries enabled @Test - public void testUpdateLoadBalancerWRetries() throws Throwable { + public void testUpdateVpcWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateLoadBalancerWOptions(); + testUpdateVpcWOptions(); vpcService.disableRetries(); - testUpdateLoadBalancerWOptions(); + testUpdateVpcWOptions(); } - // Test the updateLoadBalancer operation with a null options model (negative test) + // Test the updateVpc operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateLoadBalancerNoOptions() throws Throwable { + public void testUpdateVpcNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateLoadBalancer(null).execute(); + vpcService.updateVpc(null).execute(); } - // Test the getLoadBalancerStatistics operation with a valid options model parameter + // Test the updateVpcAddressPrefix operation with a valid options model parameter @Test - public void testGetLoadBalancerStatisticsWOptions() throws Throwable { + public void testUpdateVpcAddressPrefixWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"active_connections\": 797, \"connection_rate\": 91.121, \"data_processed_this_month\": 10093173145, \"throughput\": 167.278}"; - String getLoadBalancerStatisticsPath = "/load_balancers/testString/statistics"; + String mockResponseBody = "{\"cidr\": \"192.168.3.0/24\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"has_subnets\": true, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/address_prefixes/r006-68574057-c5e0-4675-ada4-99377d8f4789\", \"id\": \"r006-68574057-c5e0-4675-ada4-99377d8f4789\", \"is_default\": false, \"name\": \"my-vpc-address-prefix-zone-1\", \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String updateVpcAddressPrefixPath = "/vpcs/testString/address_prefixes/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetLoadBalancerStatisticsOptions model - GetLoadBalancerStatisticsOptions getLoadBalancerStatisticsOptionsModel = new GetLoadBalancerStatisticsOptions.Builder() + // Construct an instance of the AddressPrefixPatch model + AddressPrefixPatch addressPrefixPatchModel = new AddressPrefixPatch.Builder() + .isDefault(false) + .name("my-vpc-address-prefix-updated") + .build(); + Map addressPrefixPatchModelAsPatch = addressPrefixPatchModel.asPatch(); + + // Construct an instance of the UpdateVpcAddressPrefixOptions model + UpdateVpcAddressPrefixOptions updateVpcAddressPrefixOptionsModel = new UpdateVpcAddressPrefixOptions.Builder() + .vpcId("testString") .id("testString") + .addressPrefixPatch(addressPrefixPatchModelAsPatch) .build(); - // Invoke getLoadBalancerStatistics() with a valid options model and verify the result - Response response = vpcService.getLoadBalancerStatistics(getLoadBalancerStatisticsOptionsModel).execute(); + // Invoke updateVpcAddressPrefix() with a valid options model and verify the result + Response response = vpcService.updateVpcAddressPrefix(updateVpcAddressPrefixOptionsModel).execute(); assertNotNull(response); - LoadBalancerStatistics responseObj = response.getResult(); + AddressPrefix responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getLoadBalancerStatisticsPath); + assertEquals(parsedPath, updateVpcAddressPrefixPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getLoadBalancerStatistics operation with and without retries enabled + // Test the updateVpcAddressPrefix operation with and without retries enabled @Test - public void testGetLoadBalancerStatisticsWRetries() throws Throwable { + public void testUpdateVpcAddressPrefixWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetLoadBalancerStatisticsWOptions(); + testUpdateVpcAddressPrefixWOptions(); vpcService.disableRetries(); - testGetLoadBalancerStatisticsWOptions(); + testUpdateVpcAddressPrefixWOptions(); } - // Test the getLoadBalancerStatistics operation with a null options model (negative test) + // Test the updateVpcAddressPrefix operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetLoadBalancerStatisticsNoOptions() throws Throwable { + public void testUpdateVpcAddressPrefixNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getLoadBalancerStatistics(null).execute(); + vpcService.updateVpcAddressPrefix(null).execute(); } - // Test the listLoadBalancerListeners operation with a valid options model parameter + // Test the updateVpcDnsResolutionBinding operation with a valid options model parameter @Test - public void testListLoadBalancerListenersWOptions() throws Throwable { + public void testUpdateVpcDnsResolutionBindingWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"listeners\": [{\"accept_proxy_protocol\": true, \"certificate_instance\": {\"crn\": \"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5\"}, \"connection_limit\": 2000, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"default_pool\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"https_redirect\": {\"http_status_code\": 301, \"listener\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"id\": \"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\"}, \"uri\": \"/example?doc=get\"}, \"id\": \"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"idle_connection_timeout\": 100, \"policies\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"id\": \"r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"name\": \"my-load-balancer-listener-policy\"}], \"port\": 443, \"port_max\": 499, \"port_min\": 443, \"protocol\": \"http\", \"provisioning_status\": \"active\"}]}"; - String listLoadBalancerListenersPath = "/load_balancers/testString/listeners"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"endpoint_gateways\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"endpoint_gateway\"}], \"health_reasons\": [{\"code\": \"disconnected_from_bound_vpc\", \"message\": \"The VPC specified in the DNS resolution binding has been disconnected.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-1\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\", \"id\": \"r006-8a524686-fcf6-4947-a59b-188c1ed78ad1\", \"lifecycle_state\": \"stable\", \"name\": \"my-dns-resolution-binding\", \"resource_type\": \"vpc_dns_resolution_binding\", \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"vpc\"}}"; + String updateVpcDnsResolutionBindingPath = "/vpcs/testString/dns_resolution_bindings/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListLoadBalancerListenersOptions model - ListLoadBalancerListenersOptions listLoadBalancerListenersOptionsModel = new ListLoadBalancerListenersOptions.Builder() - .loadBalancerId("testString") + // Construct an instance of the VPCDNSResolutionBindingPatch model + VPCDNSResolutionBindingPatch vpcdnsResolutionBindingPatchModel = new VPCDNSResolutionBindingPatch.Builder() + .name("my-dns-resolution-binding-updated") .build(); + Map vpcdnsResolutionBindingPatchModelAsPatch = vpcdnsResolutionBindingPatchModel.asPatch(); - // Invoke listLoadBalancerListeners() with a valid options model and verify the result - Response response = vpcService.listLoadBalancerListeners(listLoadBalancerListenersOptionsModel).execute(); + // Construct an instance of the UpdateVpcDnsResolutionBindingOptions model + UpdateVpcDnsResolutionBindingOptions updateVpcDnsResolutionBindingOptionsModel = new UpdateVpcDnsResolutionBindingOptions.Builder() + .vpcId("testString") + .id("testString") + .vpcdnsResolutionBindingPatch(vpcdnsResolutionBindingPatchModelAsPatch) + .build(); + + // Invoke updateVpcDnsResolutionBinding() with a valid options model and verify the result + Response response = vpcService.updateVpcDnsResolutionBinding(updateVpcDnsResolutionBindingOptionsModel).execute(); assertNotNull(response); - LoadBalancerListenerCollection responseObj = response.getResult(); + VPCDNSResolutionBinding responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listLoadBalancerListenersPath); + assertEquals(parsedPath, updateVpcDnsResolutionBindingPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the listLoadBalancerListeners operation with and without retries enabled + // Test the updateVpcDnsResolutionBinding operation with and without retries enabled @Test - public void testListLoadBalancerListenersWRetries() throws Throwable { + public void testUpdateVpcDnsResolutionBindingWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListLoadBalancerListenersWOptions(); + testUpdateVpcDnsResolutionBindingWOptions(); vpcService.disableRetries(); - testListLoadBalancerListenersWOptions(); + testUpdateVpcDnsResolutionBindingWOptions(); } - // Test the listLoadBalancerListeners operation with a null options model (negative test) + // Test the updateVpcDnsResolutionBinding operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListLoadBalancerListenersNoOptions() throws Throwable { + public void testUpdateVpcDnsResolutionBindingNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listLoadBalancerListeners(null).execute(); + vpcService.updateVpcDnsResolutionBinding(null).execute(); } - // Test the createLoadBalancerListener operation with a valid options model parameter + // Test the updateVpcRoute operation with a valid options model parameter @Test - public void testCreateLoadBalancerListenerWOptions() throws Throwable { + public void testUpdateVpcRouteWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"accept_proxy_protocol\": true, \"certificate_instance\": {\"crn\": \"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5\"}, \"connection_limit\": 2000, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"default_pool\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"https_redirect\": {\"http_status_code\": 301, \"listener\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"id\": \"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\"}, \"uri\": \"/example?doc=get\"}, \"id\": \"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"idle_connection_timeout\": 100, \"policies\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"id\": \"r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"name\": \"my-load-balancer-listener-policy\"}], \"port\": 443, \"port_max\": 499, \"port_min\": 443, \"protocol\": \"http\", \"provisioning_status\": \"active\"}"; - String createLoadBalancerListenerPath = "/load_balancers/testString/listeners"; + String mockResponseBody = "{\"action\": \"delegate\", \"advertise\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"creator\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"id\": \"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"name\": \"my-vpn-gateway\", \"resource_type\": \"vpn_gateway\"}, \"destination\": \"192.168.3.0/24\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"lifecycle_state\": \"stable\", \"name\": \"my-vpc-routing-table-route\", \"next_hop\": {\"address\": \"192.168.3.4\"}, \"origin\": \"service\", \"priority\": 1, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String updateVpcRoutePath = "/vpcs/testString/routes/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the CertificateInstanceIdentityByCRN model - CertificateInstanceIdentityByCRN certificateInstanceIdentityModel = new CertificateInstanceIdentityByCRN.Builder() - .crn("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") - .build(); - - // Construct an instance of the LoadBalancerPoolIdentityLoadBalancerPoolIdentityById model - LoadBalancerPoolIdentityLoadBalancerPoolIdentityById loadBalancerPoolIdentityModel = new LoadBalancerPoolIdentityLoadBalancerPoolIdentityById.Builder() - .id("r006-70294e14-4e61-11e8-bcf4-0242ac110004") - .build(); - - // Construct an instance of the LoadBalancerListenerIdentityById model - LoadBalancerListenerIdentityById loadBalancerListenerIdentityModel = new LoadBalancerListenerIdentityById.Builder() - .id("r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091") - .build(); - - // Construct an instance of the LoadBalancerListenerHTTPSRedirectPrototype model - LoadBalancerListenerHTTPSRedirectPrototype loadBalancerListenerHttpsRedirectPrototypeModel = new LoadBalancerListenerHTTPSRedirectPrototype.Builder() - .httpStatusCode(Long.valueOf("301")) - .listener(loadBalancerListenerIdentityModel) - .uri("/example?doc=get") - .build(); - - // Construct an instance of the LoadBalancerListenerPolicyRulePrototype model - LoadBalancerListenerPolicyRulePrototype loadBalancerListenerPolicyRulePrototypeModel = new LoadBalancerListenerPolicyRulePrototype.Builder() - .condition("contains") - .field("MY-APP-HEADER") - .type("body") - .value("testString") - .build(); - - // Construct an instance of the LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById model - LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById loadBalancerListenerPolicyTargetPrototypeModel = new LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById.Builder() - .id("r006-70294e14-4e61-11e8-bcf4-0242ac110004") + // Construct an instance of the RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP model + RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP routeNextHopPatchModel = new RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP.Builder() + .address("10.240.0.12") .build(); - // Construct an instance of the LoadBalancerListenerPolicyPrototype model - LoadBalancerListenerPolicyPrototype loadBalancerListenerPolicyPrototypeModel = new LoadBalancerListenerPolicyPrototype.Builder() - .action("forward_to_listener") - .name("my-load-balancer-listener-policy") - .priority(Long.valueOf("5")) - .rules(java.util.Arrays.asList(loadBalancerListenerPolicyRulePrototypeModel)) - .target(loadBalancerListenerPolicyTargetPrototypeModel) + // Construct an instance of the RoutePatch model + RoutePatch routePatchModel = new RoutePatch.Builder() + .advertise(true) + .name("my-vpc-routing-table-route") + .nextHop(routeNextHopPatchModel) + .priority(Long.valueOf("1")) .build(); + Map routePatchModelAsPatch = routePatchModel.asPatch(); - // Construct an instance of the CreateLoadBalancerListenerOptions model - CreateLoadBalancerListenerOptions createLoadBalancerListenerOptionsModel = new CreateLoadBalancerListenerOptions.Builder() - .loadBalancerId("testString") - .protocol("http") - .acceptProxyProtocol(true) - .certificateInstance(certificateInstanceIdentityModel) - .connectionLimit(Long.valueOf("2000")) - .defaultPool(loadBalancerPoolIdentityModel) - .httpsRedirect(loadBalancerListenerHttpsRedirectPrototypeModel) - .idleConnectionTimeout(Long.valueOf("100")) - .policies(java.util.Arrays.asList(loadBalancerListenerPolicyPrototypeModel)) - .port(Long.valueOf("443")) - .portMax(Long.valueOf("499")) - .portMin(Long.valueOf("443")) + // Construct an instance of the UpdateVpcRouteOptions model + UpdateVpcRouteOptions updateVpcRouteOptionsModel = new UpdateVpcRouteOptions.Builder() + .vpcId("testString") + .id("testString") + .routePatch(routePatchModelAsPatch) .build(); - // Invoke createLoadBalancerListener() with a valid options model and verify the result - Response response = vpcService.createLoadBalancerListener(createLoadBalancerListenerOptionsModel).execute(); + // Invoke updateVpcRoute() with a valid options model and verify the result + Response response = vpcService.updateVpcRoute(updateVpcRouteOptionsModel).execute(); assertNotNull(response); - LoadBalancerListener responseObj = response.getResult(); + UpdateVpcRouteResponse responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createLoadBalancerListenerPath); + assertEquals(parsedPath, updateVpcRoutePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createLoadBalancerListener operation with and without retries enabled + // Test the updateVpcRoute operation with and without retries enabled @Test - public void testCreateLoadBalancerListenerWRetries() throws Throwable { + public void testUpdateVpcRouteWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateLoadBalancerListenerWOptions(); + testUpdateVpcRouteWOptions(); vpcService.disableRetries(); - testCreateLoadBalancerListenerWOptions(); + testUpdateVpcRouteWOptions(); } - // Test the createLoadBalancerListener operation with a null options model (negative test) + // Test the updateVpcRoute operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateLoadBalancerListenerNoOptions() throws Throwable { + public void testUpdateVpcRouteNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createLoadBalancerListener(null).execute(); + vpcService.updateVpcRoute(null).execute(); } - // Test the deleteLoadBalancerListener operation with a valid options model parameter + // Test the updateVpcRoutingTable operation with a valid options model parameter @Test - public void testDeleteLoadBalancerListenerWOptions() throws Throwable { + public void testUpdateVpcRoutingTableWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteLoadBalancerListenerPath = "/load_balancers/testString/listeners/testString"; + String mockResponseBody = "{\"accept_routes_from\": [{\"resource_type\": \"vpn_server\"}], \"advertise_routes_to\": [\"transit_gateway\"], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"id\": \"r006-6885e83f-03b2-4603-8a86-db2a0f55c840\", \"is_default\": false, \"lifecycle_state\": \"stable\", \"name\": \"my-routing-table-1\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"routing_table\", \"route_direct_link_ingress\": true, \"route_internet_ingress\": true, \"route_transit_gateway_ingress\": true, \"route_vpc_zone_ingress\": false, \"routes\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"name\": \"my-vpc-routing-table-route\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}]}"; + String updateVpcRoutingTablePath = "/vpcs/testString/routing_tables/testString"; server.enqueue(new MockResponse() - .setResponseCode(202) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteLoadBalancerListenerOptions model - DeleteLoadBalancerListenerOptions deleteLoadBalancerListenerOptionsModel = new DeleteLoadBalancerListenerOptions.Builder() - .loadBalancerId("testString") + // Construct an instance of the ResourceFilter model + ResourceFilter resourceFilterModel = new ResourceFilter.Builder() + .resourceType("vpn_server") + .build(); + + // Construct an instance of the RoutingTablePatch model + RoutingTablePatch routingTablePatchModel = new RoutingTablePatch.Builder() + .acceptRoutesFrom(java.util.Arrays.asList(resourceFilterModel)) + .advertiseRoutesTo(java.util.Arrays.asList("transit_gateway")) + .name("my-routing-table-2") + .routeDirectLinkIngress(true) + .routeInternetIngress(true) + .routeTransitGatewayIngress(true) + .routeVpcZoneIngress(true) + .build(); + Map routingTablePatchModelAsPatch = routingTablePatchModel.asPatch(); + + // Construct an instance of the UpdateVpcRoutingTableOptions model + UpdateVpcRoutingTableOptions updateVpcRoutingTableOptionsModel = new UpdateVpcRoutingTableOptions.Builder() + .vpcId("testString") .id("testString") + .routingTablePatch(routingTablePatchModelAsPatch) + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke deleteLoadBalancerListener() with a valid options model and verify the result - Response response = vpcService.deleteLoadBalancerListener(deleteLoadBalancerListenerOptionsModel).execute(); + // Invoke updateVpcRoutingTable() with a valid options model and verify the result + Response response = vpcService.updateVpcRoutingTable(updateVpcRoutingTableOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + RoutingTable 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(), "DELETE"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteLoadBalancerListenerPath); + assertEquals(parsedPath, updateVpcRoutingTablePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteLoadBalancerListener operation with and without retries enabled + // Test the updateVpcRoutingTable operation with and without retries enabled @Test - public void testDeleteLoadBalancerListenerWRetries() throws Throwable { + public void testUpdateVpcRoutingTableWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteLoadBalancerListenerWOptions(); + testUpdateVpcRoutingTableWOptions(); vpcService.disableRetries(); - testDeleteLoadBalancerListenerWOptions(); + testUpdateVpcRoutingTableWOptions(); } - // Test the deleteLoadBalancerListener operation with a null options model (negative test) + // Test the updateVpcRoutingTable operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteLoadBalancerListenerNoOptions() throws Throwable { + public void testUpdateVpcRoutingTableNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteLoadBalancerListener(null).execute(); + vpcService.updateVpcRoutingTable(null).execute(); } - // Test the getLoadBalancerListener operation with a valid options model parameter + // Test the updateVpcRoutingTableRoute operation with a valid options model parameter @Test - public void testGetLoadBalancerListenerWOptions() throws Throwable { + public void testUpdateVpcRoutingTableRouteWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"accept_proxy_protocol\": true, \"certificate_instance\": {\"crn\": \"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5\"}, \"connection_limit\": 2000, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"default_pool\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"https_redirect\": {\"http_status_code\": 301, \"listener\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"id\": \"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\"}, \"uri\": \"/example?doc=get\"}, \"id\": \"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"idle_connection_timeout\": 100, \"policies\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"id\": \"r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"name\": \"my-load-balancer-listener-policy\"}], \"port\": 443, \"port_max\": 499, \"port_min\": 443, \"protocol\": \"http\", \"provisioning_status\": \"active\"}"; - String getLoadBalancerListenerPath = "/load_balancers/testString/listeners/testString"; + String mockResponseBody = "{\"action\": \"delegate\", \"advertise\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"creator\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"id\": \"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"name\": \"my-vpn-gateway\", \"resource_type\": \"vpn_gateway\"}, \"destination\": \"192.168.3.0/24\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"id\": \"r006-67b7b783-9a0f-41c1-a7f7-eccff87fb8f1\", \"lifecycle_state\": \"stable\", \"name\": \"my-vpc-routing-table-route\", \"next_hop\": {\"address\": \"192.168.3.4\"}, \"origin\": \"service\", \"priority\": 1, \"zone\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1\", \"name\": \"us-south-1\"}}"; + String updateVpcRoutingTableRoutePath = "/vpcs/testString/routing_tables/testString/routes/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetLoadBalancerListenerOptions model - GetLoadBalancerListenerOptions getLoadBalancerListenerOptionsModel = new GetLoadBalancerListenerOptions.Builder() - .loadBalancerId("testString") + // Construct an instance of the RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP model + RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP routeNextHopPatchModel = new RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP.Builder() + .address("0.0.0.0") + .build(); + + // Construct an instance of the RoutePatch model + RoutePatch routePatchModel = new RoutePatch.Builder() + .advertise(false) + .name("my-vpc-routing-table-route") + .nextHop(routeNextHopPatchModel) + .priority(Long.valueOf("1")) + .build(); + Map routePatchModelAsPatch = routePatchModel.asPatch(); + + // Construct an instance of the UpdateVpcRoutingTableRouteOptions model + UpdateVpcRoutingTableRouteOptions updateVpcRoutingTableRouteOptionsModel = new UpdateVpcRoutingTableRouteOptions.Builder() + .vpcId("testString") + .routingTableId("testString") .id("testString") + .routePatch(routePatchModelAsPatch) .build(); - // Invoke getLoadBalancerListener() with a valid options model and verify the result - Response response = vpcService.getLoadBalancerListener(getLoadBalancerListenerOptionsModel).execute(); + // Invoke updateVpcRoutingTableRoute() with a valid options model and verify the result + Response response = vpcService.updateVpcRoutingTableRoute(updateVpcRoutingTableRouteOptionsModel).execute(); assertNotNull(response); - LoadBalancerListener responseObj = response.getResult(); + Route responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getLoadBalancerListenerPath); + assertEquals(parsedPath, updateVpcRoutingTableRoutePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getLoadBalancerListener operation with and without retries enabled + // Test the updateVpcRoutingTableRoute operation with and without retries enabled @Test - public void testGetLoadBalancerListenerWRetries() throws Throwable { + public void testUpdateVpcRoutingTableRouteWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetLoadBalancerListenerWOptions(); + testUpdateVpcRoutingTableRouteWOptions(); vpcService.disableRetries(); - testGetLoadBalancerListenerWOptions(); + testUpdateVpcRoutingTableRouteWOptions(); } - // Test the getLoadBalancerListener operation with a null options model (negative test) + // Test the updateVpcRoutingTableRoute operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetLoadBalancerListenerNoOptions() throws Throwable { + public void testUpdateVpcRoutingTableRouteNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getLoadBalancerListener(null).execute(); + vpcService.updateVpcRoutingTableRoute(null).execute(); } - // Test the updateLoadBalancerListener operation with a valid options model parameter + // Test the addVpnGatewayAdvertisedCidr operation with a valid options model parameter @Test - public void testUpdateLoadBalancerListenerWOptions() throws Throwable { + public void testAddVpnGatewayAdvertisedCidrWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"accept_proxy_protocol\": true, \"certificate_instance\": {\"crn\": \"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5\"}, \"connection_limit\": 2000, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"default_pool\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"https_redirect\": {\"http_status_code\": 301, \"listener\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"id\": \"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\"}, \"uri\": \"/example?doc=get\"}, \"id\": \"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091\", \"idle_connection_timeout\": 100, \"policies\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"id\": \"r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"name\": \"my-load-balancer-listener-policy\"}], \"port\": 443, \"port_max\": 499, \"port_min\": 443, \"protocol\": \"http\", \"provisioning_status\": \"active\"}"; - String updateLoadBalancerListenerPath = "/load_balancers/testString/listeners/testString"; + String mockResponseBody = ""; + String addVpnGatewayAdvertisedCidrPath = "/vpn_gateways/testString/advertised_cidrs/192.168.1.0%2F24"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the CertificateInstanceIdentityByCRN model - CertificateInstanceIdentityByCRN certificateInstanceIdentityModel = new CertificateInstanceIdentityByCRN.Builder() - .crn("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") - .build(); - - // Construct an instance of the LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById model - LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById loadBalancerListenerDefaultPoolPatchModel = new LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById.Builder() - .id("r006-70294e14-4e61-11e8-bcf4-0242ac110004") - .build(); - - // Construct an instance of the LoadBalancerListenerIdentityById model - LoadBalancerListenerIdentityById loadBalancerListenerIdentityModel = new LoadBalancerListenerIdentityById.Builder() - .id("r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091") - .build(); - - // Construct an instance of the LoadBalancerListenerHTTPSRedirectPatch model - LoadBalancerListenerHTTPSRedirectPatch loadBalancerListenerHttpsRedirectPatchModel = new LoadBalancerListenerHTTPSRedirectPatch.Builder() - .httpStatusCode(Long.valueOf("301")) - .listener(loadBalancerListenerIdentityModel) - .uri("/example?doc=get") - .build(); - - // Construct an instance of the LoadBalancerListenerPatch model - LoadBalancerListenerPatch loadBalancerListenerPatchModel = new LoadBalancerListenerPatch.Builder() - .acceptProxyProtocol(true) - .certificateInstance(certificateInstanceIdentityModel) - .connectionLimit(Long.valueOf("2000")) - .defaultPool(loadBalancerListenerDefaultPoolPatchModel) - .httpsRedirect(loadBalancerListenerHttpsRedirectPatchModel) - .idleConnectionTimeout(Long.valueOf("100")) - .port(Long.valueOf("443")) - .portMax(Long.valueOf("499")) - .portMin(Long.valueOf("443")) - .protocol("http") - .build(); - Map loadBalancerListenerPatchModelAsPatch = loadBalancerListenerPatchModel.asPatch(); - - // Construct an instance of the UpdateLoadBalancerListenerOptions model - UpdateLoadBalancerListenerOptions updateLoadBalancerListenerOptionsModel = new UpdateLoadBalancerListenerOptions.Builder() - .loadBalancerId("testString") - .id("testString") - .loadBalancerListenerPatch(loadBalancerListenerPatchModelAsPatch) + // Construct an instance of the AddVpnGatewayAdvertisedCidrOptions model + AddVpnGatewayAdvertisedCidrOptions addVpnGatewayAdvertisedCidrOptionsModel = new AddVpnGatewayAdvertisedCidrOptions.Builder() + .vpnGatewayId("testString") + .cidr("192.168.1.0/24") .build(); - // Invoke updateLoadBalancerListener() with a valid options model and verify the result - Response response = vpcService.updateLoadBalancerListener(updateLoadBalancerListenerOptionsModel).execute(); + // Invoke addVpnGatewayAdvertisedCidr() with a valid options model and verify the result + Response response = vpcService.addVpnGatewayAdvertisedCidr(addVpnGatewayAdvertisedCidrOptionsModel).execute(); assertNotNull(response); - LoadBalancerListener responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "PUT"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateLoadBalancerListenerPath); + assertEquals(parsedPath, addVpnGatewayAdvertisedCidrPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateLoadBalancerListener operation with and without retries enabled + // Test the addVpnGatewayAdvertisedCidr operation with and without retries enabled @Test - public void testUpdateLoadBalancerListenerWRetries() throws Throwable { + public void testAddVpnGatewayAdvertisedCidrWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateLoadBalancerListenerWOptions(); + testAddVpnGatewayAdvertisedCidrWOptions(); vpcService.disableRetries(); - testUpdateLoadBalancerListenerWOptions(); + testAddVpnGatewayAdvertisedCidrWOptions(); } - // Test the updateLoadBalancerListener operation with a null options model (negative test) + // Test the addVpnGatewayAdvertisedCidr operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateLoadBalancerListenerNoOptions() throws Throwable { + public void testAddVpnGatewayAdvertisedCidrNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateLoadBalancerListener(null).execute(); + vpcService.addVpnGatewayAdvertisedCidr(null).execute(); } - // Test the listLoadBalancerListenerPolicies operation with a valid options model parameter + // Test the addVpnGatewayConnectionsLocalCidr operation with a valid options model parameter @Test - public void testListLoadBalancerListenerPoliciesWOptions() throws Throwable { + public void testAddVpnGatewayConnectionsLocalCidrWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"policies\": [{\"action\": \"forward_to_listener\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"id\": \"r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"name\": \"my-load-balancer-listener-policy\", \"priority\": 5, \"provisioning_status\": \"active\", \"rules\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\", \"id\": \"r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\"}], \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}}]}"; - String listLoadBalancerListenerPoliciesPath = "/load_balancers/testString/listeners/testString/policies"; + String mockResponseBody = ""; + String addVpnGatewayConnectionsLocalCidrPath = "/vpn_gateways/testString/connections/testString/local/cidrs/192.168.1.0%2F24"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the ListLoadBalancerListenerPoliciesOptions model - ListLoadBalancerListenerPoliciesOptions listLoadBalancerListenerPoliciesOptionsModel = new ListLoadBalancerListenerPoliciesOptions.Builder() - .loadBalancerId("testString") - .listenerId("testString") + // Construct an instance of the AddVpnGatewayConnectionsLocalCidrOptions model + AddVpnGatewayConnectionsLocalCidrOptions addVpnGatewayConnectionsLocalCidrOptionsModel = new AddVpnGatewayConnectionsLocalCidrOptions.Builder() + .vpnGatewayId("testString") + .id("testString") + .cidr("192.168.1.0/24") .build(); - // Invoke listLoadBalancerListenerPolicies() with a valid options model and verify the result - Response response = vpcService.listLoadBalancerListenerPolicies(listLoadBalancerListenerPoliciesOptionsModel).execute(); + // Invoke addVpnGatewayConnectionsLocalCidr() with a valid options model and verify the result + Response response = vpcService.addVpnGatewayConnectionsLocalCidr(addVpnGatewayConnectionsLocalCidrOptionsModel).execute(); assertNotNull(response); - LoadBalancerListenerPolicyCollection responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PUT"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listLoadBalancerListenerPoliciesPath); + assertEquals(parsedPath, addVpnGatewayConnectionsLocalCidrPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the listLoadBalancerListenerPolicies operation with and without retries enabled + // Test the addVpnGatewayConnectionsLocalCidr operation with and without retries enabled @Test - public void testListLoadBalancerListenerPoliciesWRetries() throws Throwable { + public void testAddVpnGatewayConnectionsLocalCidrWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListLoadBalancerListenerPoliciesWOptions(); + testAddVpnGatewayConnectionsLocalCidrWOptions(); vpcService.disableRetries(); - testListLoadBalancerListenerPoliciesWOptions(); + testAddVpnGatewayConnectionsLocalCidrWOptions(); } - // Test the listLoadBalancerListenerPolicies operation with a null options model (negative test) + // Test the addVpnGatewayConnectionsLocalCidr operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListLoadBalancerListenerPoliciesNoOptions() throws Throwable { + public void testAddVpnGatewayConnectionsLocalCidrNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listLoadBalancerListenerPolicies(null).execute(); + vpcService.addVpnGatewayConnectionsLocalCidr(null).execute(); } - // Test the createLoadBalancerListenerPolicy operation with a valid options model parameter + // Test the addVpnGatewayConnectionsPeerCidr operation with a valid options model parameter @Test - public void testCreateLoadBalancerListenerPolicyWOptions() throws Throwable { + public void testAddVpnGatewayConnectionsPeerCidrWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"action\": \"forward_to_listener\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"id\": \"r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"name\": \"my-load-balancer-listener-policy\", \"priority\": 5, \"provisioning_status\": \"active\", \"rules\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\", \"id\": \"r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\"}], \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}}"; - String createLoadBalancerListenerPolicyPath = "/load_balancers/testString/listeners/testString/policies"; + String mockResponseBody = ""; + String addVpnGatewayConnectionsPeerCidrPath = "/vpn_gateways/testString/connections/testString/peer/cidrs/192.168.1.0%2F24"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the LoadBalancerListenerPolicyRulePrototype model - LoadBalancerListenerPolicyRulePrototype loadBalancerListenerPolicyRulePrototypeModel = new LoadBalancerListenerPolicyRulePrototype.Builder() - .condition("contains") - .field("MY-APP-HEADER") - .type("body") - .value("testString") - .build(); - - // Construct an instance of the LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById model - LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById loadBalancerListenerPolicyTargetPrototypeModel = new LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById.Builder() - .id("r006-70294e14-4e61-11e8-bcf4-0242ac110004") - .build(); - - // Construct an instance of the CreateLoadBalancerListenerPolicyOptions model - CreateLoadBalancerListenerPolicyOptions createLoadBalancerListenerPolicyOptionsModel = new CreateLoadBalancerListenerPolicyOptions.Builder() - .loadBalancerId("testString") - .listenerId("testString") - .action("forward_to_listener") - .priority(Long.valueOf("5")) - .name("my-load-balancer-listener-policy") - .rules(java.util.Arrays.asList(loadBalancerListenerPolicyRulePrototypeModel)) - .target(loadBalancerListenerPolicyTargetPrototypeModel) + // Construct an instance of the AddVpnGatewayConnectionsPeerCidrOptions model + AddVpnGatewayConnectionsPeerCidrOptions addVpnGatewayConnectionsPeerCidrOptionsModel = new AddVpnGatewayConnectionsPeerCidrOptions.Builder() + .vpnGatewayId("testString") + .id("testString") + .cidr("192.168.1.0/24") .build(); - // Invoke createLoadBalancerListenerPolicy() with a valid options model and verify the result - Response response = vpcService.createLoadBalancerListenerPolicy(createLoadBalancerListenerPolicyOptionsModel).execute(); + // Invoke addVpnGatewayConnectionsPeerCidr() with a valid options model and verify the result + Response response = vpcService.addVpnGatewayConnectionsPeerCidr(addVpnGatewayConnectionsPeerCidrOptionsModel).execute(); assertNotNull(response); - LoadBalancerListenerPolicy responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "PUT"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createLoadBalancerListenerPolicyPath); + assertEquals(parsedPath, addVpnGatewayConnectionsPeerCidrPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createLoadBalancerListenerPolicy operation with and without retries enabled + // Test the addVpnGatewayConnectionsPeerCidr operation with and without retries enabled @Test - public void testCreateLoadBalancerListenerPolicyWRetries() throws Throwable { + public void testAddVpnGatewayConnectionsPeerCidrWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateLoadBalancerListenerPolicyWOptions(); + testAddVpnGatewayConnectionsPeerCidrWOptions(); vpcService.disableRetries(); - testCreateLoadBalancerListenerPolicyWOptions(); + testAddVpnGatewayConnectionsPeerCidrWOptions(); } - // Test the createLoadBalancerListenerPolicy operation with a null options model (negative test) + // Test the addVpnGatewayConnectionsPeerCidr operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateLoadBalancerListenerPolicyNoOptions() throws Throwable { + public void testAddVpnGatewayConnectionsPeerCidrNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createLoadBalancerListenerPolicy(null).execute(); + vpcService.addVpnGatewayConnectionsPeerCidr(null).execute(); } - // Test the deleteLoadBalancerListenerPolicy operation with a valid options model parameter + // Test the checkVpnGatewayAdvertisedCidr operation with a valid options model parameter @Test - public void testDeleteLoadBalancerListenerPolicyWOptions() throws Throwable { + public void testCheckVpnGatewayAdvertisedCidrWOptions() throws Throwable { // Register a mock response String mockResponseBody = ""; - String deleteLoadBalancerListenerPolicyPath = "/load_balancers/testString/listeners/testString/policies/testString"; + String checkVpnGatewayAdvertisedCidrPath = "/vpn_gateways/testString/advertised_cidrs/192.168.1.0%2F24"; server.enqueue(new MockResponse() - .setResponseCode(202) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the DeleteLoadBalancerListenerPolicyOptions model - DeleteLoadBalancerListenerPolicyOptions deleteLoadBalancerListenerPolicyOptionsModel = new DeleteLoadBalancerListenerPolicyOptions.Builder() - .loadBalancerId("testString") - .listenerId("testString") - .id("testString") + // Construct an instance of the CheckVpnGatewayAdvertisedCidrOptions model + CheckVpnGatewayAdvertisedCidrOptions checkVpnGatewayAdvertisedCidrOptionsModel = new CheckVpnGatewayAdvertisedCidrOptions.Builder() + .vpnGatewayId("testString") + .cidr("192.168.1.0/24") .build(); - // Invoke deleteLoadBalancerListenerPolicy() with a valid options model and verify the result - Response response = vpcService.deleteLoadBalancerListenerPolicy(deleteLoadBalancerListenerPolicyOptionsModel).execute(); + // Invoke checkVpnGatewayAdvertisedCidr() with a valid options model and verify the result + Response response = vpcService.checkVpnGatewayAdvertisedCidr(checkVpnGatewayAdvertisedCidrOptionsModel).execute(); assertNotNull(response); Void responseObj = response.getResult(); assertNull(responseObj); @@ -30546,57 +31518,56 @@ public void testDeleteLoadBalancerListenerPolicyWOptions() throws Throwable { // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteLoadBalancerListenerPolicyPath); + assertEquals(parsedPath, checkVpnGatewayAdvertisedCidrPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteLoadBalancerListenerPolicy operation with and without retries enabled + // Test the checkVpnGatewayAdvertisedCidr operation with and without retries enabled @Test - public void testDeleteLoadBalancerListenerPolicyWRetries() throws Throwable { + public void testCheckVpnGatewayAdvertisedCidrWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteLoadBalancerListenerPolicyWOptions(); + testCheckVpnGatewayAdvertisedCidrWOptions(); vpcService.disableRetries(); - testDeleteLoadBalancerListenerPolicyWOptions(); + testCheckVpnGatewayAdvertisedCidrWOptions(); } - // Test the deleteLoadBalancerListenerPolicy operation with a null options model (negative test) + // Test the checkVpnGatewayAdvertisedCidr operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteLoadBalancerListenerPolicyNoOptions() throws Throwable { + public void testCheckVpnGatewayAdvertisedCidrNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteLoadBalancerListenerPolicy(null).execute(); + vpcService.checkVpnGatewayAdvertisedCidr(null).execute(); } - // Test the getLoadBalancerListenerPolicy operation with a valid options model parameter + // Test the checkVpnGatewayConnectionsLocalCidr operation with a valid options model parameter @Test - public void testGetLoadBalancerListenerPolicyWOptions() throws Throwable { + public void testCheckVpnGatewayConnectionsLocalCidrWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"action\": \"forward_to_listener\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"id\": \"r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"name\": \"my-load-balancer-listener-policy\", \"priority\": 5, \"provisioning_status\": \"active\", \"rules\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\", \"id\": \"r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\"}], \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}}"; - String getLoadBalancerListenerPolicyPath = "/load_balancers/testString/listeners/testString/policies/testString"; + String mockResponseBody = ""; + String checkVpnGatewayConnectionsLocalCidrPath = "/vpn_gateways/testString/connections/testString/local/cidrs/192.168.1.0%2F24"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the GetLoadBalancerListenerPolicyOptions model - GetLoadBalancerListenerPolicyOptions getLoadBalancerListenerPolicyOptionsModel = new GetLoadBalancerListenerPolicyOptions.Builder() - .loadBalancerId("testString") - .listenerId("testString") + // Construct an instance of the CheckVpnGatewayConnectionsLocalCidrOptions model + CheckVpnGatewayConnectionsLocalCidrOptions checkVpnGatewayConnectionsLocalCidrOptionsModel = new CheckVpnGatewayConnectionsLocalCidrOptions.Builder() + .vpnGatewayId("testString") .id("testString") + .cidr("192.168.1.0/24") .build(); - // Invoke getLoadBalancerListenerPolicy() with a valid options model and verify the result - Response response = vpcService.getLoadBalancerListenerPolicy(getLoadBalancerListenerPolicyOptionsModel).execute(); + // Invoke checkVpnGatewayConnectionsLocalCidr() with a valid options model and verify the result + Response response = vpcService.checkVpnGatewayConnectionsLocalCidr(checkVpnGatewayConnectionsLocalCidrOptionsModel).execute(); assertNotNull(response); - LoadBalancerListenerPolicy responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); @@ -30604,181 +31575,179 @@ public void testGetLoadBalancerListenerPolicyWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getLoadBalancerListenerPolicyPath); + assertEquals(parsedPath, checkVpnGatewayConnectionsLocalCidrPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getLoadBalancerListenerPolicy operation with and without retries enabled + // Test the checkVpnGatewayConnectionsLocalCidr operation with and without retries enabled @Test - public void testGetLoadBalancerListenerPolicyWRetries() throws Throwable { + public void testCheckVpnGatewayConnectionsLocalCidrWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetLoadBalancerListenerPolicyWOptions(); + testCheckVpnGatewayConnectionsLocalCidrWOptions(); vpcService.disableRetries(); - testGetLoadBalancerListenerPolicyWOptions(); + testCheckVpnGatewayConnectionsLocalCidrWOptions(); } - // Test the getLoadBalancerListenerPolicy operation with a null options model (negative test) + // Test the checkVpnGatewayConnectionsLocalCidr operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetLoadBalancerListenerPolicyNoOptions() throws Throwable { + public void testCheckVpnGatewayConnectionsLocalCidrNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getLoadBalancerListenerPolicy(null).execute(); + vpcService.checkVpnGatewayConnectionsLocalCidr(null).execute(); } - // Test the updateLoadBalancerListenerPolicy operation with a valid options model parameter + // Test the checkVpnGatewayConnectionsPeerCidr operation with a valid options model parameter @Test - public void testUpdateLoadBalancerListenerPolicyWOptions() throws Throwable { + public void testCheckVpnGatewayConnectionsPeerCidrWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"action\": \"forward_to_listener\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"id\": \"r006-0b00a37f-a3d7-43ca-8187-f1e88d659245\", \"name\": \"my-load-balancer-listener-policy\", \"priority\": 5, \"provisioning_status\": \"active\", \"rules\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\", \"id\": \"r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\"}], \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}}"; - String updateLoadBalancerListenerPolicyPath = "/load_balancers/testString/listeners/testString/policies/testString"; + String mockResponseBody = ""; + String checkVpnGatewayConnectionsPeerCidrPath = "/vpn_gateways/testString/connections/testString/peer/cidrs/192.168.1.0%2F24"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById model - LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById loadBalancerListenerPolicyTargetPatchModel = new LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById.Builder() - .id("r006-70294e14-4e61-11e8-bcf4-0242ac110004") - .build(); - - // Construct an instance of the LoadBalancerListenerPolicyPatch model - LoadBalancerListenerPolicyPatch loadBalancerListenerPolicyPatchModel = new LoadBalancerListenerPolicyPatch.Builder() - .name("my-load-balancer-listener-policy-updated") - .priority(Long.valueOf("5")) - .target(loadBalancerListenerPolicyTargetPatchModel) - .build(); - Map loadBalancerListenerPolicyPatchModelAsPatch = loadBalancerListenerPolicyPatchModel.asPatch(); - - // Construct an instance of the UpdateLoadBalancerListenerPolicyOptions model - UpdateLoadBalancerListenerPolicyOptions updateLoadBalancerListenerPolicyOptionsModel = new UpdateLoadBalancerListenerPolicyOptions.Builder() - .loadBalancerId("testString") - .listenerId("testString") + // Construct an instance of the CheckVpnGatewayConnectionsPeerCidrOptions model + CheckVpnGatewayConnectionsPeerCidrOptions checkVpnGatewayConnectionsPeerCidrOptionsModel = new CheckVpnGatewayConnectionsPeerCidrOptions.Builder() + .vpnGatewayId("testString") .id("testString") - .loadBalancerListenerPolicyPatch(loadBalancerListenerPolicyPatchModelAsPatch) + .cidr("192.168.1.0/24") .build(); - // Invoke updateLoadBalancerListenerPolicy() with a valid options model and verify the result - Response response = vpcService.updateLoadBalancerListenerPolicy(updateLoadBalancerListenerPolicyOptionsModel).execute(); + // Invoke checkVpnGatewayConnectionsPeerCidr() with a valid options model and verify the result + Response response = vpcService.checkVpnGatewayConnectionsPeerCidr(checkVpnGatewayConnectionsPeerCidrOptionsModel).execute(); assertNotNull(response); - LoadBalancerListenerPolicy responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateLoadBalancerListenerPolicyPath); + assertEquals(parsedPath, checkVpnGatewayConnectionsPeerCidrPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateLoadBalancerListenerPolicy operation with and without retries enabled + // Test the checkVpnGatewayConnectionsPeerCidr operation with and without retries enabled @Test - public void testUpdateLoadBalancerListenerPolicyWRetries() throws Throwable { + public void testCheckVpnGatewayConnectionsPeerCidrWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateLoadBalancerListenerPolicyWOptions(); + testCheckVpnGatewayConnectionsPeerCidrWOptions(); vpcService.disableRetries(); - testUpdateLoadBalancerListenerPolicyWOptions(); + testCheckVpnGatewayConnectionsPeerCidrWOptions(); } - // Test the updateLoadBalancerListenerPolicy operation with a null options model (negative test) + // Test the checkVpnGatewayConnectionsPeerCidr operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateLoadBalancerListenerPolicyNoOptions() throws Throwable { + public void testCheckVpnGatewayConnectionsPeerCidrNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateLoadBalancerListenerPolicy(null).execute(); + vpcService.checkVpnGatewayConnectionsPeerCidr(null).execute(); } - // Test the listLoadBalancerListenerPolicyRules operation with a valid options model parameter + // Test the createIkePolicy operation with a valid options model parameter @Test - public void testListLoadBalancerListenerPolicyRulesWOptions() throws Throwable { + public void testCreateIkePolicyWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"rules\": [{\"condition\": \"contains\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"field\": \"MY-APP-HEADER\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\", \"id\": \"r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\", \"provisioning_status\": \"active\", \"type\": \"body\", \"value\": \"value\"}]}"; - String listLoadBalancerListenerPolicyRulesPath = "/load_balancers/testString/listeners/testString/policies/testString/rules"; + String mockResponseBody = "{\"authentication_algorithm\": \"md5\", \"connections\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"name\": \"my-vpn-gateway-connection\", \"resource_type\": \"vpn_gateway_connection\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"dh_group\": 14, \"encryption_algorithm\": \"aes128\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"id\": \"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"ike_version\": 1, \"key_lifetime\": 28800, \"name\": \"my-ike-policy\", \"negotiation_mode\": \"main\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"ike_policy\"}"; + String createIkePolicyPath = "/ike_policies"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the ListLoadBalancerListenerPolicyRulesOptions model - ListLoadBalancerListenerPolicyRulesOptions listLoadBalancerListenerPolicyRulesOptionsModel = new ListLoadBalancerListenerPolicyRulesOptions.Builder() - .loadBalancerId("testString") - .listenerId("testString") - .policyId("testString") + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") .build(); - // Invoke listLoadBalancerListenerPolicyRules() with a valid options model and verify the result - Response response = vpcService.listLoadBalancerListenerPolicyRules(listLoadBalancerListenerPolicyRulesOptionsModel).execute(); + // Construct an instance of the CreateIkePolicyOptions model + CreateIkePolicyOptions createIkePolicyOptionsModel = new CreateIkePolicyOptions.Builder() + .authenticationAlgorithm("sha256") + .dhGroup(Long.valueOf("14")) + .encryptionAlgorithm("aes128") + .ikeVersion(Long.valueOf("1")) + .keyLifetime(Long.valueOf("28800")) + .name("my-ike-policy") + .resourceGroup(resourceGroupIdentityModel) + .build(); + + // Invoke createIkePolicy() with a valid options model and verify the result + Response response = vpcService.createIkePolicy(createIkePolicyOptionsModel).execute(); assertNotNull(response); - LoadBalancerListenerPolicyRuleCollection responseObj = response.getResult(); + IKEPolicy responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listLoadBalancerListenerPolicyRulesPath); + assertEquals(parsedPath, createIkePolicyPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the listLoadBalancerListenerPolicyRules operation with and without retries enabled + // Test the createIkePolicy operation with and without retries enabled @Test - public void testListLoadBalancerListenerPolicyRulesWRetries() throws Throwable { + public void testCreateIkePolicyWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListLoadBalancerListenerPolicyRulesWOptions(); + testCreateIkePolicyWOptions(); vpcService.disableRetries(); - testListLoadBalancerListenerPolicyRulesWOptions(); + testCreateIkePolicyWOptions(); } - // Test the listLoadBalancerListenerPolicyRules operation with a null options model (negative test) + // Test the createIkePolicy operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListLoadBalancerListenerPolicyRulesNoOptions() throws Throwable { + public void testCreateIkePolicyNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listLoadBalancerListenerPolicyRules(null).execute(); + vpcService.createIkePolicy(null).execute(); } - // Test the createLoadBalancerListenerPolicyRule operation with a valid options model parameter + // Test the createIpsecPolicy operation with a valid options model parameter @Test - public void testCreateLoadBalancerListenerPolicyRuleWOptions() throws Throwable { + public void testCreateIpsecPolicyWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"condition\": \"contains\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"field\": \"MY-APP-HEADER\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\", \"id\": \"r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\", \"provisioning_status\": \"active\", \"type\": \"body\", \"value\": \"value\"}"; - String createLoadBalancerListenerPolicyRulePath = "/load_balancers/testString/listeners/testString/policies/testString/rules"; + String mockResponseBody = "{\"authentication_algorithm\": \"disabled\", \"connections\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"name\": \"my-vpn-gateway-connection\", \"resource_type\": \"vpn_gateway_connection\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"encapsulation_mode\": \"tunnel\", \"encryption_algorithm\": \"aes128\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"id\": \"r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"key_lifetime\": 3600, \"name\": \"my-ipsec-policy\", \"pfs\": \"disabled\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"ipsec_policy\", \"transform_protocol\": \"esp\"}"; + String createIpsecPolicyPath = "/ipsec_policies"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(201) .setBody(mockResponseBody)); - - // Construct an instance of the CreateLoadBalancerListenerPolicyRuleOptions model - CreateLoadBalancerListenerPolicyRuleOptions createLoadBalancerListenerPolicyRuleOptionsModel = new CreateLoadBalancerListenerPolicyRuleOptions.Builder() - .loadBalancerId("testString") - .listenerId("testString") - .policyId("testString") - .condition("contains") - .type("body") - .value("testString") - .field("MY-APP-HEADER") + + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") .build(); - // Invoke createLoadBalancerListenerPolicyRule() with a valid options model and verify the result - Response response = vpcService.createLoadBalancerListenerPolicyRule(createLoadBalancerListenerPolicyRuleOptionsModel).execute(); + // Construct an instance of the CreateIpsecPolicyOptions model + CreateIpsecPolicyOptions createIpsecPolicyOptionsModel = new CreateIpsecPolicyOptions.Builder() + .authenticationAlgorithm("disabled") + .encryptionAlgorithm("aes128") + .pfs("disabled") + .keyLifetime(Long.valueOf("3600")) + .name("my-ipsec-policy") + .resourceGroup(resourceGroupIdentityModel) + .build(); + + // Invoke createIpsecPolicy() with a valid options model and verify the result + Response response = vpcService.createIpsecPolicy(createIpsecPolicyOptionsModel).execute(); assertNotNull(response); - LoadBalancerListenerPolicyRule responseObj = response.getResult(); + IPsecPolicy responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -30787,378 +31756,382 @@ public void testCreateLoadBalancerListenerPolicyRuleWOptions() throws Throwable assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createLoadBalancerListenerPolicyRulePath); + assertEquals(parsedPath, createIpsecPolicyPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createLoadBalancerListenerPolicyRule operation with and without retries enabled + // Test the createIpsecPolicy operation with and without retries enabled @Test - public void testCreateLoadBalancerListenerPolicyRuleWRetries() throws Throwable { + public void testCreateIpsecPolicyWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateLoadBalancerListenerPolicyRuleWOptions(); + testCreateIpsecPolicyWOptions(); vpcService.disableRetries(); - testCreateLoadBalancerListenerPolicyRuleWOptions(); + testCreateIpsecPolicyWOptions(); } - // Test the createLoadBalancerListenerPolicyRule operation with a null options model (negative test) + // Test the createIpsecPolicy operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateLoadBalancerListenerPolicyRuleNoOptions() throws Throwable { + public void testCreateIpsecPolicyNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createLoadBalancerListenerPolicyRule(null).execute(); + vpcService.createIpsecPolicy(null).execute(); } - // Test the deleteLoadBalancerListenerPolicyRule operation with a valid options model parameter + // Test the createVpnGateway operation with a valid options model parameter @Test - public void testDeleteLoadBalancerListenerPolicyRuleWOptions() throws Throwable { + public void testCreateVpnGatewayWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteLoadBalancerListenerPolicyRulePath = "/load_balancers/testString/listeners/testString/policies/testString/rules/testString"; + String mockResponseBody = "{\"connections\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"name\": \"my-vpn-gateway-connection\", \"resource_type\": \"vpn_gateway_connection\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"health_reasons\": [{\"code\": \"cannot_reserve_ip_address\", \"message\": \"IP address exhaustion (release addresses on the VPN's subnet).\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"id\": \"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"members\": [{\"health_reasons\": [{\"code\": \"cannot_reserve_ip_address\", \"message\": \"IP address exhaustion (release addresses on the VPN's subnet).\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}], \"health_state\": \"ok\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"private_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"public_ip\": {\"address\": \"192.168.3.4\"}, \"role\": \"active\"}], \"name\": \"my-vpn-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"vpn_gateway\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"mode\": \"policy\"}"; + String createVpnGatewayPath = "/vpn_gateways"; server.enqueue(new MockResponse() - .setResponseCode(202) + .setHeader("Content-type", "application/json") + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the DeleteLoadBalancerListenerPolicyRuleOptions model - DeleteLoadBalancerListenerPolicyRuleOptions deleteLoadBalancerListenerPolicyRuleOptionsModel = new DeleteLoadBalancerListenerPolicyRuleOptions.Builder() - .loadBalancerId("testString") - .listenerId("testString") - .policyId("testString") - .id("testString") + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") .build(); - // Invoke deleteLoadBalancerListenerPolicyRule() with a valid options model and verify the result - Response response = vpcService.deleteLoadBalancerListenerPolicyRule(deleteLoadBalancerListenerPolicyRuleOptionsModel).execute(); + // Construct an instance of the SubnetIdentityById model + SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() + .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + .build(); + + // Construct an instance of the VPNGatewayPrototypeVPNGatewayRouteModePrototype model + VPNGatewayPrototypeVPNGatewayRouteModePrototype vpnGatewayPrototypeModel = new VPNGatewayPrototypeVPNGatewayRouteModePrototype.Builder() + .name("my-vpn-gateway") + .resourceGroup(resourceGroupIdentityModel) + .subnet(subnetIdentityModel) + .advertisedCidrs(java.util.Arrays.asList("192.168.3.0/24")) + .localAsn(Long.valueOf("64520")) + .mode("route") + .build(); + + // Construct an instance of the CreateVpnGatewayOptions model + CreateVpnGatewayOptions createVpnGatewayOptionsModel = new CreateVpnGatewayOptions.Builder() + .vpnGatewayPrototype(vpnGatewayPrototypeModel) + .build(); + + // Invoke createVpnGateway() with a valid options model and verify the result + Response response = vpcService.createVpnGateway(createVpnGatewayOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + VPNGateway 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(), "DELETE"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteLoadBalancerListenerPolicyRulePath); + assertEquals(parsedPath, createVpnGatewayPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteLoadBalancerListenerPolicyRule operation with and without retries enabled + // Test the createVpnGateway operation with and without retries enabled @Test - public void testDeleteLoadBalancerListenerPolicyRuleWRetries() throws Throwable { + public void testCreateVpnGatewayWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteLoadBalancerListenerPolicyRuleWOptions(); + testCreateVpnGatewayWOptions(); vpcService.disableRetries(); - testDeleteLoadBalancerListenerPolicyRuleWOptions(); + testCreateVpnGatewayWOptions(); } - // Test the deleteLoadBalancerListenerPolicyRule operation with a null options model (negative test) + // Test the createVpnGateway operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteLoadBalancerListenerPolicyRuleNoOptions() throws Throwable { + public void testCreateVpnGatewayNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteLoadBalancerListenerPolicyRule(null).execute(); + vpcService.createVpnGateway(null).execute(); } - // Test the getLoadBalancerListenerPolicyRule operation with a valid options model parameter + // Test the createVpnGatewayConnection operation with a valid options model parameter @Test - public void testGetLoadBalancerListenerPolicyRuleWOptions() throws Throwable { + public void testCreateVpnGatewayConnectionWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"condition\": \"contains\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"field\": \"MY-APP-HEADER\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\", \"id\": \"r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\", \"provisioning_status\": \"active\", \"type\": \"body\", \"value\": \"value\"}"; - String getLoadBalancerListenerPolicyRulePath = "/load_balancers/testString/listeners/testString/policies/testString/rules/testString"; + String mockResponseBody = "{\"admin_state_up\": true, \"authentication_mode\": \"psk\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"dead_peer_detection\": {\"action\": \"restart\", \"interval\": 30, \"timeout\": 120}, \"establish_mode\": \"bidirectional\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"ike_policy\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"id\": \"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"name\": \"my-ike-policy\", \"resource_type\": \"ike_policy\"}, \"ipsec_policy\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"id\": \"r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"name\": \"my-ipsec-policy\", \"resource_type\": \"ipsec_policy\"}, \"mode\": \"policy\", \"name\": \"my-vpn-gateway-connection\", \"psk\": \"lkj14b1oi0alcniejkso\", \"resource_type\": \"vpn_gateway_connection\", \"status\": \"down\", \"status_reasons\": [{\"code\": \"cannot_authenticate_connection\", \"message\": \"Failed to authenticate a connection because of mismatched IKE ID and PSK.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}], \"distribute_traffic\": false, \"local\": {\"ike_identities\": [{\"type\": \"fqdn\", \"value\": \"my-service.example.com\"}]}, \"peer\": {\"ike_identity\": {\"type\": \"fqdn\", \"value\": \"my-service.example.com\"}, \"type\": \"address\", \"address\": \"192.0.2.5\"}, \"routing_protocol\": \"none\", \"tunnels\": [{\"public_ip\": {\"address\": \"192.168.3.4\"}, \"status\": \"down\", \"status_reasons\": [{\"code\": \"cannot_authenticate_connection\", \"message\": \"Failed to authenticate a connection because of mismatched IKE ID and PSK.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}"; + String createVpnGatewayConnectionPath = "/vpn_gateways/testString/connections"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the GetLoadBalancerListenerPolicyRuleOptions model - GetLoadBalancerListenerPolicyRuleOptions getLoadBalancerListenerPolicyRuleOptionsModel = new GetLoadBalancerListenerPolicyRuleOptions.Builder() - .loadBalancerId("testString") - .listenerId("testString") - .policyId("testString") - .id("testString") + // Construct an instance of the VPNGatewayConnectionDPDPrototype model + VPNGatewayConnectionDPDPrototype vpnGatewayConnectionDpdPrototypeModel = new VPNGatewayConnectionDPDPrototype.Builder() + .action("restart") + .interval(Long.valueOf("30")) + .timeout(Long.valueOf("120")) .build(); - // Invoke getLoadBalancerListenerPolicyRule() with a valid options model and verify the result - Response response = vpcService.getLoadBalancerListenerPolicyRule(getLoadBalancerListenerPolicyRuleOptionsModel).execute(); + // Construct an instance of the VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById model + VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById vpnGatewayConnectionIkePolicyPrototypeModel = new VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById.Builder() + .id("r006-e98f46a3-1e4e-4195-b4e5-b8155192689d") + .build(); + + // Construct an instance of the VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById model + VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById vpnGatewayConnectionIPsecPolicyPrototypeModel = new VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById.Builder() + .id("r006-51eae621-dbbc-4c47-b623-b57a43c19876") + .build(); + + // Construct an instance of the VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN model + VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN vpnGatewayConnectionIkeIdentityPrototypeModel = new VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN.Builder() + .type("fqdn") + .value("my-service.example.com") + .build(); + + // Construct an instance of the VPNGatewayConnectionStaticRouteModeLocalPrototype model + VPNGatewayConnectionStaticRouteModeLocalPrototype vpnGatewayConnectionStaticRouteModeLocalPrototypeModel = new VPNGatewayConnectionStaticRouteModeLocalPrototype.Builder() + .ikeIdentities(java.util.Arrays.asList(vpnGatewayConnectionIkeIdentityPrototypeModel)) + .build(); + + // Construct an instance of the VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress model + VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress vpnGatewayConnectionStaticRouteModePeerPrototypeModel = new VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress.Builder() + .ikeIdentity(vpnGatewayConnectionIkeIdentityPrototypeModel) + .address("192.0.2.5") + .build(); + + // Construct an instance of the VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype model + VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype vpnGatewayConnectionPrototypeModel = new VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype.Builder() + .adminStateUp(true) + .deadPeerDetection(vpnGatewayConnectionDpdPrototypeModel) + .establishMode("bidirectional") + .ikePolicy(vpnGatewayConnectionIkePolicyPrototypeModel) + .ipsecPolicy(vpnGatewayConnectionIPsecPolicyPrototypeModel) + .name("my-vpn-gateway-connection") + .psk("lkj14b1oi0alcniejkso") + .distributeTraffic(false) + .local(vpnGatewayConnectionStaticRouteModeLocalPrototypeModel) + .peer(vpnGatewayConnectionStaticRouteModePeerPrototypeModel) + .routingProtocol("none") + .build(); + + // Construct an instance of the CreateVpnGatewayConnectionOptions model + CreateVpnGatewayConnectionOptions createVpnGatewayConnectionOptionsModel = new CreateVpnGatewayConnectionOptions.Builder() + .vpnGatewayId("testString") + .vpnGatewayConnectionPrototype(vpnGatewayConnectionPrototypeModel) + .build(); + + // Invoke createVpnGatewayConnection() with a valid options model and verify the result + Response response = vpcService.createVpnGatewayConnection(createVpnGatewayConnectionOptionsModel).execute(); assertNotNull(response); - LoadBalancerListenerPolicyRule responseObj = response.getResult(); + VPNGatewayConnection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getLoadBalancerListenerPolicyRulePath); + assertEquals(parsedPath, createVpnGatewayConnectionPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getLoadBalancerListenerPolicyRule operation with and without retries enabled + // Test the createVpnGatewayConnection operation with and without retries enabled @Test - public void testGetLoadBalancerListenerPolicyRuleWRetries() throws Throwable { + public void testCreateVpnGatewayConnectionWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetLoadBalancerListenerPolicyRuleWOptions(); + testCreateVpnGatewayConnectionWOptions(); vpcService.disableRetries(); - testGetLoadBalancerListenerPolicyRuleWOptions(); + testCreateVpnGatewayConnectionWOptions(); } - // Test the getLoadBalancerListenerPolicyRule operation with a null options model (negative test) + // Test the createVpnGatewayConnection operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetLoadBalancerListenerPolicyRuleNoOptions() throws Throwable { + public void testCreateVpnGatewayConnectionNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getLoadBalancerListenerPolicyRule(null).execute(); + vpcService.createVpnGatewayConnection(null).execute(); } - // Test the updateLoadBalancerListenerPolicyRule operation with a valid options model parameter + // Test the deleteIkePolicy operation with a valid options model parameter @Test - public void testUpdateLoadBalancerListenerPolicyRuleWOptions() throws Throwable { + public void testDeleteIkePolicyWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"condition\": \"contains\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"field\": \"MY-APP-HEADER\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\", \"id\": \"r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b\", \"provisioning_status\": \"active\", \"type\": \"body\", \"value\": \"value\"}"; - String updateLoadBalancerListenerPolicyRulePath = "/load_balancers/testString/listeners/testString/policies/testString/rules/testString"; + String mockResponseBody = ""; + String deleteIkePolicyPath = "/ike_policies/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the LoadBalancerListenerPolicyRulePatch model - LoadBalancerListenerPolicyRulePatch loadBalancerListenerPolicyRulePatchModel = new LoadBalancerListenerPolicyRulePatch.Builder() - .condition("contains") - .field("MY-APP-HEADER") - .type("body") - .value("my-example-hostname-updated") - .build(); - Map loadBalancerListenerPolicyRulePatchModelAsPatch = loadBalancerListenerPolicyRulePatchModel.asPatch(); - - // Construct an instance of the UpdateLoadBalancerListenerPolicyRuleOptions model - UpdateLoadBalancerListenerPolicyRuleOptions updateLoadBalancerListenerPolicyRuleOptionsModel = new UpdateLoadBalancerListenerPolicyRuleOptions.Builder() - .loadBalancerId("testString") - .listenerId("testString") - .policyId("testString") + // Construct an instance of the DeleteIkePolicyOptions model + DeleteIkePolicyOptions deleteIkePolicyOptionsModel = new DeleteIkePolicyOptions.Builder() .id("testString") - .loadBalancerListenerPolicyRulePatch(loadBalancerListenerPolicyRulePatchModelAsPatch) .build(); - // Invoke updateLoadBalancerListenerPolicyRule() with a valid options model and verify the result - Response response = vpcService.updateLoadBalancerListenerPolicyRule(updateLoadBalancerListenerPolicyRuleOptionsModel).execute(); + // Invoke deleteIkePolicy() with a valid options model and verify the result + Response response = vpcService.deleteIkePolicy(deleteIkePolicyOptionsModel).execute(); assertNotNull(response); - LoadBalancerListenerPolicyRule responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateLoadBalancerListenerPolicyRulePath); + assertEquals(parsedPath, deleteIkePolicyPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateLoadBalancerListenerPolicyRule operation with and without retries enabled + // Test the deleteIkePolicy operation with and without retries enabled @Test - public void testUpdateLoadBalancerListenerPolicyRuleWRetries() throws Throwable { + public void testDeleteIkePolicyWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateLoadBalancerListenerPolicyRuleWOptions(); + testDeleteIkePolicyWOptions(); vpcService.disableRetries(); - testUpdateLoadBalancerListenerPolicyRuleWOptions(); + testDeleteIkePolicyWOptions(); } - // Test the updateLoadBalancerListenerPolicyRule operation with a null options model (negative test) + // Test the deleteIkePolicy operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateLoadBalancerListenerPolicyRuleNoOptions() throws Throwable { + public void testDeleteIkePolicyNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateLoadBalancerListenerPolicyRule(null).execute(); + vpcService.deleteIkePolicy(null).execute(); } - // Test the listLoadBalancerPools operation with a valid options model parameter + // Test the deleteIpsecPolicy operation with a valid options model parameter @Test - public void testListLoadBalancerPoolsWOptions() throws Throwable { + public void testDeleteIpsecPolicyWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"pools\": [{\"algorithm\": \"least_connections\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"failsafe_policy\": {\"action\": \"forward\", \"healthy_member_threshold_count\": 0, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}}, \"health_monitor\": {\"delay\": 5, \"max_retries\": 2, \"port\": 22, \"timeout\": 2, \"type\": \"tcp\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"instance_group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"id\": \"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"name\": \"my-instance-group\"}, \"members\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}], \"name\": \"my-load-balancer-pool\", \"protocol\": \"http\", \"provisioning_status\": \"active\", \"proxy_protocol\": \"disabled\", \"session_persistence\": {\"cookie_name\": \"my-cookie-name\", \"type\": \"app_cookie\"}}]}"; - String listLoadBalancerPoolsPath = "/load_balancers/testString/pools"; + String mockResponseBody = ""; + String deleteIpsecPolicyPath = "/ipsec_policies/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the ListLoadBalancerPoolsOptions model - ListLoadBalancerPoolsOptions listLoadBalancerPoolsOptionsModel = new ListLoadBalancerPoolsOptions.Builder() - .loadBalancerId("testString") + // Construct an instance of the DeleteIpsecPolicyOptions model + DeleteIpsecPolicyOptions deleteIpsecPolicyOptionsModel = new DeleteIpsecPolicyOptions.Builder() + .id("testString") .build(); - // Invoke listLoadBalancerPools() with a valid options model and verify the result - Response response = vpcService.listLoadBalancerPools(listLoadBalancerPoolsOptionsModel).execute(); + // Invoke deleteIpsecPolicy() with a valid options model and verify the result + Response response = vpcService.deleteIpsecPolicy(deleteIpsecPolicyOptionsModel).execute(); assertNotNull(response); - LoadBalancerPoolCollection responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listLoadBalancerPoolsPath); + assertEquals(parsedPath, deleteIpsecPolicyPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the listLoadBalancerPools operation with and without retries enabled + // Test the deleteIpsecPolicy operation with and without retries enabled @Test - public void testListLoadBalancerPoolsWRetries() throws Throwable { + public void testDeleteIpsecPolicyWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListLoadBalancerPoolsWOptions(); + testDeleteIpsecPolicyWOptions(); vpcService.disableRetries(); - testListLoadBalancerPoolsWOptions(); + testDeleteIpsecPolicyWOptions(); } - // Test the listLoadBalancerPools operation with a null options model (negative test) + // Test the deleteIpsecPolicy operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListLoadBalancerPoolsNoOptions() throws Throwable { + public void testDeleteIpsecPolicyNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listLoadBalancerPools(null).execute(); + vpcService.deleteIpsecPolicy(null).execute(); } - // Test the createLoadBalancerPool operation with a valid options model parameter + // Test the deleteVpnGateway operation with a valid options model parameter @Test - public void testCreateLoadBalancerPoolWOptions() throws Throwable { + public void testDeleteVpnGatewayWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"algorithm\": \"least_connections\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"failsafe_policy\": {\"action\": \"forward\", \"healthy_member_threshold_count\": 0, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}}, \"health_monitor\": {\"delay\": 5, \"max_retries\": 2, \"port\": 22, \"timeout\": 2, \"type\": \"tcp\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"instance_group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"id\": \"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"name\": \"my-instance-group\"}, \"members\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}], \"name\": \"my-load-balancer-pool\", \"protocol\": \"http\", \"provisioning_status\": \"active\", \"proxy_protocol\": \"disabled\", \"session_persistence\": {\"cookie_name\": \"my-cookie-name\", \"type\": \"app_cookie\"}}"; - String createLoadBalancerPoolPath = "/load_balancers/testString/pools"; + String mockResponseBody = ""; + String deleteVpnGatewayPath = "/vpn_gateways/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeTCPPrototype model - LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeTCPPrototype loadBalancerPoolHealthMonitorPrototypeModel = new LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeTCPPrototype.Builder() - .delay(Long.valueOf("5")) - .maxRetries(Long.valueOf("2")) - .port(Long.valueOf("22")) - .timeout(Long.valueOf("2")) - .type("tcp") - .build(); - - // Construct an instance of the LoadBalancerPoolIdentityLoadBalancerPoolIdentityById model - LoadBalancerPoolIdentityLoadBalancerPoolIdentityById loadBalancerPoolIdentityModel = new LoadBalancerPoolIdentityLoadBalancerPoolIdentityById.Builder() - .id("r006-70294e14-4e61-11e8-bcf4-0242ac110004") - .build(); - - // Construct an instance of the LoadBalancerPoolFailsafePolicyPrototype model - LoadBalancerPoolFailsafePolicyPrototype loadBalancerPoolFailsafePolicyPrototypeModel = new LoadBalancerPoolFailsafePolicyPrototype.Builder() - .action("forward") - .target(loadBalancerPoolIdentityModel) - .build(); - - // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model - LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById loadBalancerPoolMemberTargetPrototypeModel = new LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById.Builder() - .id("0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0") - .build(); - - // Construct an instance of the LoadBalancerPoolMemberPrototype model - LoadBalancerPoolMemberPrototype loadBalancerPoolMemberPrototypeModel = new LoadBalancerPoolMemberPrototype.Builder() - .port(Long.valueOf("80")) - .target(loadBalancerPoolMemberTargetPrototypeModel) - .weight(Long.valueOf("50")) - .build(); - - // Construct an instance of the LoadBalancerPoolSessionPersistencePrototype model - LoadBalancerPoolSessionPersistencePrototype loadBalancerPoolSessionPersistencePrototypeModel = new LoadBalancerPoolSessionPersistencePrototype.Builder() - .cookieName("my-cookie-name") - .type("app_cookie") - .build(); - - // Construct an instance of the CreateLoadBalancerPoolOptions model - CreateLoadBalancerPoolOptions createLoadBalancerPoolOptionsModel = new CreateLoadBalancerPoolOptions.Builder() - .loadBalancerId("testString") - .algorithm("least_connections") - .healthMonitor(loadBalancerPoolHealthMonitorPrototypeModel) - .protocol("http") - .failsafePolicy(loadBalancerPoolFailsafePolicyPrototypeModel) - .members(java.util.Arrays.asList(loadBalancerPoolMemberPrototypeModel)) - .name("my-load-balancer-pool") - .proxyProtocol("disabled") - .sessionPersistence(loadBalancerPoolSessionPersistencePrototypeModel) + // Construct an instance of the DeleteVpnGatewayOptions model + DeleteVpnGatewayOptions deleteVpnGatewayOptionsModel = new DeleteVpnGatewayOptions.Builder() + .id("testString") .build(); - // Invoke createLoadBalancerPool() with a valid options model and verify the result - Response response = vpcService.createLoadBalancerPool(createLoadBalancerPoolOptionsModel).execute(); + // Invoke deleteVpnGateway() with a valid options model and verify the result + Response response = vpcService.deleteVpnGateway(deleteVpnGatewayOptionsModel).execute(); assertNotNull(response); - LoadBalancerPool responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createLoadBalancerPoolPath); + assertEquals(parsedPath, deleteVpnGatewayPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createLoadBalancerPool operation with and without retries enabled + // Test the deleteVpnGateway operation with and without retries enabled @Test - public void testCreateLoadBalancerPoolWRetries() throws Throwable { + public void testDeleteVpnGatewayWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateLoadBalancerPoolWOptions(); + testDeleteVpnGatewayWOptions(); vpcService.disableRetries(); - testCreateLoadBalancerPoolWOptions(); + testDeleteVpnGatewayWOptions(); } - // Test the createLoadBalancerPool operation with a null options model (negative test) + // Test the deleteVpnGateway operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateLoadBalancerPoolNoOptions() throws Throwable { + public void testDeleteVpnGatewayNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createLoadBalancerPool(null).execute(); + vpcService.deleteVpnGateway(null).execute(); } - // Test the deleteLoadBalancerPool operation with a valid options model parameter + // Test the deleteVpnGatewayConnection operation with a valid options model parameter @Test - public void testDeleteLoadBalancerPoolWOptions() throws Throwable { + public void testDeleteVpnGatewayConnectionWOptions() throws Throwable { // Register a mock response String mockResponseBody = ""; - String deleteLoadBalancerPoolPath = "/load_balancers/testString/pools/testString"; + String deleteVpnGatewayConnectionPath = "/vpn_gateways/testString/connections/testString"; server.enqueue(new MockResponse() .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the DeleteLoadBalancerPoolOptions model - DeleteLoadBalancerPoolOptions deleteLoadBalancerPoolOptionsModel = new DeleteLoadBalancerPoolOptions.Builder() - .loadBalancerId("testString") + // Construct an instance of the DeleteVpnGatewayConnectionOptions model + DeleteVpnGatewayConnectionOptions deleteVpnGatewayConnectionOptionsModel = new DeleteVpnGatewayConnectionOptions.Builder() + .vpnGatewayId("testString") .id("testString") + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke deleteLoadBalancerPool() with a valid options model and verify the result - Response response = vpcService.deleteLoadBalancerPool(deleteLoadBalancerPoolOptionsModel).execute(); + // Invoke deleteVpnGatewayConnection() with a valid options model and verify the result + Response response = vpcService.deleteVpnGatewayConnection(deleteVpnGatewayConnectionOptionsModel).execute(); assertNotNull(response); Void responseObj = response.getResult(); assertNull(responseObj); @@ -31169,52 +32142,51 @@ public void testDeleteLoadBalancerPoolWOptions() throws Throwable { assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteLoadBalancerPoolPath); + assertEquals(parsedPath, deleteVpnGatewayConnectionPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteLoadBalancerPool operation with and without retries enabled + // Test the deleteVpnGatewayConnection operation with and without retries enabled @Test - public void testDeleteLoadBalancerPoolWRetries() throws Throwable { + public void testDeleteVpnGatewayConnectionWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteLoadBalancerPoolWOptions(); + testDeleteVpnGatewayConnectionWOptions(); vpcService.disableRetries(); - testDeleteLoadBalancerPoolWOptions(); + testDeleteVpnGatewayConnectionWOptions(); } - // Test the deleteLoadBalancerPool operation with a null options model (negative test) + // Test the deleteVpnGatewayConnection operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteLoadBalancerPoolNoOptions() throws Throwable { + public void testDeleteVpnGatewayConnectionNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteLoadBalancerPool(null).execute(); + vpcService.deleteVpnGatewayConnection(null).execute(); } - // Test the getLoadBalancerPool operation with a valid options model parameter + // Test the getIkePolicy operation with a valid options model parameter @Test - public void testGetLoadBalancerPoolWOptions() throws Throwable { + public void testGetIkePolicyWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"algorithm\": \"least_connections\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"failsafe_policy\": {\"action\": \"forward\", \"healthy_member_threshold_count\": 0, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}}, \"health_monitor\": {\"delay\": 5, \"max_retries\": 2, \"port\": 22, \"timeout\": 2, \"type\": \"tcp\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"instance_group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"id\": \"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"name\": \"my-instance-group\"}, \"members\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}], \"name\": \"my-load-balancer-pool\", \"protocol\": \"http\", \"provisioning_status\": \"active\", \"proxy_protocol\": \"disabled\", \"session_persistence\": {\"cookie_name\": \"my-cookie-name\", \"type\": \"app_cookie\"}}"; - String getLoadBalancerPoolPath = "/load_balancers/testString/pools/testString"; + String mockResponseBody = "{\"authentication_algorithm\": \"md5\", \"connections\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"name\": \"my-vpn-gateway-connection\", \"resource_type\": \"vpn_gateway_connection\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"dh_group\": 14, \"encryption_algorithm\": \"aes128\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"id\": \"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"ike_version\": 1, \"key_lifetime\": 28800, \"name\": \"my-ike-policy\", \"negotiation_mode\": \"main\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"ike_policy\"}"; + String getIkePolicyPath = "/ike_policies/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetLoadBalancerPoolOptions model - GetLoadBalancerPoolOptions getLoadBalancerPoolOptionsModel = new GetLoadBalancerPoolOptions.Builder() - .loadBalancerId("testString") + // Construct an instance of the GetIkePolicyOptions model + GetIkePolicyOptions getIkePolicyOptionsModel = new GetIkePolicyOptions.Builder() .id("testString") .build(); - // Invoke getLoadBalancerPool() with a valid options model and verify the result - Response response = vpcService.getLoadBalancerPool(getLoadBalancerPoolOptionsModel).execute(); + // Invoke getIkePolicy() with a valid options model and verify the result + Response response = vpcService.getIkePolicy(getIkePolicyOptionsModel).execute(); assertNotNull(response); - LoadBalancerPool responseObj = response.getResult(); + IKEPolicy responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -31223,146 +32195,104 @@ public void testGetLoadBalancerPoolWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getLoadBalancerPoolPath); + assertEquals(parsedPath, getIkePolicyPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getLoadBalancerPool operation with and without retries enabled + // Test the getIkePolicy operation with and without retries enabled @Test - public void testGetLoadBalancerPoolWRetries() throws Throwable { + public void testGetIkePolicyWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetLoadBalancerPoolWOptions(); + testGetIkePolicyWOptions(); vpcService.disableRetries(); - testGetLoadBalancerPoolWOptions(); + testGetIkePolicyWOptions(); } - // Test the getLoadBalancerPool operation with a null options model (negative test) + // Test the getIkePolicy operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetLoadBalancerPoolNoOptions() throws Throwable { + public void testGetIkePolicyNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getLoadBalancerPool(null).execute(); + vpcService.getIkePolicy(null).execute(); } - // Test the updateLoadBalancerPool operation with a valid options model parameter + // Test the getIpsecPolicy operation with a valid options model parameter @Test - public void testUpdateLoadBalancerPoolWOptions() throws Throwable { + public void testGetIpsecPolicyWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"algorithm\": \"least_connections\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"failsafe_policy\": {\"action\": \"forward\", \"healthy_member_threshold_count\": 0, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"name\": \"my-load-balancer-pool\"}}, \"health_monitor\": {\"delay\": 5, \"max_retries\": 2, \"port\": 22, \"timeout\": 2, \"type\": \"tcp\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"id\": \"r006-70294e14-4e61-11e8-bcf4-0242ac110004\", \"instance_group\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"id\": \"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60\", \"name\": \"my-instance-group\"}, \"members\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\"}], \"name\": \"my-load-balancer-pool\", \"protocol\": \"http\", \"provisioning_status\": \"active\", \"proxy_protocol\": \"disabled\", \"session_persistence\": {\"cookie_name\": \"my-cookie-name\", \"type\": \"app_cookie\"}}"; - String updateLoadBalancerPoolPath = "/load_balancers/testString/pools/testString"; + String mockResponseBody = "{\"authentication_algorithm\": \"disabled\", \"connections\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"name\": \"my-vpn-gateway-connection\", \"resource_type\": \"vpn_gateway_connection\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"encapsulation_mode\": \"tunnel\", \"encryption_algorithm\": \"aes128\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"id\": \"r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"key_lifetime\": 3600, \"name\": \"my-ipsec-policy\", \"pfs\": \"disabled\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"ipsec_policy\", \"transform_protocol\": \"esp\"}"; + String getIpsecPolicyPath = "/ipsec_policies/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the LoadBalancerPoolFailsafePolicyTargetPatchLoadBalancerPoolIdentityById model - LoadBalancerPoolFailsafePolicyTargetPatchLoadBalancerPoolIdentityById loadBalancerPoolFailsafePolicyTargetPatchModel = new LoadBalancerPoolFailsafePolicyTargetPatchLoadBalancerPoolIdentityById.Builder() - .id("r006-70294e14-4e61-11e8-bcf4-0242ac110004") - .build(); - - // Construct an instance of the LoadBalancerPoolFailsafePolicyPatch model - LoadBalancerPoolFailsafePolicyPatch loadBalancerPoolFailsafePolicyPatchModel = new LoadBalancerPoolFailsafePolicyPatch.Builder() - .action("forward") - .target(loadBalancerPoolFailsafePolicyTargetPatchModel) - .build(); - - // Construct an instance of the LoadBalancerPoolHealthMonitorPatch model - LoadBalancerPoolHealthMonitorPatch loadBalancerPoolHealthMonitorPatchModel = new LoadBalancerPoolHealthMonitorPatch.Builder() - .delay(Long.valueOf("5")) - .maxRetries(Long.valueOf("2")) - .port(Long.valueOf("22")) - .timeout(Long.valueOf("2")) - .type("http") - .urlPath("/") - .build(); - - // Construct an instance of the LoadBalancerPoolSessionPersistencePatch model - LoadBalancerPoolSessionPersistencePatch loadBalancerPoolSessionPersistencePatchModel = new LoadBalancerPoolSessionPersistencePatch.Builder() - .cookieName("my-cookie-name") - .type("app_cookie") - .build(); - - // Construct an instance of the LoadBalancerPoolPatch model - LoadBalancerPoolPatch loadBalancerPoolPatchModel = new LoadBalancerPoolPatch.Builder() - .algorithm("weighted_round_robin") - .failsafePolicy(loadBalancerPoolFailsafePolicyPatchModel) - .healthMonitor(loadBalancerPoolHealthMonitorPatchModel) - .name("my-load-balancer-pool") - .protocol("http") - .proxyProtocol("disabled") - .sessionPersistence(loadBalancerPoolSessionPersistencePatchModel) - .build(); - Map loadBalancerPoolPatchModelAsPatch = loadBalancerPoolPatchModel.asPatch(); - - // Construct an instance of the UpdateLoadBalancerPoolOptions model - UpdateLoadBalancerPoolOptions updateLoadBalancerPoolOptionsModel = new UpdateLoadBalancerPoolOptions.Builder() - .loadBalancerId("testString") + // Construct an instance of the GetIpsecPolicyOptions model + GetIpsecPolicyOptions getIpsecPolicyOptionsModel = new GetIpsecPolicyOptions.Builder() .id("testString") - .loadBalancerPoolPatch(loadBalancerPoolPatchModelAsPatch) .build(); - // Invoke updateLoadBalancerPool() with a valid options model and verify the result - Response response = vpcService.updateLoadBalancerPool(updateLoadBalancerPoolOptionsModel).execute(); + // Invoke getIpsecPolicy() with a valid options model and verify the result + Response response = vpcService.getIpsecPolicy(getIpsecPolicyOptionsModel).execute(); assertNotNull(response); - LoadBalancerPool responseObj = response.getResult(); + IPsecPolicy responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateLoadBalancerPoolPath); + assertEquals(parsedPath, getIpsecPolicyPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateLoadBalancerPool operation with and without retries enabled + // Test the getIpsecPolicy operation with and without retries enabled @Test - public void testUpdateLoadBalancerPoolWRetries() throws Throwable { + public void testGetIpsecPolicyWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateLoadBalancerPoolWOptions(); + testGetIpsecPolicyWOptions(); vpcService.disableRetries(); - testUpdateLoadBalancerPoolWOptions(); + testGetIpsecPolicyWOptions(); } - // Test the updateLoadBalancerPool operation with a null options model (negative test) + // Test the getIpsecPolicy operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateLoadBalancerPoolNoOptions() throws Throwable { + public void testGetIpsecPolicyNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateLoadBalancerPool(null).execute(); + vpcService.getIpsecPolicy(null).execute(); } - // Test the listLoadBalancerPoolMembers operation with a valid options model parameter + // Test the getVpnGateway operation with a valid options model parameter @Test - public void testListLoadBalancerPoolMembersWOptions() throws Throwable { + public void testGetVpnGatewayWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"members\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"health\": \"faulted\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"port\": 80, \"provisioning_status\": \"active\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}, \"weight\": 50}]}"; - String listLoadBalancerPoolMembersPath = "/load_balancers/testString/pools/testString/members"; + String mockResponseBody = "{\"connections\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"name\": \"my-vpn-gateway-connection\", \"resource_type\": \"vpn_gateway_connection\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"health_reasons\": [{\"code\": \"cannot_reserve_ip_address\", \"message\": \"IP address exhaustion (release addresses on the VPN's subnet).\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"id\": \"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"members\": [{\"health_reasons\": [{\"code\": \"cannot_reserve_ip_address\", \"message\": \"IP address exhaustion (release addresses on the VPN's subnet).\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}], \"health_state\": \"ok\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"private_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"public_ip\": {\"address\": \"192.168.3.4\"}, \"role\": \"active\"}], \"name\": \"my-vpn-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"vpn_gateway\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"mode\": \"policy\"}"; + String getVpnGatewayPath = "/vpn_gateways/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListLoadBalancerPoolMembersOptions model - ListLoadBalancerPoolMembersOptions listLoadBalancerPoolMembersOptionsModel = new ListLoadBalancerPoolMembersOptions.Builder() - .loadBalancerId("testString") - .poolId("testString") + // Construct an instance of the GetVpnGatewayOptions model + GetVpnGatewayOptions getVpnGatewayOptionsModel = new GetVpnGatewayOptions.Builder() + .id("testString") .build(); - // Invoke listLoadBalancerPoolMembers() with a valid options model and verify the result - Response response = vpcService.listLoadBalancerPoolMembers(listLoadBalancerPoolMembersOptionsModel).execute(); + // Invoke getVpnGateway() with a valid options model and verify the result + Response response = vpcService.getVpnGateway(getVpnGatewayOptionsModel).execute(); assertNotNull(response); - LoadBalancerPoolMemberCollection responseObj = response.getResult(); + VPNGateway responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -31371,236 +32301,272 @@ public void testListLoadBalancerPoolMembersWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listLoadBalancerPoolMembersPath); + assertEquals(parsedPath, getVpnGatewayPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the listLoadBalancerPoolMembers operation with and without retries enabled + // Test the getVpnGateway operation with and without retries enabled @Test - public void testListLoadBalancerPoolMembersWRetries() throws Throwable { + public void testGetVpnGatewayWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListLoadBalancerPoolMembersWOptions(); + testGetVpnGatewayWOptions(); vpcService.disableRetries(); - testListLoadBalancerPoolMembersWOptions(); + testGetVpnGatewayWOptions(); } - // Test the listLoadBalancerPoolMembers operation with a null options model (negative test) + // Test the getVpnGateway operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListLoadBalancerPoolMembersNoOptions() throws Throwable { + public void testGetVpnGatewayNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listLoadBalancerPoolMembers(null).execute(); + vpcService.getVpnGateway(null).execute(); } - // Test the createLoadBalancerPoolMember operation with a valid options model parameter + // Test the getVpnGatewayConnection operation with a valid options model parameter @Test - public void testCreateLoadBalancerPoolMemberWOptions() throws Throwable { + public void testGetVpnGatewayConnectionWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"health\": \"faulted\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"port\": 80, \"provisioning_status\": \"active\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}, \"weight\": 50}"; - String createLoadBalancerPoolMemberPath = "/load_balancers/testString/pools/testString/members"; + String mockResponseBody = "{\"admin_state_up\": true, \"authentication_mode\": \"psk\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"dead_peer_detection\": {\"action\": \"restart\", \"interval\": 30, \"timeout\": 120}, \"establish_mode\": \"bidirectional\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"ike_policy\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"id\": \"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"name\": \"my-ike-policy\", \"resource_type\": \"ike_policy\"}, \"ipsec_policy\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"id\": \"r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"name\": \"my-ipsec-policy\", \"resource_type\": \"ipsec_policy\"}, \"mode\": \"policy\", \"name\": \"my-vpn-gateway-connection\", \"psk\": \"lkj14b1oi0alcniejkso\", \"resource_type\": \"vpn_gateway_connection\", \"status\": \"down\", \"status_reasons\": [{\"code\": \"cannot_authenticate_connection\", \"message\": \"Failed to authenticate a connection because of mismatched IKE ID and PSK.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}], \"distribute_traffic\": false, \"local\": {\"ike_identities\": [{\"type\": \"fqdn\", \"value\": \"my-service.example.com\"}]}, \"peer\": {\"ike_identity\": {\"type\": \"fqdn\", \"value\": \"my-service.example.com\"}, \"type\": \"address\", \"address\": \"192.0.2.5\"}, \"routing_protocol\": \"none\", \"tunnels\": [{\"public_ip\": {\"address\": \"192.168.3.4\"}, \"status\": \"down\", \"status_reasons\": [{\"code\": \"cannot_authenticate_connection\", \"message\": \"Failed to authenticate a connection because of mismatched IKE ID and PSK.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}"; + String getVpnGatewayConnectionPath = "/vpn_gateways/testString/connections/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model - LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById loadBalancerPoolMemberTargetPrototypeModel = new LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById.Builder() - .id("0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0") - .build(); - - // Construct an instance of the CreateLoadBalancerPoolMemberOptions model - CreateLoadBalancerPoolMemberOptions createLoadBalancerPoolMemberOptionsModel = new CreateLoadBalancerPoolMemberOptions.Builder() - .loadBalancerId("testString") - .poolId("testString") - .port(Long.valueOf("80")) - .target(loadBalancerPoolMemberTargetPrototypeModel) - .weight(Long.valueOf("50")) + // Construct an instance of the GetVpnGatewayConnectionOptions model + GetVpnGatewayConnectionOptions getVpnGatewayConnectionOptionsModel = new GetVpnGatewayConnectionOptions.Builder() + .vpnGatewayId("testString") + .id("testString") .build(); - // Invoke createLoadBalancerPoolMember() with a valid options model and verify the result - Response response = vpcService.createLoadBalancerPoolMember(createLoadBalancerPoolMemberOptionsModel).execute(); + // Invoke getVpnGatewayConnection() with a valid options model and verify the result + Response response = vpcService.getVpnGatewayConnection(getVpnGatewayConnectionOptionsModel).execute(); assertNotNull(response); - LoadBalancerPoolMember responseObj = response.getResult(); + VPNGatewayConnection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createLoadBalancerPoolMemberPath); + assertEquals(parsedPath, getVpnGatewayConnectionPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createLoadBalancerPoolMember operation with and without retries enabled + // Test the getVpnGatewayConnection operation with and without retries enabled @Test - public void testCreateLoadBalancerPoolMemberWRetries() throws Throwable { + public void testGetVpnGatewayConnectionWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateLoadBalancerPoolMemberWOptions(); + testGetVpnGatewayConnectionWOptions(); vpcService.disableRetries(); - testCreateLoadBalancerPoolMemberWOptions(); + testGetVpnGatewayConnectionWOptions(); } - // Test the createLoadBalancerPoolMember operation with a null options model (negative test) + // Test the getVpnGatewayConnection operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateLoadBalancerPoolMemberNoOptions() throws Throwable { + public void testGetVpnGatewayConnectionNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createLoadBalancerPoolMember(null).execute(); + vpcService.getVpnGatewayConnection(null).execute(); } - // Test the replaceLoadBalancerPoolMembers operation with a valid options model parameter + // Test the getVpnGatewayServiceConnection operation with a valid options model parameter @Test - public void testReplaceLoadBalancerPoolMembersWOptions() throws Throwable { + public void testGetVpnGatewayServiceConnectionWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"members\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"health\": \"faulted\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"port\": 80, \"provisioning_status\": \"active\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}, \"weight\": 50}]}"; - String replaceLoadBalancerPoolMembersPath = "/load_balancers/testString/pools/testString/members"; + String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"creator\": {\"crn\": \"crn:v1:bluemix:public:transit:dal03:a/aa2432b1fa4d4ace891e9b80fc104e34::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\", \"id\": \"ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\", \"resource_type\": \"transit_gateway\"}, \"id\": \"0717-64e7e88c-4b28-4082-9ab8-3f95876952ac\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"status\": \"up\", \"status_reasons\": [{\"code\": \"peer_not_responding\", \"message\": \"The connection is down because the peer is not responding.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}]}"; + String getVpnGatewayServiceConnectionPath = "/vpn_gateways/testString/service_connections/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model - LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById loadBalancerPoolMemberTargetPrototypeModel = new LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById.Builder() - .id("0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0") - .build(); - - // Construct an instance of the LoadBalancerPoolMemberPrototype model - LoadBalancerPoolMemberPrototype loadBalancerPoolMemberPrototypeModel = new LoadBalancerPoolMemberPrototype.Builder() - .port(Long.valueOf("80")) - .target(loadBalancerPoolMemberTargetPrototypeModel) - .weight(Long.valueOf("50")) - .build(); - - // Construct an instance of the ReplaceLoadBalancerPoolMembersOptions model - ReplaceLoadBalancerPoolMembersOptions replaceLoadBalancerPoolMembersOptionsModel = new ReplaceLoadBalancerPoolMembersOptions.Builder() - .loadBalancerId("testString") - .poolId("testString") - .members(java.util.Arrays.asList(loadBalancerPoolMemberPrototypeModel)) + // Construct an instance of the GetVpnGatewayServiceConnectionOptions model + GetVpnGatewayServiceConnectionOptions getVpnGatewayServiceConnectionOptionsModel = new GetVpnGatewayServiceConnectionOptions.Builder() + .vpnGatewayId("testString") + .id("testString") .build(); - // Invoke replaceLoadBalancerPoolMembers() with a valid options model and verify the result - Response response = vpcService.replaceLoadBalancerPoolMembers(replaceLoadBalancerPoolMembersOptionsModel).execute(); + // Invoke getVpnGatewayServiceConnection() with a valid options model and verify the result + Response response = vpcService.getVpnGatewayServiceConnection(getVpnGatewayServiceConnectionOptionsModel).execute(); assertNotNull(response); - LoadBalancerPoolMemberCollection responseObj = response.getResult(); + VPNGatewayServiceConnection 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"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, replaceLoadBalancerPoolMembersPath); + assertEquals(parsedPath, getVpnGatewayServiceConnectionPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the replaceLoadBalancerPoolMembers operation with and without retries enabled + // Test the getVpnGatewayServiceConnection operation with and without retries enabled @Test - public void testReplaceLoadBalancerPoolMembersWRetries() throws Throwable { + public void testGetVpnGatewayServiceConnectionWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testReplaceLoadBalancerPoolMembersWOptions(); + testGetVpnGatewayServiceConnectionWOptions(); vpcService.disableRetries(); - testReplaceLoadBalancerPoolMembersWOptions(); + testGetVpnGatewayServiceConnectionWOptions(); } - // Test the replaceLoadBalancerPoolMembers operation with a null options model (negative test) + // Test the getVpnGatewayServiceConnection operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testReplaceLoadBalancerPoolMembersNoOptions() throws Throwable { + public void testGetVpnGatewayServiceConnectionNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.replaceLoadBalancerPoolMembers(null).execute(); + vpcService.getVpnGatewayServiceConnection(null).execute(); } - // Test the deleteLoadBalancerPoolMember operation with a valid options model parameter + // Test the listIkePolicies operation with a valid options model parameter @Test - public void testDeleteLoadBalancerPoolMemberWOptions() throws Throwable { + public void testListIkePoliciesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deleteLoadBalancerPoolMemberPath = "/load_balancers/testString/pools/testString/members/testString"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"ike_policies\": [{\"authentication_algorithm\": \"md5\", \"connections\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"name\": \"my-vpn-gateway-connection\", \"resource_type\": \"vpn_gateway_connection\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"dh_group\": 14, \"encryption_algorithm\": \"aes128\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"id\": \"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"ike_version\": 1, \"key_lifetime\": 28800, \"name\": \"my-ike-policy\", \"negotiation_mode\": \"main\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"ike_policy\"}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listIkePoliciesPath = "/ike_policies"; server.enqueue(new MockResponse() - .setResponseCode(202) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeleteLoadBalancerPoolMemberOptions model - DeleteLoadBalancerPoolMemberOptions deleteLoadBalancerPoolMemberOptionsModel = new DeleteLoadBalancerPoolMemberOptions.Builder() - .loadBalancerId("testString") - .poolId("testString") - .id("testString") + // Construct an instance of the ListIkePoliciesOptions model + ListIkePoliciesOptions listIkePoliciesOptionsModel = new ListIkePoliciesOptions.Builder() + .start("testString") + .limit(Long.valueOf("10")) .build(); - // Invoke deleteLoadBalancerPoolMember() with a valid options model and verify the result - Response response = vpcService.deleteLoadBalancerPoolMember(deleteLoadBalancerPoolMemberOptionsModel).execute(); + // Invoke listIkePolicies() with a valid options model and verify the result + Response response = vpcService.listIkePolicies(listIkePoliciesOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + IKEPolicyCollection 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteLoadBalancerPoolMemberPath); + assertEquals(parsedPath, listIkePoliciesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the deleteLoadBalancerPoolMember operation with and without retries enabled + // Test the listIkePolicies operation with and without retries enabled @Test - public void testDeleteLoadBalancerPoolMemberWRetries() throws Throwable { + public void testListIkePoliciesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteLoadBalancerPoolMemberWOptions(); + testListIkePoliciesWOptions(); vpcService.disableRetries(); - testDeleteLoadBalancerPoolMemberWOptions(); + testListIkePoliciesWOptions(); } - // Test the deleteLoadBalancerPoolMember operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteLoadBalancerPoolMemberNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.deleteLoadBalancerPoolMember(null).execute(); + // Test the listIkePolicies operation using the IkePoliciesPager.getNext() method + @Test + public void testListIkePoliciesWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"ike_policies\":[{\"authentication_algorithm\":\"md5\",\"connections\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"name\":\"my-vpn-gateway-connection\",\"resource_type\":\"vpn_gateway_connection\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dh_group\":14,\"encryption_algorithm\":\"aes128\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"ike_version\":1,\"key_lifetime\":28800,\"name\":\"my-ike-policy\",\"negotiation_mode\":\"main\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"ike_policy\"}],\"limit\":1}"; + String mockResponsePage2 = "{\"total_count\":2,\"ike_policies\":[{\"authentication_algorithm\":\"md5\",\"connections\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"name\":\"my-vpn-gateway-connection\",\"resource_type\":\"vpn_gateway_connection\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dh_group\":14,\"encryption_algorithm\":\"aes128\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"ike_version\":1,\"key_lifetime\":28800,\"name\":\"my-ike-policy\",\"negotiation_mode\":\"main\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"ike_policy\"}],\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListIkePoliciesOptions listIkePoliciesOptions = new ListIkePoliciesOptions.Builder() + .limit(Long.valueOf("10")) + .build(); + + List allResults = new ArrayList<>(); + IkePoliciesPager pager = new IkePoliciesPager(vpcService, listIkePoliciesOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } + + // Test the listIkePolicies operation using the IkePoliciesPager.getAll() method + @Test + public void testListIkePoliciesWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"ike_policies\":[{\"authentication_algorithm\":\"md5\",\"connections\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"name\":\"my-vpn-gateway-connection\",\"resource_type\":\"vpn_gateway_connection\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dh_group\":14,\"encryption_algorithm\":\"aes128\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"ike_version\":1,\"key_lifetime\":28800,\"name\":\"my-ike-policy\",\"negotiation_mode\":\"main\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"ike_policy\"}],\"limit\":1}"; + String mockResponsePage2 = "{\"total_count\":2,\"ike_policies\":[{\"authentication_algorithm\":\"md5\",\"connections\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"name\":\"my-vpn-gateway-connection\",\"resource_type\":\"vpn_gateway_connection\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dh_group\":14,\"encryption_algorithm\":\"aes128\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"ike_version\":1,\"key_lifetime\":28800,\"name\":\"my-ike-policy\",\"negotiation_mode\":\"main\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"ike_policy\"}],\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Test the getLoadBalancerPoolMember operation with a valid options model parameter + ListIkePoliciesOptions listIkePoliciesOptions = new ListIkePoliciesOptions.Builder() + .limit(Long.valueOf("10")) + .build(); + + IkePoliciesPager pager = new IkePoliciesPager(vpcService, listIkePoliciesOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); + } + + // Test the listIkePolicyConnections operation with a valid options model parameter @Test - public void testGetLoadBalancerPoolMemberWOptions() throws Throwable { + public void testListIkePolicyConnectionsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"health\": \"faulted\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"port\": 80, \"provisioning_status\": \"active\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}, \"weight\": 50}"; - String getLoadBalancerPoolMemberPath = "/load_balancers/testString/pools/testString/members/testString"; + String mockResponseBody = "{\"connections\": [{\"admin_state_up\": true, \"authentication_mode\": \"psk\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"dead_peer_detection\": {\"action\": \"restart\", \"interval\": 30, \"timeout\": 120}, \"establish_mode\": \"bidirectional\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"ike_policy\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"id\": \"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"name\": \"my-ike-policy\", \"resource_type\": \"ike_policy\"}, \"ipsec_policy\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"id\": \"r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"name\": \"my-ipsec-policy\", \"resource_type\": \"ipsec_policy\"}, \"mode\": \"policy\", \"name\": \"my-vpn-gateway-connection\", \"psk\": \"lkj14b1oi0alcniejkso\", \"resource_type\": \"vpn_gateway_connection\", \"status\": \"down\", \"status_reasons\": [{\"code\": \"cannot_authenticate_connection\", \"message\": \"Failed to authenticate a connection because of mismatched IKE ID and PSK.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}], \"distribute_traffic\": false, \"local\": {\"ike_identities\": [{\"type\": \"fqdn\", \"value\": \"my-service.example.com\"}]}, \"peer\": {\"ike_identity\": {\"type\": \"fqdn\", \"value\": \"my-service.example.com\"}, \"type\": \"address\", \"address\": \"192.0.2.5\"}, \"routing_protocol\": \"none\", \"tunnels\": [{\"public_ip\": {\"address\": \"192.168.3.4\"}, \"status\": \"down\", \"status_reasons\": [{\"code\": \"cannot_authenticate_connection\", \"message\": \"Failed to authenticate a connection because of mismatched IKE ID and PSK.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listIkePolicyConnectionsPath = "/ike_policies/testString/connections"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetLoadBalancerPoolMemberOptions model - GetLoadBalancerPoolMemberOptions getLoadBalancerPoolMemberOptionsModel = new GetLoadBalancerPoolMemberOptions.Builder() - .loadBalancerId("testString") - .poolId("testString") + // Construct an instance of the ListIkePolicyConnectionsOptions model + ListIkePolicyConnectionsOptions listIkePolicyConnectionsOptionsModel = new ListIkePolicyConnectionsOptions.Builder() .id("testString") + .start("testString") + .limit(Long.valueOf("10")) .build(); - // Invoke getLoadBalancerPoolMember() with a valid options model and verify the result - Response response = vpcService.getLoadBalancerPoolMember(getLoadBalancerPoolMemberOptionsModel).execute(); + // Invoke listIkePolicyConnections() with a valid options model and verify the result + Response response = vpcService.listIkePolicyConnections(listIkePolicyConnectionsOptionsModel).execute(); assertNotNull(response); - LoadBalancerPoolMember responseObj = response.getResult(); + IKEPolicyConnectionCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -31609,128 +32575,230 @@ public void testGetLoadBalancerPoolMemberWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getLoadBalancerPoolMemberPath); + assertEquals(parsedPath, listIkePolicyConnectionsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the getLoadBalancerPoolMember operation with and without retries enabled + // Test the listIkePolicyConnections operation with and without retries enabled @Test - public void testGetLoadBalancerPoolMemberWRetries() throws Throwable { + public void testListIkePolicyConnectionsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetLoadBalancerPoolMemberWOptions(); + testListIkePolicyConnectionsWOptions(); vpcService.disableRetries(); - testGetLoadBalancerPoolMemberWOptions(); + testListIkePolicyConnectionsWOptions(); } - // Test the getLoadBalancerPoolMember operation with a null options model (negative test) + // Test the listIkePolicyConnections operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetLoadBalancerPoolMemberNoOptions() throws Throwable { + public void testListIkePolicyConnectionsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getLoadBalancerPoolMember(null).execute(); + vpcService.listIkePolicyConnections(null).execute(); } - // Test the updateLoadBalancerPoolMember operation with a valid options model parameter + // Test the listIkePolicyConnections operation using the IkePolicyConnectionsPager.getNext() method @Test - public void testUpdateLoadBalancerPoolMemberWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"health\": \"faulted\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"id\": \"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a\", \"port\": 80, \"provisioning_status\": \"active\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"id\": \"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0\", \"name\": \"my-instance\"}, \"weight\": 50}"; - String updateLoadBalancerPoolMemberPath = "/load_balancers/testString/pools/testString/members/testString"; + public void testListIkePolicyConnectionsWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"connections\":[{\"admin_state_up\":true,\"authentication_mode\":\"psk\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dead_peer_detection\":{\"action\":\"restart\",\"interval\":30,\"timeout\":120},\"establish_mode\":\"bidirectional\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"ike_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"name\":\"my-ike-policy\",\"resource_type\":\"ike_policy\"},\"ipsec_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"name\":\"my-ipsec-policy\",\"resource_type\":\"ipsec_policy\"},\"mode\":\"policy\",\"name\":\"my-vpn-gateway-connection\",\"psk\":\"lkj14b1oi0alcniejkso\",\"resource_type\":\"vpn_gateway_connection\",\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}],\"distribute_traffic\":false,\"local\":{\"ike_identities\":[{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"}]},\"peer\":{\"ike_identity\":{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"},\"type\":\"address\",\"address\":\"192.0.2.5\"},\"routing_protocol\":\"none\",\"tunnels\":[{\"public_ip\":{\"address\":\"192.168.3.4\"},\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"connections\":[{\"admin_state_up\":true,\"authentication_mode\":\"psk\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dead_peer_detection\":{\"action\":\"restart\",\"interval\":30,\"timeout\":120},\"establish_mode\":\"bidirectional\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"ike_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"name\":\"my-ike-policy\",\"resource_type\":\"ike_policy\"},\"ipsec_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"name\":\"my-ipsec-policy\",\"resource_type\":\"ipsec_policy\"},\"mode\":\"policy\",\"name\":\"my-vpn-gateway-connection\",\"psk\":\"lkj14b1oi0alcniejkso\",\"resource_type\":\"vpn_gateway_connection\",\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}],\"distribute_traffic\":false,\"local\":{\"ike_identities\":[{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"}]},\"peer\":{\"ike_identity\":{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"},\"type\":\"address\",\"address\":\"192.0.2.5\"},\"routing_protocol\":\"none\",\"tunnels\":[{\"public_ip\":{\"address\":\"192.168.3.4\"},\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) - .setBody(mockResponseBody)); + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model - LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById loadBalancerPoolMemberTargetPrototypeModel = new LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById.Builder() - .id("0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0") + ListIkePolicyConnectionsOptions listIkePolicyConnectionsOptions = new ListIkePolicyConnectionsOptions.Builder() + .id("testString") + .limit(Long.valueOf("10")) .build(); - // Construct an instance of the LoadBalancerPoolMemberPatch model - LoadBalancerPoolMemberPatch loadBalancerPoolMemberPatchModel = new LoadBalancerPoolMemberPatch.Builder() - .port(Long.valueOf("80")) - .target(loadBalancerPoolMemberTargetPrototypeModel) - .weight(Long.valueOf("99")) - .build(); - Map loadBalancerPoolMemberPatchModelAsPatch = loadBalancerPoolMemberPatchModel.asPatch(); + List allResults = new ArrayList<>(); + IkePolicyConnectionsPager pager = new IkePolicyConnectionsPager(vpcService, listIkePolicyConnectionsOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); + } + + // Test the listIkePolicyConnections operation using the IkePolicyConnectionsPager.getAll() method + @Test + public void testListIkePolicyConnectionsWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"connections\":[{\"admin_state_up\":true,\"authentication_mode\":\"psk\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dead_peer_detection\":{\"action\":\"restart\",\"interval\":30,\"timeout\":120},\"establish_mode\":\"bidirectional\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"ike_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"name\":\"my-ike-policy\",\"resource_type\":\"ike_policy\"},\"ipsec_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"name\":\"my-ipsec-policy\",\"resource_type\":\"ipsec_policy\"},\"mode\":\"policy\",\"name\":\"my-vpn-gateway-connection\",\"psk\":\"lkj14b1oi0alcniejkso\",\"resource_type\":\"vpn_gateway_connection\",\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}],\"distribute_traffic\":false,\"local\":{\"ike_identities\":[{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"}]},\"peer\":{\"ike_identity\":{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"},\"type\":\"address\",\"address\":\"192.0.2.5\"},\"routing_protocol\":\"none\",\"tunnels\":[{\"public_ip\":{\"address\":\"192.168.3.4\"},\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"connections\":[{\"admin_state_up\":true,\"authentication_mode\":\"psk\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dead_peer_detection\":{\"action\":\"restart\",\"interval\":30,\"timeout\":120},\"establish_mode\":\"bidirectional\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"ike_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"name\":\"my-ike-policy\",\"resource_type\":\"ike_policy\"},\"ipsec_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"name\":\"my-ipsec-policy\",\"resource_type\":\"ipsec_policy\"},\"mode\":\"policy\",\"name\":\"my-vpn-gateway-connection\",\"psk\":\"lkj14b1oi0alcniejkso\",\"resource_type\":\"vpn_gateway_connection\",\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}],\"distribute_traffic\":false,\"local\":{\"ike_identities\":[{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"}]},\"peer\":{\"ike_identity\":{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"},\"type\":\"address\",\"address\":\"192.0.2.5\"},\"routing_protocol\":\"none\",\"tunnels\":[{\"public_ip\":{\"address\":\"192.168.3.4\"},\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}]}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the UpdateLoadBalancerPoolMemberOptions model - UpdateLoadBalancerPoolMemberOptions updateLoadBalancerPoolMemberOptionsModel = new UpdateLoadBalancerPoolMemberOptions.Builder() - .loadBalancerId("testString") - .poolId("testString") + ListIkePolicyConnectionsOptions listIkePolicyConnectionsOptions = new ListIkePolicyConnectionsOptions.Builder() .id("testString") - .loadBalancerPoolMemberPatch(loadBalancerPoolMemberPatchModelAsPatch) + .limit(Long.valueOf("10")) .build(); - // Invoke updateLoadBalancerPoolMember() with a valid options model and verify the result - Response response = vpcService.updateLoadBalancerPoolMember(updateLoadBalancerPoolMemberOptionsModel).execute(); + IkePolicyConnectionsPager pager = new IkePolicyConnectionsPager(vpcService, listIkePolicyConnectionsOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); + } + + // Test the listIpsecPolicies operation with a valid options model parameter + @Test + public void testListIpsecPoliciesWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"ipsec_policies\": [{\"authentication_algorithm\": \"disabled\", \"connections\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"name\": \"my-vpn-gateway-connection\", \"resource_type\": \"vpn_gateway_connection\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"encapsulation_mode\": \"tunnel\", \"encryption_algorithm\": \"aes128\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"id\": \"r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"key_lifetime\": 3600, \"name\": \"my-ipsec-policy\", \"pfs\": \"disabled\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"ipsec_policy\", \"transform_protocol\": \"esp\"}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listIpsecPoliciesPath = "/ipsec_policies"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponseBody)); + + // Construct an instance of the ListIpsecPoliciesOptions model + ListIpsecPoliciesOptions listIpsecPoliciesOptionsModel = new ListIpsecPoliciesOptions.Builder() + .start("testString") + .limit(Long.valueOf("10")) + .build(); + + // Invoke listIpsecPolicies() with a valid options model and verify the result + Response response = vpcService.listIpsecPolicies(listIpsecPoliciesOptionsModel).execute(); assertNotNull(response); - LoadBalancerPoolMember responseObj = response.getResult(); + IPsecPolicyCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateLoadBalancerPoolMemberPath); + assertEquals(parsedPath, listIpsecPoliciesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the updateLoadBalancerPoolMember operation with and without retries enabled + // Test the listIpsecPolicies operation with and without retries enabled @Test - public void testUpdateLoadBalancerPoolMemberWRetries() throws Throwable { + public void testListIpsecPoliciesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateLoadBalancerPoolMemberWOptions(); + testListIpsecPoliciesWOptions(); vpcService.disableRetries(); - testUpdateLoadBalancerPoolMemberWOptions(); + testListIpsecPoliciesWOptions(); } - // Test the updateLoadBalancerPoolMember operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateLoadBalancerPoolMemberNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.updateLoadBalancerPoolMember(null).execute(); + // Test the listIpsecPolicies operation using the IpsecPoliciesPager.getNext() method + @Test + public void testListIpsecPoliciesWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"ipsec_policies\":[{\"authentication_algorithm\":\"disabled\",\"connections\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"name\":\"my-vpn-gateway-connection\",\"resource_type\":\"vpn_gateway_connection\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"encapsulation_mode\":\"tunnel\",\"encryption_algorithm\":\"aes128\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"key_lifetime\":3600,\"name\":\"my-ipsec-policy\",\"pfs\":\"disabled\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"ipsec_policy\",\"transform_protocol\":\"esp\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"ipsec_policies\":[{\"authentication_algorithm\":\"disabled\",\"connections\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"name\":\"my-vpn-gateway-connection\",\"resource_type\":\"vpn_gateway_connection\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"encapsulation_mode\":\"tunnel\",\"encryption_algorithm\":\"aes128\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"key_lifetime\":3600,\"name\":\"my-ipsec-policy\",\"pfs\":\"disabled\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"ipsec_policy\",\"transform_protocol\":\"esp\"}],\"total_count\":2,\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); + + ListIpsecPoliciesOptions listIpsecPoliciesOptions = new ListIpsecPoliciesOptions.Builder() + .limit(Long.valueOf("10")) + .build(); + + List allResults = new ArrayList<>(); + IpsecPoliciesPager pager = new IpsecPoliciesPager(vpcService, listIpsecPoliciesOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } + + // Test the listIpsecPolicies operation using the IpsecPoliciesPager.getAll() method + @Test + public void testListIpsecPoliciesWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"ipsec_policies\":[{\"authentication_algorithm\":\"disabled\",\"connections\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"name\":\"my-vpn-gateway-connection\",\"resource_type\":\"vpn_gateway_connection\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"encapsulation_mode\":\"tunnel\",\"encryption_algorithm\":\"aes128\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"key_lifetime\":3600,\"name\":\"my-ipsec-policy\",\"pfs\":\"disabled\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"ipsec_policy\",\"transform_protocol\":\"esp\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"ipsec_policies\":[{\"authentication_algorithm\":\"disabled\",\"connections\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"name\":\"my-vpn-gateway-connection\",\"resource_type\":\"vpn_gateway_connection\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"encapsulation_mode\":\"tunnel\",\"encryption_algorithm\":\"aes128\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"key_lifetime\":3600,\"name\":\"my-ipsec-policy\",\"pfs\":\"disabled\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"ipsec_policy\",\"transform_protocol\":\"esp\"}],\"total_count\":2,\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Test the listEndpointGateways operation with a valid options model parameter + ListIpsecPoliciesOptions listIpsecPoliciesOptions = new ListIpsecPoliciesOptions.Builder() + .limit(Long.valueOf("10")) + .build(); + + IpsecPoliciesPager pager = new IpsecPoliciesPager(vpcService, listIpsecPoliciesOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); + } + + // Test the listIpsecPolicyConnections operation with a valid options model parameter @Test - public void testListEndpointGatewaysWOptions() throws Throwable { + public void testListIpsecPolicyConnectionsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"endpoint_gateways\": [{\"allow_dns_resolution_binding\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"lifecycle_reasons\": [{\"code\": \"dns_resolution_binding_pending\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-endpoint-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"endpoint_gateway\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"service_endpoint\": \"my-cloudant-instance.appdomain.cloud\", \"service_endpoints\": [\"my-cloudant-instance.appdomain.cloud\"], \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"id\": \"r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"name\": \"my-private-path-service-gateway\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"private_path_service_gateway\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listEndpointGatewaysPath = "/endpoint_gateways"; + String mockResponseBody = "{\"connections\": [{\"admin_state_up\": true, \"authentication_mode\": \"psk\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"dead_peer_detection\": {\"action\": \"restart\", \"interval\": 30, \"timeout\": 120}, \"establish_mode\": \"bidirectional\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"ike_policy\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"id\": \"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"name\": \"my-ike-policy\", \"resource_type\": \"ike_policy\"}, \"ipsec_policy\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"id\": \"r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"name\": \"my-ipsec-policy\", \"resource_type\": \"ipsec_policy\"}, \"mode\": \"policy\", \"name\": \"my-vpn-gateway-connection\", \"psk\": \"lkj14b1oi0alcniejkso\", \"resource_type\": \"vpn_gateway_connection\", \"status\": \"down\", \"status_reasons\": [{\"code\": \"cannot_authenticate_connection\", \"message\": \"Failed to authenticate a connection because of mismatched IKE ID and PSK.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}], \"distribute_traffic\": false, \"local\": {\"ike_identities\": [{\"type\": \"fqdn\", \"value\": \"my-service.example.com\"}]}, \"peer\": {\"ike_identity\": {\"type\": \"fqdn\", \"value\": \"my-service.example.com\"}, \"type\": \"address\", \"address\": \"192.0.2.5\"}, \"routing_protocol\": \"none\", \"tunnels\": [{\"public_ip\": {\"address\": \"192.168.3.4\"}, \"status\": \"down\", \"status_reasons\": [{\"code\": \"cannot_authenticate_connection\", \"message\": \"Failed to authenticate a connection because of mismatched IKE ID and PSK.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listIpsecPolicyConnectionsPath = "/ipsec_policies/testString/connections"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListEndpointGatewaysOptions model - ListEndpointGatewaysOptions listEndpointGatewaysOptionsModel = new ListEndpointGatewaysOptions.Builder() - .name("my-name") + // Construct an instance of the ListIpsecPolicyConnectionsOptions model + ListIpsecPolicyConnectionsOptions listIpsecPolicyConnectionsOptionsModel = new ListIpsecPolicyConnectionsOptions.Builder() + .id("testString") .start("testString") .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .lifecycleState(java.util.Arrays.asList("stable")) - .vpcId("testString") - .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .vpcName("my-vpc") - .allowDnsResolutionBinding(true) .build(); - // Invoke listEndpointGateways() with a valid options model and verify the result - Response response = vpcService.listEndpointGateways(listEndpointGatewaysOptionsModel).execute(); + // Invoke listIpsecPolicyConnections() with a valid options model and verify the result + Response response = vpcService.listIpsecPolicyConnections(listIpsecPolicyConnectionsOptionsModel).execute(); assertNotNull(response); - EndpointGatewayCollection responseObj = response.getResult(); + IPsecPolicyConnectionCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -31739,39 +32807,39 @@ public void testListEndpointGatewaysWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listEndpointGatewaysPath); + assertEquals(parsedPath, listIpsecPolicyConnectionsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("name"), "my-name"); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("resource_group.id"), "testString"); - assertEquals(query.get("lifecycle_state"), RequestUtils.join(java.util.Arrays.asList("stable"), ",")); - assertEquals(query.get("vpc.id"), "testString"); - assertEquals(query.get("vpc.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); - assertEquals(query.get("vpc.name"), "my-vpc"); - assertEquals(Boolean.valueOf(query.get("allow_dns_resolution_binding")), Boolean.valueOf(true)); } - // Test the listEndpointGateways operation with and without retries enabled + // Test the listIpsecPolicyConnections operation with and without retries enabled @Test - public void testListEndpointGatewaysWRetries() throws Throwable { + public void testListIpsecPolicyConnectionsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListEndpointGatewaysWOptions(); + testListIpsecPolicyConnectionsWOptions(); vpcService.disableRetries(); - testListEndpointGatewaysWOptions(); + testListIpsecPolicyConnectionsWOptions(); } - // Test the listEndpointGateways operation using the EndpointGatewaysPager.getNext() method + // Test the listIpsecPolicyConnections operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testListIpsecPolicyConnectionsNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.listIpsecPolicyConnections(null).execute(); + } + + // Test the listIpsecPolicyConnections operation using the IpsecPolicyConnectionsPager.getNext() method @Test - public void testListEndpointGatewaysWithPagerGetNext() throws Throwable { + public void testListIpsecPolicyConnectionsWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"endpoint_gateways\":[{\"allow_dns_resolution_binding\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"lifecycle_reasons\":[{\"code\":\"dns_resolution_binding_pending\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-endpoint-gateway\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"endpoint_gateway\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"service_endpoint\":\"my-cloudant-instance.appdomain.cloud\",\"service_endpoints\":[\"my-cloudant-instance.appdomain.cloud\"],\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"id\":\"r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"name\":\"my-private-path-service-gateway\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"private_path_service_gateway\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"endpoint_gateways\":[{\"allow_dns_resolution_binding\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"lifecycle_reasons\":[{\"code\":\"dns_resolution_binding_pending\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-endpoint-gateway\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"endpoint_gateway\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"service_endpoint\":\"my-cloudant-instance.appdomain.cloud\",\"service_endpoints\":[\"my-cloudant-instance.appdomain.cloud\"],\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"id\":\"r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"name\":\"my-private-path-service-gateway\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"private_path_service_gateway\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"connections\":[{\"admin_state_up\":true,\"authentication_mode\":\"psk\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dead_peer_detection\":{\"action\":\"restart\",\"interval\":30,\"timeout\":120},\"establish_mode\":\"bidirectional\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"ike_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"name\":\"my-ike-policy\",\"resource_type\":\"ike_policy\"},\"ipsec_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"name\":\"my-ipsec-policy\",\"resource_type\":\"ipsec_policy\"},\"mode\":\"policy\",\"name\":\"my-vpn-gateway-connection\",\"psk\":\"lkj14b1oi0alcniejkso\",\"resource_type\":\"vpn_gateway_connection\",\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}],\"distribute_traffic\":false,\"local\":{\"ike_identities\":[{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"}]},\"peer\":{\"ike_identity\":{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"},\"type\":\"address\",\"address\":\"192.0.2.5\"},\"routing_protocol\":\"none\",\"tunnels\":[{\"public_ip\":{\"address\":\"192.168.3.4\"},\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"connections\":[{\"admin_state_up\":true,\"authentication_mode\":\"psk\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dead_peer_detection\":{\"action\":\"restart\",\"interval\":30,\"timeout\":120},\"establish_mode\":\"bidirectional\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"ike_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"name\":\"my-ike-policy\",\"resource_type\":\"ike_policy\"},\"ipsec_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"name\":\"my-ipsec-policy\",\"resource_type\":\"ipsec_policy\"},\"mode\":\"policy\",\"name\":\"my-vpn-gateway-connection\",\"psk\":\"lkj14b1oi0alcniejkso\",\"resource_type\":\"vpn_gateway_connection\",\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}],\"distribute_traffic\":false,\"local\":{\"ike_identities\":[{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"}]},\"peer\":{\"ike_identity\":{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"},\"type\":\"address\",\"address\":\"192.0.2.5\"},\"routing_protocol\":\"none\",\"tunnels\":[{\"public_ip\":{\"address\":\"192.168.3.4\"},\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -31785,33 +32853,27 @@ public void testListEndpointGatewaysWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListEndpointGatewaysOptions listEndpointGatewaysOptions = new ListEndpointGatewaysOptions.Builder() - .name("my-name") + ListIpsecPolicyConnectionsOptions listIpsecPolicyConnectionsOptions = new ListIpsecPolicyConnectionsOptions.Builder() + .id("testString") .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .lifecycleState(java.util.Arrays.asList("stable")) - .vpcId("testString") - .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .vpcName("my-vpc") - .allowDnsResolutionBinding(true) .build(); - List allResults = new ArrayList<>(); - EndpointGatewaysPager pager = new EndpointGatewaysPager(vpcService, listEndpointGatewaysOptions); + List allResults = new ArrayList<>(); + IpsecPolicyConnectionsPager pager = new IpsecPolicyConnectionsPager(vpcService, listIpsecPolicyConnectionsOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listEndpointGateways operation using the EndpointGatewaysPager.getAll() method + // Test the listIpsecPolicyConnections operation using the IpsecPolicyConnectionsPager.getAll() method @Test - public void testListEndpointGatewaysWithPagerGetAll() throws Throwable { + public void testListIpsecPolicyConnectionsWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"endpoint_gateways\":[{\"allow_dns_resolution_binding\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"lifecycle_reasons\":[{\"code\":\"dns_resolution_binding_pending\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-endpoint-gateway\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"endpoint_gateway\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"service_endpoint\":\"my-cloudant-instance.appdomain.cloud\",\"service_endpoints\":[\"my-cloudant-instance.appdomain.cloud\"],\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"id\":\"r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"name\":\"my-private-path-service-gateway\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"private_path_service_gateway\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"endpoint_gateways\":[{\"allow_dns_resolution_binding\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"lifecycle_reasons\":[{\"code\":\"dns_resolution_binding_pending\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-endpoint-gateway\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"endpoint_gateway\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"service_endpoint\":\"my-cloudant-instance.appdomain.cloud\",\"service_endpoints\":[\"my-cloudant-instance.appdomain.cloud\"],\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"id\":\"r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"name\":\"my-private-path-service-gateway\",\"remote\":{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"region\":{\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\",\"name\":\"us-south\"}},\"resource_type\":\"private_path_service_gateway\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"connections\":[{\"admin_state_up\":true,\"authentication_mode\":\"psk\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dead_peer_detection\":{\"action\":\"restart\",\"interval\":30,\"timeout\":120},\"establish_mode\":\"bidirectional\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"ike_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"name\":\"my-ike-policy\",\"resource_type\":\"ike_policy\"},\"ipsec_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"name\":\"my-ipsec-policy\",\"resource_type\":\"ipsec_policy\"},\"mode\":\"policy\",\"name\":\"my-vpn-gateway-connection\",\"psk\":\"lkj14b1oi0alcniejkso\",\"resource_type\":\"vpn_gateway_connection\",\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}],\"distribute_traffic\":false,\"local\":{\"ike_identities\":[{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"}]},\"peer\":{\"ike_identity\":{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"},\"type\":\"address\",\"address\":\"192.0.2.5\"},\"routing_protocol\":\"none\",\"tunnels\":[{\"public_ip\":{\"address\":\"192.168.3.4\"},\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"connections\":[{\"admin_state_up\":true,\"authentication_mode\":\"psk\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dead_peer_detection\":{\"action\":\"restart\",\"interval\":30,\"timeout\":120},\"establish_mode\":\"bidirectional\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"ike_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"name\":\"my-ike-policy\",\"resource_type\":\"ike_policy\"},\"ipsec_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"name\":\"my-ipsec-policy\",\"resource_type\":\"ipsec_policy\"},\"mode\":\"policy\",\"name\":\"my-vpn-gateway-connection\",\"psk\":\"lkj14b1oi0alcniejkso\",\"resource_type\":\"vpn_gateway_connection\",\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}],\"distribute_traffic\":false,\"local\":{\"ike_identities\":[{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"}]},\"peer\":{\"ike_identity\":{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"},\"type\":\"address\",\"address\":\"192.0.2.5\"},\"routing_protocol\":\"none\",\"tunnels\":[{\"public_ip\":{\"address\":\"192.168.3.4\"},\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -31825,131 +32887,93 @@ public void testListEndpointGatewaysWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListEndpointGatewaysOptions listEndpointGatewaysOptions = new ListEndpointGatewaysOptions.Builder() - .name("my-name") + ListIpsecPolicyConnectionsOptions listIpsecPolicyConnectionsOptions = new ListIpsecPolicyConnectionsOptions.Builder() + .id("testString") .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .lifecycleState(java.util.Arrays.asList("stable")) - .vpcId("testString") - .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .vpcName("my-vpc") - .allowDnsResolutionBinding(true) .build(); - EndpointGatewaysPager pager = new EndpointGatewaysPager(vpcService, listEndpointGatewaysOptions); - List allResults = pager.getAll(); + IpsecPolicyConnectionsPager pager = new IpsecPolicyConnectionsPager(vpcService, listIpsecPolicyConnectionsOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the createEndpointGateway operation with a valid options model parameter + // Test the listVpnGatewayAdvertisedCidrs operation with a valid options model parameter @Test - public void testCreateEndpointGatewayWOptions() throws Throwable { + public void testListVpnGatewayAdvertisedCidrsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"allow_dns_resolution_binding\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"lifecycle_reasons\": [{\"code\": \"dns_resolution_binding_pending\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-endpoint-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"endpoint_gateway\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"service_endpoint\": \"my-cloudant-instance.appdomain.cloud\", \"service_endpoints\": [\"my-cloudant-instance.appdomain.cloud\"], \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"id\": \"r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"name\": \"my-private-path-service-gateway\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"private_path_service_gateway\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String createEndpointGatewayPath = "/endpoint_gateways"; + String mockResponseBody = "{\"advertised_cidrs\": [\"192.168.3.0/24\"]}"; + String listVpnGatewayAdvertisedCidrsPath = "/vpn_gateways/testString/advertised_cidrs"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype model - EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype endpointGatewayTargetPrototypeModel = new EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype.Builder() - .name("ibm-ntp-server") - .resourceType("provider_infrastructure_service") - .build(); - - // Construct an instance of the VPCIdentityById model - VPCIdentityById vpcIdentityModel = new VPCIdentityById.Builder() - .id("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .build(); - - // Construct an instance of the EndpointGatewayReservedIPReservedIPIdentityById model - EndpointGatewayReservedIPReservedIPIdentityById endpointGatewayReservedIpModel = new EndpointGatewayReservedIPReservedIPIdentityById.Builder() - .id("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") - .build(); - - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); - - // Construct an instance of the SecurityGroupIdentityById model - SecurityGroupIdentityById securityGroupIdentityModel = new SecurityGroupIdentityById.Builder() - .id("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") - .build(); - - // Construct an instance of the CreateEndpointGatewayOptions model - CreateEndpointGatewayOptions createEndpointGatewayOptionsModel = new CreateEndpointGatewayOptions.Builder() - .target(endpointGatewayTargetPrototypeModel) - .vpc(vpcIdentityModel) - .allowDnsResolutionBinding(true) - .ips(java.util.Arrays.asList(endpointGatewayReservedIpModel)) - .name("testString") - .resourceGroup(resourceGroupIdentityModel) - .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) + // Construct an instance of the ListVpnGatewayAdvertisedCidrsOptions model + ListVpnGatewayAdvertisedCidrsOptions listVpnGatewayAdvertisedCidrsOptionsModel = new ListVpnGatewayAdvertisedCidrsOptions.Builder() + .vpnGatewayId("testString") .build(); - // Invoke createEndpointGateway() with a valid options model and verify the result - Response response = vpcService.createEndpointGateway(createEndpointGatewayOptionsModel).execute(); + // Invoke listVpnGatewayAdvertisedCidrs() with a valid options model and verify the result + Response response = vpcService.listVpnGatewayAdvertisedCidrs(listVpnGatewayAdvertisedCidrsOptionsModel).execute(); assertNotNull(response); - EndpointGateway responseObj = response.getResult(); + VPNGatewayAdvertisedCIDRCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createEndpointGatewayPath); + assertEquals(parsedPath, listVpnGatewayAdvertisedCidrsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createEndpointGateway operation with and without retries enabled + // Test the listVpnGatewayAdvertisedCidrs operation with and without retries enabled @Test - public void testCreateEndpointGatewayWRetries() throws Throwable { + public void testListVpnGatewayAdvertisedCidrsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateEndpointGatewayWOptions(); + testListVpnGatewayAdvertisedCidrsWOptions(); vpcService.disableRetries(); - testCreateEndpointGatewayWOptions(); + testListVpnGatewayAdvertisedCidrsWOptions(); } - // Test the createEndpointGateway operation with a null options model (negative test) + // Test the listVpnGatewayAdvertisedCidrs operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateEndpointGatewayNoOptions() throws Throwable { + public void testListVpnGatewayAdvertisedCidrsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createEndpointGateway(null).execute(); + vpcService.listVpnGatewayAdvertisedCidrs(null).execute(); } - // Test the listEndpointGatewayIps operation with a valid options model parameter + // Test the listVpnGatewayConnections operation with a valid options model parameter @Test - public void testListEndpointGatewayIpsWOptions() throws Throwable { + public void testListVpnGatewayConnectionsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"ips\": [{\"address\": \"192.168.3.4\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"lifecycle_state\": \"stable\", \"name\": \"my-reserved-ip\", \"owner\": \"provider\", \"resource_type\": \"subnet_reserved_ip\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"resource_type\": \"endpoint_gateway\"}}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listEndpointGatewayIpsPath = "/endpoint_gateways/testString/ips"; + String mockResponseBody = "{\"connections\": [{\"admin_state_up\": true, \"authentication_mode\": \"psk\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"dead_peer_detection\": {\"action\": \"restart\", \"interval\": 30, \"timeout\": 120}, \"establish_mode\": \"bidirectional\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"ike_policy\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"id\": \"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"name\": \"my-ike-policy\", \"resource_type\": \"ike_policy\"}, \"ipsec_policy\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"id\": \"r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"name\": \"my-ipsec-policy\", \"resource_type\": \"ipsec_policy\"}, \"mode\": \"policy\", \"name\": \"my-vpn-gateway-connection\", \"psk\": \"lkj14b1oi0alcniejkso\", \"resource_type\": \"vpn_gateway_connection\", \"status\": \"down\", \"status_reasons\": [{\"code\": \"cannot_authenticate_connection\", \"message\": \"Failed to authenticate a connection because of mismatched IKE ID and PSK.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}], \"distribute_traffic\": false, \"local\": {\"ike_identities\": [{\"type\": \"fqdn\", \"value\": \"my-service.example.com\"}]}, \"peer\": {\"ike_identity\": {\"type\": \"fqdn\", \"value\": \"my-service.example.com\"}, \"type\": \"address\", \"address\": \"192.0.2.5\"}, \"routing_protocol\": \"none\", \"tunnels\": [{\"public_ip\": {\"address\": \"192.168.3.4\"}, \"status\": \"down\", \"status_reasons\": [{\"code\": \"cannot_authenticate_connection\", \"message\": \"Failed to authenticate a connection because of mismatched IKE ID and PSK.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listVpnGatewayConnectionsPath = "/vpn_gateways/testString/connections"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListEndpointGatewayIpsOptions model - ListEndpointGatewayIpsOptions listEndpointGatewayIpsOptionsModel = new ListEndpointGatewayIpsOptions.Builder() - .endpointGatewayId("testString") + // Construct an instance of the ListVpnGatewayConnectionsOptions model + ListVpnGatewayConnectionsOptions listVpnGatewayConnectionsOptionsModel = new ListVpnGatewayConnectionsOptions.Builder() + .vpnGatewayId("testString") .start("testString") .limit(Long.valueOf("10")) - .sort("name") + .status("down") .build(); - // Invoke listEndpointGatewayIps() with a valid options model and verify the result - Response response = vpcService.listEndpointGatewayIps(listEndpointGatewayIpsOptionsModel).execute(); + // Invoke listVpnGatewayConnections() with a valid options model and verify the result + Response response = vpcService.listVpnGatewayConnections(listVpnGatewayConnectionsOptionsModel).execute(); assertNotNull(response); - ReservedIPCollectionEndpointGatewayContext responseObj = response.getResult(); + VPNGatewayConnectionCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -31958,40 +32982,40 @@ public void testListEndpointGatewayIpsWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listEndpointGatewayIpsPath); + assertEquals(parsedPath, listVpnGatewayConnectionsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("sort"), "name"); + assertEquals(query.get("status"), "down"); } - // Test the listEndpointGatewayIps operation with and without retries enabled + // Test the listVpnGatewayConnections operation with and without retries enabled @Test - public void testListEndpointGatewayIpsWRetries() throws Throwable { + public void testListVpnGatewayConnectionsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListEndpointGatewayIpsWOptions(); + testListVpnGatewayConnectionsWOptions(); vpcService.disableRetries(); - testListEndpointGatewayIpsWOptions(); + testListVpnGatewayConnectionsWOptions(); } - // Test the listEndpointGatewayIps operation with a null options model (negative test) + // Test the listVpnGatewayConnections operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListEndpointGatewayIpsNoOptions() throws Throwable { + public void testListVpnGatewayConnectionsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listEndpointGatewayIps(null).execute(); + vpcService.listVpnGatewayConnections(null).execute(); } - // Test the listEndpointGatewayIps operation using the EndpointGatewayIpsPager.getNext() method + // Test the listVpnGatewayConnections operation using the VpnGatewayConnectionsPager.getNext() method @Test - public void testListEndpointGatewayIpsWithPagerGetNext() throws Throwable { + public void testListVpnGatewayConnectionsWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"ips\":[{\"address\":\"192.168.3.4\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"lifecycle_state\":\"stable\",\"name\":\"my-reserved-ip\",\"owner\":\"provider\",\"resource_type\":\"subnet_reserved_ip\",\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"resource_type\":\"endpoint_gateway\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"ips\":[{\"address\":\"192.168.3.4\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"lifecycle_state\":\"stable\",\"name\":\"my-reserved-ip\",\"owner\":\"provider\",\"resource_type\":\"subnet_reserved_ip\",\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"resource_type\":\"endpoint_gateway\"}}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"connections\":[{\"admin_state_up\":true,\"authentication_mode\":\"psk\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dead_peer_detection\":{\"action\":\"restart\",\"interval\":30,\"timeout\":120},\"establish_mode\":\"bidirectional\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"ike_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"name\":\"my-ike-policy\",\"resource_type\":\"ike_policy\"},\"ipsec_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"name\":\"my-ipsec-policy\",\"resource_type\":\"ipsec_policy\"},\"mode\":\"policy\",\"name\":\"my-vpn-gateway-connection\",\"psk\":\"lkj14b1oi0alcniejkso\",\"resource_type\":\"vpn_gateway_connection\",\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}],\"distribute_traffic\":false,\"local\":{\"ike_identities\":[{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"}]},\"peer\":{\"ike_identity\":{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"},\"type\":\"address\",\"address\":\"192.0.2.5\"},\"routing_protocol\":\"none\",\"tunnels\":[{\"public_ip\":{\"address\":\"192.168.3.4\"},\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"connections\":[{\"admin_state_up\":true,\"authentication_mode\":\"psk\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dead_peer_detection\":{\"action\":\"restart\",\"interval\":30,\"timeout\":120},\"establish_mode\":\"bidirectional\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"ike_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"name\":\"my-ike-policy\",\"resource_type\":\"ike_policy\"},\"ipsec_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"name\":\"my-ipsec-policy\",\"resource_type\":\"ipsec_policy\"},\"mode\":\"policy\",\"name\":\"my-vpn-gateway-connection\",\"psk\":\"lkj14b1oi0alcniejkso\",\"resource_type\":\"vpn_gateway_connection\",\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}],\"distribute_traffic\":false,\"local\":{\"ike_identities\":[{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"}]},\"peer\":{\"ike_identity\":{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"},\"type\":\"address\",\"address\":\"192.0.2.5\"},\"routing_protocol\":\"none\",\"tunnels\":[{\"public_ip\":{\"address\":\"192.168.3.4\"},\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -32005,28 +33029,28 @@ public void testListEndpointGatewayIpsWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListEndpointGatewayIpsOptions listEndpointGatewayIpsOptions = new ListEndpointGatewayIpsOptions.Builder() - .endpointGatewayId("testString") + ListVpnGatewayConnectionsOptions listVpnGatewayConnectionsOptions = new ListVpnGatewayConnectionsOptions.Builder() + .vpnGatewayId("testString") .limit(Long.valueOf("10")) - .sort("name") + .status("down") .build(); - List allResults = new ArrayList<>(); - EndpointGatewayIpsPager pager = new EndpointGatewayIpsPager(vpcService, listEndpointGatewayIpsOptions); + List allResults = new ArrayList<>(); + VpnGatewayConnectionsPager pager = new VpnGatewayConnectionsPager(vpcService, listVpnGatewayConnectionsOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listEndpointGatewayIps operation using the EndpointGatewayIpsPager.getAll() method + // Test the listVpnGatewayConnections operation using the VpnGatewayConnectionsPager.getAll() method @Test - public void testListEndpointGatewayIpsWithPagerGetAll() throws Throwable { + public void testListVpnGatewayConnectionsWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"ips\":[{\"address\":\"192.168.3.4\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"lifecycle_state\":\"stable\",\"name\":\"my-reserved-ip\",\"owner\":\"provider\",\"resource_type\":\"subnet_reserved_ip\",\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"resource_type\":\"endpoint_gateway\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"ips\":[{\"address\":\"192.168.3.4\",\"auto_delete\":false,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"lifecycle_state\":\"stable\",\"name\":\"my-reserved-ip\",\"owner\":\"provider\",\"resource_type\":\"subnet_reserved_ip\",\"target\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"id\":\"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\",\"name\":\"my-endpoint-gateway\",\"resource_type\":\"endpoint_gateway\"}}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"connections\":[{\"admin_state_up\":true,\"authentication_mode\":\"psk\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dead_peer_detection\":{\"action\":\"restart\",\"interval\":30,\"timeout\":120},\"establish_mode\":\"bidirectional\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"ike_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"name\":\"my-ike-policy\",\"resource_type\":\"ike_policy\"},\"ipsec_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"name\":\"my-ipsec-policy\",\"resource_type\":\"ipsec_policy\"},\"mode\":\"policy\",\"name\":\"my-vpn-gateway-connection\",\"psk\":\"lkj14b1oi0alcniejkso\",\"resource_type\":\"vpn_gateway_connection\",\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}],\"distribute_traffic\":false,\"local\":{\"ike_identities\":[{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"}]},\"peer\":{\"ike_identity\":{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"},\"type\":\"address\",\"address\":\"192.0.2.5\"},\"routing_protocol\":\"none\",\"tunnels\":[{\"public_ip\":{\"address\":\"192.168.3.4\"},\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"connections\":[{\"admin_state_up\":true,\"authentication_mode\":\"psk\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"dead_peer_detection\":{\"action\":\"restart\",\"interval\":30,\"timeout\":120},\"establish_mode\":\"bidirectional\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"ike_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"id\":\"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\",\"name\":\"my-ike-policy\",\"resource_type\":\"ike_policy\"},\"ipsec_policy\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"id\":\"r006-51eae621-dbbc-4c47-b623-b57a43c19876\",\"name\":\"my-ipsec-policy\",\"resource_type\":\"ipsec_policy\"},\"mode\":\"policy\",\"name\":\"my-vpn-gateway-connection\",\"psk\":\"lkj14b1oi0alcniejkso\",\"resource_type\":\"vpn_gateway_connection\",\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}],\"distribute_traffic\":false,\"local\":{\"ike_identities\":[{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"}]},\"peer\":{\"ike_identity\":{\"type\":\"fqdn\",\"value\":\"my-service.example.com\"},\"type\":\"address\",\"address\":\"192.0.2.5\"},\"routing_protocol\":\"none\",\"tunnels\":[{\"public_ip\":{\"address\":\"192.168.3.4\"},\"status\":\"down\",\"status_reasons\":[{\"code\":\"cannot_authenticate_connection\",\"message\":\"Failed to authenticate a connection because of mismatched IKE ID and PSK.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -32040,92 +33064,93 @@ public void testListEndpointGatewayIpsWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListEndpointGatewayIpsOptions listEndpointGatewayIpsOptions = new ListEndpointGatewayIpsOptions.Builder() - .endpointGatewayId("testString") + ListVpnGatewayConnectionsOptions listVpnGatewayConnectionsOptions = new ListVpnGatewayConnectionsOptions.Builder() + .vpnGatewayId("testString") .limit(Long.valueOf("10")) - .sort("name") + .status("down") .build(); - EndpointGatewayIpsPager pager = new EndpointGatewayIpsPager(vpcService, listEndpointGatewayIpsOptions); - List allResults = pager.getAll(); + VpnGatewayConnectionsPager pager = new VpnGatewayConnectionsPager(vpcService, listVpnGatewayConnectionsOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the removeEndpointGatewayIp operation with a valid options model parameter + // Test the listVpnGatewayConnectionsLocalCidrs operation with a valid options model parameter @Test - public void testRemoveEndpointGatewayIpWOptions() throws Throwable { + public void testListVpnGatewayConnectionsLocalCidrsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String removeEndpointGatewayIpPath = "/endpoint_gateways/testString/ips/testString"; + String mockResponseBody = "{\"cidrs\": [\"192.0.2.0/24\"]}"; + String listVpnGatewayConnectionsLocalCidrsPath = "/vpn_gateways/testString/connections/testString/local/cidrs"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the RemoveEndpointGatewayIpOptions model - RemoveEndpointGatewayIpOptions removeEndpointGatewayIpOptionsModel = new RemoveEndpointGatewayIpOptions.Builder() - .endpointGatewayId("testString") + // Construct an instance of the ListVpnGatewayConnectionsLocalCidrsOptions model + ListVpnGatewayConnectionsLocalCidrsOptions listVpnGatewayConnectionsLocalCidrsOptionsModel = new ListVpnGatewayConnectionsLocalCidrsOptions.Builder() + .vpnGatewayId("testString") .id("testString") .build(); - // Invoke removeEndpointGatewayIp() with a valid options model and verify the result - Response response = vpcService.removeEndpointGatewayIp(removeEndpointGatewayIpOptionsModel).execute(); + // Invoke listVpnGatewayConnectionsLocalCidrs() with a valid options model and verify the result + Response response = vpcService.listVpnGatewayConnectionsLocalCidrs(listVpnGatewayConnectionsLocalCidrsOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + VPNGatewayConnectionCIDRs 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, removeEndpointGatewayIpPath); + assertEquals(parsedPath, listVpnGatewayConnectionsLocalCidrsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the removeEndpointGatewayIp operation with and without retries enabled + // Test the listVpnGatewayConnectionsLocalCidrs operation with and without retries enabled @Test - public void testRemoveEndpointGatewayIpWRetries() throws Throwable { + public void testListVpnGatewayConnectionsLocalCidrsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testRemoveEndpointGatewayIpWOptions(); + testListVpnGatewayConnectionsLocalCidrsWOptions(); vpcService.disableRetries(); - testRemoveEndpointGatewayIpWOptions(); + testListVpnGatewayConnectionsLocalCidrsWOptions(); } - // Test the removeEndpointGatewayIp operation with a null options model (negative test) + // Test the listVpnGatewayConnectionsLocalCidrs operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testRemoveEndpointGatewayIpNoOptions() throws Throwable { + public void testListVpnGatewayConnectionsLocalCidrsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.removeEndpointGatewayIp(null).execute(); + vpcService.listVpnGatewayConnectionsLocalCidrs(null).execute(); } - // Test the getEndpointGatewayIp operation with a valid options model parameter + // Test the listVpnGatewayConnectionsPeerCidrs operation with a valid options model parameter @Test - public void testGetEndpointGatewayIpWOptions() throws Throwable { + public void testListVpnGatewayConnectionsPeerCidrsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"address\": \"192.168.3.4\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"lifecycle_state\": \"stable\", \"name\": \"my-reserved-ip\", \"owner\": \"provider\", \"resource_type\": \"subnet_reserved_ip\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"resource_type\": \"endpoint_gateway\"}}"; - String getEndpointGatewayIpPath = "/endpoint_gateways/testString/ips/testString"; + String mockResponseBody = "{\"cidrs\": [\"192.0.2.0/24\"]}"; + String listVpnGatewayConnectionsPeerCidrsPath = "/vpn_gateways/testString/connections/testString/peer/cidrs"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetEndpointGatewayIpOptions model - GetEndpointGatewayIpOptions getEndpointGatewayIpOptionsModel = new GetEndpointGatewayIpOptions.Builder() - .endpointGatewayId("testString") + // Construct an instance of the ListVpnGatewayConnectionsPeerCidrsOptions model + ListVpnGatewayConnectionsPeerCidrsOptions listVpnGatewayConnectionsPeerCidrsOptionsModel = new ListVpnGatewayConnectionsPeerCidrsOptions.Builder() + .vpnGatewayId("testString") .id("testString") .build(); - // Invoke getEndpointGatewayIp() with a valid options model and verify the result - Response response = vpcService.getEndpointGatewayIp(getEndpointGatewayIpOptionsModel).execute(); + // Invoke listVpnGatewayConnectionsPeerCidrs() with a valid options model and verify the result + Response response = vpcService.listVpnGatewayConnectionsPeerCidrs(listVpnGatewayConnectionsPeerCidrsOptionsModel).execute(); assertNotNull(response); - ReservedIP responseObj = response.getResult(); + VPNGatewayConnectionCIDRs responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -32134,279 +33159,176 @@ public void testGetEndpointGatewayIpWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getEndpointGatewayIpPath); + assertEquals(parsedPath, listVpnGatewayConnectionsPeerCidrsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getEndpointGatewayIp operation with and without retries enabled + // Test the listVpnGatewayConnectionsPeerCidrs operation with and without retries enabled @Test - public void testGetEndpointGatewayIpWRetries() throws Throwable { + public void testListVpnGatewayConnectionsPeerCidrsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetEndpointGatewayIpWOptions(); + testListVpnGatewayConnectionsPeerCidrsWOptions(); vpcService.disableRetries(); - testGetEndpointGatewayIpWOptions(); + testListVpnGatewayConnectionsPeerCidrsWOptions(); } - // Test the getEndpointGatewayIp operation with a null options model (negative test) + // Test the listVpnGatewayConnectionsPeerCidrs operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetEndpointGatewayIpNoOptions() throws Throwable { + public void testListVpnGatewayConnectionsPeerCidrsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getEndpointGatewayIp(null).execute(); + vpcService.listVpnGatewayConnectionsPeerCidrs(null).execute(); } - // Test the addEndpointGatewayIp operation with a valid options model parameter + // Test the listVpnGatewayServiceConnections operation with a valid options model parameter @Test - public void testAddEndpointGatewayIpWOptions() throws Throwable { + public void testListVpnGatewayServiceConnectionsWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"address\": \"192.168.3.4\", \"auto_delete\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"lifecycle_state\": \"stable\", \"name\": \"my-reserved-ip\", \"owner\": \"provider\", \"resource_type\": \"subnet_reserved_ip\", \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"name\": \"my-endpoint-gateway\", \"resource_type\": \"endpoint_gateway\"}}"; - String addEndpointGatewayIpPath = "/endpoint_gateways/testString/ips/testString"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"service_connections\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"creator\": {\"crn\": \"crn:v1:bluemix:public:transit:dal03:a/aa2432b1fa4d4ace891e9b80fc104e34::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\", \"id\": \"ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\", \"resource_type\": \"transit_gateway\"}, \"id\": \"0717-64e7e88c-4b28-4082-9ab8-3f95876952ac\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"status\": \"up\", \"status_reasons\": [{\"code\": \"peer_not_responding\", \"message\": \"The connection is down because the peer is not responding.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}]}], \"total_count\": 132}"; + String listVpnGatewayServiceConnectionsPath = "/vpn_gateways/testString/service_connections"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the AddEndpointGatewayIpOptions model - AddEndpointGatewayIpOptions addEndpointGatewayIpOptionsModel = new AddEndpointGatewayIpOptions.Builder() - .endpointGatewayId("testString") - .id("testString") + // Construct an instance of the ListVpnGatewayServiceConnectionsOptions model + ListVpnGatewayServiceConnectionsOptions listVpnGatewayServiceConnectionsOptionsModel = new ListVpnGatewayServiceConnectionsOptions.Builder() + .vpnGatewayId("testString") + .start("testString") + .limit(Long.valueOf("10")) .build(); - // Invoke addEndpointGatewayIp() with a valid options model and verify the result - Response response = vpcService.addEndpointGatewayIp(addEndpointGatewayIpOptionsModel).execute(); + // Invoke listVpnGatewayServiceConnections() with a valid options model and verify the result + Response response = vpcService.listVpnGatewayServiceConnections(listVpnGatewayServiceConnectionsOptionsModel).execute(); assertNotNull(response); - ReservedIP responseObj = response.getResult(); + VPNGatewayServiceConnectionCollection 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"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, addEndpointGatewayIpPath); + assertEquals(parsedPath, listVpnGatewayServiceConnectionsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); } - // Test the addEndpointGatewayIp operation with and without retries enabled + // Test the listVpnGatewayServiceConnections operation with and without retries enabled @Test - public void testAddEndpointGatewayIpWRetries() throws Throwable { + public void testListVpnGatewayServiceConnectionsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testAddEndpointGatewayIpWOptions(); + testListVpnGatewayServiceConnectionsWOptions(); vpcService.disableRetries(); - testAddEndpointGatewayIpWOptions(); + testListVpnGatewayServiceConnectionsWOptions(); } - // Test the addEndpointGatewayIp operation with a null options model (negative test) + // Test the listVpnGatewayServiceConnections operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testAddEndpointGatewayIpNoOptions() throws Throwable { + public void testListVpnGatewayServiceConnectionsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.addEndpointGatewayIp(null).execute(); + vpcService.listVpnGatewayServiceConnections(null).execute(); } - // Test the deleteEndpointGateway operation with a valid options model parameter + // Test the listVpnGatewayServiceConnections operation using the VpnGatewayServiceConnectionsPager.getNext() method @Test - public void testDeleteEndpointGatewayWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = ""; - String deleteEndpointGatewayPath = "/endpoint_gateways/testString"; + public void testListVpnGatewayServiceConnectionsWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"service_connections\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"creator\":{\"crn\":\"crn:v1:bluemix:public:transit:dal03:a/aa2432b1fa4d4ace891e9b80fc104e34::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"id\":\"ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"resource_type\":\"transit_gateway\"},\"id\":\"0717-64e7e88c-4b28-4082-9ab8-3f95876952ac\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"status\":\"up\",\"status_reasons\":[{\"code\":\"peer_not_responding\",\"message\":\"The connection is down because the peer is not responding.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}]}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"service_connections\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"creator\":{\"crn\":\"crn:v1:bluemix:public:transit:dal03:a/aa2432b1fa4d4ace891e9b80fc104e34::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"id\":\"ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"resource_type\":\"transit_gateway\"},\"id\":\"0717-64e7e88c-4b28-4082-9ab8-3f95876952ac\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"status\":\"up\",\"status_reasons\":[{\"code\":\"peer_not_responding\",\"message\":\"The connection is down because the peer is not responding.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}]}]}"; server.enqueue(new MockResponse() - .setResponseCode(204) - .setBody(mockResponseBody)); - - // Construct an instance of the DeleteEndpointGatewayOptions model - DeleteEndpointGatewayOptions deleteEndpointGatewayOptionsModel = new DeleteEndpointGatewayOptions.Builder() - .id("testString") - .build(); - - // Invoke deleteEndpointGateway() with a valid options model and verify the result - Response response = vpcService.deleteEndpointGateway(deleteEndpointGatewayOptionsModel).execute(); - assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "DELETE"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteEndpointGatewayPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - } - - // Test the deleteEndpointGateway operation with and without retries enabled - @Test - public void testDeleteEndpointGatewayWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testDeleteEndpointGatewayWOptions(); - - vpcService.disableRetries(); - testDeleteEndpointGatewayWOptions(); - } - - // Test the deleteEndpointGateway operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteEndpointGatewayNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.deleteEndpointGateway(null).execute(); - } - - // Test the getEndpointGateway operation with a valid options model parameter - @Test - public void testGetEndpointGatewayWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"allow_dns_resolution_binding\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"lifecycle_reasons\": [{\"code\": \"dns_resolution_binding_pending\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-endpoint-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"endpoint_gateway\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"service_endpoint\": \"my-cloudant-instance.appdomain.cloud\", \"service_endpoints\": [\"my-cloudant-instance.appdomain.cloud\"], \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"id\": \"r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"name\": \"my-private-path-service-gateway\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"private_path_service_gateway\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String getEndpointGatewayPath = "/endpoint_gateways/testString"; + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) - .setBody(mockResponseBody)); + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the GetEndpointGatewayOptions model - GetEndpointGatewayOptions getEndpointGatewayOptionsModel = new GetEndpointGatewayOptions.Builder() - .id("testString") + ListVpnGatewayServiceConnectionsOptions listVpnGatewayServiceConnectionsOptions = new ListVpnGatewayServiceConnectionsOptions.Builder() + .vpnGatewayId("testString") + .limit(Long.valueOf("10")) .build(); - // Invoke getEndpointGateway() with a valid options model and verify the result - Response response = vpcService.getEndpointGateway(getEndpointGatewayOptionsModel).execute(); - assertNotNull(response); - EndpointGateway responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "GET"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getEndpointGatewayPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - } - - // Test the getEndpointGateway operation with and without retries enabled - @Test - public void testGetEndpointGatewayWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testGetEndpointGatewayWOptions(); - - vpcService.disableRetries(); - testGetEndpointGatewayWOptions(); - } - - // Test the getEndpointGateway operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetEndpointGatewayNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.getEndpointGateway(null).execute(); + List allResults = new ArrayList<>(); + VpnGatewayServiceConnectionsPager pager = new VpnGatewayServiceConnectionsPager(vpcService, listVpnGatewayServiceConnectionsOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } - - // Test the updateEndpointGateway operation with a valid options model parameter + + // Test the listVpnGatewayServiceConnections operation using the VpnGatewayServiceConnectionsPager.getAll() method @Test - public void testUpdateEndpointGatewayWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"allow_dns_resolution_binding\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"id\": \"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0\", \"ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"lifecycle_reasons\": [{\"code\": \"dns_resolution_binding_pending\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-endpoint-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"endpoint_gateway\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"service_endpoint\": \"my-cloudant-instance.appdomain.cloud\", \"service_endpoints\": [\"my-cloudant-instance.appdomain.cloud\"], \"target\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"id\": \"r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"name\": \"my-private-path-service-gateway\", \"remote\": {\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"region\": {\"href\": \"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south\", \"name\": \"us-south\"}}, \"resource_type\": \"private_path_service_gateway\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String updateEndpointGatewayPath = "/endpoint_gateways/testString"; + public void testListVpnGatewayServiceConnectionsWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"service_connections\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"creator\":{\"crn\":\"crn:v1:bluemix:public:transit:dal03:a/aa2432b1fa4d4ace891e9b80fc104e34::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"id\":\"ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"resource_type\":\"transit_gateway\"},\"id\":\"0717-64e7e88c-4b28-4082-9ab8-3f95876952ac\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"status\":\"up\",\"status_reasons\":[{\"code\":\"peer_not_responding\",\"message\":\"The connection is down because the peer is not responding.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}]}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"service_connections\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"creator\":{\"crn\":\"crn:v1:bluemix:public:transit:dal03:a/aa2432b1fa4d4ace891e9b80fc104e34::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"id\":\"ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4\",\"resource_type\":\"transit_gateway\"},\"id\":\"0717-64e7e88c-4b28-4082-9ab8-3f95876952ac\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"status\":\"up\",\"status_reasons\":[{\"code\":\"peer_not_responding\",\"message\":\"The connection is down because the peer is not responding.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}]}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) - .setBody(mockResponseBody)); - - // Construct an instance of the EndpointGatewayPatch model - EndpointGatewayPatch endpointGatewayPatchModel = new EndpointGatewayPatch.Builder() - .allowDnsResolutionBinding(false) - .name("my-endpoint-gateway") - .build(); - Map endpointGatewayPatchModelAsPatch = endpointGatewayPatchModel.asPatch(); + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the UpdateEndpointGatewayOptions model - UpdateEndpointGatewayOptions updateEndpointGatewayOptionsModel = new UpdateEndpointGatewayOptions.Builder() - .id("testString") - .endpointGatewayPatch(endpointGatewayPatchModelAsPatch) + ListVpnGatewayServiceConnectionsOptions listVpnGatewayServiceConnectionsOptions = new ListVpnGatewayServiceConnectionsOptions.Builder() + .vpnGatewayId("testString") + .limit(Long.valueOf("10")) .build(); - // Invoke updateEndpointGateway() with a valid options model and verify the result - Response response = vpcService.updateEndpointGateway(updateEndpointGatewayOptionsModel).execute(); - assertNotNull(response); - EndpointGateway responseObj = response.getResult(); - assertNotNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateEndpointGatewayPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - } - - // Test the updateEndpointGateway operation with and without retries enabled - @Test - public void testUpdateEndpointGatewayWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testUpdateEndpointGatewayWOptions(); - - vpcService.disableRetries(); - testUpdateEndpointGatewayWOptions(); - } - - // Test the updateEndpointGateway operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateEndpointGatewayNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.updateEndpointGateway(null).execute(); + VpnGatewayServiceConnectionsPager pager = new VpnGatewayServiceConnectionsPager(vpcService, listVpnGatewayServiceConnectionsOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); } - - // Test the listFlowLogCollectors operation with a valid options model parameter + + // Test the listVpnGateways operation with a valid options model parameter @Test - public void testListFlowLogCollectorsWOptions() throws Throwable { + public void testListVpnGatewaysWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"flow_log_collectors\": [{\"active\": true, \"auto_delete\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\", \"id\": \"r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\", \"lifecycle_state\": \"stable\", \"name\": \"my-flow-log-collector\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"storage_bucket\": {\"name\": \"bucket-27200-lwx4cfvcue\"}, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"resource_type\": \"network_interface\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}], \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listFlowLogCollectorsPath = "/flow_log_collectors"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132, \"vpn_gateways\": [{\"connections\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"name\": \"my-vpn-gateway-connection\", \"resource_type\": \"vpn_gateway_connection\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"health_reasons\": [{\"code\": \"cannot_reserve_ip_address\", \"message\": \"IP address exhaustion (release addresses on the VPN's subnet).\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"id\": \"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"members\": [{\"health_reasons\": [{\"code\": \"cannot_reserve_ip_address\", \"message\": \"IP address exhaustion (release addresses on the VPN's subnet).\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}], \"health_state\": \"ok\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"private_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"public_ip\": {\"address\": \"192.168.3.4\"}, \"role\": \"active\"}], \"name\": \"my-vpn-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"vpn_gateway\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"mode\": \"policy\"}]}"; + String listVpnGatewaysPath = "/vpn_gateways"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListFlowLogCollectorsOptions model - ListFlowLogCollectorsOptions listFlowLogCollectorsOptionsModel = new ListFlowLogCollectorsOptions.Builder() + // Construct an instance of the ListVpnGatewaysOptions model + ListVpnGatewaysOptions listVpnGatewaysOptionsModel = new ListVpnGatewaysOptions.Builder() .start("testString") .limit(Long.valueOf("10")) .resourceGroupId("testString") - .name("my-name") - .vpcId("testString") - .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .vpcName("my-vpc") - .targetId("testString") - .targetResourceType("testString") + .sort("name") + .mode("policy") .build(); - // Invoke listFlowLogCollectors() with a valid options model and verify the result - Response response = vpcService.listFlowLogCollectors(listFlowLogCollectorsOptionsModel).execute(); + // Invoke listVpnGateways() with a valid options model and verify the result + Response response = vpcService.listVpnGateways(listVpnGatewaysOptionsModel).execute(); assertNotNull(response); - FlowLogCollectorCollection responseObj = response.getResult(); + VPNGatewayCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -32415,39 +33337,35 @@ public void testListFlowLogCollectorsWOptions() throws Throwable { assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listFlowLogCollectorsPath); + assertEquals(parsedPath, listVpnGatewaysPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); assertEquals(query.get("resource_group.id"), "testString"); - assertEquals(query.get("name"), "my-name"); - assertEquals(query.get("vpc.id"), "testString"); - assertEquals(query.get("vpc.crn"), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); - assertEquals(query.get("vpc.name"), "my-vpc"); - assertEquals(query.get("target.id"), "testString"); - assertEquals(query.get("target.resource_type"), "testString"); + assertEquals(query.get("sort"), "name"); + assertEquals(query.get("mode"), "policy"); } - // Test the listFlowLogCollectors operation with and without retries enabled + // Test the listVpnGateways operation with and without retries enabled @Test - public void testListFlowLogCollectorsWRetries() throws Throwable { + public void testListVpnGatewaysWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListFlowLogCollectorsWOptions(); + testListVpnGatewaysWOptions(); vpcService.disableRetries(); - testListFlowLogCollectorsWOptions(); + testListVpnGatewaysWOptions(); } - // Test the listFlowLogCollectors operation using the FlowLogCollectorsPager.getNext() method + // Test the listVpnGateways operation using the VpnGatewaysPager.getNext() method @Test - public void testListFlowLogCollectorsWithPagerGetNext() throws Throwable { + public void testListVpnGatewaysWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"flow_log_collectors\":[{\"active\":true,\"auto_delete\":true,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\",\"id\":\"r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\",\"lifecycle_state\":\"stable\",\"name\":\"my-flow-log-collector\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"storage_bucket\":{\"name\":\"bucket-27200-lwx4cfvcue\"},\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"resource_type\":\"network_interface\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"flow_log_collectors\":[{\"active\":true,\"auto_delete\":true,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\",\"id\":\"r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\",\"lifecycle_state\":\"stable\",\"name\":\"my-flow-log-collector\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"storage_bucket\":{\"name\":\"bucket-27200-lwx4cfvcue\"},\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"resource_type\":\"network_interface\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"vpn_gateways\":[{\"connections\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"name\":\"my-vpn-gateway-connection\",\"resource_type\":\"vpn_gateway_connection\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"health_reasons\":[{\"code\":\"cannot_reserve_ip_address\",\"message\":\"IP address exhaustion (release addresses on the VPN's subnet).\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"id\":\"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"members\":[{\"health_reasons\":[{\"code\":\"cannot_reserve_ip_address\",\"message\":\"IP address exhaustion (release addresses on the VPN's subnet).\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}],\"health_state\":\"ok\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"private_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"public_ip\":{\"address\":\"192.168.3.4\"},\"role\":\"active\"}],\"name\":\"my-vpn-gateway\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"vpn_gateway\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"mode\":\"policy\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"vpn_gateways\":[{\"connections\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"name\":\"my-vpn-gateway-connection\",\"resource_type\":\"vpn_gateway_connection\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"health_reasons\":[{\"code\":\"cannot_reserve_ip_address\",\"message\":\"IP address exhaustion (release addresses on the VPN's subnet).\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"id\":\"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"members\":[{\"health_reasons\":[{\"code\":\"cannot_reserve_ip_address\",\"message\":\"IP address exhaustion (release addresses on the VPN's subnet).\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}],\"health_state\":\"ok\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"private_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"public_ip\":{\"address\":\"192.168.3.4\"},\"role\":\"active\"}],\"name\":\"my-vpn-gateway\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"vpn_gateway\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"mode\":\"policy\"}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -32461,33 +33379,29 @@ public void testListFlowLogCollectorsWithPagerGetNext() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListFlowLogCollectorsOptions listFlowLogCollectorsOptions = new ListFlowLogCollectorsOptions.Builder() + ListVpnGatewaysOptions listVpnGatewaysOptions = new ListVpnGatewaysOptions.Builder() .limit(Long.valueOf("10")) .resourceGroupId("testString") - .name("my-name") - .vpcId("testString") - .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .vpcName("my-vpc") - .targetId("testString") - .targetResourceType("testString") + .sort("name") + .mode("policy") .build(); - List allResults = new ArrayList<>(); - FlowLogCollectorsPager pager = new FlowLogCollectorsPager(vpcService, listFlowLogCollectorsOptions); + List allResults = new ArrayList<>(); + VpnGatewaysPager pager = new VpnGatewaysPager(vpcService, listVpnGatewaysOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listFlowLogCollectors operation using the FlowLogCollectorsPager.getAll() method + // Test the listVpnGateways operation using the VpnGatewaysPager.getAll() method @Test - public void testListFlowLogCollectorsWithPagerGetAll() throws Throwable { + public void testListVpnGatewaysWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"flow_log_collectors\":[{\"active\":true,\"auto_delete\":true,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\",\"id\":\"r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\",\"lifecycle_state\":\"stable\",\"name\":\"my-flow-log-collector\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"storage_bucket\":{\"name\":\"bucket-27200-lwx4cfvcue\"},\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"resource_type\":\"network_interface\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"flow_log_collectors\":[{\"active\":true,\"auto_delete\":true,\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\",\"id\":\"r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\",\"lifecycle_state\":\"stable\",\"name\":\"my-flow-log-collector\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"storage_bucket\":{\"name\":\"bucket-27200-lwx4cfvcue\"},\"target\":{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"id\":\"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\",\"name\":\"my-instance-network-interface\",\"resource_type\":\"network_interface\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"vpn_gateways\":[{\"connections\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"name\":\"my-vpn-gateway-connection\",\"resource_type\":\"vpn_gateway_connection\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"health_reasons\":[{\"code\":\"cannot_reserve_ip_address\",\"message\":\"IP address exhaustion (release addresses on the VPN's subnet).\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"id\":\"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"members\":[{\"health_reasons\":[{\"code\":\"cannot_reserve_ip_address\",\"message\":\"IP address exhaustion (release addresses on the VPN's subnet).\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}],\"health_state\":\"ok\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"private_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"public_ip\":{\"address\":\"192.168.3.4\"},\"role\":\"active\"}],\"name\":\"my-vpn-gateway\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"vpn_gateway\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"mode\":\"policy\"}]}"; + String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"vpn_gateways\":[{\"connections\":[{\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"id\":\"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\",\"name\":\"my-vpn-gateway-connection\",\"resource_type\":\"vpn_gateway_connection\"}],\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"health_reasons\":[{\"code\":\"cannot_reserve_ip_address\",\"message\":\"IP address exhaustion (release addresses on the VPN's subnet).\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"id\":\"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"members\":[{\"health_reasons\":[{\"code\":\"cannot_reserve_ip_address\",\"message\":\"IP address exhaustion (release addresses on the VPN's subnet).\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}],\"health_state\":\"ok\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"private_ip\":{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"},\"public_ip\":{\"address\":\"192.168.3.4\"},\"role\":\"active\"}],\"name\":\"my-vpn-gateway\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"vpn_gateway\",\"subnet\":{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"},\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"mode\":\"policy\"}]}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -32501,112 +33415,145 @@ public void testListFlowLogCollectorsWithPagerGetAll() throws Throwable { .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListFlowLogCollectorsOptions listFlowLogCollectorsOptions = new ListFlowLogCollectorsOptions.Builder() + ListVpnGatewaysOptions listVpnGatewaysOptions = new ListVpnGatewaysOptions.Builder() .limit(Long.valueOf("10")) .resourceGroupId("testString") - .name("my-name") - .vpcId("testString") - .vpcCrn("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") - .vpcName("my-vpc") - .targetId("testString") - .targetResourceType("testString") + .sort("name") + .mode("policy") .build(); - FlowLogCollectorsPager pager = new FlowLogCollectorsPager(vpcService, listFlowLogCollectorsOptions); - List allResults = pager.getAll(); + VpnGatewaysPager pager = new VpnGatewaysPager(vpcService, listVpnGatewaysOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the createFlowLogCollector operation with a valid options model parameter + // Test the removeVpnGatewayAdvertisedCidr operation with a valid options model parameter @Test - public void testCreateFlowLogCollectorWOptions() throws Throwable { + public void testRemoveVpnGatewayAdvertisedCidrWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"active\": true, \"auto_delete\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\", \"id\": \"r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\", \"lifecycle_state\": \"stable\", \"name\": \"my-flow-log-collector\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"storage_bucket\": {\"name\": \"bucket-27200-lwx4cfvcue\"}, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"resource_type\": \"network_interface\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String createFlowLogCollectorPath = "/flow_log_collectors"; + String mockResponseBody = ""; + String removeVpnGatewayAdvertisedCidrPath = "/vpn_gateways/testString/advertised_cidrs/192.168.1.0%2F24"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName model - LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName legacyCloudObjectStorageBucketIdentityModel = new LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName.Builder() - .name("bucket-27200-lwx4cfvcue") + // Construct an instance of the RemoveVpnGatewayAdvertisedCidrOptions model + RemoveVpnGatewayAdvertisedCidrOptions removeVpnGatewayAdvertisedCidrOptionsModel = new RemoveVpnGatewayAdvertisedCidrOptions.Builder() + .vpnGatewayId("testString") + .cidr("192.168.1.0/24") .build(); - // Construct an instance of the FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById model - FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById flowLogCollectorTargetPrototypeModel = new FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById.Builder() - .id("0717-d54eb633-98ea-459d-aa00-6a8e780175a7") - .build(); + // Invoke removeVpnGatewayAdvertisedCidr() with a valid options model and verify the result + Response response = vpcService.removeVpnGatewayAdvertisedCidr(removeVpnGatewayAdvertisedCidrOptionsModel).execute(); + assertNotNull(response); + Void responseObj = response.getResult(); + assertNull(responseObj); - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "DELETE"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, removeVpnGatewayAdvertisedCidrPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } - // Construct an instance of the CreateFlowLogCollectorOptions model - CreateFlowLogCollectorOptions createFlowLogCollectorOptionsModel = new CreateFlowLogCollectorOptions.Builder() - .storageBucket(legacyCloudObjectStorageBucketIdentityModel) - .target(flowLogCollectorTargetPrototypeModel) - .active(false) - .name("my-flow-log-collector") - .resourceGroup(resourceGroupIdentityModel) + // Test the removeVpnGatewayAdvertisedCidr operation with and without retries enabled + @Test + public void testRemoveVpnGatewayAdvertisedCidrWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testRemoveVpnGatewayAdvertisedCidrWOptions(); + + vpcService.disableRetries(); + testRemoveVpnGatewayAdvertisedCidrWOptions(); + } + + // Test the removeVpnGatewayAdvertisedCidr operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testRemoveVpnGatewayAdvertisedCidrNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.removeVpnGatewayAdvertisedCidr(null).execute(); + } + + // Test the removeVpnGatewayConnectionsLocalCidr operation with a valid options model parameter + @Test + public void testRemoveVpnGatewayConnectionsLocalCidrWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = ""; + String removeVpnGatewayConnectionsLocalCidrPath = "/vpn_gateways/testString/connections/testString/local/cidrs/192.168.1.0%2F24"; + server.enqueue(new MockResponse() + .setResponseCode(204) + .setBody(mockResponseBody)); + + // Construct an instance of the RemoveVpnGatewayConnectionsLocalCidrOptions model + RemoveVpnGatewayConnectionsLocalCidrOptions removeVpnGatewayConnectionsLocalCidrOptionsModel = new RemoveVpnGatewayConnectionsLocalCidrOptions.Builder() + .vpnGatewayId("testString") + .id("testString") + .cidr("192.168.1.0/24") .build(); - // Invoke createFlowLogCollector() with a valid options model and verify the result - Response response = vpcService.createFlowLogCollector(createFlowLogCollectorOptionsModel).execute(); + // Invoke removeVpnGatewayConnectionsLocalCidr() with a valid options model and verify the result + Response response = vpcService.removeVpnGatewayConnectionsLocalCidr(removeVpnGatewayConnectionsLocalCidrOptionsModel).execute(); assertNotNull(response); - FlowLogCollector responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createFlowLogCollectorPath); + assertEquals(parsedPath, removeVpnGatewayConnectionsLocalCidrPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createFlowLogCollector operation with and without retries enabled + // Test the removeVpnGatewayConnectionsLocalCidr operation with and without retries enabled @Test - public void testCreateFlowLogCollectorWRetries() throws Throwable { + public void testRemoveVpnGatewayConnectionsLocalCidrWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreateFlowLogCollectorWOptions(); + testRemoveVpnGatewayConnectionsLocalCidrWOptions(); vpcService.disableRetries(); - testCreateFlowLogCollectorWOptions(); + testRemoveVpnGatewayConnectionsLocalCidrWOptions(); } - // Test the createFlowLogCollector operation with a null options model (negative test) + // Test the removeVpnGatewayConnectionsLocalCidr operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreateFlowLogCollectorNoOptions() throws Throwable { + public void testRemoveVpnGatewayConnectionsLocalCidrNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createFlowLogCollector(null).execute(); + vpcService.removeVpnGatewayConnectionsLocalCidr(null).execute(); } - // Test the deleteFlowLogCollector operation with a valid options model parameter + // Test the removeVpnGatewayConnectionsPeerCidr operation with a valid options model parameter @Test - public void testDeleteFlowLogCollectorWOptions() throws Throwable { + public void testRemoveVpnGatewayConnectionsPeerCidrWOptions() throws Throwable { // Register a mock response String mockResponseBody = ""; - String deleteFlowLogCollectorPath = "/flow_log_collectors/testString"; + String removeVpnGatewayConnectionsPeerCidrPath = "/vpn_gateways/testString/connections/testString/peer/cidrs/192.168.1.0%2F24"; server.enqueue(new MockResponse() .setResponseCode(204) .setBody(mockResponseBody)); - // Construct an instance of the DeleteFlowLogCollectorOptions model - DeleteFlowLogCollectorOptions deleteFlowLogCollectorOptionsModel = new DeleteFlowLogCollectorOptions.Builder() + // Construct an instance of the RemoveVpnGatewayConnectionsPeerCidrOptions model + RemoveVpnGatewayConnectionsPeerCidrOptions removeVpnGatewayConnectionsPeerCidrOptionsModel = new RemoveVpnGatewayConnectionsPeerCidrOptions.Builder() + .vpnGatewayId("testString") .id("testString") + .cidr("192.168.1.0/24") .build(); - // Invoke deleteFlowLogCollector() with a valid options model and verify the result - Response response = vpcService.deleteFlowLogCollector(deleteFlowLogCollectorOptionsModel).execute(); + // Invoke removeVpnGatewayConnectionsPeerCidr() with a valid options model and verify the result + Response response = vpcService.removeVpnGatewayConnectionsPeerCidr(removeVpnGatewayConnectionsPeerCidrOptionsModel).execute(); assertNotNull(response); Void responseObj = response.getResult(); assertNull(responseObj); @@ -32617,112 +33564,127 @@ public void testDeleteFlowLogCollectorWOptions() throws Throwable { assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deleteFlowLogCollectorPath); + assertEquals(parsedPath, removeVpnGatewayConnectionsPeerCidrPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deleteFlowLogCollector operation with and without retries enabled + // Test the removeVpnGatewayConnectionsPeerCidr operation with and without retries enabled @Test - public void testDeleteFlowLogCollectorWRetries() throws Throwable { + public void testRemoveVpnGatewayConnectionsPeerCidrWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeleteFlowLogCollectorWOptions(); + testRemoveVpnGatewayConnectionsPeerCidrWOptions(); vpcService.disableRetries(); - testDeleteFlowLogCollectorWOptions(); + testRemoveVpnGatewayConnectionsPeerCidrWOptions(); } - // Test the deleteFlowLogCollector operation with a null options model (negative test) + // Test the removeVpnGatewayConnectionsPeerCidr operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeleteFlowLogCollectorNoOptions() throws Throwable { + public void testRemoveVpnGatewayConnectionsPeerCidrNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deleteFlowLogCollector(null).execute(); + vpcService.removeVpnGatewayConnectionsPeerCidr(null).execute(); } - // Test the getFlowLogCollector operation with a valid options model parameter + // Test the updateIkePolicy operation with a valid options model parameter @Test - public void testGetFlowLogCollectorWOptions() throws Throwable { + public void testUpdateIkePolicyWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"active\": true, \"auto_delete\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\", \"id\": \"r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\", \"lifecycle_state\": \"stable\", \"name\": \"my-flow-log-collector\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"storage_bucket\": {\"name\": \"bucket-27200-lwx4cfvcue\"}, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"resource_type\": \"network_interface\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String getFlowLogCollectorPath = "/flow_log_collectors/testString"; + String mockResponseBody = "{\"authentication_algorithm\": \"md5\", \"connections\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"name\": \"my-vpn-gateway-connection\", \"resource_type\": \"vpn_gateway_connection\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"dh_group\": 14, \"encryption_algorithm\": \"aes128\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"id\": \"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"ike_version\": 1, \"key_lifetime\": 28800, \"name\": \"my-ike-policy\", \"negotiation_mode\": \"main\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"ike_policy\"}"; + String updateIkePolicyPath = "/ike_policies/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetFlowLogCollectorOptions model - GetFlowLogCollectorOptions getFlowLogCollectorOptionsModel = new GetFlowLogCollectorOptions.Builder() + // Construct an instance of the IKEPolicyPatch model + IKEPolicyPatch ikePolicyPatchModel = new IKEPolicyPatch.Builder() + .authenticationAlgorithm("sha256") + .dhGroup(Long.valueOf("14")) + .encryptionAlgorithm("aes128") + .ikeVersion(Long.valueOf("1")) + .keyLifetime(Long.valueOf("86400")) + .name("my-ike-policy") + .build(); + Map ikePolicyPatchModelAsPatch = ikePolicyPatchModel.asPatch(); + + // Construct an instance of the UpdateIkePolicyOptions model + UpdateIkePolicyOptions updateIkePolicyOptionsModel = new UpdateIkePolicyOptions.Builder() .id("testString") + .ikePolicyPatch(ikePolicyPatchModelAsPatch) .build(); - // Invoke getFlowLogCollector() with a valid options model and verify the result - Response response = vpcService.getFlowLogCollector(getFlowLogCollectorOptionsModel).execute(); + // Invoke updateIkePolicy() with a valid options model and verify the result + Response response = vpcService.updateIkePolicy(updateIkePolicyOptionsModel).execute(); assertNotNull(response); - FlowLogCollector responseObj = response.getResult(); + IKEPolicy responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getFlowLogCollectorPath); + assertEquals(parsedPath, updateIkePolicyPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getFlowLogCollector operation with and without retries enabled + // Test the updateIkePolicy operation with and without retries enabled @Test - public void testGetFlowLogCollectorWRetries() throws Throwable { + public void testUpdateIkePolicyWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetFlowLogCollectorWOptions(); + testUpdateIkePolicyWOptions(); vpcService.disableRetries(); - testGetFlowLogCollectorWOptions(); + testUpdateIkePolicyWOptions(); } - // Test the getFlowLogCollector operation with a null options model (negative test) + // Test the updateIkePolicy operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetFlowLogCollectorNoOptions() throws Throwable { + public void testUpdateIkePolicyNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getFlowLogCollector(null).execute(); + vpcService.updateIkePolicy(null).execute(); } - // Test the updateFlowLogCollector operation with a valid options model parameter + // Test the updateIpsecPolicy operation with a valid options model parameter @Test - public void testUpdateFlowLogCollectorWOptions() throws Throwable { + public void testUpdateIpsecPolicyWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"active\": true, \"auto_delete\": true, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\", \"id\": \"r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80\", \"lifecycle_state\": \"stable\", \"name\": \"my-flow-log-collector\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"storage_bucket\": {\"name\": \"bucket-27200-lwx4cfvcue\"}, \"target\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"id\": \"0717-d54eb633-98ea-459d-aa00-6a8e780175a7\", \"name\": \"my-instance-network-interface\", \"resource_type\": \"network_interface\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; - String updateFlowLogCollectorPath = "/flow_log_collectors/testString"; + String mockResponseBody = "{\"authentication_algorithm\": \"disabled\", \"connections\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"name\": \"my-vpn-gateway-connection\", \"resource_type\": \"vpn_gateway_connection\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"encapsulation_mode\": \"tunnel\", \"encryption_algorithm\": \"aes128\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"id\": \"r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"key_lifetime\": 3600, \"name\": \"my-ipsec-policy\", \"pfs\": \"disabled\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"ipsec_policy\", \"transform_protocol\": \"esp\"}"; + String updateIpsecPolicyPath = "/ipsec_policies/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the FlowLogCollectorPatch model - FlowLogCollectorPatch flowLogCollectorPatchModel = new FlowLogCollectorPatch.Builder() - .active(false) - .name("my-flow-log-collector") + // Construct an instance of the IPsecPolicyPatch model + IPsecPolicyPatch iPsecPolicyPatchModel = new IPsecPolicyPatch.Builder() + .authenticationAlgorithm("disabled") + .encryptionAlgorithm("aes128") + .keyLifetime(Long.valueOf("3600")) + .name("my-ipsec-policy") + .pfs("disabled") .build(); - Map flowLogCollectorPatchModelAsPatch = flowLogCollectorPatchModel.asPatch(); + Map iPsecPolicyPatchModelAsPatch = iPsecPolicyPatchModel.asPatch(); - // Construct an instance of the UpdateFlowLogCollectorOptions model - UpdateFlowLogCollectorOptions updateFlowLogCollectorOptionsModel = new UpdateFlowLogCollectorOptions.Builder() + // Construct an instance of the UpdateIpsecPolicyOptions model + UpdateIpsecPolicyOptions updateIpsecPolicyOptionsModel = new UpdateIpsecPolicyOptions.Builder() .id("testString") - .flowLogCollectorPatch(flowLogCollectorPatchModelAsPatch) + .iPsecPolicyPatch(iPsecPolicyPatchModelAsPatch) .build(); - // Invoke updateFlowLogCollector() with a valid options model and verify the result - Response response = vpcService.updateFlowLogCollector(updateFlowLogCollectorOptionsModel).execute(); + // Invoke updateIpsecPolicy() with a valid options model and verify the result + Response response = vpcService.updateIpsecPolicy(updateIpsecPolicyOptionsModel).execute(); assertNotNull(response); - FlowLogCollector responseObj = response.getResult(); + IPsecPolicy responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -32731,181 +33693,320 @@ public void testUpdateFlowLogCollectorWOptions() throws Throwable { assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updateFlowLogCollectorPath); + assertEquals(parsedPath, updateIpsecPolicyPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updateFlowLogCollector operation with and without retries enabled + // Test the updateIpsecPolicy operation with and without retries enabled @Test - public void testUpdateFlowLogCollectorWRetries() throws Throwable { + public void testUpdateIpsecPolicyWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdateFlowLogCollectorWOptions(); + testUpdateIpsecPolicyWOptions(); vpcService.disableRetries(); - testUpdateFlowLogCollectorWOptions(); + testUpdateIpsecPolicyWOptions(); } - // Test the updateFlowLogCollector operation with a null options model (negative test) + // Test the updateIpsecPolicy operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdateFlowLogCollectorNoOptions() throws Throwable { + public void testUpdateIpsecPolicyNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updateFlowLogCollector(null).execute(); + vpcService.updateIpsecPolicy(null).execute(); } - // Test the listPrivatePathServiceGateways operation with a valid options model parameter + // Test the updateVpnGateway operation with a valid options model parameter @Test - public void testListPrivatePathServiceGatewaysWOptions() throws Throwable { + public void testUpdateVpnGatewayWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"private_path_service_gateways\": [{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"default_access_policy\": \"deny\", \"endpoint_gateway_binding_auto_delete\": true, \"endpoint_gateway_binding_auto_delete_timeout\": 1, \"endpoint_gateway_count\": 0, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"id\": \"r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"lifecycle_state\": \"stable\", \"load_balancer\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"id\": \"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"name\": \"my-load-balancer\", \"resource_type\": \"load_balancer\"}, \"name\": \"my-private-path-service-gateway\", \"published\": false, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"private_path_service_gateway\", \"service_endpoints\": [\"*.example.com\"], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zonal_affinity\": false}], \"total_count\": 132}"; - String listPrivatePathServiceGatewaysPath = "/private_path_service_gateways"; + String mockResponseBody = "{\"connections\": [{\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"name\": \"my-vpn-gateway-connection\", \"resource_type\": \"vpn_gateway_connection\"}], \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"health_reasons\": [{\"code\": \"cannot_reserve_ip_address\", \"message\": \"IP address exhaustion (release addresses on the VPN's subnet).\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"id\": \"0717-ddf51bec-3424-11e8-b467-0ed5f89f718b\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"members\": [{\"health_reasons\": [{\"code\": \"cannot_reserve_ip_address\", \"message\": \"IP address exhaustion (release addresses on the VPN's subnet).\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health\"}], \"health_state\": \"ok\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"private_ip\": {\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}, \"public_ip\": {\"address\": \"192.168.3.4\"}, \"role\": \"active\"}], \"name\": \"my-vpn-gateway\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"vpn_gateway\", \"subnet\": {\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}, \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"mode\": \"policy\"}"; + String updateVpnGatewayPath = "/vpn_gateways/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListPrivatePathServiceGatewaysOptions model - ListPrivatePathServiceGatewaysOptions listPrivatePathServiceGatewaysOptionsModel = new ListPrivatePathServiceGatewaysOptions.Builder() - .start("testString") - .limit(Long.valueOf("10")) - .resourceGroupId("testString") + // Construct an instance of the VPNGatewayPatch model + VPNGatewayPatch vpnGatewayPatchModel = new VPNGatewayPatch.Builder() + .localAsn(Long.valueOf("64520")) + .name("my-vpn-gateway-updated") .build(); + Map vpnGatewayPatchModelAsPatch = vpnGatewayPatchModel.asPatch(); - // Invoke listPrivatePathServiceGateways() with a valid options model and verify the result - Response response = vpcService.listPrivatePathServiceGateways(listPrivatePathServiceGatewaysOptionsModel).execute(); + // Construct an instance of the UpdateVpnGatewayOptions model + UpdateVpnGatewayOptions updateVpnGatewayOptionsModel = new UpdateVpnGatewayOptions.Builder() + .id("testString") + .vpnGatewayPatch(vpnGatewayPatchModelAsPatch) + .build(); + + // Invoke updateVpnGateway() with a valid options model and verify the result + Response response = vpcService.updateVpnGateway(updateVpnGatewayOptionsModel).execute(); assertNotNull(response); - PrivatePathServiceGatewayCollection responseObj = response.getResult(); + VPNGateway responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listPrivatePathServiceGatewaysPath); + assertEquals(parsedPath, updateVpnGatewayPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("resource_group.id"), "testString"); } - // Test the listPrivatePathServiceGateways operation with and without retries enabled + // Test the updateVpnGateway operation with and without retries enabled @Test - public void testListPrivatePathServiceGatewaysWRetries() throws Throwable { + public void testUpdateVpnGatewayWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListPrivatePathServiceGatewaysWOptions(); + testUpdateVpnGatewayWOptions(); vpcService.disableRetries(); - testListPrivatePathServiceGatewaysWOptions(); + testUpdateVpnGatewayWOptions(); } - // Test the listPrivatePathServiceGateways operation using the PrivatePathServiceGatewaysPager.getNext() method + // Test the updateVpnGateway operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testUpdateVpnGatewayNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.updateVpnGateway(null).execute(); + } + + // Test the updateVpnGatewayConnection operation with a valid options model parameter @Test - public void testListPrivatePathServiceGatewaysWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"private_path_service_gateways\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"default_access_policy\":\"deny\",\"endpoint_gateway_binding_auto_delete\":true,\"endpoint_gateway_binding_auto_delete_timeout\":1,\"endpoint_gateway_count\":0,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"id\":\"r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"lifecycle_state\":\"stable\",\"load_balancer\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"id\":\"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"name\":\"my-load-balancer\",\"resource_type\":\"load_balancer\"},\"name\":\"my-private-path-service-gateway\",\"published\":false,\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"private_path_service_gateway\",\"service_endpoints\":[\"*.example.com\"],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zonal_affinity\":false}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"private_path_service_gateways\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"default_access_policy\":\"deny\",\"endpoint_gateway_binding_auto_delete\":true,\"endpoint_gateway_binding_auto_delete_timeout\":1,\"endpoint_gateway_count\":0,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"id\":\"r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"lifecycle_state\":\"stable\",\"load_balancer\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"id\":\"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"name\":\"my-load-balancer\",\"resource_type\":\"load_balancer\"},\"name\":\"my-private-path-service-gateway\",\"published\":false,\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"private_path_service_gateway\",\"service_endpoints\":[\"*.example.com\"],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zonal_affinity\":false}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); + public void testUpdateVpnGatewayConnectionWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"admin_state_up\": true, \"authentication_mode\": \"psk\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"dead_peer_detection\": {\"action\": \"restart\", \"interval\": 30, \"timeout\": 120}, \"establish_mode\": \"bidirectional\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0717-ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"id\": \"0717-52f69dc3-6a5c-4bcf-b264-e7fae279b15c\", \"ike_policy\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"id\": \"r006-e98f46a3-1e4e-4195-b4e5-b8155192689d\", \"name\": \"my-ike-policy\", \"resource_type\": \"ike_policy\"}, \"ipsec_policy\": {\"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"id\": \"r006-51eae621-dbbc-4c47-b623-b57a43c19876\", \"name\": \"my-ipsec-policy\", \"resource_type\": \"ipsec_policy\"}, \"mode\": \"policy\", \"name\": \"my-vpn-gateway-connection\", \"psk\": \"lkj14b1oi0alcniejkso\", \"resource_type\": \"vpn_gateway_connection\", \"status\": \"down\", \"status_reasons\": [{\"code\": \"cannot_authenticate_connection\", \"message\": \"Failed to authenticate a connection because of mismatched IKE ID and PSK.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}], \"distribute_traffic\": false, \"local\": {\"ike_identities\": [{\"type\": \"fqdn\", \"value\": \"my-service.example.com\"}]}, \"peer\": {\"ike_identity\": {\"type\": \"fqdn\", \"value\": \"my-service.example.com\"}, \"type\": \"address\", \"address\": \"192.0.2.5\"}, \"routing_protocol\": \"none\", \"tunnels\": [{\"public_ip\": {\"address\": \"192.168.3.4\"}, \"status\": \"down\", \"status_reasons\": [{\"code\": \"cannot_authenticate_connection\", \"message\": \"Failed to authenticate a connection because of mismatched IKE ID and PSK.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health\"}]}]}"; + String updateVpnGatewayConnectionPath = "/vpn_gateways/testString/connections/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); + .setBody(mockResponseBody)); - ListPrivatePathServiceGatewaysOptions listPrivatePathServiceGatewaysOptions = new ListPrivatePathServiceGatewaysOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") + // Construct an instance of the VPNGatewayConnectionDPDPatch model + VPNGatewayConnectionDPDPatch vpnGatewayConnectionDpdPatchModel = new VPNGatewayConnectionDPDPatch.Builder() + .action("restart") + .interval(Long.valueOf("30")) + .timeout(Long.valueOf("120")) .build(); - List allResults = new ArrayList<>(); - PrivatePathServiceGatewaysPager pager = new PrivatePathServiceGatewaysPager(vpcService, listPrivatePathServiceGatewaysOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + // Construct an instance of the VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById model + VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById vpnGatewayConnectionIkePolicyPatchModel = new VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById.Builder() + .id("r006-e98f46a3-1e4e-4195-b4e5-b8155192689d") + .build(); + + // Construct an instance of the VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById model + VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById vpnGatewayConnectionIPsecPolicyPatchModel = new VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById.Builder() + .id("r006-51eae621-dbbc-4c47-b623-b57a43c19876") + .build(); + + // Construct an instance of the VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch model + VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch vpnGatewayConnectionPeerPatchModel = new VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch.Builder() + .address("192.0.2.5") + .build(); + + // Construct an instance of the IP model + IP ipModel = new IP.Builder() + .address("169.254.0.2") + .build(); + + // Construct an instance of the VPNGatewayConnectionTunnel model + VPNGatewayConnectionTunnel vpnGatewayConnectionTunnelModel = new VPNGatewayConnectionTunnel.Builder() + .neighborIp(ipModel) + .tunnelInterfaceIp(ipModel) + .build(); + + // Construct an instance of the VPNGatewayConnectionPatch model + VPNGatewayConnectionPatch vpnGatewayConnectionPatchModel = new VPNGatewayConnectionPatch.Builder() + .adminStateUp(true) + .deadPeerDetection(vpnGatewayConnectionDpdPatchModel) + .distributeTraffic(true) + .establishMode("bidirectional") + .ikePolicy(vpnGatewayConnectionIkePolicyPatchModel) + .ipsecPolicy(vpnGatewayConnectionIPsecPolicyPatchModel) + .name("my-vpn-gateway-connection") + .peer(vpnGatewayConnectionPeerPatchModel) + .psk("lkj14b1oi0alcniejkso") + .routingProtocol("bgp") + .tunnels(java.util.Arrays.asList(vpnGatewayConnectionTunnelModel)) + .build(); + Map vpnGatewayConnectionPatchModelAsPatch = vpnGatewayConnectionPatchModel.asPatch(); + + // Construct an instance of the UpdateVpnGatewayConnectionOptions model + UpdateVpnGatewayConnectionOptions updateVpnGatewayConnectionOptionsModel = new UpdateVpnGatewayConnectionOptions.Builder() + .vpnGatewayId("testString") + .id("testString") + .vpnGatewayConnectionPatch(vpnGatewayConnectionPatchModelAsPatch) + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") + .build(); + + // Invoke updateVpnGatewayConnection() with a valid options model and verify the result + Response response = vpcService.updateVpnGatewayConnection(updateVpnGatewayConnectionOptionsModel).execute(); + assertNotNull(response); + VPNGatewayConnection responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "PATCH"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, updateVpnGatewayConnectionPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - - // Test the listPrivatePathServiceGateways operation using the PrivatePathServiceGatewaysPager.getAll() method + + // Test the updateVpnGatewayConnection operation with and without retries enabled @Test - public void testListPrivatePathServiceGatewaysWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"private_path_service_gateways\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"default_access_policy\":\"deny\",\"endpoint_gateway_binding_auto_delete\":true,\"endpoint_gateway_binding_auto_delete_timeout\":1,\"endpoint_gateway_count\":0,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"id\":\"r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"lifecycle_state\":\"stable\",\"load_balancer\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"id\":\"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"name\":\"my-load-balancer\",\"resource_type\":\"load_balancer\"},\"name\":\"my-private-path-service-gateway\",\"published\":false,\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"private_path_service_gateway\",\"service_endpoints\":[\"*.example.com\"],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zonal_affinity\":false}],\"total_count\":2,\"limit\":1}"; - String mockResponsePage2 = "{\"private_path_service_gateways\":[{\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"default_access_policy\":\"deny\",\"endpoint_gateway_binding_auto_delete\":true,\"endpoint_gateway_binding_auto_delete_timeout\":1,\"endpoint_gateway_count\":0,\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"id\":\"r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"lifecycle_state\":\"stable\",\"load_balancer\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"id\":\"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\",\"name\":\"my-load-balancer\",\"resource_type\":\"load_balancer\"},\"name\":\"my-private-path-service-gateway\",\"published\":false,\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"private_path_service_gateway\",\"service_endpoints\":[\"*.example.com\"],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"},\"zonal_affinity\":false}],\"total_count\":2,\"limit\":1}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); + public void testUpdateVpnGatewayConnectionWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testUpdateVpnGatewayConnectionWOptions(); + + vpcService.disableRetries(); + testUpdateVpnGatewayConnectionWOptions(); + } + + // Test the updateVpnGatewayConnection operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testUpdateVpnGatewayConnectionNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.updateVpnGatewayConnection(null).execute(); + } + + // Test the createVpnServer operation with a valid options model parameter + @Test + public void testCreateVpnServerWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"certificate\": {\"crn\": \"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5\"}, \"client_authentication\": [{\"method\": \"certificate\", \"identity_provider\": {\"provider_type\": \"iam\"}}], \"client_auto_delete\": true, \"client_auto_delete_timeout\": 1, \"client_dns_server_ips\": [{\"address\": \"192.168.3.4\"}], \"client_idle_timeout\": 600, \"client_ip_pool\": \"172.16.0.0/16\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\", \"enable_split_tunneling\": true, \"health_reasons\": [{\"code\": \"cannot_access_server_certificate\", \"message\": \"Failed to get VPN server's server certificate from Secrets Manager.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health\"}], \"health_state\": \"ok\", \"hostname\": \"a8506291.us-south.vpn-server.appdomain.cloud\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\", \"id\": \"r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-vpn-server\", \"port\": 443, \"private_ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"protocol\": \"tcp\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"vpn_server\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String createVpnServerPath = "/vpn_servers"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); + .setResponseCode(201) + .setBody(mockResponseBody)); + + // Construct an instance of the CertificateInstanceIdentityByCRN model + CertificateInstanceIdentityByCRN certificateInstanceIdentityModel = new CertificateInstanceIdentityByCRN.Builder() + .crn("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + .build(); + + // Construct an instance of the VPNServerAuthenticationByUsernameIdProviderByIAM model + VPNServerAuthenticationByUsernameIdProviderByIAM vpnServerAuthenticationByUsernameIdProviderModel = new VPNServerAuthenticationByUsernameIdProviderByIAM.Builder() + .providerType("iam") + .build(); + + // Construct an instance of the VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype model + VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype vpnServerAuthenticationPrototypeModel = new VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype.Builder() + .method("username") + .identityProvider(vpnServerAuthenticationByUsernameIdProviderModel) + .build(); + + // Construct an instance of the SubnetIdentityById model + SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() + .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + .build(); + + // Construct an instance of the IP model + IP ipModel = new IP.Builder() + .address("192.168.3.4") + .build(); + + // Construct an instance of the ResourceGroupIdentityById model + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() + .id("fee82deba12e4c0fb69c3b09d1f12345") + .build(); + + // Construct an instance of the SecurityGroupIdentityById model + SecurityGroupIdentityById securityGroupIdentityModel = new SecurityGroupIdentityById.Builder() + .id("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + .build(); + + // Construct an instance of the CreateVpnServerOptions model + CreateVpnServerOptions createVpnServerOptionsModel = new CreateVpnServerOptions.Builder() + .certificate(certificateInstanceIdentityModel) + .clientAuthentication(java.util.Arrays.asList(vpnServerAuthenticationPrototypeModel)) + .clientIpPool("172.16.0.0/16") + .subnets(java.util.Arrays.asList(subnetIdentityModel)) + .clientDnsServerIps(java.util.Arrays.asList(ipModel)) + .clientIdleTimeout(Long.valueOf("600")) + .enableSplitTunneling(false) + .name("my-vpn-server") + .port(Long.valueOf("443")) + .protocol("udp") + .resourceGroup(resourceGroupIdentityModel) + .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) + .build(); + + // Invoke createVpnServer() with a valid options model and verify the result + Response response = vpcService.createVpnServer(createVpnServerOptionsModel).execute(); + assertNotNull(response); + VPNServer responseObj = response.getResult(); + assertNotNull(responseObj); + + // Verify the contents of the request sent to the mock server + RecordedRequest request = server.takeRequest(); + assertNotNull(request); + assertEquals(request.getMethod(), "POST"); + // Verify request path + String parsedPath = TestUtilities.parseReqPath(request); + assertEquals(parsedPath, createVpnServerPath); + // Verify query params + Map query = TestUtilities.parseQueryString(request); + assertNotNull(query); + assertEquals(query.get("version"), "2024-06-23"); + assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + } - ListPrivatePathServiceGatewaysOptions listPrivatePathServiceGatewaysOptions = new ListPrivatePathServiceGatewaysOptions.Builder() - .limit(Long.valueOf("10")) - .resourceGroupId("testString") - .build(); + // Test the createVpnServer operation with and without retries enabled + @Test + public void testCreateVpnServerWRetries() throws Throwable { + vpcService.enableRetries(4, 30); + testCreateVpnServerWOptions(); - PrivatePathServiceGatewaysPager pager = new PrivatePathServiceGatewaysPager(vpcService, listPrivatePathServiceGatewaysOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); + vpcService.disableRetries(); + testCreateVpnServerWOptions(); } - - // Test the createPrivatePathServiceGateway operation with a valid options model parameter + + // Test the createVpnServer operation with a null options model (negative test) + @Test(expectedExceptions = IllegalArgumentException.class) + public void testCreateVpnServerNoOptions() throws Throwable { + server.enqueue(new MockResponse()); + vpcService.createVpnServer(null).execute(); + } + + // Test the createVpnServerRoute operation with a valid options model parameter @Test - public void testCreatePrivatePathServiceGatewayWOptions() throws Throwable { + public void testCreateVpnServerRouteWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"default_access_policy\": \"deny\", \"endpoint_gateway_binding_auto_delete\": true, \"endpoint_gateway_binding_auto_delete_timeout\": 1, \"endpoint_gateway_count\": 0, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"id\": \"r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"lifecycle_state\": \"stable\", \"load_balancer\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"id\": \"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"name\": \"my-load-balancer\", \"resource_type\": \"load_balancer\"}, \"name\": \"my-private-path-service-gateway\", \"published\": false, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"private_path_service_gateway\", \"service_endpoints\": [\"*.example.com\"], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zonal_affinity\": false}"; - String createPrivatePathServiceGatewayPath = "/private_path_service_gateways"; + String mockResponseBody = "{\"action\": \"deliver\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"health_reasons\": [{\"code\": \"internal_error\", \"message\": \"Internal error (contact IBM support).\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"id\": \"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-vpn-route-1\", \"resource_type\": \"vpn_server_route\"}"; + String createVpnServerRoutePath = "/vpn_servers/testString/routes"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(201) .setBody(mockResponseBody)); - // Construct an instance of the LoadBalancerIdentityById model - LoadBalancerIdentityById loadBalancerIdentityModel = new LoadBalancerIdentityById.Builder() - .id("r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727") - .build(); - - // Construct an instance of the ResourceGroupIdentityById model - ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() - .id("fee82deba12e4c0fb69c3b09d1f12345") - .build(); - - // Construct an instance of the CreatePrivatePathServiceGatewayOptions model - CreatePrivatePathServiceGatewayOptions createPrivatePathServiceGatewayOptionsModel = new CreatePrivatePathServiceGatewayOptions.Builder() - .loadBalancer(loadBalancerIdentityModel) - .serviceEndpoints(java.util.Arrays.asList("*.example.com")) - .defaultAccessPolicy("deny") - .name("my-private-path-service-gateway") - .resourceGroup(resourceGroupIdentityModel) - .zonalAffinity(false) + // Construct an instance of the CreateVpnServerRouteOptions model + CreateVpnServerRouteOptions createVpnServerRouteOptionsModel = new CreateVpnServerRouteOptions.Builder() + .vpnServerId("testString") + .destination("172.16.0.0/16") + .action("deliver") + .name("my-vpn-route-2") .build(); - // Invoke createPrivatePathServiceGateway() with a valid options model and verify the result - Response response = vpcService.createPrivatePathServiceGateway(createPrivatePathServiceGatewayOptionsModel).execute(); + // Invoke createVpnServerRoute() with a valid options model and verify the result + Response response = vpcService.createVpnServerRoute(createVpnServerRouteOptionsModel).execute(); assertNotNull(response); - PrivatePathServiceGateway responseObj = response.getResult(); + VPNServerRoute responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -32914,48 +34015,49 @@ public void testCreatePrivatePathServiceGatewayWOptions() throws Throwable { assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createPrivatePathServiceGatewayPath); + assertEquals(parsedPath, createVpnServerRoutePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createPrivatePathServiceGateway operation with and without retries enabled + // Test the createVpnServerRoute operation with and without retries enabled @Test - public void testCreatePrivatePathServiceGatewayWRetries() throws Throwable { + public void testCreateVpnServerRouteWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreatePrivatePathServiceGatewayWOptions(); + testCreateVpnServerRouteWOptions(); vpcService.disableRetries(); - testCreatePrivatePathServiceGatewayWOptions(); + testCreateVpnServerRouteWOptions(); } - // Test the createPrivatePathServiceGateway operation with a null options model (negative test) + // Test the createVpnServerRoute operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreatePrivatePathServiceGatewayNoOptions() throws Throwable { + public void testCreateVpnServerRouteNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createPrivatePathServiceGateway(null).execute(); + vpcService.createVpnServerRoute(null).execute(); } - // Test the deletePrivatePathServiceGateway operation with a valid options model parameter + // Test the deleteVpnServer operation with a valid options model parameter @Test - public void testDeletePrivatePathServiceGatewayWOptions() throws Throwable { + public void testDeleteVpnServerWOptions() throws Throwable { // Register a mock response String mockResponseBody = ""; - String deletePrivatePathServiceGatewayPath = "/private_path_service_gateways/testString"; + String deleteVpnServerPath = "/vpn_servers/testString"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the DeletePrivatePathServiceGatewayOptions model - DeletePrivatePathServiceGatewayOptions deletePrivatePathServiceGatewayOptionsModel = new DeletePrivatePathServiceGatewayOptions.Builder() + // Construct an instance of the DeleteVpnServerOptions model + DeleteVpnServerOptions deleteVpnServerOptionsModel = new DeleteVpnServerOptions.Builder() .id("testString") + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); - // Invoke deletePrivatePathServiceGateway() with a valid options model and verify the result - Response response = vpcService.deletePrivatePathServiceGateway(deletePrivatePathServiceGatewayOptionsModel).execute(); + // Invoke deleteVpnServer() with a valid options model and verify the result + Response response = vpcService.deleteVpnServer(deleteVpnServerOptionsModel).execute(); assertNotNull(response); Void responseObj = response.getResult(); assertNull(responseObj); @@ -32966,411 +34068,317 @@ public void testDeletePrivatePathServiceGatewayWOptions() throws Throwable { assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deletePrivatePathServiceGatewayPath); + assertEquals(parsedPath, deleteVpnServerPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deletePrivatePathServiceGateway operation with and without retries enabled + // Test the deleteVpnServer operation with and without retries enabled @Test - public void testDeletePrivatePathServiceGatewayWRetries() throws Throwable { + public void testDeleteVpnServerWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeletePrivatePathServiceGatewayWOptions(); + testDeleteVpnServerWOptions(); vpcService.disableRetries(); - testDeletePrivatePathServiceGatewayWOptions(); + testDeleteVpnServerWOptions(); } - // Test the deletePrivatePathServiceGateway operation with a null options model (negative test) + // Test the deleteVpnServer operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeletePrivatePathServiceGatewayNoOptions() throws Throwable { + public void testDeleteVpnServerNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deletePrivatePathServiceGateway(null).execute(); + vpcService.deleteVpnServer(null).execute(); } - // Test the getPrivatePathServiceGateway operation with a valid options model parameter + // Test the deleteVpnServerClient operation with a valid options model parameter @Test - public void testGetPrivatePathServiceGatewayWOptions() throws Throwable { + public void testDeleteVpnServerClientWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"default_access_policy\": \"deny\", \"endpoint_gateway_binding_auto_delete\": true, \"endpoint_gateway_binding_auto_delete_timeout\": 1, \"endpoint_gateway_count\": 0, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"id\": \"r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"lifecycle_state\": \"stable\", \"load_balancer\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"id\": \"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"name\": \"my-load-balancer\", \"resource_type\": \"load_balancer\"}, \"name\": \"my-private-path-service-gateway\", \"published\": false, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"private_path_service_gateway\", \"service_endpoints\": [\"*.example.com\"], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zonal_affinity\": false}"; - String getPrivatePathServiceGatewayPath = "/private_path_service_gateways/testString"; + String mockResponseBody = ""; + String deleteVpnServerClientPath = "/vpn_servers/testString/clients/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the GetPrivatePathServiceGatewayOptions model - GetPrivatePathServiceGatewayOptions getPrivatePathServiceGatewayOptionsModel = new GetPrivatePathServiceGatewayOptions.Builder() + // Construct an instance of the DeleteVpnServerClientOptions model + DeleteVpnServerClientOptions deleteVpnServerClientOptionsModel = new DeleteVpnServerClientOptions.Builder() + .vpnServerId("testString") .id("testString") .build(); - // Invoke getPrivatePathServiceGateway() with a valid options model and verify the result - Response response = vpcService.getPrivatePathServiceGateway(getPrivatePathServiceGatewayOptionsModel).execute(); + // Invoke deleteVpnServerClient() with a valid options model and verify the result + Response response = vpcService.deleteVpnServerClient(deleteVpnServerClientOptionsModel).execute(); assertNotNull(response); - PrivatePathServiceGateway responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getPrivatePathServiceGatewayPath); + assertEquals(parsedPath, deleteVpnServerClientPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getPrivatePathServiceGateway operation with and without retries enabled + // Test the deleteVpnServerClient operation with and without retries enabled @Test - public void testGetPrivatePathServiceGatewayWRetries() throws Throwable { + public void testDeleteVpnServerClientWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetPrivatePathServiceGatewayWOptions(); + testDeleteVpnServerClientWOptions(); vpcService.disableRetries(); - testGetPrivatePathServiceGatewayWOptions(); + testDeleteVpnServerClientWOptions(); } - // Test the getPrivatePathServiceGateway operation with a null options model (negative test) + // Test the deleteVpnServerClient operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetPrivatePathServiceGatewayNoOptions() throws Throwable { + public void testDeleteVpnServerClientNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getPrivatePathServiceGateway(null).execute(); + vpcService.deleteVpnServerClient(null).execute(); } - // Test the updatePrivatePathServiceGateway operation with a valid options model parameter + // Test the deleteVpnServerRoute operation with a valid options model parameter @Test - public void testUpdatePrivatePathServiceGatewayWOptions() throws Throwable { + public void testDeleteVpnServerRouteWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"default_access_policy\": \"deny\", \"endpoint_gateway_binding_auto_delete\": true, \"endpoint_gateway_binding_auto_delete_timeout\": 1, \"endpoint_gateway_count\": 0, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"id\": \"r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"lifecycle_state\": \"stable\", \"load_balancer\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"id\": \"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727\", \"name\": \"my-load-balancer\", \"resource_type\": \"load_balancer\"}, \"name\": \"my-private-path-service-gateway\", \"published\": false, \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"private_path_service_gateway\", \"service_endpoints\": [\"*.example.com\"], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}, \"zonal_affinity\": false}"; - String updatePrivatePathServiceGatewayPath = "/private_path_service_gateways/testString"; + String mockResponseBody = ""; + String deleteVpnServerRoutePath = "/vpn_servers/testString/routes/testString"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the LoadBalancerIdentityById model - LoadBalancerIdentityById loadBalancerIdentityModel = new LoadBalancerIdentityById.Builder() - .id("r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727") - .build(); - - // Construct an instance of the PrivatePathServiceGatewayPatch model - PrivatePathServiceGatewayPatch privatePathServiceGatewayPatchModel = new PrivatePathServiceGatewayPatch.Builder() - .defaultAccessPolicy("deny") - .loadBalancer(loadBalancerIdentityModel) - .name("my-private-path-service-gateway") - .zonalAffinity(true) - .build(); - Map privatePathServiceGatewayPatchModelAsPatch = privatePathServiceGatewayPatchModel.asPatch(); - - // Construct an instance of the UpdatePrivatePathServiceGatewayOptions model - UpdatePrivatePathServiceGatewayOptions updatePrivatePathServiceGatewayOptionsModel = new UpdatePrivatePathServiceGatewayOptions.Builder() + // Construct an instance of the DeleteVpnServerRouteOptions model + DeleteVpnServerRouteOptions deleteVpnServerRouteOptionsModel = new DeleteVpnServerRouteOptions.Builder() + .vpnServerId("testString") .id("testString") - .privatePathServiceGatewayPatch(privatePathServiceGatewayPatchModelAsPatch) .build(); - // Invoke updatePrivatePathServiceGateway() with a valid options model and verify the result - Response response = vpcService.updatePrivatePathServiceGateway(updatePrivatePathServiceGatewayOptionsModel).execute(); + // Invoke deleteVpnServerRoute() with a valid options model and verify the result + Response response = vpcService.deleteVpnServerRoute(deleteVpnServerRouteOptionsModel).execute(); assertNotNull(response); - PrivatePathServiceGateway responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "DELETE"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updatePrivatePathServiceGatewayPath); + assertEquals(parsedPath, deleteVpnServerRoutePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updatePrivatePathServiceGateway operation with and without retries enabled + // Test the deleteVpnServerRoute operation with and without retries enabled @Test - public void testUpdatePrivatePathServiceGatewayWRetries() throws Throwable { + public void testDeleteVpnServerRouteWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdatePrivatePathServiceGatewayWOptions(); + testDeleteVpnServerRouteWOptions(); vpcService.disableRetries(); - testUpdatePrivatePathServiceGatewayWOptions(); + testDeleteVpnServerRouteWOptions(); } - // Test the updatePrivatePathServiceGateway operation with a null options model (negative test) + // Test the deleteVpnServerRoute operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdatePrivatePathServiceGatewayNoOptions() throws Throwable { + public void testDeleteVpnServerRouteNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updatePrivatePathServiceGateway(null).execute(); + vpcService.deleteVpnServerRoute(null).execute(); } - // Test the listPrivatePathServiceGatewayAccountPolicies operation with a valid options model parameter + // Test the disconnectVpnClient operation with a valid options model parameter @Test - public void testListPrivatePathServiceGatewayAccountPoliciesWOptions() throws Throwable { + public void testDisconnectVpnClientWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"account_policies\": [{\"access_policy\": \"deny\", \"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c\", \"id\": \"r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"resource_type\": \"private_path_service_gateway_account_policy\"}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listPrivatePathServiceGatewayAccountPoliciesPath = "/private_path_service_gateways/testString/account_policies"; + String mockResponseBody = ""; + String disconnectVpnClientPath = "/vpn_servers/testString/clients/testString/disconnect"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) + .setResponseCode(202) .setBody(mockResponseBody)); - // Construct an instance of the ListPrivatePathServiceGatewayAccountPoliciesOptions model - ListPrivatePathServiceGatewayAccountPoliciesOptions listPrivatePathServiceGatewayAccountPoliciesOptionsModel = new ListPrivatePathServiceGatewayAccountPoliciesOptions.Builder() - .privatePathServiceGatewayId("testString") - .start("testString") - .limit(Long.valueOf("10")) - .accountId("bb1b52262f7441a586f49068482f1e60") + // Construct an instance of the DisconnectVpnClientOptions model + DisconnectVpnClientOptions disconnectVpnClientOptionsModel = new DisconnectVpnClientOptions.Builder() + .vpnServerId("testString") + .id("testString") .build(); - // Invoke listPrivatePathServiceGatewayAccountPolicies() with a valid options model and verify the result - Response response = vpcService.listPrivatePathServiceGatewayAccountPolicies(listPrivatePathServiceGatewayAccountPoliciesOptionsModel).execute(); + // Invoke disconnectVpnClient() with a valid options model and verify the result + Response response = vpcService.disconnectVpnClient(disconnectVpnClientOptionsModel).execute(); assertNotNull(response); - PrivatePathServiceGatewayAccountPolicyCollection responseObj = response.getResult(); - assertNotNull(responseObj); + Void responseObj = response.getResult(); + assertNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "GET"); + assertEquals(request.getMethod(), "POST"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listPrivatePathServiceGatewayAccountPoliciesPath); + assertEquals(parsedPath, disconnectVpnClientPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); - assertEquals(query.get("start"), "testString"); - assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("account.id"), "bb1b52262f7441a586f49068482f1e60"); } - // Test the listPrivatePathServiceGatewayAccountPolicies operation with and without retries enabled + // Test the disconnectVpnClient operation with and without retries enabled @Test - public void testListPrivatePathServiceGatewayAccountPoliciesWRetries() throws Throwable { + public void testDisconnectVpnClientWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListPrivatePathServiceGatewayAccountPoliciesWOptions(); + testDisconnectVpnClientWOptions(); vpcService.disableRetries(); - testListPrivatePathServiceGatewayAccountPoliciesWOptions(); + testDisconnectVpnClientWOptions(); } - // Test the listPrivatePathServiceGatewayAccountPolicies operation with a null options model (negative test) + // Test the disconnectVpnClient operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListPrivatePathServiceGatewayAccountPoliciesNoOptions() throws Throwable { + public void testDisconnectVpnClientNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listPrivatePathServiceGatewayAccountPolicies(null).execute(); - } - - // Test the listPrivatePathServiceGatewayAccountPolicies operation using the PrivatePathServiceGatewayAccountPoliciesPager.getNext() method - @Test - public void testListPrivatePathServiceGatewayAccountPoliciesWithPagerGetNext() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"account_policies\":[{\"access_policy\":\"deny\",\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c\",\"id\":\"r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"resource_type\":\"private_path_service_gateway_account_policy\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"account_policies\":[{\"access_policy\":\"deny\",\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c\",\"id\":\"r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"resource_type\":\"private_path_service_gateway_account_policy\"}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListPrivatePathServiceGatewayAccountPoliciesOptions listPrivatePathServiceGatewayAccountPoliciesOptions = new ListPrivatePathServiceGatewayAccountPoliciesOptions.Builder() - .privatePathServiceGatewayId("testString") - .limit(Long.valueOf("10")) - .accountId("bb1b52262f7441a586f49068482f1e60") - .build(); - - List allResults = new ArrayList<>(); - PrivatePathServiceGatewayAccountPoliciesPager pager = new PrivatePathServiceGatewayAccountPoliciesPager(vpcService, listPrivatePathServiceGatewayAccountPoliciesOptions); - while (pager.hasNext()) { - List nextPage = pager.getNext(); - assertNotNull(nextPage); - allResults.addAll(nextPage); - } - assertEquals(allResults.size(), 2); + vpcService.disconnectVpnClient(null).execute(); } - - // Test the listPrivatePathServiceGatewayAccountPolicies operation using the PrivatePathServiceGatewayAccountPoliciesPager.getAll() method - @Test - public void testListPrivatePathServiceGatewayAccountPoliciesWithPagerGetAll() throws Throwable { - // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"account_policies\":[{\"access_policy\":\"deny\",\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c\",\"id\":\"r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"resource_type\":\"private_path_service_gateway_account_policy\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"account_policies\":[{\"access_policy\":\"deny\",\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c\",\"id\":\"r006-7268d425-59b7-48fd-9735-81a7271657d5\",\"resource_type\":\"private_path_service_gateway_account_policy\"}]}"; - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage1)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(200) - .setBody(mockResponsePage2)); - server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") - .setResponseCode(400) - .setBody("{\"message\": \"No more results available!\"}")); - - ListPrivatePathServiceGatewayAccountPoliciesOptions listPrivatePathServiceGatewayAccountPoliciesOptions = new ListPrivatePathServiceGatewayAccountPoliciesOptions.Builder() - .privatePathServiceGatewayId("testString") - .limit(Long.valueOf("10")) - .accountId("bb1b52262f7441a586f49068482f1e60") - .build(); - PrivatePathServiceGatewayAccountPoliciesPager pager = new PrivatePathServiceGatewayAccountPoliciesPager(vpcService, listPrivatePathServiceGatewayAccountPoliciesOptions); - List allResults = pager.getAll(); - assertNotNull(allResults); - assertEquals(allResults.size(), 2); - } - - // Test the createPrivatePathServiceGatewayAccountPolicy operation with a valid options model parameter + // Test the getVpnServer operation with a valid options model parameter @Test - public void testCreatePrivatePathServiceGatewayAccountPolicyWOptions() throws Throwable { + public void testGetVpnServerWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"access_policy\": \"deny\", \"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c\", \"id\": \"r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"resource_type\": \"private_path_service_gateway_account_policy\"}"; - String createPrivatePathServiceGatewayAccountPolicyPath = "/private_path_service_gateways/testString/account_policies"; + String mockResponseBody = "{\"certificate\": {\"crn\": \"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5\"}, \"client_authentication\": [{\"method\": \"certificate\", \"identity_provider\": {\"provider_type\": \"iam\"}}], \"client_auto_delete\": true, \"client_auto_delete_timeout\": 1, \"client_dns_server_ips\": [{\"address\": \"192.168.3.4\"}], \"client_idle_timeout\": 600, \"client_ip_pool\": \"172.16.0.0/16\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\", \"enable_split_tunneling\": true, \"health_reasons\": [{\"code\": \"cannot_access_server_certificate\", \"message\": \"Failed to get VPN server's server certificate from Secrets Manager.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health\"}], \"health_state\": \"ok\", \"hostname\": \"a8506291.us-south.vpn-server.appdomain.cloud\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\", \"id\": \"r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-vpn-server\", \"port\": 443, \"private_ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"protocol\": \"tcp\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"vpn_server\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String getVpnServerPath = "/vpn_servers/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") - .setResponseCode(201) + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the AccountIdentityById model - AccountIdentityById accountIdentityModel = new AccountIdentityById.Builder() - .id("bb1b52262f7441a586f49068482f1e60") - .build(); - - // Construct an instance of the CreatePrivatePathServiceGatewayAccountPolicyOptions model - CreatePrivatePathServiceGatewayAccountPolicyOptions createPrivatePathServiceGatewayAccountPolicyOptionsModel = new CreatePrivatePathServiceGatewayAccountPolicyOptions.Builder() - .privatePathServiceGatewayId("testString") - .accessPolicy("deny") - .account(accountIdentityModel) + // Construct an instance of the GetVpnServerOptions model + GetVpnServerOptions getVpnServerOptionsModel = new GetVpnServerOptions.Builder() + .id("testString") .build(); - // Invoke createPrivatePathServiceGatewayAccountPolicy() with a valid options model and verify the result - Response response = vpcService.createPrivatePathServiceGatewayAccountPolicy(createPrivatePathServiceGatewayAccountPolicyOptionsModel).execute(); + // Invoke getVpnServer() with a valid options model and verify the result + Response response = vpcService.getVpnServer(getVpnServerOptionsModel).execute(); assertNotNull(response); - PrivatePathServiceGatewayAccountPolicy responseObj = response.getResult(); + VPNServer responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, createPrivatePathServiceGatewayAccountPolicyPath); + assertEquals(parsedPath, getVpnServerPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the createPrivatePathServiceGatewayAccountPolicy operation with and without retries enabled + // Test the getVpnServer operation with and without retries enabled @Test - public void testCreatePrivatePathServiceGatewayAccountPolicyWRetries() throws Throwable { + public void testGetVpnServerWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testCreatePrivatePathServiceGatewayAccountPolicyWOptions(); + testGetVpnServerWOptions(); vpcService.disableRetries(); - testCreatePrivatePathServiceGatewayAccountPolicyWOptions(); + testGetVpnServerWOptions(); } - // Test the createPrivatePathServiceGatewayAccountPolicy operation with a null options model (negative test) + // Test the getVpnServer operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testCreatePrivatePathServiceGatewayAccountPolicyNoOptions() throws Throwable { + public void testGetVpnServerNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.createPrivatePathServiceGatewayAccountPolicy(null).execute(); + vpcService.getVpnServer(null).execute(); } - // Test the deletePrivatePathServiceGatewayAccountPolicy operation with a valid options model parameter + // Test the getVpnServerClient operation with a valid options model parameter @Test - public void testDeletePrivatePathServiceGatewayAccountPolicyWOptions() throws Throwable { + public void testGetVpnServerClientWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String deletePrivatePathServiceGatewayAccountPolicyPath = "/private_path_service_gateways/testString/account_policies/testString"; + String mockResponseBody = "{\"client_ip\": {\"address\": \"192.168.3.4\"}, \"common_name\": \"commonName\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"disconnected_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/clients/r006-b37832e2-7abe-4b20-a292-c70b007569c6\", \"id\": \"r006-b37832e2-7abe-4b20-a292-c70b007569c6\", \"remote_ip\": {\"address\": \"192.168.3.4\"}, \"remote_port\": 22, \"resource_type\": \"vpn_server_client\", \"status\": \"connected\", \"username\": \"username\"}"; + String getVpnServerClientPath = "/vpn_servers/testString/clients/testString"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the DeletePrivatePathServiceGatewayAccountPolicyOptions model - DeletePrivatePathServiceGatewayAccountPolicyOptions deletePrivatePathServiceGatewayAccountPolicyOptionsModel = new DeletePrivatePathServiceGatewayAccountPolicyOptions.Builder() - .privatePathServiceGatewayId("testString") + // Construct an instance of the GetVpnServerClientOptions model + GetVpnServerClientOptions getVpnServerClientOptionsModel = new GetVpnServerClientOptions.Builder() + .vpnServerId("testString") .id("testString") .build(); - // Invoke deletePrivatePathServiceGatewayAccountPolicy() with a valid options model and verify the result - Response response = vpcService.deletePrivatePathServiceGatewayAccountPolicy(deletePrivatePathServiceGatewayAccountPolicyOptionsModel).execute(); + // Invoke getVpnServerClient() with a valid options model and verify the result + Response response = vpcService.getVpnServerClient(getVpnServerClientOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + VPNServerClient 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(), "DELETE"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, deletePrivatePathServiceGatewayAccountPolicyPath); + assertEquals(parsedPath, getVpnServerClientPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the deletePrivatePathServiceGatewayAccountPolicy operation with and without retries enabled + // Test the getVpnServerClient operation with and without retries enabled @Test - public void testDeletePrivatePathServiceGatewayAccountPolicyWRetries() throws Throwable { + public void testGetVpnServerClientWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testDeletePrivatePathServiceGatewayAccountPolicyWOptions(); + testGetVpnServerClientWOptions(); vpcService.disableRetries(); - testDeletePrivatePathServiceGatewayAccountPolicyWOptions(); + testGetVpnServerClientWOptions(); } - // Test the deletePrivatePathServiceGatewayAccountPolicy operation with a null options model (negative test) + // Test the getVpnServerClient operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testDeletePrivatePathServiceGatewayAccountPolicyNoOptions() throws Throwable { + public void testGetVpnServerClientNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.deletePrivatePathServiceGatewayAccountPolicy(null).execute(); + vpcService.getVpnServerClient(null).execute(); } - // Test the getPrivatePathServiceGatewayAccountPolicy operation with a valid options model parameter + // Test the getVpnServerClientConfiguration operation with a valid options model parameter @Test - public void testGetPrivatePathServiceGatewayAccountPolicyWOptions() throws Throwable { + public void testGetVpnServerClientConfigurationWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"access_policy\": \"deny\", \"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c\", \"id\": \"r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"resource_type\": \"private_path_service_gateway_account_policy\"}"; - String getPrivatePathServiceGatewayAccountPolicyPath = "/private_path_service_gateways/testString/account_policies/testString"; + String mockResponseBody = "\"client\nproto udp\nremote a8506291.us-south.vpn-server.appdomain.cloud\nport 443\n\ndev tun\nnobind\n\n-----BEGIN CERTIFICATE-----\nxxxxxx\n-----END CERTIFICATE-----\n\""; + String getVpnServerClientConfigurationPath = "/vpn_servers/testString/client_configuration"; server.enqueue(new MockResponse() - .setHeader("Content-type", "application/json") + .setHeader("Content-type", "text/plain") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetPrivatePathServiceGatewayAccountPolicyOptions model - GetPrivatePathServiceGatewayAccountPolicyOptions getPrivatePathServiceGatewayAccountPolicyOptionsModel = new GetPrivatePathServiceGatewayAccountPolicyOptions.Builder() - .privatePathServiceGatewayId("testString") + // Construct an instance of the GetVpnServerClientConfigurationOptions model + GetVpnServerClientConfigurationOptions getVpnServerClientConfigurationOptionsModel = new GetVpnServerClientConfigurationOptions.Builder() .id("testString") .build(); - // Invoke getPrivatePathServiceGatewayAccountPolicy() with a valid options model and verify the result - Response response = vpcService.getPrivatePathServiceGatewayAccountPolicy(getPrivatePathServiceGatewayAccountPolicyOptionsModel).execute(); + // Invoke getVpnServerClientConfiguration() with a valid options model and verify the result + Response response = vpcService.getVpnServerClientConfiguration(getVpnServerClientConfigurationOptionsModel).execute(); assertNotNull(response); - PrivatePathServiceGatewayAccountPolicy responseObj = response.getResult(); + String responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -33379,116 +34387,108 @@ public void testGetPrivatePathServiceGatewayAccountPolicyWOptions() throws Throw assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getPrivatePathServiceGatewayAccountPolicyPath); + assertEquals(parsedPath, getVpnServerClientConfigurationPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the getPrivatePathServiceGatewayAccountPolicy operation with and without retries enabled + // Test the getVpnServerClientConfiguration operation with and without retries enabled @Test - public void testGetPrivatePathServiceGatewayAccountPolicyWRetries() throws Throwable { + public void testGetVpnServerClientConfigurationWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetPrivatePathServiceGatewayAccountPolicyWOptions(); + testGetVpnServerClientConfigurationWOptions(); vpcService.disableRetries(); - testGetPrivatePathServiceGatewayAccountPolicyWOptions(); + testGetVpnServerClientConfigurationWOptions(); } - // Test the getPrivatePathServiceGatewayAccountPolicy operation with a null options model (negative test) + // Test the getVpnServerClientConfiguration operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetPrivatePathServiceGatewayAccountPolicyNoOptions() throws Throwable { + public void testGetVpnServerClientConfigurationNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getPrivatePathServiceGatewayAccountPolicy(null).execute(); + vpcService.getVpnServerClientConfiguration(null).execute(); } - // Test the updatePrivatePathServiceGatewayAccountPolicy operation with a valid options model parameter + // Test the getVpnServerRoute operation with a valid options model parameter @Test - public void testUpdatePrivatePathServiceGatewayAccountPolicyWOptions() throws Throwable { + public void testGetVpnServerRouteWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"access_policy\": \"deny\", \"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c\", \"id\": \"r006-7268d425-59b7-48fd-9735-81a7271657d5\", \"resource_type\": \"private_path_service_gateway_account_policy\"}"; - String updatePrivatePathServiceGatewayAccountPolicyPath = "/private_path_service_gateways/testString/account_policies/testString"; + String mockResponseBody = "{\"action\": \"deliver\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"health_reasons\": [{\"code\": \"internal_error\", \"message\": \"Internal error (contact IBM support).\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"id\": \"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-vpn-route-1\", \"resource_type\": \"vpn_server_route\"}"; + String getVpnServerRoutePath = "/vpn_servers/testString/routes/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the PrivatePathServiceGatewayAccountPolicyPatch model - PrivatePathServiceGatewayAccountPolicyPatch privatePathServiceGatewayAccountPolicyPatchModel = new PrivatePathServiceGatewayAccountPolicyPatch.Builder() - .accessPolicy("review") - .build(); - Map privatePathServiceGatewayAccountPolicyPatchModelAsPatch = privatePathServiceGatewayAccountPolicyPatchModel.asPatch(); - - // Construct an instance of the UpdatePrivatePathServiceGatewayAccountPolicyOptions model - UpdatePrivatePathServiceGatewayAccountPolicyOptions updatePrivatePathServiceGatewayAccountPolicyOptionsModel = new UpdatePrivatePathServiceGatewayAccountPolicyOptions.Builder() - .privatePathServiceGatewayId("testString") + // Construct an instance of the GetVpnServerRouteOptions model + GetVpnServerRouteOptions getVpnServerRouteOptionsModel = new GetVpnServerRouteOptions.Builder() + .vpnServerId("testString") .id("testString") - .privatePathServiceGatewayAccountPolicyPatch(privatePathServiceGatewayAccountPolicyPatchModelAsPatch) .build(); - // Invoke updatePrivatePathServiceGatewayAccountPolicy() with a valid options model and verify the result - Response response = vpcService.updatePrivatePathServiceGatewayAccountPolicy(updatePrivatePathServiceGatewayAccountPolicyOptionsModel).execute(); + // Invoke getVpnServerRoute() with a valid options model and verify the result + Response response = vpcService.getVpnServerRoute(getVpnServerRouteOptionsModel).execute(); assertNotNull(response); - PrivatePathServiceGatewayAccountPolicy responseObj = response.getResult(); + VPNServerRoute responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "PATCH"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, updatePrivatePathServiceGatewayAccountPolicyPath); + assertEquals(parsedPath, getVpnServerRoutePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the updatePrivatePathServiceGatewayAccountPolicy operation with and without retries enabled + // Test the getVpnServerRoute operation with and without retries enabled @Test - public void testUpdatePrivatePathServiceGatewayAccountPolicyWRetries() throws Throwable { + public void testGetVpnServerRouteWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUpdatePrivatePathServiceGatewayAccountPolicyWOptions(); + testGetVpnServerRouteWOptions(); vpcService.disableRetries(); - testUpdatePrivatePathServiceGatewayAccountPolicyWOptions(); + testGetVpnServerRouteWOptions(); } - // Test the updatePrivatePathServiceGatewayAccountPolicy operation with a null options model (negative test) + // Test the getVpnServerRoute operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUpdatePrivatePathServiceGatewayAccountPolicyNoOptions() throws Throwable { + public void testGetVpnServerRouteNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.updatePrivatePathServiceGatewayAccountPolicy(null).execute(); + vpcService.getVpnServerRoute(null).execute(); } - // Test the listPrivatePathServiceGatewayEndpointGatewayBindings operation with a valid options model parameter + // Test the listVpnServerClients operation with a valid options model parameter @Test - public void testListPrivatePathServiceGatewayEndpointGatewayBindingsWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = "{\"endpoint_gateway_bindings\": [{\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"expiration_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/endpoint_gateway_bindings/r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0\", \"id\": \"r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0\", \"lifecycle_state\": \"stable\", \"resource_type\": \"private_path_service_gateway_endpoint_gateway_binding\", \"status\": \"abandoned\"}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; - String listPrivatePathServiceGatewayEndpointGatewayBindingsPath = "/private_path_service_gateways/testString/endpoint_gateway_bindings"; + public void testListVpnServerClientsWOptions() throws Throwable { + // Register a mock response + String mockResponseBody = "{\"clients\": [{\"client_ip\": {\"address\": \"192.168.3.4\"}, \"common_name\": \"commonName\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"disconnected_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/clients/r006-b37832e2-7abe-4b20-a292-c70b007569c6\", \"id\": \"r006-b37832e2-7abe-4b20-a292-c70b007569c6\", \"remote_ip\": {\"address\": \"192.168.3.4\"}, \"remote_port\": 22, \"resource_type\": \"vpn_server_client\", \"status\": \"connected\", \"username\": \"username\"}], \"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132}"; + String listVpnServerClientsPath = "/vpn_servers/testString/clients"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the ListPrivatePathServiceGatewayEndpointGatewayBindingsOptions model - ListPrivatePathServiceGatewayEndpointGatewayBindingsOptions listPrivatePathServiceGatewayEndpointGatewayBindingsOptionsModel = new ListPrivatePathServiceGatewayEndpointGatewayBindingsOptions.Builder() - .privatePathServiceGatewayId("testString") + // Construct an instance of the ListVpnServerClientsOptions model + ListVpnServerClientsOptions listVpnServerClientsOptionsModel = new ListVpnServerClientsOptions.Builder() + .vpnServerId("testString") .start("testString") .limit(Long.valueOf("10")) - .status("abandoned") - .accountId("bb1b52262f7441a586f49068482f1e60") + .sort("created_at") .build(); - // Invoke listPrivatePathServiceGatewayEndpointGatewayBindings() with a valid options model and verify the result - Response response = vpcService.listPrivatePathServiceGatewayEndpointGatewayBindings(listPrivatePathServiceGatewayEndpointGatewayBindingsOptionsModel).execute(); + // Invoke listVpnServerClients() with a valid options model and verify the result + Response response = vpcService.listVpnServerClients(listVpnServerClientsOptionsModel).execute(); assertNotNull(response); - PrivatePathServiceGatewayEndpointGatewayBindingCollection responseObj = response.getResult(); + VPNServerClientCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -33497,41 +34497,40 @@ public void testListPrivatePathServiceGatewayEndpointGatewayBindingsWOptions() t assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, listPrivatePathServiceGatewayEndpointGatewayBindingsPath); + assertEquals(parsedPath, listVpnServerClientsPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); assertEquals(query.get("start"), "testString"); assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); - assertEquals(query.get("status"), "abandoned"); - assertEquals(query.get("account.id"), "bb1b52262f7441a586f49068482f1e60"); + assertEquals(query.get("sort"), "created_at"); } - // Test the listPrivatePathServiceGatewayEndpointGatewayBindings operation with and without retries enabled + // Test the listVpnServerClients operation with and without retries enabled @Test - public void testListPrivatePathServiceGatewayEndpointGatewayBindingsWRetries() throws Throwable { + public void testListVpnServerClientsWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testListPrivatePathServiceGatewayEndpointGatewayBindingsWOptions(); + testListVpnServerClientsWOptions(); vpcService.disableRetries(); - testListPrivatePathServiceGatewayEndpointGatewayBindingsWOptions(); + testListVpnServerClientsWOptions(); } - // Test the listPrivatePathServiceGatewayEndpointGatewayBindings operation with a null options model (negative test) + // Test the listVpnServerClients operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testListPrivatePathServiceGatewayEndpointGatewayBindingsNoOptions() throws Throwable { + public void testListVpnServerClientsNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.listPrivatePathServiceGatewayEndpointGatewayBindings(null).execute(); + vpcService.listVpnServerClients(null).execute(); } - // Test the listPrivatePathServiceGatewayEndpointGatewayBindings operation using the PrivatePathServiceGatewayEndpointGatewayBindingsPager.getNext() method + // Test the listVpnServerClients operation using the VpnServerClientsPager.getNext() method @Test - public void testListPrivatePathServiceGatewayEndpointGatewayBindingsWithPagerGetNext() throws Throwable { + public void testListVpnServerClientsWithPagerGetNext() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"endpoint_gateway_bindings\":[{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"expiration_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/endpoint_gateway_bindings/r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0\",\"id\":\"r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0\",\"lifecycle_state\":\"stable\",\"resource_type\":\"private_path_service_gateway_endpoint_gateway_binding\",\"status\":\"abandoned\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"endpoint_gateway_bindings\":[{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"expiration_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/endpoint_gateway_bindings/r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0\",\"id\":\"r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0\",\"lifecycle_state\":\"stable\",\"resource_type\":\"private_path_service_gateway_endpoint_gateway_binding\",\"status\":\"abandoned\"}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"clients\":[{\"client_ip\":{\"address\":\"192.168.3.4\"},\"common_name\":\"commonName\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"disconnected_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/clients/r006-b37832e2-7abe-4b20-a292-c70b007569c6\",\"id\":\"r006-b37832e2-7abe-4b20-a292-c70b007569c6\",\"remote_ip\":{\"address\":\"192.168.3.4\"},\"remote_port\":22,\"resource_type\":\"vpn_server_client\",\"status\":\"connected\",\"username\":\"username\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"clients\":[{\"client_ip\":{\"address\":\"192.168.3.4\"},\"common_name\":\"commonName\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"disconnected_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/clients/r006-b37832e2-7abe-4b20-a292-c70b007569c6\",\"id\":\"r006-b37832e2-7abe-4b20-a292-c70b007569c6\",\"remote_ip\":{\"address\":\"192.168.3.4\"},\"remote_port\":22,\"resource_type\":\"vpn_server_client\",\"status\":\"connected\",\"username\":\"username\"}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -33545,29 +34544,28 @@ public void testListPrivatePathServiceGatewayEndpointGatewayBindingsWithPagerGet .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListPrivatePathServiceGatewayEndpointGatewayBindingsOptions listPrivatePathServiceGatewayEndpointGatewayBindingsOptions = new ListPrivatePathServiceGatewayEndpointGatewayBindingsOptions.Builder() - .privatePathServiceGatewayId("testString") + ListVpnServerClientsOptions listVpnServerClientsOptions = new ListVpnServerClientsOptions.Builder() + .vpnServerId("testString") .limit(Long.valueOf("10")) - .status("abandoned") - .accountId("bb1b52262f7441a586f49068482f1e60") + .sort("created_at") .build(); - List allResults = new ArrayList<>(); - PrivatePathServiceGatewayEndpointGatewayBindingsPager pager = new PrivatePathServiceGatewayEndpointGatewayBindingsPager(vpcService, listPrivatePathServiceGatewayEndpointGatewayBindingsOptions); + List allResults = new ArrayList<>(); + VpnServerClientsPager pager = new VpnServerClientsPager(vpcService, listVpnServerClientsOptions); while (pager.hasNext()) { - List nextPage = pager.getNext(); + List nextPage = pager.getNext(); assertNotNull(nextPage); allResults.addAll(nextPage); } assertEquals(allResults.size(), 2); } - // Test the listPrivatePathServiceGatewayEndpointGatewayBindings operation using the PrivatePathServiceGatewayEndpointGatewayBindingsPager.getAll() method + // Test the listVpnServerClients operation using the VpnServerClientsPager.getAll() method @Test - public void testListPrivatePathServiceGatewayEndpointGatewayBindingsWithPagerGetAll() throws Throwable { + public void testListVpnServerClientsWithPagerGetAll() throws Throwable { // Set up the two-page mock response. - String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"total_count\":2,\"limit\":1,\"endpoint_gateway_bindings\":[{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"expiration_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/endpoint_gateway_bindings/r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0\",\"id\":\"r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0\",\"lifecycle_state\":\"stable\",\"resource_type\":\"private_path_service_gateway_endpoint_gateway_binding\",\"status\":\"abandoned\"}]}"; - String mockResponsePage2 = "{\"total_count\":2,\"limit\":1,\"endpoint_gateway_bindings\":[{\"account\":{\"id\":\"bb1b52262f7441a586f49068482f1e60\",\"resource_type\":\"account\"},\"created_at\":\"2019-01-01T12:00:00.000Z\",\"expiration_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/endpoint_gateway_bindings/r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0\",\"id\":\"r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0\",\"lifecycle_state\":\"stable\",\"resource_type\":\"private_path_service_gateway_endpoint_gateway_binding\",\"status\":\"abandoned\"}]}"; + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"clients\":[{\"client_ip\":{\"address\":\"192.168.3.4\"},\"common_name\":\"commonName\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"disconnected_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/clients/r006-b37832e2-7abe-4b20-a292-c70b007569c6\",\"id\":\"r006-b37832e2-7abe-4b20-a292-c70b007569c6\",\"remote_ip\":{\"address\":\"192.168.3.4\"},\"remote_port\":22,\"resource_type\":\"vpn_server_client\",\"status\":\"connected\",\"username\":\"username\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"clients\":[{\"client_ip\":{\"address\":\"192.168.3.4\"},\"common_name\":\"commonName\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"disconnected_at\":\"2019-01-01T12:00:00.000Z\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/clients/r006-b37832e2-7abe-4b20-a292-c70b007569c6\",\"id\":\"r006-b37832e2-7abe-4b20-a292-c70b007569c6\",\"remote_ip\":{\"address\":\"192.168.3.4\"},\"remote_port\":22,\"resource_type\":\"vpn_server_client\",\"status\":\"connected\",\"username\":\"username\"}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) @@ -33581,40 +34579,41 @@ public void testListPrivatePathServiceGatewayEndpointGatewayBindingsWithPagerGet .setResponseCode(400) .setBody("{\"message\": \"No more results available!\"}")); - ListPrivatePathServiceGatewayEndpointGatewayBindingsOptions listPrivatePathServiceGatewayEndpointGatewayBindingsOptions = new ListPrivatePathServiceGatewayEndpointGatewayBindingsOptions.Builder() - .privatePathServiceGatewayId("testString") + ListVpnServerClientsOptions listVpnServerClientsOptions = new ListVpnServerClientsOptions.Builder() + .vpnServerId("testString") .limit(Long.valueOf("10")) - .status("abandoned") - .accountId("bb1b52262f7441a586f49068482f1e60") + .sort("created_at") .build(); - PrivatePathServiceGatewayEndpointGatewayBindingsPager pager = new PrivatePathServiceGatewayEndpointGatewayBindingsPager(vpcService, listPrivatePathServiceGatewayEndpointGatewayBindingsOptions); - List allResults = pager.getAll(); + VpnServerClientsPager pager = new VpnServerClientsPager(vpcService, listVpnServerClientsOptions); + List allResults = pager.getAll(); assertNotNull(allResults); assertEquals(allResults.size(), 2); } - // Test the getPrivatePathServiceGatewayEndpointGatewayBinding operation with a valid options model parameter + // Test the listVpnServerRoutes operation with a valid options model parameter @Test - public void testGetPrivatePathServiceGatewayEndpointGatewayBindingWOptions() throws Throwable { + public void testListVpnServerRoutesWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"account\": {\"id\": \"bb1b52262f7441a586f49068482f1e60\", \"resource_type\": \"account\"}, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"expiration_at\": \"2019-01-01T12:00:00.000Z\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/endpoint_gateway_bindings/r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0\", \"id\": \"r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0\", \"lifecycle_state\": \"stable\", \"resource_type\": \"private_path_service_gateway_endpoint_gateway_binding\", \"status\": \"abandoned\"}"; - String getPrivatePathServiceGatewayEndpointGatewayBindingPath = "/private_path_service_gateways/testString/endpoint_gateway_bindings/testString"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"routes\": [{\"action\": \"deliver\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"health_reasons\": [{\"code\": \"internal_error\", \"message\": \"Internal error (contact IBM support).\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"id\": \"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-vpn-route-1\", \"resource_type\": \"vpn_server_route\"}], \"total_count\": 132}"; + String listVpnServerRoutesPath = "/vpn_servers/testString/routes"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the GetPrivatePathServiceGatewayEndpointGatewayBindingOptions model - GetPrivatePathServiceGatewayEndpointGatewayBindingOptions getPrivatePathServiceGatewayEndpointGatewayBindingOptionsModel = new GetPrivatePathServiceGatewayEndpointGatewayBindingOptions.Builder() - .privatePathServiceGatewayId("testString") - .id("testString") + // Construct an instance of the ListVpnServerRoutesOptions model + ListVpnServerRoutesOptions listVpnServerRoutesOptionsModel = new ListVpnServerRoutesOptions.Builder() + .vpnServerId("testString") + .start("testString") + .limit(Long.valueOf("10")) + .sort("name") .build(); - // Invoke getPrivatePathServiceGatewayEndpointGatewayBinding() with a valid options model and verify the result - Response response = vpcService.getPrivatePathServiceGatewayEndpointGatewayBinding(getPrivatePathServiceGatewayEndpointGatewayBindingOptionsModel).execute(); + // Invoke listVpnServerRoutes() with a valid options model and verify the result + Response response = vpcService.listVpnServerRoutes(listVpnServerRoutesOptionsModel).execute(); assertNotNull(response); - PrivatePathServiceGatewayEndpointGatewayBinding responseObj = response.getResult(); + VPNServerRouteCollection responseObj = response.getResult(); assertNotNull(responseObj); // Verify the contents of the request sent to the mock server @@ -33623,299 +34622,378 @@ public void testGetPrivatePathServiceGatewayEndpointGatewayBindingWOptions() thr assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, getPrivatePathServiceGatewayEndpointGatewayBindingPath); + assertEquals(parsedPath, listVpnServerRoutesPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("sort"), "name"); } - // Test the getPrivatePathServiceGatewayEndpointGatewayBinding operation with and without retries enabled + // Test the listVpnServerRoutes operation with and without retries enabled @Test - public void testGetPrivatePathServiceGatewayEndpointGatewayBindingWRetries() throws Throwable { + public void testListVpnServerRoutesWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testGetPrivatePathServiceGatewayEndpointGatewayBindingWOptions(); + testListVpnServerRoutesWOptions(); vpcService.disableRetries(); - testGetPrivatePathServiceGatewayEndpointGatewayBindingWOptions(); + testListVpnServerRoutesWOptions(); } - // Test the getPrivatePathServiceGatewayEndpointGatewayBinding operation with a null options model (negative test) + // Test the listVpnServerRoutes operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testGetPrivatePathServiceGatewayEndpointGatewayBindingNoOptions() throws Throwable { + public void testListVpnServerRoutesNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.getPrivatePathServiceGatewayEndpointGatewayBinding(null).execute(); + vpcService.listVpnServerRoutes(null).execute(); } - // Test the denyPrivatePathServiceGatewayEndpointGatewayBinding operation with a valid options model parameter + // Test the listVpnServerRoutes operation using the VpnServerRoutesPager.getNext() method @Test - public void testDenyPrivatePathServiceGatewayEndpointGatewayBindingWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = ""; - String denyPrivatePathServiceGatewayEndpointGatewayBindingPath = "/private_path_service_gateways/testString/endpoint_gateway_bindings/testString/deny"; + public void testListVpnServerRoutesWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"routes\":[{\"action\":\"deliver\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"destination\":\"192.168.3.0/24\",\"health_reasons\":[{\"code\":\"internal_error\",\"message\":\"Internal error (contact IBM support).\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"id\":\"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-vpn-route-1\",\"resource_type\":\"vpn_server_route\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"routes\":[{\"action\":\"deliver\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"destination\":\"192.168.3.0/24\",\"health_reasons\":[{\"code\":\"internal_error\",\"message\":\"Internal error (contact IBM support).\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"id\":\"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-vpn-route-1\",\"resource_type\":\"vpn_server_route\"}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() - .setResponseCode(204) - .setBody(mockResponseBody)); + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the DenyPrivatePathServiceGatewayEndpointGatewayBindingOptions model - DenyPrivatePathServiceGatewayEndpointGatewayBindingOptions denyPrivatePathServiceGatewayEndpointGatewayBindingOptionsModel = new DenyPrivatePathServiceGatewayEndpointGatewayBindingOptions.Builder() - .privatePathServiceGatewayId("testString") - .id("testString") - .setAccountPolicy(true) + ListVpnServerRoutesOptions listVpnServerRoutesOptions = new ListVpnServerRoutesOptions.Builder() + .vpnServerId("testString") + .limit(Long.valueOf("10")) + .sort("name") .build(); - // Invoke denyPrivatePathServiceGatewayEndpointGatewayBinding() with a valid options model and verify the result - Response response = vpcService.denyPrivatePathServiceGatewayEndpointGatewayBinding(denyPrivatePathServiceGatewayEndpointGatewayBindingOptionsModel).execute(); - assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, denyPrivatePathServiceGatewayEndpointGatewayBindingPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + List allResults = new ArrayList<>(); + VpnServerRoutesPager pager = new VpnServerRoutesPager(vpcService, listVpnServerRoutesOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } - - // Test the denyPrivatePathServiceGatewayEndpointGatewayBinding operation with and without retries enabled + + // Test the listVpnServerRoutes operation using the VpnServerRoutesPager.getAll() method @Test - public void testDenyPrivatePathServiceGatewayEndpointGatewayBindingWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testDenyPrivatePathServiceGatewayEndpointGatewayBindingWOptions(); + public void testListVpnServerRoutesWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"routes\":[{\"action\":\"deliver\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"destination\":\"192.168.3.0/24\",\"health_reasons\":[{\"code\":\"internal_error\",\"message\":\"Internal error (contact IBM support).\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"id\":\"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-vpn-route-1\",\"resource_type\":\"vpn_server_route\"}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"routes\":[{\"action\":\"deliver\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"destination\":\"192.168.3.0/24\",\"health_reasons\":[{\"code\":\"internal_error\",\"message\":\"Internal error (contact IBM support).\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health\"}],\"health_state\":\"ok\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"id\":\"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-vpn-route-1\",\"resource_type\":\"vpn_server_route\"}],\"total_count\":2,\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - vpcService.disableRetries(); - testDenyPrivatePathServiceGatewayEndpointGatewayBindingWOptions(); - } + ListVpnServerRoutesOptions listVpnServerRoutesOptions = new ListVpnServerRoutesOptions.Builder() + .vpnServerId("testString") + .limit(Long.valueOf("10")) + .sort("name") + .build(); - // Test the denyPrivatePathServiceGatewayEndpointGatewayBinding operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testDenyPrivatePathServiceGatewayEndpointGatewayBindingNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.denyPrivatePathServiceGatewayEndpointGatewayBinding(null).execute(); + VpnServerRoutesPager pager = new VpnServerRoutesPager(vpcService, listVpnServerRoutesOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); } - - // Test the permitPrivatePathServiceGatewayEndpointGatewayBinding operation with a valid options model parameter + + // Test the listVpnServers operation with a valid options model parameter @Test - public void testPermitPrivatePathServiceGatewayEndpointGatewayBindingWOptions() throws Throwable { + public void testListVpnServersWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String permitPrivatePathServiceGatewayEndpointGatewayBindingPath = "/private_path_service_gateways/testString/endpoint_gateway_bindings/testString/permit"; + String mockResponseBody = "{\"first\": {\"href\": \"href\"}, \"limit\": 20, \"next\": {\"href\": \"href\"}, \"total_count\": 132, \"vpn_servers\": [{\"certificate\": {\"crn\": \"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5\"}, \"client_authentication\": [{\"method\": \"certificate\", \"identity_provider\": {\"provider_type\": \"iam\"}}], \"client_auto_delete\": true, \"client_auto_delete_timeout\": 1, \"client_dns_server_ips\": [{\"address\": \"192.168.3.4\"}], \"client_idle_timeout\": 600, \"client_ip_pool\": \"172.16.0.0/16\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\", \"enable_split_tunneling\": true, \"health_reasons\": [{\"code\": \"cannot_access_server_certificate\", \"message\": \"Failed to get VPN server's server certificate from Secrets Manager.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health\"}], \"health_state\": \"ok\", \"hostname\": \"a8506291.us-south.vpn-server.appdomain.cloud\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\", \"id\": \"r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-vpn-server\", \"port\": 443, \"private_ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"protocol\": \"tcp\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"vpn_server\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}]}"; + String listVpnServersPath = "/vpn_servers"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the PermitPrivatePathServiceGatewayEndpointGatewayBindingOptions model - PermitPrivatePathServiceGatewayEndpointGatewayBindingOptions permitPrivatePathServiceGatewayEndpointGatewayBindingOptionsModel = new PermitPrivatePathServiceGatewayEndpointGatewayBindingOptions.Builder() - .privatePathServiceGatewayId("testString") - .id("testString") - .setAccountPolicy(true) + // Construct an instance of the ListVpnServersOptions model + ListVpnServersOptions listVpnServersOptionsModel = new ListVpnServersOptions.Builder() + .name("my-name") + .start("testString") + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .sort("name") .build(); - // Invoke permitPrivatePathServiceGatewayEndpointGatewayBinding() with a valid options model and verify the result - Response response = vpcService.permitPrivatePathServiceGatewayEndpointGatewayBinding(permitPrivatePathServiceGatewayEndpointGatewayBindingOptionsModel).execute(); + // Invoke listVpnServers() with a valid options model and verify the result + Response response = vpcService.listVpnServers(listVpnServersOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + VPNServerCollection responseObj = response.getResult(); + assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "GET"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, permitPrivatePathServiceGatewayEndpointGatewayBindingPath); + assertEquals(parsedPath, listVpnServersPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + assertEquals(query.get("name"), "my-name"); + assertEquals(query.get("start"), "testString"); + assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("10")); + assertEquals(query.get("resource_group.id"), "testString"); + assertEquals(query.get("sort"), "name"); } - // Test the permitPrivatePathServiceGatewayEndpointGatewayBinding operation with and without retries enabled + // Test the listVpnServers operation with and without retries enabled @Test - public void testPermitPrivatePathServiceGatewayEndpointGatewayBindingWRetries() throws Throwable { + public void testListVpnServersWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testPermitPrivatePathServiceGatewayEndpointGatewayBindingWOptions(); + testListVpnServersWOptions(); vpcService.disableRetries(); - testPermitPrivatePathServiceGatewayEndpointGatewayBindingWOptions(); - } - - // Test the permitPrivatePathServiceGatewayEndpointGatewayBinding operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testPermitPrivatePathServiceGatewayEndpointGatewayBindingNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.permitPrivatePathServiceGatewayEndpointGatewayBinding(null).execute(); + testListVpnServersWOptions(); } - // Test the publishPrivatePathServiceGateway operation with a valid options model parameter + // Test the listVpnServers operation using the VpnServersPager.getNext() method @Test - public void testPublishPrivatePathServiceGatewayWOptions() throws Throwable { - // Register a mock response - String mockResponseBody = ""; - String publishPrivatePathServiceGatewayPath = "/private_path_service_gateways/testString/publish"; + public void testListVpnServersWithPagerGetNext() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"vpn_servers\":[{\"certificate\":{\"crn\":\"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5\"},\"client_authentication\":[{\"method\":\"certificate\",\"identity_provider\":{\"provider_type\":\"iam\"}}],\"client_auto_delete\":true,\"client_auto_delete_timeout\":1,\"client_dns_server_ips\":[{\"address\":\"192.168.3.4\"}],\"client_idle_timeout\":600,\"client_ip_pool\":\"172.16.0.0/16\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\",\"enable_split_tunneling\":true,\"health_reasons\":[{\"code\":\"cannot_access_server_certificate\",\"message\":\"Failed to get VPN server's server certificate from Secrets Manager.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health\"}],\"health_state\":\"ok\",\"hostname\":\"a8506291.us-south.vpn-server.appdomain.cloud\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\",\"id\":\"r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-vpn-server\",\"port\":443,\"private_ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"protocol\":\"tcp\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"vpn_server\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"vpn_servers\":[{\"certificate\":{\"crn\":\"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5\"},\"client_authentication\":[{\"method\":\"certificate\",\"identity_provider\":{\"provider_type\":\"iam\"}}],\"client_auto_delete\":true,\"client_auto_delete_timeout\":1,\"client_dns_server_ips\":[{\"address\":\"192.168.3.4\"}],\"client_idle_timeout\":600,\"client_ip_pool\":\"172.16.0.0/16\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\",\"enable_split_tunneling\":true,\"health_reasons\":[{\"code\":\"cannot_access_server_certificate\",\"message\":\"Failed to get VPN server's server certificate from Secrets Manager.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health\"}],\"health_state\":\"ok\",\"hostname\":\"a8506291.us-south.vpn-server.appdomain.cloud\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\",\"id\":\"r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-vpn-server\",\"port\":443,\"private_ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"protocol\":\"tcp\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"vpn_server\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; server.enqueue(new MockResponse() - .setResponseCode(204) - .setBody(mockResponseBody)); + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - // Construct an instance of the PublishPrivatePathServiceGatewayOptions model - PublishPrivatePathServiceGatewayOptions publishPrivatePathServiceGatewayOptionsModel = new PublishPrivatePathServiceGatewayOptions.Builder() - .privatePathServiceGatewayId("testString") + ListVpnServersOptions listVpnServersOptions = new ListVpnServersOptions.Builder() + .name("my-name") + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .sort("name") .build(); - // Invoke publishPrivatePathServiceGateway() with a valid options model and verify the result - Response response = vpcService.publishPrivatePathServiceGateway(publishPrivatePathServiceGatewayOptionsModel).execute(); - assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); - - // Verify the contents of the request sent to the mock server - RecordedRequest request = server.takeRequest(); - assertNotNull(request); - assertEquals(request.getMethod(), "POST"); - // Verify request path - String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, publishPrivatePathServiceGatewayPath); - // Verify query params - Map query = TestUtilities.parseQueryString(request); - assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); - assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); + List allResults = new ArrayList<>(); + VpnServersPager pager = new VpnServersPager(vpcService, listVpnServersOptions); + while (pager.hasNext()) { + List nextPage = pager.getNext(); + assertNotNull(nextPage); + allResults.addAll(nextPage); + } + assertEquals(allResults.size(), 2); } - - // Test the publishPrivatePathServiceGateway operation with and without retries enabled + + // Test the listVpnServers operation using the VpnServersPager.getAll() method @Test - public void testPublishPrivatePathServiceGatewayWRetries() throws Throwable { - vpcService.enableRetries(4, 30); - testPublishPrivatePathServiceGatewayWOptions(); + public void testListVpnServersWithPagerGetAll() throws Throwable { + // Set up the two-page mock response. + String mockResponsePage1 = "{\"next\":{\"href\":\"https://myhost.com/somePath?start=1\"},\"vpn_servers\":[{\"certificate\":{\"crn\":\"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5\"},\"client_authentication\":[{\"method\":\"certificate\",\"identity_provider\":{\"provider_type\":\"iam\"}}],\"client_auto_delete\":true,\"client_auto_delete_timeout\":1,\"client_dns_server_ips\":[{\"address\":\"192.168.3.4\"}],\"client_idle_timeout\":600,\"client_ip_pool\":\"172.16.0.0/16\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\",\"enable_split_tunneling\":true,\"health_reasons\":[{\"code\":\"cannot_access_server_certificate\",\"message\":\"Failed to get VPN server's server certificate from Secrets Manager.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health\"}],\"health_state\":\"ok\",\"hostname\":\"a8506291.us-south.vpn-server.appdomain.cloud\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\",\"id\":\"r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-vpn-server\",\"port\":443,\"private_ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"protocol\":\"tcp\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"vpn_server\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; + String mockResponsePage2 = "{\"vpn_servers\":[{\"certificate\":{\"crn\":\"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5\"},\"client_authentication\":[{\"method\":\"certificate\",\"identity_provider\":{\"provider_type\":\"iam\"}}],\"client_auto_delete\":true,\"client_auto_delete_timeout\":1,\"client_dns_server_ips\":[{\"address\":\"192.168.3.4\"}],\"client_idle_timeout\":600,\"client_ip_pool\":\"172.16.0.0/16\",\"created_at\":\"2019-01-01T12:00:00.000Z\",\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\",\"enable_split_tunneling\":true,\"health_reasons\":[{\"code\":\"cannot_access_server_certificate\",\"message\":\"Failed to get VPN server's server certificate from Secrets Manager.\",\"more_info\":\"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health\"}],\"health_state\":\"ok\",\"hostname\":\"a8506291.us-south.vpn-server.appdomain.cloud\",\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\",\"id\":\"r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\",\"lifecycle_reasons\":[{\"code\":\"resource_suspended_by_provider\",\"message\":\"The resource has been suspended. Contact IBM support with the CRN for next steps.\",\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}],\"lifecycle_state\":\"stable\",\"name\":\"my-vpn-server\",\"port\":443,\"private_ips\":[{\"address\":\"192.168.3.4\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"id\":\"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\",\"name\":\"my-reserved-ip\",\"resource_type\":\"subnet_reserved_ip\"}],\"protocol\":\"tcp\",\"resource_group\":{\"href\":\"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\",\"id\":\"fee82deba12e4c0fb69c3b09d1f12345\",\"name\":\"my-resource-group\"},\"resource_type\":\"vpn_server\",\"security_groups\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"id\":\"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\",\"name\":\"my-security-group\"}],\"subnets\":[{\"crn\":\"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"id\":\"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\",\"name\":\"my-subnet\",\"resource_type\":\"subnet\"}],\"vpc\":{\"crn\":\"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"deleted\":{\"more_info\":\"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"},\"href\":\"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"id\":\"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\",\"name\":\"my-vpc\",\"resource_type\":\"vpc\"}}],\"total_count\":2,\"limit\":1}"; + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage1)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(200) + .setBody(mockResponsePage2)); + server.enqueue(new MockResponse() + .setHeader("Content-type", "application/json") + .setResponseCode(400) + .setBody("{\"message\": \"No more results available!\"}")); - vpcService.disableRetries(); - testPublishPrivatePathServiceGatewayWOptions(); - } + ListVpnServersOptions listVpnServersOptions = new ListVpnServersOptions.Builder() + .name("my-name") + .limit(Long.valueOf("10")) + .resourceGroupId("testString") + .sort("name") + .build(); - // Test the publishPrivatePathServiceGateway operation with a null options model (negative test) - @Test(expectedExceptions = IllegalArgumentException.class) - public void testPublishPrivatePathServiceGatewayNoOptions() throws Throwable { - server.enqueue(new MockResponse()); - vpcService.publishPrivatePathServiceGateway(null).execute(); + VpnServersPager pager = new VpnServersPager(vpcService, listVpnServersOptions); + List allResults = pager.getAll(); + assertNotNull(allResults); + assertEquals(allResults.size(), 2); } - - // Test the revokeAccountForPrivatePathServiceGateway operation with a valid options model parameter + + // Test the updateVpnServer operation with a valid options model parameter @Test - public void testRevokeAccountForPrivatePathServiceGatewayWOptions() throws Throwable { + public void testUpdateVpnServerWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String revokeAccountForPrivatePathServiceGatewayPath = "/private_path_service_gateways/testString/revoke_account"; + String mockResponseBody = "{\"certificate\": {\"crn\": \"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5\"}, \"client_authentication\": [{\"method\": \"certificate\", \"identity_provider\": {\"provider_type\": \"iam\"}}], \"client_auto_delete\": true, \"client_auto_delete_timeout\": 1, \"client_dns_server_ips\": [{\"address\": \"192.168.3.4\"}], \"client_idle_timeout\": 600, \"client_ip_pool\": \"172.16.0.0/16\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\", \"enable_split_tunneling\": true, \"health_reasons\": [{\"code\": \"cannot_access_server_certificate\", \"message\": \"Failed to get VPN server's server certificate from Secrets Manager.\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health\"}], \"health_state\": \"ok\", \"hostname\": \"a8506291.us-south.vpn-server.appdomain.cloud\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\", \"id\": \"r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-vpn-server\", \"port\": 443, \"private_ips\": [{\"address\": \"192.168.3.4\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"id\": \"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb\", \"name\": \"my-reserved-ip\", \"resource_type\": \"subnet_reserved_ip\"}], \"protocol\": \"tcp\", \"resource_group\": {\"href\": \"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345\", \"id\": \"fee82deba12e4c0fb69c3b09d1f12345\", \"name\": \"my-resource-group\"}, \"resource_type\": \"vpn_server\", \"security_groups\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"id\": \"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271\", \"name\": \"my-security-group\"}], \"subnets\": [{\"crn\": \"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"id\": \"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e\", \"name\": \"my-subnet\", \"resource_type\": \"subnet\"}], \"vpc\": {\"crn\": \"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"deleted\": {\"more_info\": \"https://cloud.ibm.com/apidocs/vpc#deleted-resources\"}, \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"id\": \"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b\", \"name\": \"my-vpc\", \"resource_type\": \"vpc\"}}"; + String updateVpnServerPath = "/vpn_servers/testString"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the AccountIdentityById model - AccountIdentityById accountIdentityModel = new AccountIdentityById.Builder() - .id("bb1b52262f7441a586f49068482f1e60") + // Construct an instance of the CertificateInstanceIdentityByCRN model + CertificateInstanceIdentityByCRN certificateInstanceIdentityModel = new CertificateInstanceIdentityByCRN.Builder() + .crn("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") .build(); - // Construct an instance of the RevokeAccountForPrivatePathServiceGatewayOptions model - RevokeAccountForPrivatePathServiceGatewayOptions revokeAccountForPrivatePathServiceGatewayOptionsModel = new RevokeAccountForPrivatePathServiceGatewayOptions.Builder() - .privatePathServiceGatewayId("testString") - .account(accountIdentityModel) + // Construct an instance of the VPNServerAuthenticationByUsernameIdProviderByIAM model + VPNServerAuthenticationByUsernameIdProviderByIAM vpnServerAuthenticationByUsernameIdProviderModel = new VPNServerAuthenticationByUsernameIdProviderByIAM.Builder() + .providerType("iam") .build(); - // Invoke revokeAccountForPrivatePathServiceGateway() with a valid options model and verify the result - Response response = vpcService.revokeAccountForPrivatePathServiceGateway(revokeAccountForPrivatePathServiceGatewayOptionsModel).execute(); + // Construct an instance of the VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype model + VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype vpnServerAuthenticationPrototypeModel = new VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype.Builder() + .method("username") + .identityProvider(vpnServerAuthenticationByUsernameIdProviderModel) + .build(); + + // Construct an instance of the IP model + IP ipModel = new IP.Builder() + .address("192.168.3.4") + .build(); + + // Construct an instance of the SubnetIdentityById model + SubnetIdentityById subnetIdentityModel = new SubnetIdentityById.Builder() + .id("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + .build(); + + // Construct an instance of the VPNServerPatch model + VPNServerPatch vpnServerPatchModel = new VPNServerPatch.Builder() + .certificate(certificateInstanceIdentityModel) + .clientAuthentication(java.util.Arrays.asList(vpnServerAuthenticationPrototypeModel)) + .clientDnsServerIps(java.util.Arrays.asList(ipModel)) + .clientIdleTimeout(Long.valueOf("600")) + .clientIpPool("172.16.0.0/16") + .enableSplitTunneling(true) + .name("my-vpn-server-updated") + .port(Long.valueOf("443")) + .protocol("tcp") + .subnets(java.util.Arrays.asList(subnetIdentityModel)) + .build(); + Map vpnServerPatchModelAsPatch = vpnServerPatchModel.asPatch(); + + // Construct an instance of the UpdateVpnServerOptions model + UpdateVpnServerOptions updateVpnServerOptionsModel = new UpdateVpnServerOptions.Builder() + .id("testString") + .vpnServerPatch(vpnServerPatchModelAsPatch) + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") + .build(); + + // Invoke updateVpnServer() with a valid options model and verify the result + Response response = vpcService.updateVpnServer(updateVpnServerOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + VPNServer responseObj = response.getResult(); + assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, revokeAccountForPrivatePathServiceGatewayPath); + assertEquals(parsedPath, updateVpnServerPath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the revokeAccountForPrivatePathServiceGateway operation with and without retries enabled + // Test the updateVpnServer operation with and without retries enabled @Test - public void testRevokeAccountForPrivatePathServiceGatewayWRetries() throws Throwable { + public void testUpdateVpnServerWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testRevokeAccountForPrivatePathServiceGatewayWOptions(); + testUpdateVpnServerWOptions(); vpcService.disableRetries(); - testRevokeAccountForPrivatePathServiceGatewayWOptions(); + testUpdateVpnServerWOptions(); } - // Test the revokeAccountForPrivatePathServiceGateway operation with a null options model (negative test) + // Test the updateVpnServer operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testRevokeAccountForPrivatePathServiceGatewayNoOptions() throws Throwable { + public void testUpdateVpnServerNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.revokeAccountForPrivatePathServiceGateway(null).execute(); + vpcService.updateVpnServer(null).execute(); } - // Test the unpublishPrivatePathServiceGateway operation with a valid options model parameter + // Test the updateVpnServerRoute operation with a valid options model parameter @Test - public void testUnpublishPrivatePathServiceGatewayWOptions() throws Throwable { + public void testUpdateVpnServerRouteWOptions() throws Throwable { // Register a mock response - String mockResponseBody = ""; - String unpublishPrivatePathServiceGatewayPath = "/private_path_service_gateways/testString/unpublish"; + String mockResponseBody = "{\"action\": \"deliver\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"destination\": \"192.168.3.0/24\", \"health_reasons\": [{\"code\": \"internal_error\", \"message\": \"Internal error (contact IBM support).\", \"more_info\": \"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health\"}], \"health_state\": \"ok\", \"href\": \"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-4ec65fe4-e68f-44ff-bc94-c9caf6123b5f/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"id\": \"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531\", \"lifecycle_reasons\": [{\"code\": \"resource_suspended_by_provider\", \"message\": \"The resource has been suspended. Contact IBM support with the CRN for next steps.\", \"more_info\": \"https://cloud.ibm.com/apidocs/vpc#resource-suspension\"}], \"lifecycle_state\": \"stable\", \"name\": \"my-vpn-route-1\", \"resource_type\": \"vpn_server_route\"}"; + String updateVpnServerRoutePath = "/vpn_servers/testString/routes/testString"; server.enqueue(new MockResponse() - .setResponseCode(204) + .setHeader("Content-type", "application/json") + .setResponseCode(200) .setBody(mockResponseBody)); - // Construct an instance of the UnpublishPrivatePathServiceGatewayOptions model - UnpublishPrivatePathServiceGatewayOptions unpublishPrivatePathServiceGatewayOptionsModel = new UnpublishPrivatePathServiceGatewayOptions.Builder() - .privatePathServiceGatewayId("testString") + // Construct an instance of the VPNServerRoutePatch model + VPNServerRoutePatch vpnServerRoutePatchModel = new VPNServerRoutePatch.Builder() + .name("my-vpn-server-route-updated") .build(); + Map vpnServerRoutePatchModelAsPatch = vpnServerRoutePatchModel.asPatch(); - // Invoke unpublishPrivatePathServiceGateway() with a valid options model and verify the result - Response response = vpcService.unpublishPrivatePathServiceGateway(unpublishPrivatePathServiceGatewayOptionsModel).execute(); + // Construct an instance of the UpdateVpnServerRouteOptions model + UpdateVpnServerRouteOptions updateVpnServerRouteOptionsModel = new UpdateVpnServerRouteOptions.Builder() + .vpnServerId("testString") + .id("testString") + .vpnServerRoutePatch(vpnServerRoutePatchModelAsPatch) + .build(); + + // Invoke updateVpnServerRoute() with a valid options model and verify the result + Response response = vpcService.updateVpnServerRoute(updateVpnServerRouteOptionsModel).execute(); assertNotNull(response); - Void responseObj = response.getResult(); - assertNull(responseObj); + VPNServerRoute responseObj = response.getResult(); + assertNotNull(responseObj); // Verify the contents of the request sent to the mock server RecordedRequest request = server.takeRequest(); assertNotNull(request); - assertEquals(request.getMethod(), "POST"); + assertEquals(request.getMethod(), "PATCH"); // Verify request path String parsedPath = TestUtilities.parseReqPath(request); - assertEquals(parsedPath, unpublishPrivatePathServiceGatewayPath); + assertEquals(parsedPath, updateVpnServerRoutePath); // Verify query params Map query = TestUtilities.parseQueryString(request); assertNotNull(query); - assertEquals(query.get("version"), "2025-07-08"); + assertEquals(query.get("version"), "2024-06-23"); assertEquals(Long.valueOf(query.get("generation")), Long.valueOf("2")); } - // Test the unpublishPrivatePathServiceGateway operation with and without retries enabled + // Test the updateVpnServerRoute operation with and without retries enabled @Test - public void testUnpublishPrivatePathServiceGatewayWRetries() throws Throwable { + public void testUpdateVpnServerRouteWRetries() throws Throwable { vpcService.enableRetries(4, 30); - testUnpublishPrivatePathServiceGatewayWOptions(); + testUpdateVpnServerRouteWOptions(); vpcService.disableRetries(); - testUnpublishPrivatePathServiceGatewayWOptions(); + testUpdateVpnServerRouteWOptions(); } - // Test the unpublishPrivatePathServiceGateway operation with a null options model (negative test) + // Test the updateVpnServerRoute operation with a null options model (negative test) @Test(expectedExceptions = IllegalArgumentException.class) - public void testUnpublishPrivatePathServiceGatewayNoOptions() throws Throwable { + public void testUpdateVpnServerRouteNoOptions() throws Throwable { server.enqueue(new MockResponse()); - vpcService.unpublishPrivatePathServiceGateway(null).execute(); + vpcService.updateVpnServerRoute(null).execute(); } // Perform setup needed before each test method @@ -33944,8 +35022,9 @@ public void afterEachTest() throws IOException { public void constructClientService() { System.setProperty("TESTSERVICE_AUTH_TYPE", "noAuth"); final String serviceName = "testService"; + String version = "2024-06-23"; - vpcService = Vpc.newInstance(serviceName); + vpcService = Vpc.newInstance(version, serviceName); String url = server.url("/").toString(); vpcService.setServiceUrl(url); } diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AccountIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AccountIdentityByIdTest.java index a4f13c85e2..73f66a2388 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AccountIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AccountIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AccountIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AccountIdentityTest.java index aa5dfd917a..cf39c917b1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AccountIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AccountIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AccountReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AccountReferenceTest.java index 0c9911cd91..92cbf7e44d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AccountReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AccountReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ActivateReservationOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ActivateReservationOptionsTest.java index b0beded5a7..d766319137 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ActivateReservationOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ActivateReservationOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddBareMetalServerNetworkInterfaceFloatingIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddBareMetalServerNetworkInterfaceFloatingIpOptionsTest.java index 0e694bbd69..c99a5838b0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddBareMetalServerNetworkInterfaceFloatingIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddBareMetalServerNetworkInterfaceFloatingIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddEndpointGatewayIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddEndpointGatewayIpOptionsTest.java index 44c096ff2c..268bdea707 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddEndpointGatewayIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddEndpointGatewayIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddInstanceNetworkInterfaceFloatingIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddInstanceNetworkInterfaceFloatingIpOptionsTest.java index ccd0b16824..664ee43479 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddInstanceNetworkInterfaceFloatingIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddInstanceNetworkInterfaceFloatingIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddNetworkInterfaceFloatingIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddNetworkInterfaceFloatingIpOptionsTest.java index 4a622eab61..3b0e056e26 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddNetworkInterfaceFloatingIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddNetworkInterfaceFloatingIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddVirtualNetworkInterfaceIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddVirtualNetworkInterfaceIpOptionsTest.java index d8acfe02fe..c781583f03 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddVirtualNetworkInterfaceIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddVirtualNetworkInterfaceIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddVpnGatewayAdvertisedCidrOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddVpnGatewayAdvertisedCidrOptionsTest.java new file mode 100644 index 0000000000..0f9388fbfe --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddVpnGatewayAdvertisedCidrOptionsTest.java @@ -0,0 +1,47 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.AddVpnGatewayAdvertisedCidrOptions; +import com.ibm.cloud.is.vpc.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 AddVpnGatewayAdvertisedCidrOptions model. + */ +public class AddVpnGatewayAdvertisedCidrOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testAddVpnGatewayAdvertisedCidrOptions() throws Throwable { + AddVpnGatewayAdvertisedCidrOptions addVpnGatewayAdvertisedCidrOptionsModel = new AddVpnGatewayAdvertisedCidrOptions.Builder() + .vpnGatewayId("testString") + .cidr("192.168.1.0/24") + .build(); + assertEquals(addVpnGatewayAdvertisedCidrOptionsModel.vpnGatewayId(), "testString"); + assertEquals(addVpnGatewayAdvertisedCidrOptionsModel.cidr(), "192.168.1.0/24"); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testAddVpnGatewayAdvertisedCidrOptionsError() throws Throwable { + new AddVpnGatewayAdvertisedCidrOptions.Builder().build(); + } + +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddVpnGatewayConnectionsLocalCidrOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddVpnGatewayConnectionsLocalCidrOptionsTest.java index 066776375e..308a2c0e16 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddVpnGatewayConnectionsLocalCidrOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddVpnGatewayConnectionsLocalCidrOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddVpnGatewayConnectionsPeerCidrOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddVpnGatewayConnectionsPeerCidrOptionsTest.java index 5639a5926e..be575af598 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddVpnGatewayConnectionsPeerCidrOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddVpnGatewayConnectionsPeerCidrOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddressPrefixCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddressPrefixCollectionTest.java index d017dc23cf..d7f1810526 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddressPrefixCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddressPrefixCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddressPrefixPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddressPrefixPatchTest.java index ae354b0fbf..90899e8bf3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddressPrefixPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddressPrefixPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddressPrefixTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddressPrefixTest.java index fb8ac940b1..dd40bb6f9a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddressPrefixTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/AddressPrefixTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyCollectionTest.java index 62d89e0ffe..2e9401be47 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyHealthReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyHealthReasonTest.java index 7d1d7852f2..2c7df47d12 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyHealthReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyHealthReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobCollectionTest.java index 0971bed23b..a73473e631 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceInstanceReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceInstanceReferenceTest.java index 538b01253e..ce485a46ac 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceInstanceReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceInstanceReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceShareReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceShareReferenceTest.java index 8cc21b604d..f4d58fa785 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceShareReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceShareReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceTest.java index 426e0472da..354000ad67 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceVolumeReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceVolumeReferenceTest.java index d2f3ec1023..6dbcb0d5c8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceVolumeReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobSourceVolumeReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobStatusReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobStatusReasonTest.java index 19b649f1bf..76812dc043 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobStatusReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobStatusReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobTest.java index e8e2002de3..91f84a1ec7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyJobTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyMatchResourceTypeInstanceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyMatchResourceTypeInstanceTest.java index 9e0543d29d..19e105e658 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyMatchResourceTypeInstanceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyMatchResourceTypeInstanceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyMatchResourceTypeShareTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyMatchResourceTypeShareTest.java index 1da3577cb8..318f660b8a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyMatchResourceTypeShareTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyMatchResourceTypeShareTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyMatchResourceTypeVolumeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyMatchResourceTypeVolumeTest.java index fa05c6730c..b17d2f4faf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyMatchResourceTypeVolumeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyMatchResourceTypeVolumeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPatchTest.java index e1fb956f71..0896b92c1d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanClonePolicyPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanClonePolicyPatchTest.java index 9464d0980e..d4cb58df00 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanClonePolicyPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanClonePolicyPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanClonePolicyPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanClonePolicyPrototypeTest.java index 58cd6303f3..10d90be9ac 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanClonePolicyPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanClonePolicyPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanClonePolicyTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanClonePolicyTest.java index 5a2100c606..2b933a5a5c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanClonePolicyTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanClonePolicyTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanCollectionTest.java index f467bf7598..c98e61d833 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanDeletionTriggerPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanDeletionTriggerPatchTest.java index a2b9dcde6a..9336103ff7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanDeletionTriggerPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanDeletionTriggerPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanDeletionTriggerPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanDeletionTriggerPrototypeTest.java index 684bdd4cc3..437b5e80b2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanDeletionTriggerPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanDeletionTriggerPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanDeletionTriggerTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanDeletionTriggerTest.java index 7da1d470e3..4681915b3c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanDeletionTriggerTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanDeletionTriggerTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanPatchTest.java index d56169fbf6..cbdcd8ca1e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanPrototypeTest.java index 2df27ca486..12bdb06a5b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanReferenceTest.java index c5b407d679..99196e0c9f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanRemoteRegionPolicyPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanRemoteRegionPolicyPrototypeTest.java index a561a04c03..08f9a5285d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanRemoteRegionPolicyPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanRemoteRegionPolicyPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanRemoteRegionPolicyTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanRemoteRegionPolicyTest.java index c1dd2cf562..92a198de7e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanRemoteRegionPolicyTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanRemoteRegionPolicyTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanRemoteTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanRemoteTest.java index 49f26ecfc7..7e290cbe72 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanRemoteTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanRemoteTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanTest.java index f389130059..c6958336c9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPlanTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototypeTest.java index 5cf37c5119..59e2ca8153 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototypeTest.java index 379528de0b..bdda4ecea1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototypeTest.java index 7d968317ee..46f11b53fb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeTest.java index 0635ad50ed..eb21653104 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopeAccountReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopeAccountReferenceTest.java index 12d2b210d9..7ffe3cfd7f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopeAccountReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopeAccountReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopeEnterpriseReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopeEnterpriseReferenceTest.java index 79dae9cdab..032fe3a27b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopeEnterpriseReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopeEnterpriseReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRNTest.java index 6dbc0132cf..ed73565227 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopePrototypeEnterpriseIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopePrototypeEnterpriseIdentityTest.java index c8d155e1ef..438e7bc9b3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopePrototypeEnterpriseIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopePrototypeEnterpriseIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopePrototypeTest.java index e36123eab5..2f972a65b1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopeTest.java index c2882439c4..9b0f55b8d2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyScopeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTargetSnapshotShareSnapshotReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTargetSnapshotShareSnapshotReferenceTest.java index 81fc07beb8..ea124e0507 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTargetSnapshotShareSnapshotReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTargetSnapshotShareSnapshotReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTargetSnapshotSnapshotReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTargetSnapshotSnapshotReferenceTest.java index 7c988ea947..ee4d140dcb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTargetSnapshotSnapshotReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTargetSnapshotSnapshotReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTargetSnapshotTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTargetSnapshotTest.java index 90d4e57704..0c957daf24 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTargetSnapshotTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTargetSnapshotTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTest.java index 1ab0137015..5dd916d30f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BackupPolicyTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerBootTargetBareMetalServerDiskReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerBootTargetBareMetalServerDiskReferenceTest.java index 4417deca0b..07d3c39e45 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerBootTargetBareMetalServerDiskReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerBootTargetBareMetalServerDiskReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerBootTargetTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerBootTargetTest.java index 6c02ed2e98..e6895a606f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerBootTargetTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerBootTargetTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerCPUTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerCPUTest.java index ff68848e21..fb324a05a6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerCPUTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerCPUTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerCollectionTest.java index 6141061945..afd4336936 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -18,9 +18,11 @@ import com.ibm.cloud.is.vpc.v1.model.BareMetalServerCPU; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerCollection; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerDisk; +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerDiskAllowedUse; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerFirmware; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerHealthReason; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerLifecycleReason; +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerMetadataService; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerNetworkAttachmentReference; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerProfileReference; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerReservationAffinity; diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerConsoleAccessTokenTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerConsoleAccessTokenTest.java index b875968718..805b562e3e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerConsoleAccessTokenTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerConsoleAccessTokenTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskAllowedUseTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskAllowedUseTest.java new file mode 100644 index 0000000000..db8b494710 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskAllowedUseTest.java @@ -0,0 +1,38 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerDiskAllowedUse; +import com.ibm.cloud.is.vpc.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 BareMetalServerDiskAllowedUse model. + */ +public class BareMetalServerDiskAllowedUseTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testBareMetalServerDiskAllowedUse() throws Throwable { + BareMetalServerDiskAllowedUse bareMetalServerDiskAllowedUseModel = new BareMetalServerDiskAllowedUse(); + assertNull(bareMetalServerDiskAllowedUseModel.getApiVersion()); + assertNull(bareMetalServerDiskAllowedUseModel.getBareMetalServer()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskCollectionTest.java index e19b09c5d1..b3e1a9ea11 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -14,6 +14,7 @@ package com.ibm.cloud.is.vpc.v1.model; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerDisk; +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerDiskAllowedUse; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerDiskCollection; import com.ibm.cloud.is.vpc.v1.utils.TestUtilities; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskPatchTest.java index 8fe35e4a60..3cf7ad4666 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskTest.java index 905acd1164..cf6fae6169 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerDiskTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -14,6 +14,7 @@ package com.ibm.cloud.is.vpc.v1.model; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerDisk; +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerDiskAllowedUse; import com.ibm.cloud.is.vpc.v1.utils.TestUtilities; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; import java.io.InputStream; @@ -32,6 +33,7 @@ public class BareMetalServerDiskTest { @Test public void testBareMetalServerDisk() throws Throwable { BareMetalServerDisk bareMetalServerDiskModel = new BareMetalServerDisk(); + assertNull(bareMetalServerDiskModel.getAllowedUse()); assertNull(bareMetalServerDiskModel.getCreatedAt()); assertNull(bareMetalServerDiskModel.getHref()); assertNull(bareMetalServerDiskModel.getId()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerFirmwareTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerFirmwareTest.java index 627fd5b8d8..a2bec351a4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerFirmwareTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerFirmwareTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerHealthReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerHealthReasonTest.java index 1cc96c9c26..e7f0a8cd5e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerHealthReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerHealthReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationDefaultTrustedProfilePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationDefaultTrustedProfilePrototypeTest.java new file mode 100644 index 0000000000..bac456d490 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationDefaultTrustedProfilePrototypeTest.java @@ -0,0 +1,60 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerInitializationDefaultTrustedProfilePrototype; +import com.ibm.cloud.is.vpc.v1.model.TrustedProfileIdentityById; +import com.ibm.cloud.is.vpc.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 BareMetalServerInitializationDefaultTrustedProfilePrototype model. + */ +public class BareMetalServerInitializationDefaultTrustedProfilePrototypeTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testBareMetalServerInitializationDefaultTrustedProfilePrototype() throws Throwable { + TrustedProfileIdentityById trustedProfileIdentityModel = new TrustedProfileIdentityById.Builder() + .id("Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5") + .build(); + assertEquals(trustedProfileIdentityModel.id(), "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"); + + BareMetalServerInitializationDefaultTrustedProfilePrototype bareMetalServerInitializationDefaultTrustedProfilePrototypeModel = new BareMetalServerInitializationDefaultTrustedProfilePrototype.Builder() + .autoLink(false) + .target(trustedProfileIdentityModel) + .build(); + assertEquals(bareMetalServerInitializationDefaultTrustedProfilePrototypeModel.autoLink(), Boolean.valueOf(false)); + assertEquals(bareMetalServerInitializationDefaultTrustedProfilePrototypeModel.target(), trustedProfileIdentityModel); + + String json = TestUtilities.serialize(bareMetalServerInitializationDefaultTrustedProfilePrototypeModel); + + BareMetalServerInitializationDefaultTrustedProfilePrototype bareMetalServerInitializationDefaultTrustedProfilePrototypeModelNew = TestUtilities.deserialize(json, BareMetalServerInitializationDefaultTrustedProfilePrototype.class); + assertTrue(bareMetalServerInitializationDefaultTrustedProfilePrototypeModelNew instanceof BareMetalServerInitializationDefaultTrustedProfilePrototype); + assertEquals(bareMetalServerInitializationDefaultTrustedProfilePrototypeModelNew.autoLink(), Boolean.valueOf(false)); + assertEquals(bareMetalServerInitializationDefaultTrustedProfilePrototypeModelNew.target().toString(), trustedProfileIdentityModel.toString()); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testBareMetalServerInitializationDefaultTrustedProfilePrototypeError() throws Throwable { + new BareMetalServerInitializationDefaultTrustedProfilePrototype.Builder().build(); + } + +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationDefaultTrustedProfileTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationDefaultTrustedProfileTest.java new file mode 100644 index 0000000000..ecc5d0a233 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationDefaultTrustedProfileTest.java @@ -0,0 +1,39 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerInitializationDefaultTrustedProfile; +import com.ibm.cloud.is.vpc.v1.model.TrustedProfileReference; +import com.ibm.cloud.is.vpc.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 BareMetalServerInitializationDefaultTrustedProfile model. + */ +public class BareMetalServerInitializationDefaultTrustedProfileTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testBareMetalServerInitializationDefaultTrustedProfile() throws Throwable { + BareMetalServerInitializationDefaultTrustedProfile bareMetalServerInitializationDefaultTrustedProfileModel = new BareMetalServerInitializationDefaultTrustedProfile(); + assertNull(bareMetalServerInitializationDefaultTrustedProfileModel.isAutoLink()); + assertNull(bareMetalServerInitializationDefaultTrustedProfileModel.getTarget()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationPrototypeTest.java index 34be6d6c76..53f0fa83b5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -13,9 +13,11 @@ package com.ibm.cloud.is.vpc.v1.model; +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerInitializationDefaultTrustedProfilePrototype; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerInitializationPrototype; import com.ibm.cloud.is.vpc.v1.model.ImageIdentityById; import com.ibm.cloud.is.vpc.v1.model.KeyIdentityById; +import com.ibm.cloud.is.vpc.v1.model.TrustedProfileIdentityById; import com.ibm.cloud.is.vpc.v1.utils.TestUtilities; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; import java.io.InputStream; @@ -33,6 +35,18 @@ public class BareMetalServerInitializationPrototypeTest { @Test public void testBareMetalServerInitializationPrototype() throws Throwable { + TrustedProfileIdentityById trustedProfileIdentityModel = new TrustedProfileIdentityById.Builder() + .id("Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5") + .build(); + assertEquals(trustedProfileIdentityModel.id(), "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"); + + BareMetalServerInitializationDefaultTrustedProfilePrototype bareMetalServerInitializationDefaultTrustedProfilePrototypeModel = new BareMetalServerInitializationDefaultTrustedProfilePrototype.Builder() + .autoLink(false) + .target(trustedProfileIdentityModel) + .build(); + assertEquals(bareMetalServerInitializationDefaultTrustedProfilePrototypeModel.autoLink(), Boolean.valueOf(false)); + assertEquals(bareMetalServerInitializationDefaultTrustedProfilePrototypeModel.target(), trustedProfileIdentityModel); + ImageIdentityById imageIdentityModel = new ImageIdentityById.Builder() .id("r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") .build(); @@ -44,10 +58,12 @@ public void testBareMetalServerInitializationPrototype() throws Throwable { assertEquals(keyIdentityModel.id(), "r006-82679077-ac3b-4c10-be16-63e9c21f0f45"); BareMetalServerInitializationPrototype bareMetalServerInitializationPrototypeModel = new BareMetalServerInitializationPrototype.Builder() + .defaultTrustedProfile(bareMetalServerInitializationDefaultTrustedProfilePrototypeModel) .image(imageIdentityModel) .keys(java.util.Arrays.asList(keyIdentityModel)) .userData("testString") .build(); + assertEquals(bareMetalServerInitializationPrototypeModel.defaultTrustedProfile(), bareMetalServerInitializationDefaultTrustedProfilePrototypeModel); assertEquals(bareMetalServerInitializationPrototypeModel.image(), imageIdentityModel); assertEquals(bareMetalServerInitializationPrototypeModel.keys(), java.util.Arrays.asList(keyIdentityModel)); assertEquals(bareMetalServerInitializationPrototypeModel.userData(), "testString"); @@ -56,6 +72,7 @@ public void testBareMetalServerInitializationPrototype() throws Throwable { BareMetalServerInitializationPrototype bareMetalServerInitializationPrototypeModelNew = TestUtilities.deserialize(json, BareMetalServerInitializationPrototype.class); assertTrue(bareMetalServerInitializationPrototypeModelNew instanceof BareMetalServerInitializationPrototype); + assertEquals(bareMetalServerInitializationPrototypeModelNew.defaultTrustedProfile().toString(), bareMetalServerInitializationDefaultTrustedProfilePrototypeModel.toString()); assertEquals(bareMetalServerInitializationPrototypeModelNew.image().toString(), imageIdentityModel.toString()); assertEquals(bareMetalServerInitializationPrototypeModelNew.userData(), "testString"); } diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationTest.java index 606c68828b..2692974ca9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -15,12 +15,14 @@ import com.ibm.cloud.is.vpc.v1.model.AccountReference; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerInitialization; +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerInitializationDefaultTrustedProfile; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount; import com.ibm.cloud.is.vpc.v1.model.Deleted; import com.ibm.cloud.is.vpc.v1.model.ImageReference; import com.ibm.cloud.is.vpc.v1.model.ImageRemoteContextImageReference; import com.ibm.cloud.is.vpc.v1.model.KeyReference; import com.ibm.cloud.is.vpc.v1.model.RegionReference; +import com.ibm.cloud.is.vpc.v1.model.TrustedProfileReference; import com.ibm.cloud.is.vpc.v1.utils.TestUtilities; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; import java.io.InputStream; @@ -39,6 +41,7 @@ public class BareMetalServerInitializationTest { @Test public void testBareMetalServerInitialization() throws Throwable { BareMetalServerInitialization bareMetalServerInitializationModel = new BareMetalServerInitialization(); + assertNull(bareMetalServerInitializationModel.getDefaultTrustedProfile()); assertNull(bareMetalServerInitializationModel.getImage()); assertNull(bareMetalServerInitializationModel.getKeys()); assertNull(bareMetalServerInitializationModel.getUserAccounts()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccountTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccountTest.java index 7ffc5bcccc..78f9acc3af 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccountTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccountTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationUserAccountTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationUserAccountTest.java index b97389a6cb..7a09d12749 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationUserAccountTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerInitializationUserAccountTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerLifecycleReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerLifecycleReasonTest.java index 46b06403ac..5065585f80 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerLifecycleReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerLifecycleReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerMetadataServicePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerMetadataServicePatchTest.java new file mode 100644 index 0000000000..286533553a --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerMetadataServicePatchTest.java @@ -0,0 +1,48 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerMetadataServicePatch; +import com.ibm.cloud.is.vpc.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 BareMetalServerMetadataServicePatch model. + */ +public class BareMetalServerMetadataServicePatchTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testBareMetalServerMetadataServicePatch() throws Throwable { + BareMetalServerMetadataServicePatch bareMetalServerMetadataServicePatchModel = new BareMetalServerMetadataServicePatch.Builder() + .enabled(true) + .protocol("http") + .build(); + assertEquals(bareMetalServerMetadataServicePatchModel.enabled(), Boolean.valueOf(true)); + assertEquals(bareMetalServerMetadataServicePatchModel.protocol(), "http"); + + String json = TestUtilities.serialize(bareMetalServerMetadataServicePatchModel); + + BareMetalServerMetadataServicePatch bareMetalServerMetadataServicePatchModelNew = TestUtilities.deserialize(json, BareMetalServerMetadataServicePatch.class); + assertTrue(bareMetalServerMetadataServicePatchModelNew instanceof BareMetalServerMetadataServicePatch); + assertEquals(bareMetalServerMetadataServicePatchModelNew.enabled(), Boolean.valueOf(true)); + assertEquals(bareMetalServerMetadataServicePatchModelNew.protocol(), "http"); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerMetadataServicePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerMetadataServicePrototypeTest.java new file mode 100644 index 0000000000..fcdfd6a4c4 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerMetadataServicePrototypeTest.java @@ -0,0 +1,48 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerMetadataServicePrototype; +import com.ibm.cloud.is.vpc.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 BareMetalServerMetadataServicePrototype model. + */ +public class BareMetalServerMetadataServicePrototypeTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testBareMetalServerMetadataServicePrototype() throws Throwable { + BareMetalServerMetadataServicePrototype bareMetalServerMetadataServicePrototypeModel = new BareMetalServerMetadataServicePrototype.Builder() + .enabled(true) + .protocol("https") + .build(); + assertEquals(bareMetalServerMetadataServicePrototypeModel.enabled(), Boolean.valueOf(true)); + assertEquals(bareMetalServerMetadataServicePrototypeModel.protocol(), "https"); + + String json = TestUtilities.serialize(bareMetalServerMetadataServicePrototypeModel); + + BareMetalServerMetadataServicePrototype bareMetalServerMetadataServicePrototypeModelNew = TestUtilities.deserialize(json, BareMetalServerMetadataServicePrototype.class); + assertTrue(bareMetalServerMetadataServicePrototypeModelNew instanceof BareMetalServerMetadataServicePrototype); + assertEquals(bareMetalServerMetadataServicePrototypeModelNew.enabled(), Boolean.valueOf(true)); + assertEquals(bareMetalServerMetadataServicePrototypeModelNew.protocol(), "https"); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerMetadataServiceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerMetadataServiceTest.java new file mode 100644 index 0000000000..46343998ea --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerMetadataServiceTest.java @@ -0,0 +1,38 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerMetadataService; +import com.ibm.cloud.is.vpc.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 BareMetalServerMetadataService model. + */ +public class BareMetalServerMetadataServiceTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testBareMetalServerMetadataService() throws Throwable { + BareMetalServerMetadataService bareMetalServerMetadataServiceModel = new BareMetalServerMetadataService(); + assertNull(bareMetalServerMetadataServiceModel.isEnabled()); + assertNull(bareMetalServerMetadataServiceModel.getProtocol()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentByPCITest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentByPCITest.java index 60195db95f..10b848dc6a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentByPCITest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentByPCITest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentByVLANTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentByVLANTest.java index c4c7b15bba..7c5b889f58 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentByVLANTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentByVLANTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentCollectionTest.java index bfa3646f9c..c15626bc56 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPatchTest.java index 08b28940fb..85bfce476a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototypeTest.java index 3599f20689..d0285b1a99 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -96,12 +96,12 @@ public void testBareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkA BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype bareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPciPrototypeModel = new BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype.Builder() .name("my-bare-metal-server-network-attachment") .virtualNetworkInterface(bareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceModel) - .allowedVlans(java.util.Arrays.asList(Long.valueOf("4"))) + .allowedVlans(java.util.Arrays.asList(Long.valueOf(""))) .interfaceType("pci") .build(); assertEquals(bareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPciPrototypeModel.name(), "my-bare-metal-server-network-attachment"); assertEquals(bareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPciPrototypeModel.virtualNetworkInterface(), bareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceModel); - assertEquals(bareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPciPrototypeModel.allowedVlans(), java.util.Arrays.asList(Long.valueOf("4"))); + assertEquals(bareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPciPrototypeModel.allowedVlans(), java.util.Arrays.asList(Long.valueOf(""))); assertEquals(bareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPciPrototypeModel.interfaceType(), "pci"); String json = TestUtilities.serialize(bareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPciPrototypeModel); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototypeTest.java index 298fd05af1..29190b4a54 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeTest.java index d1141a4e8b..f435658359 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceTest.java index e483a41d35..8061087eeb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityTest.java index eda08bb37f..ca26a98b4f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java index bd4f858d44..d7eaaf098d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java index 5984174b50..7efc45fd78 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java index d29e3f6652..916c51b1da 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContextTest.java index 54955215ec..28b94927ab 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentReferenceTest.java index 9015f9bfb4..26c4a79e71 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentTest.java index aca4f42bba..1e822750fe 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkAttachmentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceByHiperSocketTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceByHiperSocketTest.java index c35e475594..32e44f2e60 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceByHiperSocketTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceByHiperSocketTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceByPCITest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceByPCITest.java index 20c6137312..b4c626cfba 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceByPCITest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceByPCITest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceByVLANTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceByVLANTest.java index b462b6db22..3eaddb70b9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceByVLANTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceByVLANTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceCollectionTest.java index f58dd7038d..aa350a2e79 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePatchTest.java index 70908294ee..d3ec4518e7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototypeTest.java index 59a91e0685..5396c8ba4f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototypeTest.java index e8fd387a93..422e283230 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -60,7 +60,7 @@ public void testBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkIn .primaryIp(networkInterfaceIpPrototypeModel) .securityGroups(java.util.Arrays.asList(securityGroupIdentityModel)) .subnet(subnetIdentityModel) - .allowedVlans(java.util.Arrays.asList(Long.valueOf("4"))) + .allowedVlans(java.util.Arrays.asList(Long.valueOf(""))) .interfaceType("pci") .build(); assertEquals(bareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototypeModel.allowIpSpoofing(), Boolean.valueOf(true)); @@ -69,7 +69,7 @@ public void testBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkIn assertEquals(bareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototypeModel.primaryIp(), networkInterfaceIpPrototypeModel); assertEquals(bareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototypeModel.securityGroups(), java.util.Arrays.asList(securityGroupIdentityModel)); assertEquals(bareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototypeModel.subnet(), subnetIdentityModel); - assertEquals(bareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototypeModel.allowedVlans(), java.util.Arrays.asList(Long.valueOf("4"))); + assertEquals(bareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototypeModel.allowedVlans(), java.util.Arrays.asList(Long.valueOf(""))); assertEquals(bareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototypeModel.interfaceType(), "pci"); String json = TestUtilities.serialize(bareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototypeModel); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototypeTest.java index 3807b4a9c3..b5bbf7bc44 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeTest.java index 7d9ca98158..9823fad5b1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfacePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceTest.java index bd83535710..81dc277871 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerNetworkInterfaceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPatchTest.java index c3040460ac..01ea66c1ed 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -13,6 +13,7 @@ package com.ibm.cloud.is.vpc.v1.model; +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerMetadataServicePatch; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerPatch; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerReservationAffinityPatch; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerTrustedPlatformModulePatch; @@ -35,6 +36,13 @@ public class BareMetalServerPatchTest { @Test public void testBareMetalServerPatch() throws Throwable { + BareMetalServerMetadataServicePatch bareMetalServerMetadataServicePatchModel = new BareMetalServerMetadataServicePatch.Builder() + .enabled(true) + .protocol("http") + .build(); + assertEquals(bareMetalServerMetadataServicePatchModel.enabled(), Boolean.valueOf(true)); + assertEquals(bareMetalServerMetadataServicePatchModel.protocol(), "http"); + ReservationIdentityById reservationIdentityModel = new ReservationIdentityById.Builder() .id("0717-ba49df72-37b8-43ac-98da-f8e029de0e63") .build(); @@ -55,12 +63,14 @@ public void testBareMetalServerPatch() throws Throwable { BareMetalServerPatch bareMetalServerPatchModel = new BareMetalServerPatch.Builder() .bandwidth(Long.valueOf("20000")) .enableSecureBoot(false) + .metadataService(bareMetalServerMetadataServicePatchModel) .name("my-bare-metal-server") .reservationAffinity(bareMetalServerReservationAffinityPatchModel) .trustedPlatformModule(bareMetalServerTrustedPlatformModulePatchModel) .build(); assertEquals(bareMetalServerPatchModel.bandwidth(), Long.valueOf("20000")); assertEquals(bareMetalServerPatchModel.enableSecureBoot(), Boolean.valueOf(false)); + assertEquals(bareMetalServerPatchModel.metadataService(), bareMetalServerMetadataServicePatchModel); assertEquals(bareMetalServerPatchModel.name(), "my-bare-metal-server"); assertEquals(bareMetalServerPatchModel.reservationAffinity(), bareMetalServerReservationAffinityPatchModel); assertEquals(bareMetalServerPatchModel.trustedPlatformModule(), bareMetalServerTrustedPlatformModulePatchModel); @@ -71,12 +81,18 @@ public void testBareMetalServerPatch() throws Throwable { assertTrue(bareMetalServerPatchModelNew instanceof BareMetalServerPatch); assertEquals(bareMetalServerPatchModelNew.bandwidth(), Long.valueOf("20000")); assertEquals(bareMetalServerPatchModelNew.enableSecureBoot(), Boolean.valueOf(false)); + assertEquals(bareMetalServerPatchModelNew.metadataService().toString(), bareMetalServerMetadataServicePatchModel.toString()); assertEquals(bareMetalServerPatchModelNew.name(), "my-bare-metal-server"); assertEquals(bareMetalServerPatchModelNew.reservationAffinity().toString(), bareMetalServerReservationAffinityPatchModel.toString()); assertEquals(bareMetalServerPatchModelNew.trustedPlatformModule().toString(), bareMetalServerTrustedPlatformModulePatchModel.toString()); } @Test public void testBareMetalServerPatchAsPatch() throws Throwable { + BareMetalServerMetadataServicePatch bareMetalServerMetadataServicePatchModel = new BareMetalServerMetadataServicePatch.Builder() + .enabled(true) + .protocol("http") + .build(); + ReservationIdentityById reservationIdentityModel = new ReservationIdentityById.Builder() .id("0717-ba49df72-37b8-43ac-98da-f8e029de0e63") .build(); @@ -93,6 +109,7 @@ public void testBareMetalServerPatchAsPatch() throws Throwable { BareMetalServerPatch bareMetalServerPatchModel = new BareMetalServerPatch.Builder() .bandwidth(Long.valueOf("20000")) .enableSecureBoot(false) + .metadataService(bareMetalServerMetadataServicePatchModel) .name("my-bare-metal-server") .reservationAffinity(bareMetalServerReservationAffinityPatchModel) .trustedPlatformModule(bareMetalServerTrustedPlatformModulePatchModel) @@ -102,6 +119,7 @@ public void testBareMetalServerPatchAsPatch() throws Throwable { assertTrue(mergePatch.containsKey("bandwidth")); assertTrue(mergePatch.containsKey("enable_secure_boot")); + assertTrue(mergePatch.containsKey("metadata_service")); assertEquals(mergePatch.get("name"), "my-bare-metal-server"); assertTrue(mergePatch.containsKey("reservation_affinity")); assertTrue(mergePatch.containsKey("trusted_platform_module")); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototypeTest.java index beb8be887d..2653473a24 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -96,12 +96,12 @@ public void testBareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerP BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype bareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPciPrototypeModel = new BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype.Builder() .name("my-bare-metal-server-network-attachment") .virtualNetworkInterface(bareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceModel) - .allowedVlans(java.util.Arrays.asList(Long.valueOf("4"))) + .allowedVlans(java.util.Arrays.asList(Long.valueOf(""))) .interfaceType("pci") .build(); assertEquals(bareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPciPrototypeModel.name(), "my-bare-metal-server-network-attachment"); assertEquals(bareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPciPrototypeModel.virtualNetworkInterface(), bareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceModel); - assertEquals(bareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPciPrototypeModel.allowedVlans(), java.util.Arrays.asList(Long.valueOf("4"))); + assertEquals(bareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPciPrototypeModel.allowedVlans(), java.util.Arrays.asList(Long.valueOf(""))); assertEquals(bareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPciPrototypeModel.interfaceType(), "pci"); String json = TestUtilities.serialize(bareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPciPrototypeModel); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrimaryNetworkAttachmentPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrimaryNetworkAttachmentPrototypeTest.java index aea4de3698..0a81451398 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrimaryNetworkAttachmentPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrimaryNetworkAttachmentPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrimaryNetworkInterfacePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrimaryNetworkInterfacePrototypeTest.java index c4f5f5f3ab..563b8c06fb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrimaryNetworkInterfacePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrimaryNetworkInterfacePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthDependentTest.java index a951fd9114..3a9f68f9ac 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthEnumTest.java index 8a40251edf..9cfea69e6d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthEnumTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthEnumTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthFixedTest.java index f41ea8c75c..683fffcb29 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthRangeTest.java index 94e5e2fa23..3b91f34789 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthTest.java index 9e693089ea..35f532630d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileBandwidthTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUArchitectureTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUArchitectureTest.java index 02a92d33e7..2b473906ca 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUArchitectureTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUArchitectureTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountDependentTest.java index 95071831f8..79c98641aa 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountEnumTest.java index cdb0ff03b1..689c962baf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountEnumTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountEnumTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountFixedTest.java index 89fe79072e..9ec59d7779 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountRangeTest.java index 199c592c06..97dbf71e96 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountTest.java index 4fa27ba95a..6e6e299084 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUCoreCountTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountDependentTest.java index f0b74bcbb2..29f7340fb9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountEnumTest.java index bb27b8b720..77a001d13d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountEnumTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountEnumTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountFixedTest.java index 0e6729aeb4..7fa4dbcfb2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountRangeTest.java index d1deea1932..6935200ca3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountTest.java index 771f8acb43..efc0176fbd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCPUSocketCountTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCollectionTest.java index 14302f1d75..edd88ae3b0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileConsoleTypesTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileConsoleTypesTest.java index 417fd1ca46..34a76e52db 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileConsoleTypesTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileConsoleTypesTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityDependentTest.java index 0a672b32a2..de6cc8c62d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityEnumTest.java index 0a7c9cf9f1..2354d28198 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityEnumTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityEnumTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityFixedTest.java index df9b36368e..2d023d8e53 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityRangeTest.java index f7b0f78745..d2298ae1cf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityTest.java index c07db09cfd..b9e7cc5629 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskQuantityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeDependentTest.java index 89b487766a..ff10e3d616 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeEnumTest.java index 453004fb9a..43c9c3730d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeEnumTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeEnumTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeFixedTest.java index 8c55cf540e..4c01f51474 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeRangeTest.java index 31cf4ba657..b6120c9dff 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeTest.java index 64131c9dc3..748ca8856a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSizeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSupportedInterfacesTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSupportedInterfacesTest.java index 8345bed196..838eb0d488 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSupportedInterfacesTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskSupportedInterfacesTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskTest.java index 5fdca95249..706d68532c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileDiskTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileIdentityByHrefTest.java index cddb2ae6e0..3e206ffce8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileIdentityByNameTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileIdentityByNameTest.java index 41c8c2f0ac..01850f6475 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileIdentityByNameTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileIdentityByNameTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileIdentityTest.java index fa81a14aa7..58afb6280a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryDependentTest.java index e715b037a5..a36ba4bab7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryEnumTest.java index 3f6d515c68..f97be7e4de 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryEnumTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryEnumTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryFixedTest.java index 51b3a9ac34..dd497421bb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryRangeTest.java index 6db71c34d8..e428148401 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryTest.java index 82b9206c61..6e5fcc2f89 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileMemoryTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkAttachmentCountDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkAttachmentCountDependentTest.java index c7839693c1..8d9edccc25 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkAttachmentCountDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkAttachmentCountDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkAttachmentCountRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkAttachmentCountRangeTest.java index b9c7cbee75..1350c74174 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkAttachmentCountRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkAttachmentCountRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkAttachmentCountTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkAttachmentCountTest.java index 0364ec82b3..d7f6851134 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkAttachmentCountTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkAttachmentCountTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkInterfaceCountDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkInterfaceCountDependentTest.java index 966124fe9a..e747d4f2b0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkInterfaceCountDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkInterfaceCountDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkInterfaceCountRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkInterfaceCountRangeTest.java index 08ca54faf3..ab7473e4b7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkInterfaceCountRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkInterfaceCountRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkInterfaceCountTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkInterfaceCountTest.java index 1c07a8c8a4..f8398e3202 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkInterfaceCountTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileNetworkInterfaceCountTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileOSArchitectureTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileOSArchitectureTest.java index 3c301b3d67..a368622ba6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileOSArchitectureTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileOSArchitectureTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileReferenceTest.java index bcbdc0b784..f1f5c0b2fb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileReservationTermsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileReservationTermsTest.java index 6b49b69a2c..58baa61e45 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileReservationTermsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileReservationTermsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileSupportedTrustedPlatformModuleModesTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileSupportedTrustedPlatformModuleModesTest.java index 32583b4ac3..3e1e87a543 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileSupportedTrustedPlatformModuleModesTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileSupportedTrustedPlatformModuleModesTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileTest.java index dd24d2db71..9ec900851a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileVirtualNetworkInterfacesSupportedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileVirtualNetworkInterfacesSupportedTest.java index 880487b652..95667f7405 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileVirtualNetworkInterfacesSupportedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileVirtualNetworkInterfacesSupportedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrototypeBareMetalServerByNetworkAttachmentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrototypeBareMetalServerByNetworkAttachmentTest.java index 48808c377e..04bd97baed 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrototypeBareMetalServerByNetworkAttachmentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrototypeBareMetalServerByNetworkAttachmentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -13,7 +13,9 @@ package com.ibm.cloud.is.vpc.v1.model; +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerInitializationDefaultTrustedProfilePrototype; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerInitializationPrototype; +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerMetadataServicePrototype; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype; @@ -27,6 +29,7 @@ import com.ibm.cloud.is.vpc.v1.model.ResourceGroupIdentityById; import com.ibm.cloud.is.vpc.v1.model.SecurityGroupIdentityById; import com.ibm.cloud.is.vpc.v1.model.SubnetIdentityById; +import com.ibm.cloud.is.vpc.v1.model.TrustedProfileIdentityById; import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; @@ -48,6 +51,18 @@ public class BareMetalServerPrototypeBareMetalServerByNetworkAttachmentTest { @Test public void testBareMetalServerPrototypeBareMetalServerByNetworkAttachment() throws Throwable { + TrustedProfileIdentityById trustedProfileIdentityModel = new TrustedProfileIdentityById.Builder() + .id("Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5") + .build(); + assertEquals(trustedProfileIdentityModel.id(), "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"); + + BareMetalServerInitializationDefaultTrustedProfilePrototype bareMetalServerInitializationDefaultTrustedProfilePrototypeModel = new BareMetalServerInitializationDefaultTrustedProfilePrototype.Builder() + .autoLink(false) + .target(trustedProfileIdentityModel) + .build(); + assertEquals(bareMetalServerInitializationDefaultTrustedProfilePrototypeModel.autoLink(), Boolean.valueOf(false)); + assertEquals(bareMetalServerInitializationDefaultTrustedProfilePrototypeModel.target(), trustedProfileIdentityModel); + ImageIdentityById imageIdentityModel = new ImageIdentityById.Builder() .id("r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") .build(); @@ -59,14 +74,23 @@ public void testBareMetalServerPrototypeBareMetalServerByNetworkAttachment() thr assertEquals(keyIdentityModel.id(), "r006-82679077-ac3b-4c10-be16-63e9c21f0f45"); BareMetalServerInitializationPrototype bareMetalServerInitializationPrototypeModel = new BareMetalServerInitializationPrototype.Builder() + .defaultTrustedProfile(bareMetalServerInitializationDefaultTrustedProfilePrototypeModel) .image(imageIdentityModel) .keys(java.util.Arrays.asList(keyIdentityModel)) .userData("testString") .build(); + assertEquals(bareMetalServerInitializationPrototypeModel.defaultTrustedProfile(), bareMetalServerInitializationDefaultTrustedProfilePrototypeModel); assertEquals(bareMetalServerInitializationPrototypeModel.image(), imageIdentityModel); assertEquals(bareMetalServerInitializationPrototypeModel.keys(), java.util.Arrays.asList(keyIdentityModel)); assertEquals(bareMetalServerInitializationPrototypeModel.userData(), "testString"); + BareMetalServerMetadataServicePrototype bareMetalServerMetadataServicePrototypeModel = new BareMetalServerMetadataServicePrototype.Builder() + .enabled(true) + .protocol("https") + .build(); + assertEquals(bareMetalServerMetadataServicePrototypeModel.enabled(), Boolean.valueOf(true)); + assertEquals(bareMetalServerMetadataServicePrototypeModel.protocol(), "https"); + BareMetalServerProfileIdentityByName bareMetalServerProfileIdentityModel = new BareMetalServerProfileIdentityByName.Builder() .name("bx2-metal-192x768") .build(); @@ -158,29 +182,30 @@ public void testBareMetalServerPrototypeBareMetalServerByNetworkAttachment() thr BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype bareMetalServerNetworkAttachmentPrototypeModel = new BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype.Builder() .name("my-bare-metal-server-network-attachment") .virtualNetworkInterface(bareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceModel) - .allowedVlans(java.util.Arrays.asList(Long.valueOf("4"))) + .allowedVlans(java.util.Arrays.asList(Long.valueOf(""))) .interfaceType("pci") .build(); assertEquals(bareMetalServerNetworkAttachmentPrototypeModel.name(), "my-bare-metal-server-network-attachment"); assertEquals(bareMetalServerNetworkAttachmentPrototypeModel.virtualNetworkInterface(), bareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceModel); - assertEquals(bareMetalServerNetworkAttachmentPrototypeModel.allowedVlans(), java.util.Arrays.asList(Long.valueOf("4"))); + assertEquals(bareMetalServerNetworkAttachmentPrototypeModel.allowedVlans(), java.util.Arrays.asList(Long.valueOf(""))); assertEquals(bareMetalServerNetworkAttachmentPrototypeModel.interfaceType(), "pci"); BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype bareMetalServerPrimaryNetworkAttachmentPrototypeModel = new BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype.Builder() .name("my-bare-metal-server-network-attachment") .virtualNetworkInterface(bareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceModel) - .allowedVlans(java.util.Arrays.asList(Long.valueOf("4"))) + .allowedVlans(java.util.Arrays.asList(Long.valueOf(""))) .interfaceType("pci") .build(); assertEquals(bareMetalServerPrimaryNetworkAttachmentPrototypeModel.name(), "my-bare-metal-server-network-attachment"); assertEquals(bareMetalServerPrimaryNetworkAttachmentPrototypeModel.virtualNetworkInterface(), bareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceModel); - assertEquals(bareMetalServerPrimaryNetworkAttachmentPrototypeModel.allowedVlans(), java.util.Arrays.asList(Long.valueOf("4"))); + assertEquals(bareMetalServerPrimaryNetworkAttachmentPrototypeModel.allowedVlans(), java.util.Arrays.asList(Long.valueOf(""))); assertEquals(bareMetalServerPrimaryNetworkAttachmentPrototypeModel.interfaceType(), "pci"); BareMetalServerPrototypeBareMetalServerByNetworkAttachment bareMetalServerPrototypeBareMetalServerByNetworkAttachmentModel = new BareMetalServerPrototypeBareMetalServerByNetworkAttachment.Builder() .bandwidth(Long.valueOf("20000")) .enableSecureBoot(false) .initialization(bareMetalServerInitializationPrototypeModel) + .metadataService(bareMetalServerMetadataServicePrototypeModel) .name("my-bare-metal-server") .profile(bareMetalServerProfileIdentityModel) .reservationAffinity(bareMetalServerReservationAffinityPrototypeModel) @@ -194,6 +219,7 @@ public void testBareMetalServerPrototypeBareMetalServerByNetworkAttachment() thr assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkAttachmentModel.bandwidth(), Long.valueOf("20000")); assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkAttachmentModel.enableSecureBoot(), Boolean.valueOf(false)); assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkAttachmentModel.initialization(), bareMetalServerInitializationPrototypeModel); + assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkAttachmentModel.metadataService(), bareMetalServerMetadataServicePrototypeModel); assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkAttachmentModel.name(), "my-bare-metal-server"); assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkAttachmentModel.profile(), bareMetalServerProfileIdentityModel); assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkAttachmentModel.reservationAffinity(), bareMetalServerReservationAffinityPrototypeModel); @@ -211,6 +237,7 @@ public void testBareMetalServerPrototypeBareMetalServerByNetworkAttachment() thr assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkAttachmentModelNew.bandwidth(), Long.valueOf("20000")); assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkAttachmentModelNew.enableSecureBoot(), Boolean.valueOf(false)); assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkAttachmentModelNew.initialization().toString(), bareMetalServerInitializationPrototypeModel.toString()); + assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkAttachmentModelNew.metadataService().toString(), bareMetalServerMetadataServicePrototypeModel.toString()); assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkAttachmentModelNew.name(), "my-bare-metal-server"); assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkAttachmentModelNew.profile().toString(), bareMetalServerProfileIdentityModel.toString()); assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkAttachmentModelNew.reservationAffinity().toString(), bareMetalServerReservationAffinityPrototypeModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrototypeBareMetalServerByNetworkInterfaceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrototypeBareMetalServerByNetworkInterfaceTest.java index 5de076324b..8e5eb1bba8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrototypeBareMetalServerByNetworkInterfaceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrototypeBareMetalServerByNetworkInterfaceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -13,7 +13,9 @@ package com.ibm.cloud.is.vpc.v1.model; +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerInitializationDefaultTrustedProfilePrototype; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerInitializationPrototype; +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerMetadataServicePrototype; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerPrimaryNetworkInterfacePrototype; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerProfileIdentityByName; @@ -27,6 +29,7 @@ import com.ibm.cloud.is.vpc.v1.model.ResourceGroupIdentityById; import com.ibm.cloud.is.vpc.v1.model.SecurityGroupIdentityById; import com.ibm.cloud.is.vpc.v1.model.SubnetIdentityById; +import com.ibm.cloud.is.vpc.v1.model.TrustedProfileIdentityById; import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.ZoneIdentityByName; import com.ibm.cloud.is.vpc.v1.utils.TestUtilities; @@ -46,6 +49,18 @@ public class BareMetalServerPrototypeBareMetalServerByNetworkInterfaceTest { @Test public void testBareMetalServerPrototypeBareMetalServerByNetworkInterface() throws Throwable { + TrustedProfileIdentityById trustedProfileIdentityModel = new TrustedProfileIdentityById.Builder() + .id("Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5") + .build(); + assertEquals(trustedProfileIdentityModel.id(), "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"); + + BareMetalServerInitializationDefaultTrustedProfilePrototype bareMetalServerInitializationDefaultTrustedProfilePrototypeModel = new BareMetalServerInitializationDefaultTrustedProfilePrototype.Builder() + .autoLink(false) + .target(trustedProfileIdentityModel) + .build(); + assertEquals(bareMetalServerInitializationDefaultTrustedProfilePrototypeModel.autoLink(), Boolean.valueOf(false)); + assertEquals(bareMetalServerInitializationDefaultTrustedProfilePrototypeModel.target(), trustedProfileIdentityModel); + ImageIdentityById imageIdentityModel = new ImageIdentityById.Builder() .id("r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") .build(); @@ -57,14 +72,23 @@ public void testBareMetalServerPrototypeBareMetalServerByNetworkInterface() thro assertEquals(keyIdentityModel.id(), "r006-82679077-ac3b-4c10-be16-63e9c21f0f45"); BareMetalServerInitializationPrototype bareMetalServerInitializationPrototypeModel = new BareMetalServerInitializationPrototype.Builder() + .defaultTrustedProfile(bareMetalServerInitializationDefaultTrustedProfilePrototypeModel) .image(imageIdentityModel) .keys(java.util.Arrays.asList(keyIdentityModel)) .userData("testString") .build(); + assertEquals(bareMetalServerInitializationPrototypeModel.defaultTrustedProfile(), bareMetalServerInitializationDefaultTrustedProfilePrototypeModel); assertEquals(bareMetalServerInitializationPrototypeModel.image(), imageIdentityModel); assertEquals(bareMetalServerInitializationPrototypeModel.keys(), java.util.Arrays.asList(keyIdentityModel)); assertEquals(bareMetalServerInitializationPrototypeModel.userData(), "testString"); + BareMetalServerMetadataServicePrototype bareMetalServerMetadataServicePrototypeModel = new BareMetalServerMetadataServicePrototype.Builder() + .enabled(true) + .protocol("https") + .build(); + assertEquals(bareMetalServerMetadataServicePrototypeModel.enabled(), Boolean.valueOf(true)); + assertEquals(bareMetalServerMetadataServicePrototypeModel.protocol(), "https"); + BareMetalServerProfileIdentityByName bareMetalServerProfileIdentityModel = new BareMetalServerProfileIdentityByName.Builder() .name("bx2-metal-192x768") .build(); @@ -161,6 +185,7 @@ public void testBareMetalServerPrototypeBareMetalServerByNetworkInterface() thro .bandwidth(Long.valueOf("20000")) .enableSecureBoot(false) .initialization(bareMetalServerInitializationPrototypeModel) + .metadataService(bareMetalServerMetadataServicePrototypeModel) .name("my-bare-metal-server") .profile(bareMetalServerProfileIdentityModel) .reservationAffinity(bareMetalServerReservationAffinityPrototypeModel) @@ -174,6 +199,7 @@ public void testBareMetalServerPrototypeBareMetalServerByNetworkInterface() thro assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkInterfaceModel.bandwidth(), Long.valueOf("20000")); assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkInterfaceModel.enableSecureBoot(), Boolean.valueOf(false)); assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkInterfaceModel.initialization(), bareMetalServerInitializationPrototypeModel); + assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkInterfaceModel.metadataService(), bareMetalServerMetadataServicePrototypeModel); assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkInterfaceModel.name(), "my-bare-metal-server"); assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkInterfaceModel.profile(), bareMetalServerProfileIdentityModel); assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkInterfaceModel.reservationAffinity(), bareMetalServerReservationAffinityPrototypeModel); @@ -191,6 +217,7 @@ public void testBareMetalServerPrototypeBareMetalServerByNetworkInterface() thro assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkInterfaceModelNew.bandwidth(), Long.valueOf("20000")); assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkInterfaceModelNew.enableSecureBoot(), Boolean.valueOf(false)); assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkInterfaceModelNew.initialization().toString(), bareMetalServerInitializationPrototypeModel.toString()); + assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkInterfaceModelNew.metadataService().toString(), bareMetalServerMetadataServicePrototypeModel.toString()); assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkInterfaceModelNew.name(), "my-bare-metal-server"); assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkInterfaceModelNew.profile().toString(), bareMetalServerProfileIdentityModel.toString()); assertEquals(bareMetalServerPrototypeBareMetalServerByNetworkInterfaceModelNew.reservationAffinity().toString(), bareMetalServerReservationAffinityPrototypeModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrototypeTest.java index 1508b9b6a7..a565dcab18 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -13,7 +13,9 @@ package com.ibm.cloud.is.vpc.v1.model; +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerInitializationDefaultTrustedProfilePrototype; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerInitializationPrototype; +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerMetadataServicePrototype; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype; @@ -27,6 +29,7 @@ import com.ibm.cloud.is.vpc.v1.model.ResourceGroupIdentityById; import com.ibm.cloud.is.vpc.v1.model.SecurityGroupIdentityById; import com.ibm.cloud.is.vpc.v1.model.SubnetIdentityById; +import com.ibm.cloud.is.vpc.v1.model.TrustedProfileIdentityById; import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerReservationAffinityPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerReservationAffinityPatchTest.java index b794307c0f..0f6b515922 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerReservationAffinityPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerReservationAffinityPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerReservationAffinityPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerReservationAffinityPrototypeTest.java index a7e6a18fec..8e70d30357 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerReservationAffinityPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerReservationAffinityPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerReservationAffinityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerReservationAffinityTest.java index 668e0db4fd..1df162abf6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerReservationAffinityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerReservationAffinityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerStatusReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerStatusReasonTest.java index d59c80a7ad..e8c80eb180 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerStatusReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerStatusReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTest.java index 194572c963..f5bbf5ea82 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -17,9 +17,11 @@ import com.ibm.cloud.is.vpc.v1.model.BareMetalServerBootTargetBareMetalServerDiskReference; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerCPU; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerDisk; +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerDiskAllowedUse; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerFirmware; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerHealthReason; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerLifecycleReason; +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerMetadataService; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerNetworkAttachmentReference; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerProfileReference; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerReservationAffinity; @@ -68,6 +70,7 @@ public void testBareMetalServer() throws Throwable { assertNull(bareMetalServerModel.getLifecycleReasons()); assertNull(bareMetalServerModel.getLifecycleState()); assertNull(bareMetalServerModel.getMemory()); + assertNull(bareMetalServerModel.getMetadataService()); assertNull(bareMetalServerModel.getName()); assertNull(bareMetalServerModel.getNetworkAttachments()); assertNull(bareMetalServerModel.getNetworkInterfaces()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTrustedPlatformModulePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTrustedPlatformModulePatchTest.java index 4fadc9357d..b1c49cc741 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTrustedPlatformModulePatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTrustedPlatformModulePatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTrustedPlatformModulePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTrustedPlatformModulePrototypeTest.java index 1925be19b1..1d20f6694e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTrustedPlatformModulePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTrustedPlatformModulePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTrustedPlatformModuleTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTrustedPlatformModuleTest.java index 0e9c25fe83..d6fcbc43de 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTrustedPlatformModuleTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTrustedPlatformModuleTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingIdentityCatalogOfferingByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingIdentityCatalogOfferingByCRNTest.java index b24b42cf8b..c37c2d062c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingIdentityCatalogOfferingByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingIdentityCatalogOfferingByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingIdentityTest.java index 8650847926..1522249cd1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionIdentityCatalogOfferingVersionByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionIdentityCatalogOfferingVersionByCRNTest.java index c2d3c1f6e6..154fbee30e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionIdentityCatalogOfferingVersionByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionIdentityCatalogOfferingVersionByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionIdentityTest.java index ca2ac33103..a832227fe8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRNTest.java index b0afb42e3c..16177b6fab 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionPlanIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionPlanIdentityTest.java index 439ed19c86..554ba2418f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionPlanIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionPlanIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionPlanReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionPlanReferenceTest.java index 09f6980f85..c1387b85ce 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionPlanReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionPlanReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionReferenceTest.java index 15790d8d89..629a00ef80 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CatalogOfferingVersionReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CertificateInstanceIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CertificateInstanceIdentityByCRNTest.java index ad82bbe6f5..7790172b95 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CertificateInstanceIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CertificateInstanceIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CertificateInstanceIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CertificateInstanceIdentityTest.java index 056a337730..1c6d68b876 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CertificateInstanceIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CertificateInstanceIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CertificateInstanceReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CertificateInstanceReferenceTest.java index ee67323a67..3b2358b8b9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CertificateInstanceReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CertificateInstanceReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CheckVpnGatewayAdvertisedCidrOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CheckVpnGatewayAdvertisedCidrOptionsTest.java new file mode 100644 index 0000000000..74884ec130 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CheckVpnGatewayAdvertisedCidrOptionsTest.java @@ -0,0 +1,47 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.CheckVpnGatewayAdvertisedCidrOptions; +import com.ibm.cloud.is.vpc.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 CheckVpnGatewayAdvertisedCidrOptions model. + */ +public class CheckVpnGatewayAdvertisedCidrOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testCheckVpnGatewayAdvertisedCidrOptions() throws Throwable { + CheckVpnGatewayAdvertisedCidrOptions checkVpnGatewayAdvertisedCidrOptionsModel = new CheckVpnGatewayAdvertisedCidrOptions.Builder() + .vpnGatewayId("testString") + .cidr("192.168.1.0/24") + .build(); + assertEquals(checkVpnGatewayAdvertisedCidrOptionsModel.vpnGatewayId(), "testString"); + assertEquals(checkVpnGatewayAdvertisedCidrOptionsModel.cidr(), "192.168.1.0/24"); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testCheckVpnGatewayAdvertisedCidrOptionsError() throws Throwable { + new CheckVpnGatewayAdvertisedCidrOptions.Builder().build(); + } + +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CheckVpnGatewayConnectionsLocalCidrOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CheckVpnGatewayConnectionsLocalCidrOptionsTest.java index 6547f5e8b2..7974e8aa1b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CheckVpnGatewayConnectionsLocalCidrOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CheckVpnGatewayConnectionsLocalCidrOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CheckVpnGatewayConnectionsPeerCidrOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CheckVpnGatewayConnectionsPeerCidrOptionsTest.java index b8d795dd68..a3364a6dcf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CheckVpnGatewayConnectionsPeerCidrOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CheckVpnGatewayConnectionsPeerCidrOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketIdentityByCRNTest.java index 44984bdf7b..6caabf8032 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByNameTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByNameTest.java index b172f72cbe..b984f0afac 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByNameTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByNameTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketIdentityTest.java index bffd93e826..b5ec23f6b8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketReferenceTest.java index 1b4547a341..bf87fd9bac 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageBucketReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageObjectReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageObjectReferenceTest.java index 013d2a914e..aa119b8b89 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageObjectReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CloudObjectStorageObjectReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkCollectionTest.java index 66323ff226..43cafe1ace 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceCollectionTest.java index 61c6cea846..9628c48ca1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceLifecycleReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceLifecycleReasonTest.java index 10fb3ce716..0ba2635f54 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceLifecycleReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceLifecycleReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePatchTest.java index 815d5ef9cd..9be5ada9bf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHrefTest.java index f85fb66e22..4378cd12c6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByIdTest.java index 0255e413c4..9b32659c6c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextTest.java index ad920dd00f..53152ac9e4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContextTest.java index 741e640e20..086ee08a8d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeTest.java index de9473ccc2..45610e3398 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfacePrimaryIPPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceReferenceTest.java index d8b961da16..fb187ec920 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContextTest.java index 0a8007d520..09dd55aa24 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceTargetTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceTargetTest.java index 0c7acbd2e7..94341b6064 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceTargetTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceTargetTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceTest.java index 1305f1f4bf..3d16605c67 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkInterfaceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkLifecycleReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkLifecycleReasonTest.java index 8008f6ac7e..6ae63355ff 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkLifecycleReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkLifecycleReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkPatchTest.java index 5616538e90..806aa59644 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileCollectionTest.java index 81ed91fcb7..26e3a7ac72 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileIdentityByHrefTest.java index 7f405eecf3..4840a592a8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileIdentityByNameTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileIdentityByNameTest.java index 9cf3be5acb..85145fbcc2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileIdentityByNameTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileIdentityByNameTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileIdentityTest.java index dd209be70b..f08a285947 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileReferenceTest.java index 12f6e0e5e4..1c4036c056 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileTest.java index ce78c39c16..331155df78 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkProfileTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkReferenceTest.java index 28642a83b3..3c42e0f1b8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetCollectionTest.java index 28ab18f6d4..2d5fda1235 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetIdentityByHrefTest.java index 5acde2321b..bcfd61eff6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetIdentityByIdTest.java index 75ca9fbf17..dcb8d22979 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetIdentityTest.java index 529f2f5185..1bd43c0c36 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetLifecycleReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetLifecycleReasonTest.java index f0d823124f..8da7e5ea39 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetLifecycleReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetLifecycleReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPatchTest.java index 3685549a04..5b93c44dc1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrefixPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrefixPrototypeTest.java index 40faad6b90..50eb5c04a1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrefixPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrefixPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrefixTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrefixTest.java index d7dd85a709..be0f678804 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrefixTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrefixTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrototypeClusterNetworkSubnetByIPv4CIDRBlockPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrototypeClusterNetworkSubnetByIPv4CIDRBlockPrototypeTest.java index 4a29f5cf9d..8b7da3c7a9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrototypeClusterNetworkSubnetByIPv4CIDRBlockPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrototypeClusterNetworkSubnetByIPv4CIDRBlockPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototypeTest.java index 358d3ac97e..ca9625140f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrototypeTest.java index 993b8324bf..e1b317663d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReferenceTest.java index 13db2e779c..d891116dd1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPCollectionTest.java index ea2753d356..ff73900c7f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPLifecycleReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPLifecycleReasonTest.java index 93d5be9bda..6cbb551271 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPLifecycleReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPLifecycleReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPPatchTest.java index 81517e35e2..717235e590 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPReferenceTest.java index dd82d58f4d..fc1c4bf991 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContextTest.java index 35d97d1c8a..f940e95ac8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPTargetTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPTargetTest.java index a998591344..b124739a6b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPTargetTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPTargetTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPTest.java index 749e858f91..2454e2b701 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetReservedIPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetTest.java index b307280951..55c7739173 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkSubnetTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkTest.java index e0f21799fa..a2af365ad4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ClusterNetworkTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateBackupPolicyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateBackupPolicyOptionsTest.java index 54cc6d07ec..34260f76d4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateBackupPolicyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateBackupPolicyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateBackupPolicyPlanOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateBackupPolicyPlanOptionsTest.java index b3c422bd37..ff2ae4d6b5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateBackupPolicyPlanOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateBackupPolicyPlanOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerConsoleAccessTokenOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerConsoleAccessTokenOptionsTest.java index 0b50756e82..600700487a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerConsoleAccessTokenOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerConsoleAccessTokenOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerNetworkAttachmentOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerNetworkAttachmentOptionsTest.java index 00c5d88f57..20e8fd66ee 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerNetworkAttachmentOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerNetworkAttachmentOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -97,12 +97,12 @@ public void testCreateBareMetalServerNetworkAttachmentOptions() throws Throwable BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype bareMetalServerNetworkAttachmentPrototypeModel = new BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype.Builder() .name("my-bare-metal-server-network-attachment") .virtualNetworkInterface(bareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceModel) - .allowedVlans(java.util.Arrays.asList(Long.valueOf("4"))) + .allowedVlans(java.util.Arrays.asList(Long.valueOf(""))) .interfaceType("pci") .build(); assertEquals(bareMetalServerNetworkAttachmentPrototypeModel.name(), "my-bare-metal-server-network-attachment"); assertEquals(bareMetalServerNetworkAttachmentPrototypeModel.virtualNetworkInterface(), bareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceModel); - assertEquals(bareMetalServerNetworkAttachmentPrototypeModel.allowedVlans(), java.util.Arrays.asList(Long.valueOf("4"))); + assertEquals(bareMetalServerNetworkAttachmentPrototypeModel.allowedVlans(), java.util.Arrays.asList(Long.valueOf(""))); assertEquals(bareMetalServerNetworkAttachmentPrototypeModel.interfaceType(), "pci"); CreateBareMetalServerNetworkAttachmentOptions createBareMetalServerNetworkAttachmentOptionsModel = new CreateBareMetalServerNetworkAttachmentOptions.Builder() diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerNetworkInterfaceOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerNetworkInterfaceOptionsTest.java index 488f8477b3..f92a7312f9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerNetworkInterfaceOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerNetworkInterfaceOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerOptionsTest.java index 1d58cebfc3..aacd0ddb23 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateBareMetalServerOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -13,7 +13,9 @@ package com.ibm.cloud.is.vpc.v1.model; +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerInitializationDefaultTrustedProfilePrototype; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerInitializationPrototype; +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerMetadataServicePrototype; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext; import com.ibm.cloud.is.vpc.v1.model.BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype; @@ -28,6 +30,7 @@ import com.ibm.cloud.is.vpc.v1.model.ResourceGroupIdentityById; import com.ibm.cloud.is.vpc.v1.model.SecurityGroupIdentityById; import com.ibm.cloud.is.vpc.v1.model.SubnetIdentityById; +import com.ibm.cloud.is.vpc.v1.model.TrustedProfileIdentityById; import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; @@ -49,6 +52,18 @@ public class CreateBareMetalServerOptionsTest { @Test public void testCreateBareMetalServerOptions() throws Throwable { + TrustedProfileIdentityById trustedProfileIdentityModel = new TrustedProfileIdentityById.Builder() + .id("Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5") + .build(); + assertEquals(trustedProfileIdentityModel.id(), "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"); + + BareMetalServerInitializationDefaultTrustedProfilePrototype bareMetalServerInitializationDefaultTrustedProfilePrototypeModel = new BareMetalServerInitializationDefaultTrustedProfilePrototype.Builder() + .autoLink(false) + .target(trustedProfileIdentityModel) + .build(); + assertEquals(bareMetalServerInitializationDefaultTrustedProfilePrototypeModel.autoLink(), Boolean.valueOf(false)); + assertEquals(bareMetalServerInitializationDefaultTrustedProfilePrototypeModel.target(), trustedProfileIdentityModel); + ImageIdentityById imageIdentityModel = new ImageIdentityById.Builder() .id("r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") .build(); @@ -60,14 +75,23 @@ public void testCreateBareMetalServerOptions() throws Throwable { assertEquals(keyIdentityModel.id(), "r006-82679077-ac3b-4c10-be16-63e9c21f0f45"); BareMetalServerInitializationPrototype bareMetalServerInitializationPrototypeModel = new BareMetalServerInitializationPrototype.Builder() + .defaultTrustedProfile(bareMetalServerInitializationDefaultTrustedProfilePrototypeModel) .image(imageIdentityModel) .keys(java.util.Arrays.asList(keyIdentityModel)) .userData("testString") .build(); + assertEquals(bareMetalServerInitializationPrototypeModel.defaultTrustedProfile(), bareMetalServerInitializationDefaultTrustedProfilePrototypeModel); assertEquals(bareMetalServerInitializationPrototypeModel.image(), imageIdentityModel); assertEquals(bareMetalServerInitializationPrototypeModel.keys(), java.util.Arrays.asList(keyIdentityModel)); assertEquals(bareMetalServerInitializationPrototypeModel.userData(), "testString"); + BareMetalServerMetadataServicePrototype bareMetalServerMetadataServicePrototypeModel = new BareMetalServerMetadataServicePrototype.Builder() + .enabled(true) + .protocol("https") + .build(); + assertEquals(bareMetalServerMetadataServicePrototypeModel.enabled(), Boolean.valueOf(true)); + assertEquals(bareMetalServerMetadataServicePrototypeModel.protocol(), "https"); + BareMetalServerProfileIdentityByName bareMetalServerProfileIdentityModel = new BareMetalServerProfileIdentityByName.Builder() .name("bx2-metal-192x768") .build(); @@ -159,29 +183,30 @@ public void testCreateBareMetalServerOptions() throws Throwable { BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype bareMetalServerNetworkAttachmentPrototypeModel = new BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype.Builder() .name("my-bare-metal-server-network-attachment") .virtualNetworkInterface(bareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceModel) - .allowedVlans(java.util.Arrays.asList(Long.valueOf("4"))) + .allowedVlans(java.util.Arrays.asList(Long.valueOf(""))) .interfaceType("pci") .build(); assertEquals(bareMetalServerNetworkAttachmentPrototypeModel.name(), "my-bare-metal-server-network-attachment"); assertEquals(bareMetalServerNetworkAttachmentPrototypeModel.virtualNetworkInterface(), bareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceModel); - assertEquals(bareMetalServerNetworkAttachmentPrototypeModel.allowedVlans(), java.util.Arrays.asList(Long.valueOf("4"))); + assertEquals(bareMetalServerNetworkAttachmentPrototypeModel.allowedVlans(), java.util.Arrays.asList(Long.valueOf(""))); assertEquals(bareMetalServerNetworkAttachmentPrototypeModel.interfaceType(), "pci"); BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype bareMetalServerPrimaryNetworkAttachmentPrototypeModel = new BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype.Builder() .name("my-bare-metal-server-network-attachment") .virtualNetworkInterface(bareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceModel) - .allowedVlans(java.util.Arrays.asList(Long.valueOf("4"))) + .allowedVlans(java.util.Arrays.asList(Long.valueOf(""))) .interfaceType("pci") .build(); assertEquals(bareMetalServerPrimaryNetworkAttachmentPrototypeModel.name(), "my-bare-metal-server-network-attachment"); assertEquals(bareMetalServerPrimaryNetworkAttachmentPrototypeModel.virtualNetworkInterface(), bareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceModel); - assertEquals(bareMetalServerPrimaryNetworkAttachmentPrototypeModel.allowedVlans(), java.util.Arrays.asList(Long.valueOf("4"))); + assertEquals(bareMetalServerPrimaryNetworkAttachmentPrototypeModel.allowedVlans(), java.util.Arrays.asList(Long.valueOf(""))); assertEquals(bareMetalServerPrimaryNetworkAttachmentPrototypeModel.interfaceType(), "pci"); BareMetalServerPrototypeBareMetalServerByNetworkAttachment bareMetalServerPrototypeModel = new BareMetalServerPrototypeBareMetalServerByNetworkAttachment.Builder() .bandwidth(Long.valueOf("20000")) .enableSecureBoot(false) .initialization(bareMetalServerInitializationPrototypeModel) + .metadataService(bareMetalServerMetadataServicePrototypeModel) .name("my-bare-metal-server") .profile(bareMetalServerProfileIdentityModel) .reservationAffinity(bareMetalServerReservationAffinityPrototypeModel) @@ -195,6 +220,7 @@ public void testCreateBareMetalServerOptions() throws Throwable { assertEquals(bareMetalServerPrototypeModel.bandwidth(), Long.valueOf("20000")); assertEquals(bareMetalServerPrototypeModel.enableSecureBoot(), Boolean.valueOf(false)); assertEquals(bareMetalServerPrototypeModel.initialization(), bareMetalServerInitializationPrototypeModel); + assertEquals(bareMetalServerPrototypeModel.metadataService(), bareMetalServerMetadataServicePrototypeModel); assertEquals(bareMetalServerPrototypeModel.name(), "my-bare-metal-server"); assertEquals(bareMetalServerPrototypeModel.profile(), bareMetalServerProfileIdentityModel); assertEquals(bareMetalServerPrototypeModel.reservationAffinity(), bareMetalServerReservationAffinityPrototypeModel); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkAttachmentOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkAttachmentOptionsTest.java index 39464094d1..4460cffbf1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkAttachmentOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkAttachmentOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkInterfaceOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkInterfaceOptionsTest.java index ee50ca616d..f4cd9d0a5c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkInterfaceOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkInterfaceOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkOptionsTest.java index c3f5539af4..b142b795ce 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkSubnetOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkSubnetOptionsTest.java index 453e7dcf4a..5e2ce9a24a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkSubnetOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkSubnetOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkSubnetReservedIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkSubnetReservedIpOptionsTest.java index d4360486de..1394ad3eeb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkSubnetReservedIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateClusterNetworkSubnetReservedIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateDedicatedHostGroupOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateDedicatedHostGroupOptionsTest.java index a1ee7e6699..084fdb863e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateDedicatedHostGroupOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateDedicatedHostGroupOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateDedicatedHostOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateDedicatedHostOptionsTest.java index d94003e6dd..f347b8200a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateDedicatedHostOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateDedicatedHostOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateEndpointGatewayOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateEndpointGatewayOptionsTest.java index 039efa366e..11c16177de 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateEndpointGatewayOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateEndpointGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateFloatingIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateFloatingIpOptionsTest.java index e54a61d68b..68c41ef22f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateFloatingIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateFloatingIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateFlowLogCollectorOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateFlowLogCollectorOptionsTest.java index 516d23a204..2c8f683ac1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateFlowLogCollectorOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateFlowLogCollectorOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateIkePolicyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateIkePolicyOptionsTest.java index ebdc3af50b..6dcd9d9722 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateIkePolicyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateIkePolicyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateImageExportJobOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateImageExportJobOptionsTest.java index 5c09284262..11c539eced 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateImageExportJobOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateImageExportJobOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateImageOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateImageOptionsTest.java index 8d20c268c5..51f06db5ff 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateImageOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateImageOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -15,6 +15,7 @@ import com.ibm.cloud.is.vpc.v1.model.CreateImageOptions; import com.ibm.cloud.is.vpc.v1.model.EncryptionKeyIdentityByCRN; +import com.ibm.cloud.is.vpc.v1.model.ImageAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.ImageFilePrototype; import com.ibm.cloud.is.vpc.v1.model.ImagePrototypeImageByFile; import com.ibm.cloud.is.vpc.v1.model.OperatingSystemIdentityByName; @@ -37,6 +38,15 @@ public class CreateImageOptionsTest { @Test public void testCreateImageOptions() throws Throwable { + ImageAllowedUsePrototype imageAllowedUsePrototypeModel = new ImageAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(imageAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(imageAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(imageAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() .id("fee82deba12e4c0fb69c3b09d1f12345") .build(); @@ -58,6 +68,7 @@ public void testCreateImageOptions() throws Throwable { assertEquals(operatingSystemIdentityModel.name(), "ubuntu-24-04-amd64"); ImagePrototypeImageByFile imagePrototypeModel = new ImagePrototypeImageByFile.Builder() + .allowedUse(imageAllowedUsePrototypeModel) .deprecationAt(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) .name("my-image") .obsolescenceAt(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) @@ -67,6 +78,7 @@ public void testCreateImageOptions() throws Throwable { .file(imageFilePrototypeModel) .operatingSystem(operatingSystemIdentityModel) .build(); + assertEquals(imagePrototypeModel.allowedUse(), imageAllowedUsePrototypeModel); assertEquals(imagePrototypeModel.deprecationAt(), DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")); assertEquals(imagePrototypeModel.name(), "my-image"); assertEquals(imagePrototypeModel.obsolescenceAt(), DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceActionOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceActionOptionsTest.java index b58bbab386..a7dda0157f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceActionOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceActionOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceConsoleAccessTokenOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceConsoleAccessTokenOptionsTest.java index e530a25222..cba17a083a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceConsoleAccessTokenOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceConsoleAccessTokenOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupManagerActionOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupManagerActionOptionsTest.java index 5d16e3fb0a..0fe499e327 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupManagerActionOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupManagerActionOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupManagerOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupManagerOptionsTest.java index 57a610ee02..3f1074633f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupManagerOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupManagerOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupManagerPolicyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupManagerPolicyOptionsTest.java index e2d9faddb0..9ee999b466 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupManagerPolicyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupManagerPolicyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,12 +35,12 @@ public void testCreateInstanceGroupManagerPolicyOptions() throws Throwable { InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype instanceGroupManagerPolicyPrototypeModel = new InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype.Builder() .name("my-instance-group-manager-policy") .metricType("cpu") - .metricValue(Long.valueOf("26")) + .metricValue(Long.valueOf("0")) .policyType("target") .build(); assertEquals(instanceGroupManagerPolicyPrototypeModel.name(), "my-instance-group-manager-policy"); assertEquals(instanceGroupManagerPolicyPrototypeModel.metricType(), "cpu"); - assertEquals(instanceGroupManagerPolicyPrototypeModel.metricValue(), Long.valueOf("26")); + assertEquals(instanceGroupManagerPolicyPrototypeModel.metricValue(), Long.valueOf("0")); assertEquals(instanceGroupManagerPolicyPrototypeModel.policyType(), "target"); CreateInstanceGroupManagerPolicyOptions createInstanceGroupManagerPolicyOptionsModel = new CreateInstanceGroupManagerPolicyOptions.Builder() diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupOptionsTest.java index 61c5c9f2ba..fe20c8f08c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceGroupOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceNetworkAttachmentOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceNetworkAttachmentOptionsTest.java index 8fc0600eb2..90d2a69fe0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceNetworkAttachmentOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceNetworkAttachmentOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceNetworkInterfaceOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceNetworkInterfaceOptionsTest.java index 267ac2ae3f..0a765d3415 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceNetworkInterfaceOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceNetworkInterfaceOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceOptionsTest.java index 68a1a84ebf..c0c9256749 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -38,6 +38,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; @@ -170,6 +171,15 @@ public void testCreateInstanceOptions() throws Throwable { .build(); assertEquals(vpcIdentityModel.id(), "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModel = new VolumeAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(volumeAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") .build(); @@ -181,6 +191,7 @@ public void testCreateInstanceOptions() throws Throwable { assertEquals(volumeProfileIdentityModel.name(), "general-purpose"); VolumePrototypeInstanceByImageContext volumePrototypeInstanceByImageContextModel = new VolumePrototypeInstanceByImageContext.Builder() + .allowedUse(volumeAllowedUsePrototypeModel) .bandwidth(Long.valueOf("1000")) .capacity(Long.valueOf("100")) .encryptionKey(encryptionKeyIdentityModel) @@ -190,6 +201,7 @@ public void testCreateInstanceOptions() throws Throwable { .resourceGroup(resourceGroupIdentityModel) .userTags(java.util.Arrays.asList()) .build(); + assertEquals(volumePrototypeInstanceByImageContextModel.allowedUse(), volumeAllowedUsePrototypeModel); assertEquals(volumePrototypeInstanceByImageContextModel.bandwidth(), Long.valueOf("1000")); assertEquals(volumePrototypeInstanceByImageContextModel.capacity(), Long.valueOf("100")); assertEquals(volumePrototypeInstanceByImageContextModel.encryptionKey(), encryptionKeyIdentityModel); @@ -292,6 +304,7 @@ public void testCreateInstanceOptions() throws Throwable { .totalVolumeBandwidth(Long.valueOf("500")) .userData("testString") .volumeAttachments(java.util.Arrays.asList(volumeAttachmentPrototypeModel)) + .volumeBandwidthQosMode("pooled") .vpc(vpcIdentityModel) .bootVolumeAttachment(volumeAttachmentPrototypeInstanceByImageContextModel) .image(imageIdentityModel) @@ -314,6 +327,7 @@ public void testCreateInstanceOptions() throws Throwable { assertEquals(instancePrototypeModel.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instancePrototypeModel.userData(), "testString"); assertEquals(instancePrototypeModel.volumeAttachments(), java.util.Arrays.asList(volumeAttachmentPrototypeModel)); + assertEquals(instancePrototypeModel.volumeBandwidthQosMode(), "pooled"); assertEquals(instancePrototypeModel.vpc(), vpcIdentityModel); assertEquals(instancePrototypeModel.bootVolumeAttachment(), volumeAttachmentPrototypeInstanceByImageContextModel); assertEquals(instancePrototypeModel.image(), imageIdentityModel); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceTemplateOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceTemplateOptionsTest.java index 6d7b045bb9..93fe1d66f2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceTemplateOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceTemplateOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -38,6 +38,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; @@ -170,6 +171,15 @@ public void testCreateInstanceTemplateOptions() throws Throwable { .build(); assertEquals(vpcIdentityModel.id(), "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModel = new VolumeAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(volumeAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") .build(); @@ -181,6 +191,7 @@ public void testCreateInstanceTemplateOptions() throws Throwable { assertEquals(volumeProfileIdentityModel.name(), "general-purpose"); VolumePrototypeInstanceByImageContext volumePrototypeInstanceByImageContextModel = new VolumePrototypeInstanceByImageContext.Builder() + .allowedUse(volumeAllowedUsePrototypeModel) .bandwidth(Long.valueOf("1000")) .capacity(Long.valueOf("100")) .encryptionKey(encryptionKeyIdentityModel) @@ -190,6 +201,7 @@ public void testCreateInstanceTemplateOptions() throws Throwable { .resourceGroup(resourceGroupIdentityModel) .userTags(java.util.Arrays.asList()) .build(); + assertEquals(volumePrototypeInstanceByImageContextModel.allowedUse(), volumeAllowedUsePrototypeModel); assertEquals(volumePrototypeInstanceByImageContextModel.bandwidth(), Long.valueOf("1000")); assertEquals(volumePrototypeInstanceByImageContextModel.capacity(), Long.valueOf("100")); assertEquals(volumePrototypeInstanceByImageContextModel.encryptionKey(), encryptionKeyIdentityModel); @@ -292,6 +304,7 @@ public void testCreateInstanceTemplateOptions() throws Throwable { .totalVolumeBandwidth(Long.valueOf("500")) .userData("testString") .volumeAttachments(java.util.Arrays.asList(volumeAttachmentPrototypeModel)) + .volumeBandwidthQosMode("pooled") .vpc(vpcIdentityModel) .bootVolumeAttachment(volumeAttachmentPrototypeInstanceByImageContextModel) .image(imageIdentityModel) @@ -314,6 +327,7 @@ public void testCreateInstanceTemplateOptions() throws Throwable { assertEquals(instanceTemplatePrototypeModel.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instanceTemplatePrototypeModel.userData(), "testString"); assertEquals(instanceTemplatePrototypeModel.volumeAttachments(), java.util.Arrays.asList(volumeAttachmentPrototypeModel)); + assertEquals(instanceTemplatePrototypeModel.volumeBandwidthQosMode(), "pooled"); assertEquals(instanceTemplatePrototypeModel.vpc(), vpcIdentityModel); assertEquals(instanceTemplatePrototypeModel.bootVolumeAttachment(), volumeAttachmentPrototypeInstanceByImageContextModel); assertEquals(instanceTemplatePrototypeModel.image(), imageIdentityModel); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceVolumeAttachmentOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceVolumeAttachmentOptionsTest.java index 2eb60675e7..9c8ab94108 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceVolumeAttachmentOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateInstanceVolumeAttachmentOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateIpsecPolicyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateIpsecPolicyOptionsTest.java index 92ca6aa6dc..4e98798ca8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateIpsecPolicyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateIpsecPolicyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateKeyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateKeyOptionsTest.java index e26f910e51..7707e97828 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateKeyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateKeyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerListenerOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerListenerOptionsTest.java index dec4da0b6d..142c536d7a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerListenerOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerListenerOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerListenerPolicyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerListenerPolicyOptionsTest.java index 61f626a8a4..423ba85dbc 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerListenerPolicyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerListenerPolicyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerListenerPolicyRuleOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerListenerPolicyRuleOptionsTest.java index 2f1c6b746f..497c64aa3b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerListenerPolicyRuleOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerListenerPolicyRuleOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerOptionsTest.java index 4d570dc9b8..503d265ac7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerPoolMemberOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerPoolMemberOptionsTest.java index 7e2da08512..95889a3c11 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerPoolMemberOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerPoolMemberOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerPoolOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerPoolOptionsTest.java index 83ca03fd26..1f0c2cb85b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerPoolOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateLoadBalancerPoolOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateNetworkAclOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateNetworkAclOptionsTest.java index 75d420fc25..90a03397b8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateNetworkAclOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateNetworkAclOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateNetworkAclRuleOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateNetworkAclRuleOptionsTest.java index 1accfdabcf..b91c5e1593 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateNetworkAclRuleOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateNetworkAclRuleOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreatePlacementGroupOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreatePlacementGroupOptionsTest.java index 411dc035ac..47d81631fc 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreatePlacementGroupOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreatePlacementGroupOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreatePrivatePathServiceGatewayAccountPolicyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreatePrivatePathServiceGatewayAccountPolicyOptionsTest.java index 0a39425def..0b221e5d27 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreatePrivatePathServiceGatewayAccountPolicyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreatePrivatePathServiceGatewayAccountPolicyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreatePrivatePathServiceGatewayOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreatePrivatePathServiceGatewayOptionsTest.java index ae2ab2ae6d..4906f3895e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreatePrivatePathServiceGatewayOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreatePrivatePathServiceGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreatePublicAddressRangeOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreatePublicAddressRangeOptionsTest.java index 23569fb010..6622f765a0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreatePublicAddressRangeOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreatePublicAddressRangeOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreatePublicGatewayOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreatePublicGatewayOptionsTest.java index 2ea25c0041..07224602c0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreatePublicGatewayOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreatePublicGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateReservationOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateReservationOptionsTest.java index bbbc8d4d1a..35ba7aac85 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateReservationOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateReservationOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSecurityGroupOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSecurityGroupOptionsTest.java index 5513c05210..80658a009e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSecurityGroupOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSecurityGroupOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSecurityGroupRuleOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSecurityGroupRuleOptionsTest.java index 0c64106ae3..5635cc29a0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSecurityGroupRuleOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSecurityGroupRuleOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSecurityGroupTargetBindingOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSecurityGroupTargetBindingOptionsTest.java index 2b50769654..454ae18430 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSecurityGroupTargetBindingOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSecurityGroupTargetBindingOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateShareMountTargetOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateShareMountTargetOptionsTest.java index d492d82fad..3e217a6531 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateShareMountTargetOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateShareMountTargetOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -95,10 +95,12 @@ public void testCreateShareMountTargetOptions() throws Throwable { assertEquals(shareMountTargetVirtualNetworkInterfacePrototypeModel.subnet(), subnetIdentityModel); ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup shareMountTargetPrototypeModel = new ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.Builder() + .accessProtocol("nfs4") .name("my-share-mount-target") .transitEncryption("none") .virtualNetworkInterface(shareMountTargetVirtualNetworkInterfacePrototypeModel) .build(); + assertEquals(shareMountTargetPrototypeModel.accessProtocol(), "nfs4"); assertEquals(shareMountTargetPrototypeModel.name(), "my-share-mount-target"); assertEquals(shareMountTargetPrototypeModel.transitEncryption(), "none"); assertEquals(shareMountTargetPrototypeModel.virtualNetworkInterface(), shareMountTargetVirtualNetworkInterfacePrototypeModel); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateShareOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateShareOptionsTest.java index c0bbaa9f2b..e13eb058ea 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateShareOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateShareOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -101,10 +101,12 @@ public void testCreateShareOptions() throws Throwable { assertEquals(shareMountTargetVirtualNetworkInterfacePrototypeModel.subnet(), subnetIdentityModel); ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup shareMountTargetPrototypeModel = new ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.Builder() + .accessProtocol("nfs4") .name("my-share-mount-target") .transitEncryption("none") .virtualNetworkInterface(shareMountTargetVirtualNetworkInterfacePrototypeModel) .build(); + assertEquals(shareMountTargetPrototypeModel.accessProtocol(), "nfs4"); assertEquals(shareMountTargetPrototypeModel.name(), "my-share-mount-target"); assertEquals(shareMountTargetPrototypeModel.transitEncryption(), "none"); assertEquals(shareMountTargetPrototypeModel.virtualNetworkInterface(), shareMountTargetVirtualNetworkInterfacePrototypeModel); @@ -120,7 +122,7 @@ public void testCreateShareOptions() throws Throwable { assertEquals(zoneIdentityModel.name(), "us-south-1"); SharePrototypeShareContext sharePrototypeShareContextModel = new SharePrototypeShareContext.Builder() - .allowedTransitEncryptionModes(java.util.Arrays.asList("none")) + .allowedTransitEncryptionModes(java.util.Arrays.asList("ipsec")) .iops(Long.valueOf("100")) .mountTargets(java.util.Arrays.asList(shareMountTargetPrototypeModel)) .name("my-share") @@ -130,7 +132,7 @@ public void testCreateShareOptions() throws Throwable { .userTags(java.util.Arrays.asList()) .zone(zoneIdentityModel) .build(); - assertEquals(sharePrototypeShareContextModel.allowedTransitEncryptionModes(), java.util.Arrays.asList("none")); + assertEquals(sharePrototypeShareContextModel.allowedTransitEncryptionModes(), java.util.Arrays.asList("ipsec")); assertEquals(sharePrototypeShareContextModel.iops(), Long.valueOf("100")); assertEquals(sharePrototypeShareContextModel.mountTargets(), java.util.Arrays.asList(shareMountTargetPrototypeModel)); assertEquals(sharePrototypeShareContextModel.name(), "my-share"); @@ -153,12 +155,14 @@ public void testCreateShareOptions() throws Throwable { assertEquals(shareInitialOwnerModel.uid(), Long.valueOf("50")); SharePrototypeShareBySize sharePrototypeModel = new SharePrototypeShareBySize.Builder() - .allowedTransitEncryptionModes(java.util.Arrays.asList("none")) + .allowedTransitEncryptionModes(java.util.Arrays.asList("ipsec")) .mountTargets(java.util.Arrays.asList(shareMountTargetPrototypeModel)) .name("my-share") .replicaShare(sharePrototypeShareContextModel) .userTags(java.util.Arrays.asList()) .accessControlMode("security_group") + .allowedAccessProtocols(java.util.Arrays.asList("nfs4")) + .bandwidth(Long.valueOf("100")) .encryptionKey(encryptionKeyIdentityModel) .initialOwner(shareInitialOwnerModel) .iops(Long.valueOf("100")) @@ -167,12 +171,14 @@ public void testCreateShareOptions() throws Throwable { .size(Long.valueOf("200")) .zone(zoneIdentityModel) .build(); - assertEquals(sharePrototypeModel.allowedTransitEncryptionModes(), java.util.Arrays.asList("none")); + assertEquals(sharePrototypeModel.allowedTransitEncryptionModes(), java.util.Arrays.asList("ipsec")); assertEquals(sharePrototypeModel.mountTargets(), java.util.Arrays.asList(shareMountTargetPrototypeModel)); assertEquals(sharePrototypeModel.name(), "my-share"); assertEquals(sharePrototypeModel.replicaShare(), sharePrototypeShareContextModel); assertEquals(sharePrototypeModel.userTags(), java.util.Arrays.asList()); assertEquals(sharePrototypeModel.accessControlMode(), "security_group"); + assertEquals(sharePrototypeModel.allowedAccessProtocols(), java.util.Arrays.asList("nfs4")); + assertEquals(sharePrototypeModel.bandwidth(), Long.valueOf("100")); assertEquals(sharePrototypeModel.encryptionKey(), encryptionKeyIdentityModel); assertEquals(sharePrototypeModel.initialOwner(), shareInitialOwnerModel); assertEquals(sharePrototypeModel.iops(), Long.valueOf("100")); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateShareSnapshotOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateShareSnapshotOptionsTest.java index 1328427158..978695fa52 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateShareSnapshotOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateShareSnapshotOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSnapshotCloneOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSnapshotCloneOptionsTest.java index 1f46141bd0..ff7d3a67b7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSnapshotCloneOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSnapshotCloneOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSnapshotConsistencyGroupOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSnapshotConsistencyGroupOptionsTest.java index beb8c6ddcf..14745b8c44 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSnapshotConsistencyGroupOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSnapshotConsistencyGroupOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSnapshotOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSnapshotOptionsTest.java index 776a11a2b7..beee7f3acf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSnapshotOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSnapshotOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -15,6 +15,7 @@ import com.ibm.cloud.is.vpc.v1.model.CreateSnapshotOptions; import com.ibm.cloud.is.vpc.v1.model.ResourceGroupIdentityById; +import com.ibm.cloud.is.vpc.v1.model.SnapshotAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.SnapshotClonePrototype; import com.ibm.cloud.is.vpc.v1.model.SnapshotPrototypeSnapshotBySourceVolume; import com.ibm.cloud.is.vpc.v1.model.VolumeIdentityById; @@ -36,6 +37,15 @@ public class CreateSnapshotOptionsTest { @Test public void testCreateSnapshotOptions() throws Throwable { + SnapshotAllowedUsePrototype snapshotAllowedUsePrototypeModel = new SnapshotAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(snapshotAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(snapshotAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(snapshotAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() .name("us-south-1") .build(); @@ -57,12 +67,14 @@ public void testCreateSnapshotOptions() throws Throwable { assertEquals(volumeIdentityModel.id(), "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"); SnapshotPrototypeSnapshotBySourceVolume snapshotPrototypeModel = new SnapshotPrototypeSnapshotBySourceVolume.Builder() + .allowedUse(snapshotAllowedUsePrototypeModel) .clones(java.util.Arrays.asList(snapshotClonePrototypeModel)) .name("my-snapshot") .resourceGroup(resourceGroupIdentityModel) .userTags(java.util.Arrays.asList()) .sourceVolume(volumeIdentityModel) .build(); + assertEquals(snapshotPrototypeModel.allowedUse(), snapshotAllowedUsePrototypeModel); assertEquals(snapshotPrototypeModel.clones(), java.util.Arrays.asList(snapshotClonePrototypeModel)); assertEquals(snapshotPrototypeModel.name(), "my-snapshot"); assertEquals(snapshotPrototypeModel.resourceGroup(), resourceGroupIdentityModel); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSubnetOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSubnetOptionsTest.java index c79fd40ffc..35832458a6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSubnetOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSubnetOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSubnetReservedIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSubnetReservedIpOptionsTest.java index bd03f01c7a..57753bb827 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSubnetReservedIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateSubnetReservedIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVirtualNetworkInterfaceOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVirtualNetworkInterfaceOptionsTest.java index e40fd37eae..9144aa837f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVirtualNetworkInterfaceOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVirtualNetworkInterfaceOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVolumeOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVolumeOptionsTest.java index f3b5be77db..f7b6cd3edb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVolumeOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVolumeOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcAddressPrefixOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcAddressPrefixOptionsTest.java index 39002d8df0..aeed1fbf6e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcAddressPrefixOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcAddressPrefixOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcDnsResolutionBindingOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcDnsResolutionBindingOptionsTest.java index a5909249c8..93b5302710 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcDnsResolutionBindingOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcDnsResolutionBindingOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcOptionsTest.java index 4bb91ff19e..5e22db8d0b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRouteOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRouteOptionsTest.java index 4c85fc703e..cefd2e8774 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRouteOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRouteOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRouteResponseTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRouteResponseTest.java new file mode 100644 index 0000000000..0142f0a6f8 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRouteResponseTest.java @@ -0,0 +1,53 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.CreateVpcRouteResponse; +import com.ibm.cloud.is.vpc.v1.model.Deleted; +import com.ibm.cloud.is.vpc.v1.model.RouteCreatorVPNGatewayReference; +import com.ibm.cloud.is.vpc.v1.model.RouteNextHopIP; +import com.ibm.cloud.is.vpc.v1.model.ZoneReference; +import com.ibm.cloud.is.vpc.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 CreateVpcRouteResponse model. + */ +public class CreateVpcRouteResponseTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testCreateVpcRouteResponse() throws Throwable { + CreateVpcRouteResponse createVpcRouteResponseModel = new CreateVpcRouteResponse(); + assertNull(createVpcRouteResponseModel.getAction()); + assertNull(createVpcRouteResponseModel.isAdvertise()); + assertNull(createVpcRouteResponseModel.getCreatedAt()); + assertNull(createVpcRouteResponseModel.getCreator()); + assertNull(createVpcRouteResponseModel.getDestination()); + assertNull(createVpcRouteResponseModel.getHref()); + assertNull(createVpcRouteResponseModel.getId()); + assertNull(createVpcRouteResponseModel.getLifecycleState()); + assertNull(createVpcRouteResponseModel.getName()); + assertNull(createVpcRouteResponseModel.getNextHop()); + assertNull(createVpcRouteResponseModel.getOrigin()); + assertNull(createVpcRouteResponseModel.getPriority()); + assertNull(createVpcRouteResponseModel.getZone()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRoutingTableOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRoutingTableOptionsTest.java index b959591aa1..5f26868cf5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRoutingTableOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRoutingTableOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRoutingTableRouteOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRoutingTableRouteOptionsTest.java index 319bf5c110..7d70884d34 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRoutingTableRouteOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRoutingTableRouteOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnGatewayConnectionOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnGatewayConnectionOptionsTest.java index 28b1905206..4b27538454 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnGatewayConnectionOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnGatewayConnectionOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnGatewayOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnGatewayOptionsTest.java index 195787f71c..637d403d85 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnGatewayOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -48,11 +48,15 @@ public void testCreateVpnGatewayOptions() throws Throwable { .name("my-vpn-gateway") .resourceGroup(resourceGroupIdentityModel) .subnet(subnetIdentityModel) + .advertisedCidrs(java.util.Arrays.asList("192.168.3.0/24")) + .localAsn(Long.valueOf("64520")) .mode("route") .build(); assertEquals(vpnGatewayPrototypeModel.name(), "my-vpn-gateway"); assertEquals(vpnGatewayPrototypeModel.resourceGroup(), resourceGroupIdentityModel); assertEquals(vpnGatewayPrototypeModel.subnet(), subnetIdentityModel); + assertEquals(vpnGatewayPrototypeModel.advertisedCidrs(), java.util.Arrays.asList("192.168.3.0/24")); + assertEquals(vpnGatewayPrototypeModel.localAsn(), Long.valueOf("64520")); assertEquals(vpnGatewayPrototypeModel.mode(), "route"); CreateVpnGatewayOptions createVpnGatewayOptionsModel = new CreateVpnGatewayOptions.Builder() diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnServerOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnServerOptionsTest.java index f671effbcf..50690a1fe8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnServerOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnServerOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnServerRouteOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnServerRouteOptionsTest.java index e1c2888c2b..f2700956cc 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnServerRouteOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/CreateVpnServerRouteOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSInstanceIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSInstanceIdentityByCRNTest.java index 81e08a90df..ce9425c110 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSInstanceIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSInstanceIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSInstanceIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSInstanceIdentityTest.java index e9b2060972..e902363928 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSInstanceIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSInstanceIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSInstanceReferenceLoadBalancerDNSContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSInstanceReferenceLoadBalancerDNSContextTest.java index 0d6d0ada2a..460d169547 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSInstanceReferenceLoadBalancerDNSContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSInstanceReferenceLoadBalancerDNSContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSServerPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSServerPrototypeTest.java index 13c90287d4..4dd8db6652 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSServerPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSServerPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSServerTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSServerTest.java index 58530fafda..03270d3e9b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSServerTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSServerTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSZoneIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSZoneIdentityByIdTest.java index 08cca1cf7f..12ebe02bd4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSZoneIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSZoneIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSZoneIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSZoneIdentityTest.java index d7a6dbc2c7..9e33cf8de4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSZoneIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSZoneIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSZoneReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSZoneReferenceTest.java index 828a4355a6..59c8346dd6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSZoneReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DNSZoneReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostCollectionTest.java index 4c5663f53b..bb04f2989a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostDiskCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostDiskCollectionTest.java index ddcba72697..0f549fab76 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostDiskCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostDiskCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostDiskPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostDiskPatchTest.java index 5f247532be..ae3ce79f91 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostDiskPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostDiskPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostDiskTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostDiskTest.java index c3adff1e7b..7257572017 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostDiskTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostDiskTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupCollectionTest.java index 56fccbbfef..e22d93e908 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityByCRNTest.java index a54f12e340..01421c8c48 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityByHrefTest.java index b50fe94490..c02d991cb8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityByIdTest.java index 199aa0ff96..03259aa699 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityTest.java index 140ce02d49..e87bed6341 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupPatchTest.java index 6a697f60f3..0b6b66bcf7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupPrototypeDedicatedHostByZoneContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupPrototypeDedicatedHostByZoneContextTest.java index f38dbc7561..4a6bb27253 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupPrototypeDedicatedHostByZoneContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupPrototypeDedicatedHostByZoneContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupReferenceTest.java index 48a2800351..503bd75c82 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupTest.java index 9d786261ab..94c09ab4a7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostGroupTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostNUMANodeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostNUMANodeTest.java index 55ffa0efdb..7d73771db3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostNUMANodeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostNUMANodeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostNUMATest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostNUMATest.java index a9234869e4..64c3cf9e15 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostNUMATest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostNUMATest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPatchTest.java index 66fafd45cd..5533617ba8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileCollectionTest.java index daccfa9984..792bbbf82d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskInterfaceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskInterfaceTest.java index 6a79805b3b..55ea27a850 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskInterfaceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskInterfaceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskQuantityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskQuantityTest.java index 24fbfe8a9f..9794544a12 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskQuantityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskQuantityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskSizeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskSizeTest.java index b61d81be52..890d0bbf22 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskSizeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskSizeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskSupportedInterfacesTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskSupportedInterfacesTest.java index 4b0d161c97..297c3f3d56 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskSupportedInterfacesTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskSupportedInterfacesTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskTest.java index 2ebcad146a..a1f9fcf150 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileDiskTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileIdentityByHrefTest.java index ff182867ba..3278a44467 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileIdentityByNameTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileIdentityByNameTest.java index 73d4c1aa14..b146281cae 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileIdentityByNameTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileIdentityByNameTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileIdentityTest.java index a173243ace..b1c7e7ff07 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryDependentTest.java index f2bfc1c9e9..b67d5e5670 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryEnumTest.java index 3bafc78b24..2a51b6c313 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryEnumTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryEnumTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryFixedTest.java index d66b71a0e6..c7f32a9bff 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryRangeTest.java index 3504940239..f5eff16a59 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryTest.java index 5dd11f082c..99b742108d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileMemoryTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileReferenceTest.java index 328b242508..1b006cf1a6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketDependentTest.java index 313e206b9f..9a50d720b9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketEnumTest.java index 56adf55e18..d633f6972f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketEnumTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketEnumTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketFixedTest.java index a887a9befc..a0738d38aa 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketRangeTest.java index 71892e5dbe..1a9aee6ce0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketTest.java index 15c62afb4c..f69e3cb21e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileSocketTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileTest.java index b74e743710..485ed3518d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUArchitectureTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUArchitectureTest.java index 073036809d..27679919dd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUArchitectureTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUArchitectureTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUDependentTest.java index 0082058d13..4580907722 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUEnumTest.java index d746b5d66c..945f2aa9aa 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUEnumTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUEnumTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUFixedTest.java index 0d79313bf9..df2cf7b881 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUManufacturerTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUManufacturerTest.java index bb29b17265..87c8db508d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUManufacturerTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUManufacturerTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPURangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPURangeTest.java index 00f6be7ee2..0a8768d57e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPURangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPURangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUTest.java index 76e3ce7798..5710671872 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostProfileVCPUTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPrototypeDedicatedHostByGroupTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPrototypeDedicatedHostByGroupTest.java index 3c25375d61..0210dbcb3e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPrototypeDedicatedHostByGroupTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPrototypeDedicatedHostByGroupTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPrototypeDedicatedHostByZoneTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPrototypeDedicatedHostByZoneTest.java index fe47f74c8c..4aa57d2d47 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPrototypeDedicatedHostByZoneTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPrototypeDedicatedHostByZoneTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPrototypeTest.java index 3842321d3a..1427ce2e61 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostReferenceTest.java index 2a912dc39d..69586e41dd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostTest.java index 8436fa487d..f9cb8a9750 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DedicatedHostTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DefaultNetworkACLTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DefaultNetworkACLTest.java index a6f01bdfab..d3302b438e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DefaultNetworkACLTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DefaultNetworkACLTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DefaultRoutingTableTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DefaultRoutingTableTest.java index b56eb8d400..de2c3e1ad7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DefaultRoutingTableTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DefaultRoutingTableTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DefaultSecurityGroupTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DefaultSecurityGroupTest.java index 3dd69a4a92..9e8a325b22 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DefaultSecurityGroupTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DefaultSecurityGroupTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteBackupPolicyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteBackupPolicyOptionsTest.java index 0a0dd0ff11..a213d593c0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteBackupPolicyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteBackupPolicyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteBackupPolicyPlanOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteBackupPolicyPlanOptionsTest.java index 15bc486a1d..56139442f4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteBackupPolicyPlanOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteBackupPolicyPlanOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteBareMetalServerNetworkAttachmentOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteBareMetalServerNetworkAttachmentOptionsTest.java index 9861f75a25..5fda6b5a71 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteBareMetalServerNetworkAttachmentOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteBareMetalServerNetworkAttachmentOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteBareMetalServerNetworkInterfaceOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteBareMetalServerNetworkInterfaceOptionsTest.java index 956e60dffc..00eb52cb65 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteBareMetalServerNetworkInterfaceOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteBareMetalServerNetworkInterfaceOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteBareMetalServerOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteBareMetalServerOptionsTest.java index bda9dc168d..543cf436cc 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteBareMetalServerOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteBareMetalServerOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkInterfaceOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkInterfaceOptionsTest.java index 846a12ca76..ca1dce4a1f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkInterfaceOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkInterfaceOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkOptionsTest.java index f7a62d019f..1f6a402330 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkSubnetOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkSubnetOptionsTest.java index d230d81934..f281c43150 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkSubnetOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkSubnetOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkSubnetReservedIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkSubnetReservedIpOptionsTest.java index f1abc5aada..07a969c052 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkSubnetReservedIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteClusterNetworkSubnetReservedIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteDedicatedHostGroupOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteDedicatedHostGroupOptionsTest.java index fa589f8ade..8d5824cfde 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteDedicatedHostGroupOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteDedicatedHostGroupOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteDedicatedHostOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteDedicatedHostOptionsTest.java index bedd47b124..6dba9bf11c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteDedicatedHostOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteDedicatedHostOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteEndpointGatewayOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteEndpointGatewayOptionsTest.java index 1117a4b501..8fad686cf3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteEndpointGatewayOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteEndpointGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteFloatingIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteFloatingIpOptionsTest.java index 2985b13a32..cab88e0197 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteFloatingIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteFloatingIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteFlowLogCollectorOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteFlowLogCollectorOptionsTest.java index 776ebbfe5e..e49a4b2ba2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteFlowLogCollectorOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteFlowLogCollectorOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteIkePolicyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteIkePolicyOptionsTest.java index edaf05e19c..48e2957af5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteIkePolicyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteIkePolicyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteImageExportJobOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteImageExportJobOptionsTest.java index 6aa7706501..16a341ca28 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteImageExportJobOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteImageExportJobOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteImageOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteImageOptionsTest.java index af6c58b136..d17acf0f7c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteImageOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteImageOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceClusterNetworkAttachmentOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceClusterNetworkAttachmentOptionsTest.java index f599cdb67e..7559447429 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceClusterNetworkAttachmentOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceClusterNetworkAttachmentOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupLoadBalancerOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupLoadBalancerOptionsTest.java index d3750c861f..c4431e4705 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupLoadBalancerOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupLoadBalancerOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupManagerActionOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupManagerActionOptionsTest.java index 1fe910a017..fd49269cc8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupManagerActionOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupManagerActionOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupManagerOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupManagerOptionsTest.java index a441e5ee9d..5a592c20be 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupManagerOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupManagerOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupManagerPolicyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupManagerPolicyOptionsTest.java index 6a1eed7db6..01ea7ea752 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupManagerPolicyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupManagerPolicyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupMembershipOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupMembershipOptionsTest.java index 780f7c0a4f..81b904c4b4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupMembershipOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupMembershipOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupMembershipsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupMembershipsOptionsTest.java index d164b0305a..06c239a924 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupMembershipsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupMembershipsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupOptionsTest.java index d4b93f5814..3ea5a8ed9d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceGroupOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceNetworkAttachmentOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceNetworkAttachmentOptionsTest.java index 985c501087..456a81e064 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceNetworkAttachmentOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceNetworkAttachmentOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceNetworkInterfaceOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceNetworkInterfaceOptionsTest.java index 4db7b390bd..f4aff2a0aa 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceNetworkInterfaceOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceNetworkInterfaceOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceOptionsTest.java index b2790ce057..c891261a2b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceTemplateOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceTemplateOptionsTest.java index a49fd6d5b2..3b4e9a6bed 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceTemplateOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceTemplateOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceVolumeAttachmentOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceVolumeAttachmentOptionsTest.java index 1dbad54af7..d6a463ddc5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceVolumeAttachmentOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteInstanceVolumeAttachmentOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteIpsecPolicyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteIpsecPolicyOptionsTest.java index a7033e53b8..7439f04412 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteIpsecPolicyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteIpsecPolicyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteKeyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteKeyOptionsTest.java index a7ecb4c226..da5b1429b4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteKeyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteKeyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerListenerOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerListenerOptionsTest.java index 24dad3fb4c..1d0159ba18 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerListenerOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerListenerOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerListenerPolicyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerListenerPolicyOptionsTest.java index e815b6ec0d..82f3c1a760 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerListenerPolicyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerListenerPolicyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerListenerPolicyRuleOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerListenerPolicyRuleOptionsTest.java index 95cc58fa55..5c368c9734 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerListenerPolicyRuleOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerListenerPolicyRuleOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerOptionsTest.java index fe0aee0d74..a45012579b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerPoolMemberOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerPoolMemberOptionsTest.java index 2371328a12..796fb3f0d3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerPoolMemberOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerPoolMemberOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerPoolOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerPoolOptionsTest.java index 6efed1e418..3bd2cce321 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerPoolOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteLoadBalancerPoolOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteNetworkAclOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteNetworkAclOptionsTest.java index e1e71e28d5..a3f4f21c88 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteNetworkAclOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteNetworkAclOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteNetworkAclRuleOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteNetworkAclRuleOptionsTest.java index 775270ff7f..f2e764d3b8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteNetworkAclRuleOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteNetworkAclRuleOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeletePlacementGroupOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeletePlacementGroupOptionsTest.java index 87148b0086..0b90d5c4c2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeletePlacementGroupOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeletePlacementGroupOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeletePrivatePathServiceGatewayAccountPolicyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeletePrivatePathServiceGatewayAccountPolicyOptionsTest.java index 5bf6c8f2c9..dc99b5d5df 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeletePrivatePathServiceGatewayAccountPolicyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeletePrivatePathServiceGatewayAccountPolicyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeletePrivatePathServiceGatewayOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeletePrivatePathServiceGatewayOptionsTest.java index 158ccb13e5..5c36a07336 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeletePrivatePathServiceGatewayOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeletePrivatePathServiceGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeletePublicAddressRangeOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeletePublicAddressRangeOptionsTest.java index 0e8e3ff9b0..6a87bb799d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeletePublicAddressRangeOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeletePublicAddressRangeOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeletePublicGatewayOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeletePublicGatewayOptionsTest.java index 02c4601271..d605ad82e2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeletePublicGatewayOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeletePublicGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteReservationOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteReservationOptionsTest.java index c6b5cd41c9..5d6595ee47 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteReservationOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteReservationOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSecurityGroupOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSecurityGroupOptionsTest.java index d9b76c43d1..3acda720ca 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSecurityGroupOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSecurityGroupOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSecurityGroupRuleOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSecurityGroupRuleOptionsTest.java index a11e4b1307..906b81b234 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSecurityGroupRuleOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSecurityGroupRuleOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSecurityGroupTargetBindingOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSecurityGroupTargetBindingOptionsTest.java index f245c699e3..6cd0fe37e1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSecurityGroupTargetBindingOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSecurityGroupTargetBindingOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareAccessorBindingOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareAccessorBindingOptionsTest.java index d4803bd45d..51d1fc0ce5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareAccessorBindingOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareAccessorBindingOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareMountTargetOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareMountTargetOptionsTest.java index dec14e336d..4dd1b6e646 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareMountTargetOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareMountTargetOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareOptionsTest.java index b73535b4fc..14903c2ecd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareSnapshotOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareSnapshotOptionsTest.java index 88dfbf3718..5f8eb09396 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareSnapshotOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareSnapshotOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareSourceOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareSourceOptionsTest.java index 2213c57bb4..08eb388b6a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareSourceOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteShareSourceOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotCloneOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotCloneOptionsTest.java index ddbc27f5c0..52c3355cc7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotCloneOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotCloneOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotConsistencyGroupOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotConsistencyGroupOptionsTest.java index e8a4a8698e..04c406450b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotConsistencyGroupOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotConsistencyGroupOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotOptionsTest.java index 4edb3413ba..d0ca7612ac 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotsOptionsTest.java index 6ed76c2992..61504890f5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSnapshotsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSubnetOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSubnetOptionsTest.java index a7640aadce..6866333aca 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSubnetOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSubnetOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSubnetReservedIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSubnetReservedIpOptionsTest.java index eca20ee838..6d92b18f80 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSubnetReservedIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteSubnetReservedIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVirtualNetworkInterfacesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVirtualNetworkInterfacesOptionsTest.java index c666d614a7..aa4948480e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVirtualNetworkInterfacesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVirtualNetworkInterfacesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVolumeOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVolumeOptionsTest.java index 0c24e45c57..328d5ba1d3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVolumeOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVolumeOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcAddressPrefixOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcAddressPrefixOptionsTest.java index 34116955d7..2b60162311 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcAddressPrefixOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcAddressPrefixOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcDnsResolutionBindingOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcDnsResolutionBindingOptionsTest.java index 27375453ea..2345f1bc6b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcDnsResolutionBindingOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcDnsResolutionBindingOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcOptionsTest.java index cc58c151ae..5983e3d321 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcRouteOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcRouteOptionsTest.java index f2ac42560b..59f250e6fb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcRouteOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcRouteOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcRoutingTableOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcRoutingTableOptionsTest.java index d586c77085..671e7da180 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcRoutingTableOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcRoutingTableOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcRoutingTableRouteOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcRoutingTableRouteOptionsTest.java index caabff3708..78850d2383 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcRoutingTableRouteOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpcRoutingTableRouteOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnGatewayConnectionOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnGatewayConnectionOptionsTest.java index 3658a348f0..572fa85e29 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnGatewayConnectionOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnGatewayConnectionOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -34,9 +34,11 @@ public void testDeleteVpnGatewayConnectionOptions() throws Throwable { DeleteVpnGatewayConnectionOptions deleteVpnGatewayConnectionOptionsModel = new DeleteVpnGatewayConnectionOptions.Builder() .vpnGatewayId("testString") .id("testString") + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); assertEquals(deleteVpnGatewayConnectionOptionsModel.vpnGatewayId(), "testString"); assertEquals(deleteVpnGatewayConnectionOptionsModel.id(), "testString"); + assertEquals(deleteVpnGatewayConnectionOptionsModel.ifMatch(), "W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\""); } @Test(expectedExceptions = IllegalArgumentException.class) diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnGatewayOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnGatewayOptionsTest.java index efaa405c4b..73791645a1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnGatewayOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnServerClientOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnServerClientOptionsTest.java index 06c7a8af5e..9f0ace38d0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnServerClientOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnServerClientOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnServerOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnServerOptionsTest.java index 9b10b701a6..97024f6d58 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnServerOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnServerOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnServerRouteOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnServerRouteOptionsTest.java index a8365a5e64..ccc45c8e88 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnServerRouteOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeleteVpnServerRouteOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeletedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeletedTest.java index 39a6242c77..cd430558aa 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeletedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeletedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DenyPrivatePathServiceGatewayEndpointGatewayBindingOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DenyPrivatePathServiceGatewayEndpointGatewayBindingOptionsTest.java index ae3a1004cf..8e91aaf140 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DenyPrivatePathServiceGatewayEndpointGatewayBindingOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DenyPrivatePathServiceGatewayEndpointGatewayBindingOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeprecateImageOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeprecateImageOptionsTest.java index 6557a65e66..d8afdc4ab5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeprecateImageOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DeprecateImageOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DisconnectVpnClientOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DisconnectVpnClientOptionsTest.java index 28c7e6760b..e6cb7a18ac 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DisconnectVpnClientOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/DisconnectVpnClientOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EncryptionKeyIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EncryptionKeyIdentityByCRNTest.java index aee515b8f1..33a29eed05 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EncryptionKeyIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EncryptionKeyIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EncryptionKeyIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EncryptionKeyIdentityTest.java index 4f4147f4d6..06cc469cad 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EncryptionKeyIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EncryptionKeyIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EncryptionKeyReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EncryptionKeyReferenceTest.java index ffb446af08..cd8100f133 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EncryptionKeyReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EncryptionKeyReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayCollectionTest.java index a9eac7590e..a70d8deb19 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayLifecycleReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayLifecycleReasonTest.java index a6d6b4ff72..990d64e079 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayLifecycleReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayLifecycleReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayPatchTest.java index 6b99076766..8431c4d7fa 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReferenceRemoteTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReferenceRemoteTest.java index 28ea2d8735..fd7cbb5361 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReferenceRemoteTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReferenceRemoteTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayRemoteTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayRemoteTest.java index 3d35b96729..f5112ebfb3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayRemoteTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayRemoteTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPIdentityByHrefTest.java index c6a0702df2..f114a85477 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPIdentityByIdTest.java index 7296357fac..609da89288 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPIdentityTest.java index 8a2b65e22e..2b2a44383b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPPrototypeTargetContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPPrototypeTargetContextTest.java index 2ee33a0e40..711097f62a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPPrototypeTargetContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPReservedIPPrototypeTargetContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPTest.java index 5a81f1b919..de27f9045f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayReservedIPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrivatePathServiceGatewayReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrivatePathServiceGatewayReferenceTest.java index 5928c9e609..706737b7b5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrivatePathServiceGatewayReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrivatePathServiceGatewayReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototypeTest.java index 28fc4b65d0..ff4b62af80 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototypeTest.java index 494a3e9783..4f69578105 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototypeTest.java index 9a34a64577..92d85657be 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeTest.java index ea0b3a10fb..7cc37e7434 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetProviderCloudServiceReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetProviderCloudServiceReferenceTest.java index c493a589d3..7fc1832576 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetProviderCloudServiceReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetProviderCloudServiceReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetProviderInfrastructureServiceReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetProviderInfrastructureServiceReferenceTest.java index a2f808e225..8bbd16dd37 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetProviderInfrastructureServiceReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetProviderInfrastructureServiceReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetTest.java index 896cc0c472..9145ee61f6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTargetTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTest.java index e1bbd20043..f37b7e6a68 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/EndpointGatewayTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FailoverShareOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FailoverShareOptionsTest.java index bd048e0780..a5b0b61cdf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FailoverShareOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FailoverShareOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPCollectionTest.java index f943039efb..9c95c56761 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPCollectionVirtualNetworkInterfaceContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPCollectionVirtualNetworkInterfaceContextTest.java index 5993057d28..c6b8fa53d2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPCollectionVirtualNetworkInterfaceContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPCollectionVirtualNetworkInterfaceContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPatchTest.java index c754f7e2f8..960a11f6d8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPrototypeFloatingIPByTargetTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPrototypeFloatingIPByTargetTest.java index 02860c8cf2..0a3beae68c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPrototypeFloatingIPByTargetTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPrototypeFloatingIPByTargetTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPrototypeFloatingIPByZoneTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPrototypeFloatingIPByZoneTest.java index 91469fc32b..078a1784e2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPrototypeFloatingIPByZoneTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPrototypeFloatingIPByZoneTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPrototypeTest.java index 781c17a83b..3c0847198f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPReferenceTest.java index 3a2c9bbe46..a3c36244ab 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetBareMetalServerNetworkInterfaceReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetBareMetalServerNetworkInterfaceReferenceTest.java index 8438212663..4ebb19a13b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetBareMetalServerNetworkInterfaceReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetBareMetalServerNetworkInterfaceReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetNetworkInterfaceReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetNetworkInterfaceReferenceTest.java index 5e064aa9ab..ba8a2302ec 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetNetworkInterfaceReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetNetworkInterfaceReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHrefTest.java index 5b55e82c36..bcb1c546f5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByIdTest.java index fbcbed033b..6e3e73de12 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityTest.java index d7280757a0..2e56b7087b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHrefTest.java index dc255ceeac..9edf27c7cd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByIdTest.java index 1957e9fd59..4c2f371d52 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchNetworkInterfaceIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchNetworkInterfaceIdentityTest.java index df1b9f625a..12c4285933 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchNetworkInterfaceIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchNetworkInterfaceIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchTest.java index 121ee33dc1..f9820249e3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityTest.java index 929d64f50c..aef7855ee5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java index 18a1393be8..4ecfc5e921 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java index b166acfd77..48ff0e2b35 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java index 1052930c3b..e068187077 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHrefTest.java index 1720ad7616..4e00df5e0c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByIdTest.java index ff457a5483..88867ae981 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityTest.java index 6da6615152..2d04ad561a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHrefTest.java index 731024970d..ddf0a210a2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByIdTest.java index 2003aab31d..a38b9d5020 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeNetworkInterfaceIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeNetworkInterfaceIdentityTest.java index 47d73a23a9..deebb25d2b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeNetworkInterfaceIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeNetworkInterfaceIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeTest.java index 615c38111e..6509151c55 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityTest.java index 448d1abc9e..b9ca0f10cd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java index 01cbcc6295..97c014d620 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java index 35590a1351..295935faa5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java index bc47d2902c..078228a5b7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPublicGatewayReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPublicGatewayReferenceTest.java index 0fdf8dd4d2..75496bedea 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPublicGatewayReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetPublicGatewayReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetTest.java index e6713ca998..f51e5cda61 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetVirtualNetworkInterfaceReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetVirtualNetworkInterfaceReferenceTest.java index bf924a6387..59f506d313 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetVirtualNetworkInterfaceReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTargetVirtualNetworkInterfaceReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTest.java index 8ad33926bb..0c31a5d68e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPUnpaginatedCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPUnpaginatedCollectionTest.java index 4316e91406..7ae1cc1f62 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPUnpaginatedCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FloatingIPUnpaginatedCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorCollectionTest.java index 24638cb445..10f97d6f46 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorPatchTest.java index 25f64bc298..5dd1a4e5e7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetInstanceNetworkAttachmentReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetInstanceNetworkAttachmentReferenceTest.java index ac37f452bb..8d601a979d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetInstanceNetworkAttachmentReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetInstanceNetworkAttachmentReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetInstanceReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetInstanceReferenceTest.java index e604c99fc7..1cc65e3064 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetInstanceReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetInstanceReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetNetworkInterfaceReferenceTargetContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetNetworkInterfaceReferenceTargetContextTest.java index af61cf7143..7e24b4ccd3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetNetworkInterfaceReferenceTargetContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetNetworkInterfaceReferenceTargetContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRNTest.java index 8bfd6ef884..41af69e2ec 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHrefTest.java index 9da5e8f7b5..5ec9ebb6d1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByIdTest.java index 301d39aac6..404617d3e2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityTest.java index 0c574882ed..2cc23db893 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHrefTest.java index 795f50356f..943b6117e0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByIdTest.java index 7cd31956dd..84d03584a0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityTest.java index df2d7075c5..2f9fb42e9c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHrefTest.java index a61fef704d..587829cb2f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByIdTest.java index 732161fa44..f53e4b4746 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityTest.java index 49ec160166..368ed53c74 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRNTest.java index 319bca835a..874bf29f3e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHrefTest.java index e90875eec2..97abd57413 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByIdTest.java index d33aafbabd..d9b863be0a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentityTest.java index d7a5fe11ac..adda60e6e9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeSubnetIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeTest.java index 7d6891e5ff..c9b78be41f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityTest.java index 2178e9e04d..af66d87980 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRNTest.java index 8988363547..ed6c386d46 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHrefTest.java index bea76503de..184b63e740 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByIdTest.java index 54e40bfd53..9d60bef6d0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityTest.java index 519fb2ca7d..e734668a51 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java index 7ac290af43..4fbfae0973 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java index d1131d88e7..4ec45ac5bd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java index 889cde9d73..91f60b1853 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetSubnetReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetSubnetReferenceTest.java index 455105d976..3a3af14650 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetSubnetReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetSubnetReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetTest.java index 4ddb331083..7d73331c51 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetVPCReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetVPCReferenceTest.java index d9b19c1769..f45689a17a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetVPCReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetVPCReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContextTest.java index a87c630bfb..ff3f065fb2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTest.java index b59f391199..6a8783f7b9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/FlowLogCollectorTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBackupPolicyJobOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBackupPolicyJobOptionsTest.java index 4cba4b9b7c..db1bf2e34d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBackupPolicyJobOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBackupPolicyJobOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBackupPolicyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBackupPolicyOptionsTest.java index d2208cd086..864a9e05a2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBackupPolicyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBackupPolicyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBackupPolicyPlanOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBackupPolicyPlanOptionsTest.java index f2a541124a..ce76d6b8b0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBackupPolicyPlanOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBackupPolicyPlanOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerDiskOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerDiskOptionsTest.java index 9e2e50834a..6478a45993 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerDiskOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerDiskOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerInitializationOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerInitializationOptionsTest.java index 279c70fdfd..f3f7c49eb8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerInitializationOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerInitializationOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkAttachmentOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkAttachmentOptionsTest.java index a507cffdde..c45c3620af 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkAttachmentOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkAttachmentOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkInterfaceFloatingIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkInterfaceFloatingIpOptionsTest.java index 2df40373c8..5402de60e4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkInterfaceFloatingIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkInterfaceFloatingIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkInterfaceIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkInterfaceIpOptionsTest.java index 68e1b55da1..4404cbe982 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkInterfaceIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkInterfaceIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkInterfaceOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkInterfaceOptionsTest.java index 7f295a3321..c450e040f0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkInterfaceOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerNetworkInterfaceOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerOptionsTest.java index 744a6c0229..35e35f87fe 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerProfileOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerProfileOptionsTest.java index 5618e20626..77c101040f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerProfileOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetBareMetalServerProfileOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkInterfaceOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkInterfaceOptionsTest.java index f0c19b28a2..1c0420b4a0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkInterfaceOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkInterfaceOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkOptionsTest.java index f1a0a0c3a4..ae7ef6ca26 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkProfileOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkProfileOptionsTest.java index 49b6185c9a..1b87e1279c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkProfileOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkProfileOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkSubnetOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkSubnetOptionsTest.java index c082be1bfc..1fb70dba83 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkSubnetOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkSubnetOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkSubnetReservedIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkSubnetReservedIpOptionsTest.java index 5840f0e88c..14c38b7d9c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkSubnetReservedIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetClusterNetworkSubnetReservedIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostDiskOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostDiskOptionsTest.java index 60e3faaf22..d1a24ab72d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostDiskOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostDiskOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostGroupOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostGroupOptionsTest.java index 5d88e79388..6f54a925c9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostGroupOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostGroupOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostOptionsTest.java index 0a2668d669..8fd43d8798 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostProfileOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostProfileOptionsTest.java index 56e8e29b70..7428b30231 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostProfileOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetDedicatedHostProfileOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetEndpointGatewayIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetEndpointGatewayIpOptionsTest.java index 8d8c7f197f..5c681b7c70 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetEndpointGatewayIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetEndpointGatewayIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetEndpointGatewayOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetEndpointGatewayOptionsTest.java index a95881de6d..318850d770 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetEndpointGatewayOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetEndpointGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetFloatingIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetFloatingIpOptionsTest.java index 355aeffc19..771fd7e066 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetFloatingIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetFloatingIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetFlowLogCollectorOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetFlowLogCollectorOptionsTest.java index 534503084d..72a05cec06 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetFlowLogCollectorOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetFlowLogCollectorOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetIkePolicyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetIkePolicyOptionsTest.java index cdbd696eda..b310097885 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetIkePolicyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetIkePolicyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetImageExportJobOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetImageExportJobOptionsTest.java index d8f825e745..d20238e571 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetImageExportJobOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetImageExportJobOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetImageOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetImageOptionsTest.java index 33f64fa40d..33ff166a58 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetImageOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetImageOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceClusterNetworkAttachmentOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceClusterNetworkAttachmentOptionsTest.java index b21401a3b4..8d3e6dac2b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceClusterNetworkAttachmentOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceClusterNetworkAttachmentOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceDiskOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceDiskOptionsTest.java index 8b709c4cca..7f5f8fbcfa 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceDiskOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceDiskOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupManagerActionOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupManagerActionOptionsTest.java index f15d9f1867..35de1746a7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupManagerActionOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupManagerActionOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupManagerOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupManagerOptionsTest.java index 60de4a6aa5..2306fa974d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupManagerOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupManagerOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupManagerPolicyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupManagerPolicyOptionsTest.java index 571738ff85..67bfde3575 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupManagerPolicyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupManagerPolicyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupMembershipOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupMembershipOptionsTest.java index a21c76e7d0..d3d0ea1818 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupMembershipOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupMembershipOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupOptionsTest.java index 7274a6e8e3..dbfb845350 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceGroupOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceInitializationOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceInitializationOptionsTest.java index cb606faede..4928b341fd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceInitializationOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceInitializationOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkAttachmentOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkAttachmentOptionsTest.java index 8275a4e9db..b2f3aa4ef1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkAttachmentOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkAttachmentOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkInterfaceFloatingIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkInterfaceFloatingIpOptionsTest.java index 1518e934a4..d22ebafd0c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkInterfaceFloatingIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkInterfaceFloatingIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkInterfaceIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkInterfaceIpOptionsTest.java index af71ed10a9..c6d3c55b3f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkInterfaceIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkInterfaceIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkInterfaceOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkInterfaceOptionsTest.java index 83e5d42964..6778c664b2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkInterfaceOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceNetworkInterfaceOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceOptionsTest.java index 5683fb334a..5c0793358b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceProfileOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceProfileOptionsTest.java index 9d911d0bc0..81f03554c8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceProfileOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceProfileOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceTemplateOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceTemplateOptionsTest.java index 8ad9a5d6e6..e311a3abd8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceTemplateOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceTemplateOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceVolumeAttachmentOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceVolumeAttachmentOptionsTest.java index 9216ab111e..e5d4552704 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceVolumeAttachmentOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetInstanceVolumeAttachmentOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetIpsecPolicyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetIpsecPolicyOptionsTest.java index faec3f6a4b..295f0092ec 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetIpsecPolicyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetIpsecPolicyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetKeyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetKeyOptionsTest.java index 8dface008a..1fc2c3c551 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetKeyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetKeyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerListenerOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerListenerOptionsTest.java index 65f51f91ce..6eee0b07cf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerListenerOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerListenerOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerListenerPolicyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerListenerPolicyOptionsTest.java index e7b8f21d2c..4bf30b0d4a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerListenerPolicyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerListenerPolicyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerListenerPolicyRuleOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerListenerPolicyRuleOptionsTest.java index 3fbc14c1c7..7393614fdf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerListenerPolicyRuleOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerListenerPolicyRuleOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerOptionsTest.java index eb026c26f9..358e8b776b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerPoolMemberOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerPoolMemberOptionsTest.java index 94c1a3dd47..c171ea9dc6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerPoolMemberOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerPoolMemberOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerPoolOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerPoolOptionsTest.java index 0b7d86877d..f7ca31d06a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerPoolOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerPoolOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerProfileOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerProfileOptionsTest.java index c4c2eedf02..708fa0957c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerProfileOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerProfileOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerStatisticsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerStatisticsOptionsTest.java index 1c940ac6fc..626adf552f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerStatisticsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetLoadBalancerStatisticsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetNetworkAclOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetNetworkAclOptionsTest.java index 8578fd657c..3b0df11234 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetNetworkAclOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetNetworkAclOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetNetworkAclRuleOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetNetworkAclRuleOptionsTest.java index b9745e6514..26e0c3b38c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetNetworkAclRuleOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetNetworkAclRuleOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetNetworkInterfaceFloatingIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetNetworkInterfaceFloatingIpOptionsTest.java index cf9c4f293e..fe04e62742 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetNetworkInterfaceFloatingIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetNetworkInterfaceFloatingIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetOperatingSystemOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetOperatingSystemOptionsTest.java index 6ea379f1c6..f058b5fd97 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetOperatingSystemOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetOperatingSystemOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetPlacementGroupOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetPlacementGroupOptionsTest.java index 2ba5f718af..8035908872 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetPlacementGroupOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetPlacementGroupOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetPrivatePathServiceGatewayAccountPolicyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetPrivatePathServiceGatewayAccountPolicyOptionsTest.java index e539f5c5f3..f4dbb1ed7f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetPrivatePathServiceGatewayAccountPolicyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetPrivatePathServiceGatewayAccountPolicyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetPrivatePathServiceGatewayEndpointGatewayBindingOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetPrivatePathServiceGatewayEndpointGatewayBindingOptionsTest.java index 3dc3ae17d3..42511de998 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetPrivatePathServiceGatewayEndpointGatewayBindingOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetPrivatePathServiceGatewayEndpointGatewayBindingOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetPrivatePathServiceGatewayOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetPrivatePathServiceGatewayOptionsTest.java index 56cb011961..64cd7bf004 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetPrivatePathServiceGatewayOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetPrivatePathServiceGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetPublicAddressRangeOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetPublicAddressRangeOptionsTest.java index a47adc74d3..54f5b10631 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetPublicAddressRangeOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetPublicAddressRangeOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetPublicGatewayOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetPublicGatewayOptionsTest.java index 09d60c313d..81198ce0fe 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetPublicGatewayOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetPublicGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetRegionOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetRegionOptionsTest.java index dfaf856db7..8ae787e04b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetRegionOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetRegionOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetRegionZoneOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetRegionZoneOptionsTest.java index 2f82dbacc9..858f4aa6cb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetRegionZoneOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetRegionZoneOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetReservationOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetReservationOptionsTest.java index 85462765aa..6fc149d14c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetReservationOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetReservationOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSecurityGroupOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSecurityGroupOptionsTest.java index 04ffbaf131..18e7a88b3e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSecurityGroupOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSecurityGroupOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSecurityGroupRuleOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSecurityGroupRuleOptionsTest.java index b452fa5901..a1ed3d25af 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSecurityGroupRuleOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSecurityGroupRuleOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSecurityGroupTargetOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSecurityGroupTargetOptionsTest.java index 2fe035e8ca..e7ddd393cf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSecurityGroupTargetOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSecurityGroupTargetOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetShareAccessorBindingOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetShareAccessorBindingOptionsTest.java index 3ce4444df8..a6c50049f1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetShareAccessorBindingOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetShareAccessorBindingOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetShareMountTargetOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetShareMountTargetOptionsTest.java index 90e5f18009..4a369bf517 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetShareMountTargetOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetShareMountTargetOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetShareOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetShareOptionsTest.java index 1919c99ead..fe68deb9ce 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetShareOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetShareOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetShareProfileOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetShareProfileOptionsTest.java index 78480d02bd..233e0e979e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetShareProfileOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetShareProfileOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetShareSnapshotOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetShareSnapshotOptionsTest.java index 34c22aad27..3d46037711 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetShareSnapshotOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetShareSnapshotOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetShareSourceOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetShareSourceOptionsTest.java index 11eb620809..54f009ed20 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetShareSourceOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetShareSourceOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSnapshotCloneOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSnapshotCloneOptionsTest.java index 08cc9b5a36..aec38866a7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSnapshotCloneOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSnapshotCloneOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSnapshotConsistencyGroupOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSnapshotConsistencyGroupOptionsTest.java index b11aa50e33..a9d8a751ee 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSnapshotConsistencyGroupOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSnapshotConsistencyGroupOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSnapshotOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSnapshotOptionsTest.java index 04dea2947e..fd30d197f0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSnapshotOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSnapshotOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetNetworkAclOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetNetworkAclOptionsTest.java index e8254f00ac..f7104193be 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetNetworkAclOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetNetworkAclOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetOptionsTest.java index a252d84c86..8335d2cbc9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetPublicGatewayOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetPublicGatewayOptionsTest.java index c41e46385f..743e752c17 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetPublicGatewayOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetPublicGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetReservedIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetReservedIpOptionsTest.java index 14b3bb3e27..44854d8c54 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetReservedIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetReservedIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetRoutingTableOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetRoutingTableOptionsTest.java index 23f102c13f..3c98b0c478 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetRoutingTableOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetSubnetRoutingTableOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVirtualNetworkInterfaceIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVirtualNetworkInterfaceIpOptionsTest.java index cf951283aa..2370772ad1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVirtualNetworkInterfaceIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVirtualNetworkInterfaceIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVirtualNetworkInterfaceOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVirtualNetworkInterfaceOptionsTest.java index b9ca91bd1c..c862c2e972 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVirtualNetworkInterfaceOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVirtualNetworkInterfaceOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVolumeOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVolumeOptionsTest.java index 88da7a57e1..e0fcd16c97 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVolumeOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVolumeOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVolumeProfileOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVolumeProfileOptionsTest.java index f415848efd..fb935b7fee 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVolumeProfileOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVolumeProfileOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcAddressPrefixOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcAddressPrefixOptionsTest.java index 0a55e3541f..9f72f6690c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcAddressPrefixOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcAddressPrefixOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDefaultNetworkAclOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDefaultNetworkAclOptionsTest.java index 8d2db7f29a..d03b7fe4da 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDefaultNetworkAclOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDefaultNetworkAclOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDefaultRoutingTableOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDefaultRoutingTableOptionsTest.java index 7cea5de98a..a3a7930915 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDefaultRoutingTableOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDefaultRoutingTableOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDefaultSecurityGroupOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDefaultSecurityGroupOptionsTest.java index 48aa28474b..56f0cfc1ee 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDefaultSecurityGroupOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDefaultSecurityGroupOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDnsResolutionBindingOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDnsResolutionBindingOptionsTest.java index b61f24e085..f35f8e0019 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDnsResolutionBindingOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcDnsResolutionBindingOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcOptionsTest.java index 1c73aa749f..02089e3e47 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRouteOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRouteOptionsTest.java index 8c287557b2..01bf584780 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRouteOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRouteOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRouteResponseTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRouteResponseTest.java new file mode 100644 index 0000000000..dbe3bd6cff --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRouteResponseTest.java @@ -0,0 +1,53 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.Deleted; +import com.ibm.cloud.is.vpc.v1.model.GetVpcRouteResponse; +import com.ibm.cloud.is.vpc.v1.model.RouteCreatorVPNGatewayReference; +import com.ibm.cloud.is.vpc.v1.model.RouteNextHopIP; +import com.ibm.cloud.is.vpc.v1.model.ZoneReference; +import com.ibm.cloud.is.vpc.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 GetVpcRouteResponse model. + */ +public class GetVpcRouteResponseTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testGetVpcRouteResponse() throws Throwable { + GetVpcRouteResponse getVpcRouteResponseModel = new GetVpcRouteResponse(); + assertNull(getVpcRouteResponseModel.getAction()); + assertNull(getVpcRouteResponseModel.isAdvertise()); + assertNull(getVpcRouteResponseModel.getCreatedAt()); + assertNull(getVpcRouteResponseModel.getCreator()); + assertNull(getVpcRouteResponseModel.getDestination()); + assertNull(getVpcRouteResponseModel.getHref()); + assertNull(getVpcRouteResponseModel.getId()); + assertNull(getVpcRouteResponseModel.getLifecycleState()); + assertNull(getVpcRouteResponseModel.getName()); + assertNull(getVpcRouteResponseModel.getNextHop()); + assertNull(getVpcRouteResponseModel.getOrigin()); + assertNull(getVpcRouteResponseModel.getPriority()); + assertNull(getVpcRouteResponseModel.getZone()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRoutingTableOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRoutingTableOptionsTest.java index 693e3742a7..abfa928647 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRoutingTableOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRoutingTableOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRoutingTableRouteOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRoutingTableRouteOptionsTest.java index ed8dfc28f2..ca72fd6138 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRoutingTableRouteOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpcRoutingTableRouteOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnGatewayConnectionOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnGatewayConnectionOptionsTest.java index f149ba8323..efd1696e43 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnGatewayConnectionOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnGatewayConnectionOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnGatewayOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnGatewayOptionsTest.java index ca27773622..1f888b2182 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnGatewayOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnGatewayServiceConnectionOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnGatewayServiceConnectionOptionsTest.java new file mode 100644 index 0000000000..ab87a8d074 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnGatewayServiceConnectionOptionsTest.java @@ -0,0 +1,47 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.GetVpnGatewayServiceConnectionOptions; +import com.ibm.cloud.is.vpc.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 GetVpnGatewayServiceConnectionOptions model. + */ +public class GetVpnGatewayServiceConnectionOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testGetVpnGatewayServiceConnectionOptions() throws Throwable { + GetVpnGatewayServiceConnectionOptions getVpnGatewayServiceConnectionOptionsModel = new GetVpnGatewayServiceConnectionOptions.Builder() + .vpnGatewayId("testString") + .id("testString") + .build(); + assertEquals(getVpnGatewayServiceConnectionOptionsModel.vpnGatewayId(), "testString"); + assertEquals(getVpnGatewayServiceConnectionOptionsModel.id(), "testString"); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testGetVpnGatewayServiceConnectionOptionsError() throws Throwable { + new GetVpnGatewayServiceConnectionOptions.Builder().build(); + } + +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerClientConfigurationOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerClientConfigurationOptionsTest.java index a9c40767b6..ac5321cad7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerClientConfigurationOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerClientConfigurationOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerClientOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerClientOptionsTest.java index 25409aba7f..599ecf1781 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerClientOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerClientOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerOptionsTest.java index ca47410973..664785328a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerRouteOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerRouteOptionsTest.java index 24829f3811..0e0f0722ac 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerRouteOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/GetVpnServerRouteOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyCollectionTest.java index c34945a8be..6bba47c2a3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyConnectionCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyConnectionCollectionTest.java index 54d85ddb64..cb09df9a20 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyConnectionCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyConnectionCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyPatchTest.java index e9f86fb7ef..d84ab3bb90 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyReferenceTest.java index 4592874f63..4c7e3a0127 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyTest.java index 7d6eaa6f28..2fc9c88ee6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IKEPolicyTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IPTest.java index 9faef629a7..3cb7a8354a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyCollectionTest.java index 1f71c9772e..74fa2e9f82 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyConnectionCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyConnectionCollectionTest.java index 6c3569b19c..0c458d4b6a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyConnectionCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyConnectionCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyPatchTest.java index e03beb923a..fa42b9c3aa 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyReferenceTest.java index 41e7b3fff6..2a669be6f9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyTest.java index 3fe3000db2..c6980e0bbc 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/IPsecPolicyTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageAllowedUsePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageAllowedUsePatchTest.java new file mode 100644 index 0000000000..9fa6091b48 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageAllowedUsePatchTest.java @@ -0,0 +1,51 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.ImageAllowedUsePatch; +import com.ibm.cloud.is.vpc.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 ImageAllowedUsePatch model. + */ +public class ImageAllowedUsePatchTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testImageAllowedUsePatch() throws Throwable { + ImageAllowedUsePatch imageAllowedUsePatchModel = new ImageAllowedUsePatch.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(imageAllowedUsePatchModel.apiVersion(), "2024-06-23"); + assertEquals(imageAllowedUsePatchModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(imageAllowedUsePatchModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + + String json = TestUtilities.serialize(imageAllowedUsePatchModel); + + ImageAllowedUsePatch imageAllowedUsePatchModelNew = TestUtilities.deserialize(json, ImageAllowedUsePatch.class); + assertTrue(imageAllowedUsePatchModelNew instanceof ImageAllowedUsePatch); + assertEquals(imageAllowedUsePatchModelNew.apiVersion(), "2024-06-23"); + assertEquals(imageAllowedUsePatchModelNew.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(imageAllowedUsePatchModelNew.instance(), "gpu.count > 0 && enable_secure_boot == true"); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageAllowedUsePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageAllowedUsePrototypeTest.java new file mode 100644 index 0000000000..77cf1d4a83 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageAllowedUsePrototypeTest.java @@ -0,0 +1,51 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.ImageAllowedUsePrototype; +import com.ibm.cloud.is.vpc.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 ImageAllowedUsePrototype model. + */ +public class ImageAllowedUsePrototypeTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testImageAllowedUsePrototype() throws Throwable { + ImageAllowedUsePrototype imageAllowedUsePrototypeModel = new ImageAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(imageAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(imageAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(imageAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + + String json = TestUtilities.serialize(imageAllowedUsePrototypeModel); + + ImageAllowedUsePrototype imageAllowedUsePrototypeModelNew = TestUtilities.deserialize(json, ImageAllowedUsePrototype.class); + assertTrue(imageAllowedUsePrototypeModelNew instanceof ImageAllowedUsePrototype); + assertEquals(imageAllowedUsePrototypeModelNew.apiVersion(), "2024-06-23"); + assertEquals(imageAllowedUsePrototypeModelNew.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(imageAllowedUsePrototypeModelNew.instance(), "gpu.count > 0 && enable_secure_boot == true"); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageAllowedUseTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageAllowedUseTest.java new file mode 100644 index 0000000000..c801d8c290 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageAllowedUseTest.java @@ -0,0 +1,39 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.ImageAllowedUse; +import com.ibm.cloud.is.vpc.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 ImageAllowedUse model. + */ +public class ImageAllowedUseTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testImageAllowedUse() throws Throwable { + ImageAllowedUse imageAllowedUseModel = new ImageAllowedUse(); + assertNull(imageAllowedUseModel.getApiVersion()); + assertNull(imageAllowedUseModel.getBareMetalServer()); + assertNull(imageAllowedUseModel.getInstance()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageBareMetalServerProfileCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageBareMetalServerProfileCollectionTest.java new file mode 100644 index 0000000000..2e055d1750 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageBareMetalServerProfileCollectionTest.java @@ -0,0 +1,43 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerProfileReference; +import com.ibm.cloud.is.vpc.v1.model.ImageBareMetalServerProfileCollection; +import com.ibm.cloud.is.vpc.v1.model.PageLink; +import com.ibm.cloud.is.vpc.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 ImageBareMetalServerProfileCollection model. + */ +public class ImageBareMetalServerProfileCollectionTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testImageBareMetalServerProfileCollection() throws Throwable { + ImageBareMetalServerProfileCollection imageBareMetalServerProfileCollectionModel = new ImageBareMetalServerProfileCollection(); + assertNull(imageBareMetalServerProfileCollectionModel.getBareMetalServerProfiles()); + assertNull(imageBareMetalServerProfileCollectionModel.getFirst()); + assertNull(imageBareMetalServerProfileCollectionModel.getLimit()); + assertNull(imageBareMetalServerProfileCollectionModel.getNext()); + assertNull(imageBareMetalServerProfileCollectionModel.getTotalCount()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageCatalogOfferingTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageCatalogOfferingTest.java index f15db6f58b..e5c9f3b8c6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageCatalogOfferingTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageCatalogOfferingTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageCollectionTest.java index f23a9798f9..21e2d06ada 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -18,6 +18,7 @@ import com.ibm.cloud.is.vpc.v1.model.Deleted; import com.ibm.cloud.is.vpc.v1.model.EncryptionKeyReference; import com.ibm.cloud.is.vpc.v1.model.Image; +import com.ibm.cloud.is.vpc.v1.model.ImageAllowedUse; import com.ibm.cloud.is.vpc.v1.model.ImageCatalogOffering; import com.ibm.cloud.is.vpc.v1.model.ImageCollection; import com.ibm.cloud.is.vpc.v1.model.ImageFile; diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobPatchTest.java index 199986f639..5f3cabb7f9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobStatusReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobStatusReasonTest.java index a1ba94e13c..8aaf03d354 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobStatusReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobStatusReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobTest.java index 319ccdb081..194ae6cd80 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobUnpaginatedCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobUnpaginatedCollectionTest.java index c9bf13cd35..453c0a39e2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobUnpaginatedCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageExportJobUnpaginatedCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageFileChecksumsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageFileChecksumsTest.java index 888d1aa193..5bedeae4bd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageFileChecksumsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageFileChecksumsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageFilePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageFilePrototypeTest.java index 7c9ce30544..e79bf5c618 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageFilePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageFilePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageFileTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageFileTest.java index 3769cb60c5..2d5af2f6c3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageFileTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageFileTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityByCRNTest.java index fc3ac24953..680282e39d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityByHrefTest.java index c8581823f5..1a7ea64dde 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityByIdTest.java index d02d49eb3d..d1fa3da184 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityTest.java index bac6d5bb72..3dc1af1511 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageInstanceProfileCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageInstanceProfileCollectionTest.java new file mode 100644 index 0000000000..c634f3d3fc --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageInstanceProfileCollectionTest.java @@ -0,0 +1,43 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.ImageInstanceProfileCollection; +import com.ibm.cloud.is.vpc.v1.model.InstanceProfileReference; +import com.ibm.cloud.is.vpc.v1.model.PageLink; +import com.ibm.cloud.is.vpc.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 ImageInstanceProfileCollection model. + */ +public class ImageInstanceProfileCollectionTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testImageInstanceProfileCollection() throws Throwable { + ImageInstanceProfileCollection imageInstanceProfileCollectionModel = new ImageInstanceProfileCollection(); + assertNull(imageInstanceProfileCollectionModel.getFirst()); + assertNull(imageInstanceProfileCollectionModel.getInstanceProfiles()); + assertNull(imageInstanceProfileCollectionModel.getLimit()); + assertNull(imageInstanceProfileCollectionModel.getNext()); + assertNull(imageInstanceProfileCollectionModel.getTotalCount()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImagePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImagePatchTest.java index 435a9f484f..719f6c9c6e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImagePatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImagePatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -13,6 +13,7 @@ package com.ibm.cloud.is.vpc.v1.model; +import com.ibm.cloud.is.vpc.v1.model.ImageAllowedUsePatch; import com.ibm.cloud.is.vpc.v1.model.ImagePatch; import com.ibm.cloud.is.vpc.v1.utils.TestUtilities; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; @@ -33,11 +34,22 @@ public class ImagePatchTest { @Test public void testImagePatch() throws Throwable { + ImageAllowedUsePatch imageAllowedUsePatchModel = new ImageAllowedUsePatch.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(imageAllowedUsePatchModel.apiVersion(), "2024-06-23"); + assertEquals(imageAllowedUsePatchModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(imageAllowedUsePatchModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + ImagePatch imagePatchModel = new ImagePatch.Builder() + .allowedUse(imageAllowedUsePatchModel) .deprecationAt(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) .name("my-image") .obsolescenceAt(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) .build(); + assertEquals(imagePatchModel.allowedUse(), imageAllowedUsePatchModel); assertEquals(imagePatchModel.deprecationAt(), DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")); assertEquals(imagePatchModel.name(), "my-image"); assertEquals(imagePatchModel.obsolescenceAt(), DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")); @@ -46,13 +58,21 @@ public void testImagePatch() throws Throwable { ImagePatch imagePatchModelNew = TestUtilities.deserialize(json, ImagePatch.class); assertTrue(imagePatchModelNew instanceof ImagePatch); + assertEquals(imagePatchModelNew.allowedUse().toString(), imageAllowedUsePatchModel.toString()); assertEquals(imagePatchModelNew.deprecationAt(), DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")); assertEquals(imagePatchModelNew.name(), "my-image"); assertEquals(imagePatchModelNew.obsolescenceAt(), DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")); } @Test public void testImagePatchAsPatch() throws Throwable { + ImageAllowedUsePatch imageAllowedUsePatchModel = new ImageAllowedUsePatch.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + ImagePatch imagePatchModel = new ImagePatch.Builder() + .allowedUse(imageAllowedUsePatchModel) .deprecationAt(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) .name("my-image") .obsolescenceAt(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) @@ -60,6 +80,7 @@ public void testImagePatchAsPatch() throws Throwable { Map mergePatch = imagePatchModel.asPatch(); + assertTrue(mergePatch.containsKey("allowed_use")); assertTrue(mergePatch.containsKey("deprecation_at")); assertEquals(mergePatch.get("name"), "my-image"); assertTrue(mergePatch.containsKey("obsolescence_at")); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImagePrototypeImageByFileTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImagePrototypeImageByFileTest.java index 28edf1bb7d..744e899246 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImagePrototypeImageByFileTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImagePrototypeImageByFileTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -14,6 +14,7 @@ package com.ibm.cloud.is.vpc.v1.model; import com.ibm.cloud.is.vpc.v1.model.EncryptionKeyIdentityByCRN; +import com.ibm.cloud.is.vpc.v1.model.ImageAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.ImageFilePrototype; import com.ibm.cloud.is.vpc.v1.model.ImagePrototypeImageByFile; import com.ibm.cloud.is.vpc.v1.model.OperatingSystemIdentityByName; @@ -36,6 +37,15 @@ public class ImagePrototypeImageByFileTest { @Test public void testImagePrototypeImageByFile() throws Throwable { + ImageAllowedUsePrototype imageAllowedUsePrototypeModel = new ImageAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(imageAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(imageAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(imageAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() .id("fee82deba12e4c0fb69c3b09d1f12345") .build(); @@ -57,6 +67,7 @@ public void testImagePrototypeImageByFile() throws Throwable { assertEquals(operatingSystemIdentityModel.name(), "ubuntu-24-04-amd64"); ImagePrototypeImageByFile imagePrototypeImageByFileModel = new ImagePrototypeImageByFile.Builder() + .allowedUse(imageAllowedUsePrototypeModel) .deprecationAt(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) .name("my-image") .obsolescenceAt(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) @@ -66,6 +77,7 @@ public void testImagePrototypeImageByFile() throws Throwable { .file(imageFilePrototypeModel) .operatingSystem(operatingSystemIdentityModel) .build(); + assertEquals(imagePrototypeImageByFileModel.allowedUse(), imageAllowedUsePrototypeModel); assertEquals(imagePrototypeImageByFileModel.deprecationAt(), DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")); assertEquals(imagePrototypeImageByFileModel.name(), "my-image"); assertEquals(imagePrototypeImageByFileModel.obsolescenceAt(), DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")); @@ -79,6 +91,7 @@ public void testImagePrototypeImageByFile() throws Throwable { ImagePrototypeImageByFile imagePrototypeImageByFileModelNew = TestUtilities.deserialize(json, ImagePrototypeImageByFile.class); assertTrue(imagePrototypeImageByFileModelNew instanceof ImagePrototypeImageByFile); + assertEquals(imagePrototypeImageByFileModelNew.allowedUse().toString(), imageAllowedUsePrototypeModel.toString()); assertEquals(imagePrototypeImageByFileModelNew.deprecationAt(), DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")); assertEquals(imagePrototypeImageByFileModelNew.name(), "my-image"); assertEquals(imagePrototypeImageByFileModelNew.obsolescenceAt(), DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImagePrototypeImageBySourceVolumeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImagePrototypeImageBySourceVolumeTest.java index 284e897892..1006d918b4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImagePrototypeImageBySourceVolumeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImagePrototypeImageBySourceVolumeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -14,6 +14,7 @@ package com.ibm.cloud.is.vpc.v1.model; import com.ibm.cloud.is.vpc.v1.model.EncryptionKeyIdentityByCRN; +import com.ibm.cloud.is.vpc.v1.model.ImageAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.ImagePrototypeImageBySourceVolume; import com.ibm.cloud.is.vpc.v1.model.ResourceGroupIdentityById; import com.ibm.cloud.is.vpc.v1.model.VolumeIdentityById; @@ -35,6 +36,15 @@ public class ImagePrototypeImageBySourceVolumeTest { @Test public void testImagePrototypeImageBySourceVolume() throws Throwable { + ImageAllowedUsePrototype imageAllowedUsePrototypeModel = new ImageAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(imageAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(imageAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(imageAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + ResourceGroupIdentityById resourceGroupIdentityModel = new ResourceGroupIdentityById.Builder() .id("fee82deba12e4c0fb69c3b09d1f12345") .build(); @@ -51,6 +61,7 @@ public void testImagePrototypeImageBySourceVolume() throws Throwable { assertEquals(volumeIdentityModel.id(), "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"); ImagePrototypeImageBySourceVolume imagePrototypeImageBySourceVolumeModel = new ImagePrototypeImageBySourceVolume.Builder() + .allowedUse(imageAllowedUsePrototypeModel) .deprecationAt(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) .name("my-image") .obsolescenceAt(DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")) @@ -58,6 +69,7 @@ public void testImagePrototypeImageBySourceVolume() throws Throwable { .encryptionKey(encryptionKeyIdentityModel) .sourceVolume(volumeIdentityModel) .build(); + assertEquals(imagePrototypeImageBySourceVolumeModel.allowedUse(), imageAllowedUsePrototypeModel); assertEquals(imagePrototypeImageBySourceVolumeModel.deprecationAt(), DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")); assertEquals(imagePrototypeImageBySourceVolumeModel.name(), "my-image"); assertEquals(imagePrototypeImageBySourceVolumeModel.obsolescenceAt(), DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")); @@ -69,6 +81,7 @@ public void testImagePrototypeImageBySourceVolume() throws Throwable { ImagePrototypeImageBySourceVolume imagePrototypeImageBySourceVolumeModelNew = TestUtilities.deserialize(json, ImagePrototypeImageBySourceVolume.class); assertTrue(imagePrototypeImageBySourceVolumeModelNew instanceof ImagePrototypeImageBySourceVolume); + assertEquals(imagePrototypeImageBySourceVolumeModelNew.allowedUse().toString(), imageAllowedUsePrototypeModel.toString()); assertEquals(imagePrototypeImageBySourceVolumeModelNew.deprecationAt(), DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")); assertEquals(imagePrototypeImageBySourceVolumeModelNew.name(), "my-image"); assertEquals(imagePrototypeImageBySourceVolumeModelNew.obsolescenceAt(), DateUtils.parseAsDateTime("2019-01-01T12:00:00.000Z")); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImagePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImagePrototypeTest.java index 459b250bbb..a5360b0af0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImagePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImagePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -14,6 +14,7 @@ package com.ibm.cloud.is.vpc.v1.model; import com.ibm.cloud.is.vpc.v1.model.EncryptionKeyIdentityByCRN; +import com.ibm.cloud.is.vpc.v1.model.ImageAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.ImageFilePrototype; import com.ibm.cloud.is.vpc.v1.model.ImagePrototype; import com.ibm.cloud.is.vpc.v1.model.OperatingSystemIdentityByName; diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageReferenceTest.java index 49c2025fb7..20705f5ed3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageRemoteContextImageReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageRemoteContextImageReferenceTest.java index eaa1508206..59315318f2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageRemoteContextImageReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageRemoteContextImageReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageRemoteTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageRemoteTest.java index e511dcd03b..291db1506a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageRemoteTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageRemoteTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageStatusReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageStatusReasonTest.java index 83ca7ca8b8..88cb6d39b6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageStatusReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageStatusReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageTest.java index c38ea3e845..aeb4873234 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ImageTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -18,6 +18,7 @@ import com.ibm.cloud.is.vpc.v1.model.Deleted; import com.ibm.cloud.is.vpc.v1.model.EncryptionKeyReference; import com.ibm.cloud.is.vpc.v1.model.Image; +import com.ibm.cloud.is.vpc.v1.model.ImageAllowedUse; import com.ibm.cloud.is.vpc.v1.model.ImageCatalogOffering; import com.ibm.cloud.is.vpc.v1.model.ImageFile; import com.ibm.cloud.is.vpc.v1.model.ImageFileChecksums; @@ -46,6 +47,7 @@ public class ImageTest { @Test public void testImage() throws Throwable { Image imageModel = new Image(); + assertNull(imageModel.getAllowedUse()); assertNull(imageModel.getCatalogOffering()); assertNull(imageModel.getCreatedAt()); assertNull(imageModel.getCrn()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceActionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceActionTest.java index 76335f2b46..42e56b3cc3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceActionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceActionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceAvailabilityPolicyPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceAvailabilityPolicyPatchTest.java index 264a3b63bd..33a50f70f2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceAvailabilityPolicyPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceAvailabilityPolicyPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceAvailabilityPolicyPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceAvailabilityPolicyPrototypeTest.java index 43efe4dbd9..78949fe16b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceAvailabilityPolicyPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceAvailabilityPolicyPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceAvailabilityPolicyTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceAvailabilityPolicyTest.java index 458f79878c..4020612e59 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceAvailabilityPolicyTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceAvailabilityPolicyTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingPrototypeCatalogOfferingByOfferingTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingPrototypeCatalogOfferingByOfferingTest.java index c102bb57dd..c013b8c746 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingPrototypeCatalogOfferingByOfferingTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingPrototypeCatalogOfferingByOfferingTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingPrototypeCatalogOfferingByVersionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingPrototypeCatalogOfferingByVersionTest.java index 1061c93380..af39fccdd0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingPrototypeCatalogOfferingByVersionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingPrototypeCatalogOfferingByVersionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingPrototypeTest.java index 8004898bc4..a1b6853b8e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingTest.java index f878ab0ec3..89461edbfb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceCatalogOfferingTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHrefTest.java index 4af1ef91b4..b9fa82d44f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByIdTest.java index 2b7849d3eb..8e371c43bc 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforePrototypeTest.java index 8177ba59c7..5bd8297b91 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforeTest.java index f1b1495ea7..d759acc626 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentBeforeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentCollectionTest.java index 622694e731..1c6121e611 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentLifecycleReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentLifecycleReasonTest.java index a3f4aaf262..0e22575fb8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentLifecycleReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentLifecycleReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPatchTest.java index b8de2df729..77b0ff47c2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHrefTest.java index bbfe5d317a..f8ee535e6e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByIdTest.java index e5feeb6fe8..d3b27587fb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityTest.java index ff96cd46f7..5ca2a94424 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachmentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachmentTest.java index 3584d5cbee..f77f8a54c7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachmentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachmentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceTest.java index b70d88b4a7..af8bee7d55 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeInstanceContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeInstanceContextTest.java index 92fd7f68fa..8c3379c566 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeInstanceContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentPrototypeInstanceContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentReferenceTest.java index 5317f65568..a094d31b03 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentTest.java index 126cb5444f..6f3f450c14 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceClusterNetworkAttachmentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceCollectionTest.java index 96c59c48e9..7562e6c341 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceConsoleAccessTokenTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceConsoleAccessTokenTest.java index 7f17262980..c9a3010086 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceConsoleAccessTokenTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceConsoleAccessTokenTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceDefaultTrustedProfilePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceDefaultTrustedProfilePrototypeTest.java index 4256497f26..ca864412f5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceDefaultTrustedProfilePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceDefaultTrustedProfilePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskCollectionTest.java index 209af66819..41a978fb32 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskPatchTest.java index c644177e70..c58fb42ed0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskReferenceTest.java index 12584ea83b..143bc4af16 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskTest.java index aec63b1ee3..8313b82258 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceDiskTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGPUTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGPUTest.java index 9e197a9f80..1d151a6455 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGPUTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGPUTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupCollectionTest.java index be0eae0cf9..b3836795bc 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupLifecycleReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupLifecycleReasonTest.java index 9fba61849f..6ae4cd4b62 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupLifecycleReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupLifecycleReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionGroupPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionGroupPatchTest.java index 61bd46b6ee..b6efb9d53b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionGroupPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionGroupPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionManagerPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionManagerPatchTest.java index a004813c33..c99ebf3574 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionManagerPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionManagerPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPatchTest.java index c414f9fa34..763c77c534 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroupTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroupTest.java index 4867fcbd90..6f241821d7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroupTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroupTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManagerTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManagerTest.java index ae9daff1df..843615d880 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManagerTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManagerTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecTest.java index 92b2773aab..3dea06286a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroupTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroupTest.java index 3e74b0e95c..e22c4c2b48 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroupTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroupTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManagerTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManagerTest.java index 94c8ea0c9c..11c6430603 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManagerTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManagerTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtTest.java index 6acc464cd3..1b2e4faf9c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeTest.java index ba48c50946..7a8ede7f6a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeScheduledActionPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeTest.java index cf6af155e9..3c5d764d37 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionReferenceTest.java index 39104182e6..498b3487db 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionScheduledActionGroupTargetTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionScheduledActionGroupTargetTest.java index f5fed461fb..3317ab3872 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionScheduledActionGroupTargetTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionScheduledActionGroupTargetTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionScheduledActionManagerTargetTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionScheduledActionManagerTargetTest.java index 5f5043d01f..9a61a82649 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionScheduledActionManagerTargetTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionScheduledActionManagerTargetTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionScheduledActionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionScheduledActionTest.java index 380d809435..ec76027c3b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionScheduledActionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionScheduledActionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionTest.java index f3ab8489bc..2209a767d5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionsCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionsCollectionTest.java index 030ae25963..6d26ecc545 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionsCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerActionsCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerAutoScaleTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerAutoScaleTest.java index 8cee6094eb..34fc82b940 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerAutoScaleTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerAutoScaleTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerCollectionTest.java index 31cd5b5ef2..51a93d1edf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPatchTest.java index 8a00e1c423..210b353beb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyCollectionTest.java index 9942c5e77e..ff3eafd5ff 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicyTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicyTest.java index 9e1404fd92..649fc92fd1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicyTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicyTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyPatchTest.java index 63f913d452..91f12553d0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -34,11 +34,11 @@ public class InstanceGroupManagerPolicyPatchTest { public void testInstanceGroupManagerPolicyPatch() throws Throwable { InstanceGroupManagerPolicyPatch instanceGroupManagerPolicyPatchModel = new InstanceGroupManagerPolicyPatch.Builder() .metricType("cpu") - .metricValue(Long.valueOf("26")) + .metricValue(Long.valueOf("0")) .name("my-instance-group-manager-policy") .build(); assertEquals(instanceGroupManagerPolicyPatchModel.metricType(), "cpu"); - assertEquals(instanceGroupManagerPolicyPatchModel.metricValue(), Long.valueOf("26")); + assertEquals(instanceGroupManagerPolicyPatchModel.metricValue(), Long.valueOf("0")); assertEquals(instanceGroupManagerPolicyPatchModel.name(), "my-instance-group-manager-policy"); String json = TestUtilities.serialize(instanceGroupManagerPolicyPatchModel); @@ -46,14 +46,14 @@ public void testInstanceGroupManagerPolicyPatch() throws Throwable { InstanceGroupManagerPolicyPatch instanceGroupManagerPolicyPatchModelNew = TestUtilities.deserialize(json, InstanceGroupManagerPolicyPatch.class); assertTrue(instanceGroupManagerPolicyPatchModelNew instanceof InstanceGroupManagerPolicyPatch); assertEquals(instanceGroupManagerPolicyPatchModelNew.metricType(), "cpu"); - assertEquals(instanceGroupManagerPolicyPatchModelNew.metricValue(), Long.valueOf("26")); + assertEquals(instanceGroupManagerPolicyPatchModelNew.metricValue(), Long.valueOf("0")); assertEquals(instanceGroupManagerPolicyPatchModelNew.name(), "my-instance-group-manager-policy"); } @Test public void testInstanceGroupManagerPolicyPatchAsPatch() throws Throwable { InstanceGroupManagerPolicyPatch instanceGroupManagerPolicyPatchModel = new InstanceGroupManagerPolicyPatch.Builder() .metricType("cpu") - .metricValue(Long.valueOf("26")) + .metricValue(Long.valueOf("0")) .name("my-instance-group-manager-policy") .build(); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypeTest.java index 6177071665..f01643d0a5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -34,12 +34,12 @@ public void testInstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPol InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype instanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypeModel = new InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype.Builder() .name("my-instance-group-manager-policy") .metricType("cpu") - .metricValue(Long.valueOf("26")) + .metricValue(Long.valueOf("0")) .policyType("target") .build(); assertEquals(instanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypeModel.name(), "my-instance-group-manager-policy"); assertEquals(instanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypeModel.metricType(), "cpu"); - assertEquals(instanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypeModel.metricValue(), Long.valueOf("26")); + assertEquals(instanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypeModel.metricValue(), Long.valueOf("0")); assertEquals(instanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypeModel.policyType(), "target"); String json = TestUtilities.serialize(instanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypeModel); @@ -48,7 +48,7 @@ public void testInstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPol assertTrue(instanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypeModelNew instanceof InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype); assertEquals(instanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypeModelNew.name(), "my-instance-group-manager-policy"); assertEquals(instanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypeModelNew.metricType(), "cpu"); - assertEquals(instanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypeModelNew.metricValue(), Long.valueOf("26")); + assertEquals(instanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypeModelNew.metricValue(), Long.valueOf("0")); assertEquals(instanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypeModelNew.policyType(), "target"); } diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyPrototypeTest.java index 2701014fcb..5cf25b467a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyReferenceTest.java index 8964d7cc6c..fd50312d76 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyTest.java index 540c85c1e7..f93c0cddf9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPolicyTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototypeTest.java index 88a510dfde..8655bd7e72 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototypeTest.java index 976b0c1379..2f991e8fcf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPrototypeTest.java index 1b34b36d02..8411dabd7d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerReferenceTest.java index f9fb9c1d14..15a543ce7e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionGroupPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionGroupPrototypeTest.java index b268729d7f..01560ffcec 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionGroupPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionGroupPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionGroupTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionGroupTest.java index 9017e5b45a..7332ccab65 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionGroupTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionGroupTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerAutoScaleTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerAutoScaleTest.java index 94df80542c..eaebe3a374 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerAutoScaleTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerAutoScaleTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHrefTest.java index d1dae0ccd8..dad63b41d6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByIdTest.java index 807cb65a45..fff6341ee7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeTest.java index 7cb1243a60..e5ecc988ba 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeTest.java index c63e93f362..589f88bbaa 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerTest.java index b24668fb3f..d6313797cd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledActionManagerTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledTest.java index f66af67e35..7361f11730 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerScheduledTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerTest.java index 8dc6b1655c..75279ea2dc 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupManagerTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembershipCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembershipCollectionTest.java index e3fb52dbed..867acd5a1b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembershipCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembershipCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembershipPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembershipPatchTest.java index a5a41bb349..cca878360b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembershipPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembershipPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembershipTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembershipTest.java index ae63280193..b649e19ae5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembershipTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupMembershipTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupPatchTest.java index 3731e52fda..5c1a4e1f08 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupReferenceTest.java index c979704a77..3f7b704a5c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupTest.java index 5bf87d66cc..fc447a9a38 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceGroupTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceHealthReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceHealthReasonTest.java index 5da57d1a3f..cbd53f9fde 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceHealthReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceHealthReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceInitializationDefaultTrustedProfileTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceInitializationDefaultTrustedProfileTest.java index 2a469f3258..ec04192c77 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceInitializationDefaultTrustedProfileTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceInitializationDefaultTrustedProfileTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceInitializationPasswordTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceInitializationPasswordTest.java index 92284c8114..7802e8edf7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceInitializationPasswordTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceInitializationPasswordTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceInitializationTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceInitializationTest.java index 1e5d470208..7281595dfa 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceInitializationTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceInitializationTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceLifecycleReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceLifecycleReasonTest.java index 1770a044fa..0247591595 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceLifecycleReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceLifecycleReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceMetadataServicePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceMetadataServicePatchTest.java index 3fb02d958e..68ea9ce4b1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceMetadataServicePatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceMetadataServicePatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceMetadataServicePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceMetadataServicePrototypeTest.java index 46fea8e6ed..f5676a700b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceMetadataServicePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceMetadataServicePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceMetadataServiceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceMetadataServiceTest.java index 63a4970de8..4b4d629b87 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceMetadataServiceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceMetadataServiceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentCollectionTest.java index 3b3c6b481e..bf2c35a531 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPatchTest.java index 138aa0cc56..7360e05940 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeTest.java index 16e3ef45b0..1ac0a551b3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceTest.java index 7e98b19dc6..f83160e307 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityTest.java index 87de15e13b..71a8fc9e62 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java index f5464745c7..7d5d07c126 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java index c6c83a011f..c412caaa99 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java index cf8f26a09f..048d953966 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContextTest.java index b245d279d8..c5ef1350fc 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentReferenceTest.java index 2735dce0f7..b0ca0a74ba 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentTest.java index 813cac8d4e..8484905098 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceNetworkAttachmentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchProfileInstanceProfileIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchProfileInstanceProfileIdentityByHrefTest.java index 4d53588501..2d477249b2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchProfileInstanceProfileIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchProfileInstanceProfileIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchProfileInstanceProfileIdentityByNameTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchProfileInstanceProfileIdentityByNameTest.java index 6c97d3b110..5c89f97590 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchProfileInstanceProfileIdentityByNameTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchProfileInstanceProfileIdentityByNameTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchProfileTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchProfileTest.java index 4b0cae6773..b2c40f758b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchProfileTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchProfileTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchTest.java index 414df87423..56b4da9e4e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -84,6 +84,7 @@ public void testInstancePatch() throws Throwable { .profile(instancePatchProfileModel) .reservationAffinity(instanceReservationAffinityPatchModel) .totalVolumeBandwidth(Long.valueOf("500")) + .volumeBandwidthQosMode("pooled") .build(); assertEquals(instancePatchModel.availabilityPolicy(), instanceAvailabilityPolicyPatchModel); assertEquals(instancePatchModel.confidentialComputeMode(), "disabled"); @@ -94,6 +95,7 @@ public void testInstancePatch() throws Throwable { assertEquals(instancePatchModel.profile(), instancePatchProfileModel); assertEquals(instancePatchModel.reservationAffinity(), instanceReservationAffinityPatchModel); assertEquals(instancePatchModel.totalVolumeBandwidth(), Long.valueOf("500")); + assertEquals(instancePatchModel.volumeBandwidthQosMode(), "pooled"); String json = TestUtilities.serialize(instancePatchModel); @@ -108,6 +110,7 @@ public void testInstancePatch() throws Throwable { assertEquals(instancePatchModelNew.profile().toString(), instancePatchProfileModel.toString()); assertEquals(instancePatchModelNew.reservationAffinity().toString(), instanceReservationAffinityPatchModel.toString()); assertEquals(instancePatchModelNew.totalVolumeBandwidth(), Long.valueOf("500")); + assertEquals(instancePatchModelNew.volumeBandwidthQosMode(), "pooled"); } @Test public void testInstancePatchAsPatch() throws Throwable { @@ -148,6 +151,7 @@ public void testInstancePatchAsPatch() throws Throwable { .profile(instancePatchProfileModel) .reservationAffinity(instanceReservationAffinityPatchModel) .totalVolumeBandwidth(Long.valueOf("500")) + .volumeBandwidthQosMode("pooled") .build(); Map mergePatch = instancePatchModel.asPatch(); @@ -161,6 +165,7 @@ public void testInstancePatchAsPatch() throws Throwable { assertTrue(mergePatch.containsKey("profile")); assertTrue(mergePatch.containsKey("reservation_affinity")); assertTrue(mergePatch.containsKey("total_volume_bandwidth")); + assertEquals(mergePatch.get("volume_bandwidth_qos_mode"), "pooled"); } } \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetDedicatedHostGroupReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetDedicatedHostGroupReferenceTest.java index e79f6998fe..2d0123b63b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetDedicatedHostGroupReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetDedicatedHostGroupReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetDedicatedHostReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetDedicatedHostReferenceTest.java index 7c9d37a76b..0bdc9ff4f2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetDedicatedHostReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetDedicatedHostReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRNTest.java index 792fc3a2bf..1a54444833 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHrefTest.java index a44224f5d2..413444b4b1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByIdTest.java index b8e54dfc76..5773a519e1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityTest.java index 5200b400be..4e342f96e8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostGroupIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRNTest.java index 9d4d300105..d3640aedb5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHrefTest.java index 4ebec80376..015ce4d221 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByIdTest.java index 8727b6dac5..133c1ded78 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityTest.java index e80ab7b37b..791413ba8d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchDedicatedHostIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchTest.java index 02e6b5ecb6..ce72d99a6b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPlacementGroupReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPlacementGroupReferenceTest.java index 2f46e73529..6e0ec11a6e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPlacementGroupReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPlacementGroupReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRNTest.java index 27690e2277..ea9eb23502 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHrefTest.java index f7c4aaf879..a1b0ad240b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByIdTest.java index 781c400354..7a5d361892 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityTest.java index 43552910da..cca061f559 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostGroupIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRNTest.java index b4df7d43dc..3fc40cc50b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHrefTest.java index 4e3cf16661..24c2bff616 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByIdTest.java index 27d651464c..511dedcc71 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityTest.java index 22e07923d1..1a223ddf0c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeDedicatedHostIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRNTest.java index 9063d4ba8e..c24ad25362 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHrefTest.java index 3d62ca3bac..3890291f5f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByIdTest.java index 377b7373ff..eb560b2499 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityTest.java index 0f2b28d7cc..c637dd220b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypePlacementGroupIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeTest.java index 242b491c7d..1c8dcf0ab0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetTest.java index 074bd7b325..61aa487c5d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePlacementTargetTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthDependentTest.java index 6b1258080e..a2ef657514 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthEnumTest.java index 3e62b4ff80..77e8d0e087 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthEnumTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthEnumTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthFixedTest.java index f26ebf486b..3e2d225ae5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthRangeTest.java index 355b4a1e27..3f54fe4542 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthTest.java index c60e4c8be5..47ddfd789c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileBandwidthTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountDependentTest.java index c5d1cfd8c8..d065f930a9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountEnumTest.java index daf3c5c3ba..0aa275f7d3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountEnumTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountEnumTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountRangeTest.java index 1369085e8d..28b12a877c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountTest.java index a98b104a28..264b834787 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileClusterNetworkAttachmentCountTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileCollectionTest.java index 23aba89dea..c77c67a84f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -39,6 +39,7 @@ import com.ibm.cloud.is.vpc.v1.model.InstanceProfileVCPUFixed; import com.ibm.cloud.is.vpc.v1.model.InstanceProfileVCPUManufacturerFixed; import com.ibm.cloud.is.vpc.v1.model.InstanceProfileVolumeBandwidthFixed; +import com.ibm.cloud.is.vpc.v1.model.InstanceProfileVolumeBandwidthQoSModesEnum; import com.ibm.cloud.is.vpc.v1.utils.TestUtilities; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; import java.io.InputStream; diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityDependentTest.java index c7cf1270e1..bd5bf03443 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityEnumTest.java index fa31e6722c..53e27089ad 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityEnumTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityEnumTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityFixedTest.java index 31baff9526..6e0f7317ed 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityRangeTest.java index 2e3c645b62..e5c612842c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityTest.java index ebcb98fc26..03f972df0a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskQuantityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeDependentTest.java index f13787f0bd..73cf530cba 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeEnumTest.java index 9000a682cb..54365268df 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeEnumTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeEnumTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeFixedTest.java index 55e45a78f2..9fd4820637 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeRangeTest.java index 12720d52bc..9ca13558d9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeTest.java index 35f4ff9e48..411e06f5b2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSizeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSupportedInterfacesTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSupportedInterfacesTest.java index 1d1d331087..cb13143c4d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSupportedInterfacesTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskSupportedInterfacesTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskTest.java index cfbb2e2956..e4bddf22b3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileDiskTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUDependentTest.java index c0fd97f42e..5a1ff25721 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUEnumTest.java index c223aa5a0f..1b254c24b7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUEnumTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUEnumTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUFixedTest.java index 321f4ce625..b7d764fb70 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUManufacturerTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUManufacturerTest.java index cbf9139d4e..a5911a3b63 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUManufacturerTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUManufacturerTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryDependentTest.java index bfebd281f5..bc878ee243 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryEnumTest.java index 2341605663..d17cefa79c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryEnumTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryEnumTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryFixedTest.java index 750f497d7a..0f5d7968a6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryRangeTest.java index 0f6e85c183..441ca81816 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryTest.java index 08d89bdaeb..6778d045a0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUMemoryTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUModelTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUModelTest.java index 33059e651e..cecd01b23d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUModelTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUModelTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPURangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPURangeTest.java index 33d6a2866d..24aae71e0e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPURangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPURangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUTest.java index 9973f114dd..51d48f3f3d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileGPUTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileIdentityByHrefTest.java index f3753f3628..ae5b58cca9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileIdentityByNameTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileIdentityByNameTest.java index 9495a8c312..66eebeb301 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileIdentityByNameTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileIdentityByNameTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileIdentityTest.java index bce199af2d..c72d3298e7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryDependentTest.java index 4b1f036ac6..876a9363ae 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryEnumTest.java index 334592eb71..3e0bb80e55 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryEnumTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryEnumTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryFixedTest.java index f8efe53756..cf3587c66d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryRangeTest.java index ea802ee359..fe2005dfc2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryTest.java index 7c10b6442a..e1a28fb4db 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileMemoryTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNUMACountDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNUMACountDependentTest.java index aab0479613..3cf8f5e592 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNUMACountDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNUMACountDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNUMACountFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNUMACountFixedTest.java index dfc17d5393..a9f5a1726a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNUMACountFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNUMACountFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNUMACountTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNUMACountTest.java index 9f19693087..deaa6399d8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNUMACountTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNUMACountTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkAttachmentCountDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkAttachmentCountDependentTest.java index 40d3ace78b..b17e30faf9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkAttachmentCountDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkAttachmentCountDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkAttachmentCountRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkAttachmentCountRangeTest.java index edc0dd02aa..5025702965 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkAttachmentCountRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkAttachmentCountRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkAttachmentCountTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkAttachmentCountTest.java index 4bca526c70..0b083a4fb5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkAttachmentCountTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkAttachmentCountTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkInterfaceCountDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkInterfaceCountDependentTest.java index dd481aee8f..36f99740f7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkInterfaceCountDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkInterfaceCountDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkInterfaceCountRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkInterfaceCountRangeTest.java index 0b58e70122..b5dcf7ca63 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkInterfaceCountRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkInterfaceCountRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkInterfaceCountTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkInterfaceCountTest.java index fa62650526..2cb0ea4164 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkInterfaceCountTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileNetworkInterfaceCountTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileOSArchitectureTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileOSArchitectureTest.java index 33f08f0faf..38b1d2ce09 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileOSArchitectureTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileOSArchitectureTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfilePortSpeedDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfilePortSpeedDependentTest.java index f1fbfc5b6d..31a918a3cb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfilePortSpeedDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfilePortSpeedDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfilePortSpeedFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfilePortSpeedFixedTest.java index b28ccb4332..8db681ae2c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfilePortSpeedFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfilePortSpeedFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfilePortSpeedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfilePortSpeedTest.java index 395eab3f81..86a96cbc9e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfilePortSpeedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfilePortSpeedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileReferenceTest.java index fce254d0a5..2b8b314ca0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileReservationTermsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileReservationTermsTest.java index 18b303395a..64eca3b018 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileReservationTermsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileReservationTermsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileSupportedConfidentialComputeModesTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileSupportedConfidentialComputeModesTest.java index 1845c4d314..21d0361d5f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileSupportedConfidentialComputeModesTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileSupportedConfidentialComputeModesTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileSupportedSecureBootModesTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileSupportedSecureBootModesTest.java index a669a3cb45..34c9478223 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileSupportedSecureBootModesTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileSupportedSecureBootModesTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileTest.java index b1a87d9896..7e448f75a3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -38,6 +38,7 @@ import com.ibm.cloud.is.vpc.v1.model.InstanceProfileVCPUFixed; import com.ibm.cloud.is.vpc.v1.model.InstanceProfileVCPUManufacturerFixed; import com.ibm.cloud.is.vpc.v1.model.InstanceProfileVolumeBandwidthFixed; +import com.ibm.cloud.is.vpc.v1.model.InstanceProfileVolumeBandwidthQoSModesEnum; import com.ibm.cloud.is.vpc.v1.utils.TestUtilities; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; import java.io.InputStream; @@ -82,5 +83,6 @@ public void testInstanceProfile() throws Throwable { assertNull(instanceProfileModel.getVcpuArchitecture()); assertNull(instanceProfileModel.getVcpuCount()); assertNull(instanceProfileModel.getVcpuManufacturer()); + assertNull(instanceProfileModel.getVolumeBandwidthQosModes()); } } \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUArchitectureTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUArchitectureTest.java index ad178e0a1d..7f5e75fd5d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUArchitectureTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUArchitectureTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUDependentTest.java index 3a90b5ba3a..26c9ac846b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUEnumTest.java index 7c6bed671d..906d7519f6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUEnumTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUEnumTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUFixedTest.java index 09d4db6209..da49696379 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUManufacturerDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUManufacturerDependentTest.java index d66bf0ccef..ef50b422f1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUManufacturerDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUManufacturerDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUManufacturerFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUManufacturerFixedTest.java index ec02ec5c0b..7194f0e878 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUManufacturerFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUManufacturerFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUManufacturerTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUManufacturerTest.java index 2218152a15..9cb6277656 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUManufacturerTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUManufacturerTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPURangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPURangeTest.java index 3fa9493a77..fc53a88ecc 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPURangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPURangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUTest.java index 5bd42c756a..bd2a170f87 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVCPUTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthDependentTest.java index 9bbd754521..d90bf430ce 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthEnumTest.java index a7cb81d5c4..e1fe30d319 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthEnumTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthEnumTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthFixedTest.java index b35c2864a7..5e2ac11e0b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthQoSModesDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthQoSModesDependentTest.java new file mode 100644 index 0000000000..41d377a635 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthQoSModesDependentTest.java @@ -0,0 +1,37 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.InstanceProfileVolumeBandwidthQoSModesDependent; +import com.ibm.cloud.is.vpc.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 InstanceProfileVolumeBandwidthQoSModesDependent model. + */ +public class InstanceProfileVolumeBandwidthQoSModesDependentTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testInstanceProfileVolumeBandwidthQoSModesDependent() throws Throwable { + InstanceProfileVolumeBandwidthQoSModesDependent instanceProfileVolumeBandwidthQoSModesDependentModel = new InstanceProfileVolumeBandwidthQoSModesDependent(); + assertNull(instanceProfileVolumeBandwidthQoSModesDependentModel.getType()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthQoSModesEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthQoSModesEnumTest.java new file mode 100644 index 0000000000..06f4b74e2b --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthQoSModesEnumTest.java @@ -0,0 +1,39 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.InstanceProfileVolumeBandwidthQoSModesEnum; +import com.ibm.cloud.is.vpc.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 InstanceProfileVolumeBandwidthQoSModesEnum model. + */ +public class InstanceProfileVolumeBandwidthQoSModesEnumTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testInstanceProfileVolumeBandwidthQoSModesEnum() throws Throwable { + InstanceProfileVolumeBandwidthQoSModesEnum instanceProfileVolumeBandwidthQoSModesEnumModel = new InstanceProfileVolumeBandwidthQoSModesEnum(); + assertNull(instanceProfileVolumeBandwidthQoSModesEnumModel.getXDefault()); + assertNull(instanceProfileVolumeBandwidthQoSModesEnumModel.getType()); + assertNull(instanceProfileVolumeBandwidthQoSModesEnumModel.getValues()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthQoSModesTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthQoSModesTest.java new file mode 100644 index 0000000000..f66b80742f --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthQoSModesTest.java @@ -0,0 +1,38 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.InstanceProfileVolumeBandwidthQoSModes; +import com.ibm.cloud.is.vpc.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 InstanceProfileVolumeBandwidthQoSModes model. + */ +public class InstanceProfileVolumeBandwidthQoSModesTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + // TODO: Add tests for models that are abstract + @Test + public void testInstanceProfileVolumeBandwidthQoSModes() throws Throwable { + InstanceProfileVolumeBandwidthQoSModes instanceProfileVolumeBandwidthQoSModesModel = new InstanceProfileVolumeBandwidthQoSModes(); + assertNotNull(instanceProfileVolumeBandwidthQoSModesModel); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthRangeTest.java index 00ac4fee12..eb858a9d4b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthTest.java index 676ff79396..90f7239660 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceProfileVolumeBandwidthTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachmentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachmentTest.java index 489ea46526..046b81a5c6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachmentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachmentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -39,6 +39,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; @@ -171,6 +172,15 @@ public void testInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOffer .build(); assertEquals(vpcIdentityModel.id(), "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModel = new VolumeAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(volumeAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") .build(); @@ -182,6 +192,7 @@ public void testInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOffer assertEquals(volumeProfileIdentityModel.name(), "general-purpose"); VolumePrototypeInstanceByImageContext volumePrototypeInstanceByImageContextModel = new VolumePrototypeInstanceByImageContext.Builder() + .allowedUse(volumeAllowedUsePrototypeModel) .bandwidth(Long.valueOf("1000")) .capacity(Long.valueOf("100")) .encryptionKey(encryptionKeyIdentityModel) @@ -191,6 +202,7 @@ public void testInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOffer .resourceGroup(resourceGroupIdentityModel) .userTags(java.util.Arrays.asList()) .build(); + assertEquals(volumePrototypeInstanceByImageContextModel.allowedUse(), volumeAllowedUsePrototypeModel); assertEquals(volumePrototypeInstanceByImageContextModel.bandwidth(), Long.valueOf("1000")); assertEquals(volumePrototypeInstanceByImageContextModel.capacity(), Long.valueOf("100")); assertEquals(volumePrototypeInstanceByImageContextModel.encryptionKey(), encryptionKeyIdentityModel); @@ -305,6 +317,7 @@ public void testInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOffer .totalVolumeBandwidth(Long.valueOf("500")) .userData("testString") .volumeAttachments(java.util.Arrays.asList(volumeAttachmentPrototypeModel)) + .volumeBandwidthQosMode("pooled") .vpc(vpcIdentityModel) .bootVolumeAttachment(volumeAttachmentPrototypeInstanceByImageContextModel) .catalogOffering(instanceCatalogOfferingPrototypeModel) @@ -327,6 +340,7 @@ public void testInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOffer assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachmentModel.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachmentModel.userData(), "testString"); assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachmentModel.volumeAttachments(), java.util.Arrays.asList(volumeAttachmentPrototypeModel)); + assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachmentModel.volumeBandwidthQosMode(), "pooled"); assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachmentModel.vpc(), vpcIdentityModel); assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachmentModel.bootVolumeAttachment(), volumeAttachmentPrototypeInstanceByImageContextModel); assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachmentModel.catalogOffering(), instanceCatalogOfferingPrototypeModel); @@ -350,6 +364,7 @@ public void testInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOffer assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachmentModelNew.resourceGroup().toString(), resourceGroupIdentityModel.toString()); assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachmentModelNew.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachmentModelNew.userData(), "testString"); + assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachmentModelNew.volumeBandwidthQosMode(), "pooled"); assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachmentModelNew.vpc().toString(), vpcIdentityModel.toString()); assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachmentModelNew.bootVolumeAttachment().toString(), volumeAttachmentPrototypeInstanceByImageContextModel.toString()); assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachmentModelNew.catalogOffering().toString(), instanceCatalogOfferingPrototypeModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterfaceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterfaceTest.java index 9655fd386e..5f3f776a17 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterfaceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterfaceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -37,6 +37,7 @@ import com.ibm.cloud.is.vpc.v1.model.SubnetIdentityById; import com.ibm.cloud.is.vpc.v1.model.TrustedProfileIdentityById; import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; @@ -169,6 +170,15 @@ public void testInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOffer .build(); assertEquals(vpcIdentityModel.id(), "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModel = new VolumeAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(volumeAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") .build(); @@ -180,6 +190,7 @@ public void testInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOffer assertEquals(volumeProfileIdentityModel.name(), "general-purpose"); VolumePrototypeInstanceByImageContext volumePrototypeInstanceByImageContextModel = new VolumePrototypeInstanceByImageContext.Builder() + .allowedUse(volumeAllowedUsePrototypeModel) .bandwidth(Long.valueOf("1000")) .capacity(Long.valueOf("100")) .encryptionKey(encryptionKeyIdentityModel) @@ -189,6 +200,7 @@ public void testInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOffer .resourceGroup(resourceGroupIdentityModel) .userTags(java.util.Arrays.asList()) .build(); + assertEquals(volumePrototypeInstanceByImageContextModel.allowedUse(), volumeAllowedUsePrototypeModel); assertEquals(volumePrototypeInstanceByImageContextModel.bandwidth(), Long.valueOf("1000")); assertEquals(volumePrototypeInstanceByImageContextModel.capacity(), Long.valueOf("100")); assertEquals(volumePrototypeInstanceByImageContextModel.encryptionKey(), encryptionKeyIdentityModel); @@ -277,6 +289,7 @@ public void testInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOffer .totalVolumeBandwidth(Long.valueOf("500")) .userData("testString") .volumeAttachments(java.util.Arrays.asList(volumeAttachmentPrototypeModel)) + .volumeBandwidthQosMode("pooled") .vpc(vpcIdentityModel) .bootVolumeAttachment(volumeAttachmentPrototypeInstanceByImageContextModel) .catalogOffering(instanceCatalogOfferingPrototypeModel) @@ -299,6 +312,7 @@ public void testInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOffer assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterfaceModel.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterfaceModel.userData(), "testString"); assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterfaceModel.volumeAttachments(), java.util.Arrays.asList(volumeAttachmentPrototypeModel)); + assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterfaceModel.volumeBandwidthQosMode(), "pooled"); assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterfaceModel.vpc(), vpcIdentityModel); assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterfaceModel.bootVolumeAttachment(), volumeAttachmentPrototypeInstanceByImageContextModel); assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterfaceModel.catalogOffering(), instanceCatalogOfferingPrototypeModel); @@ -322,6 +336,7 @@ public void testInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOffer assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterfaceModelNew.resourceGroup().toString(), resourceGroupIdentityModel.toString()); assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterfaceModelNew.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterfaceModelNew.userData(), "testString"); + assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterfaceModelNew.volumeBandwidthQosMode(), "pooled"); assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterfaceModelNew.vpc().toString(), vpcIdentityModel.toString()); assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterfaceModelNew.bootVolumeAttachment().toString(), volumeAttachmentPrototypeInstanceByImageContextModel.toString()); assertEquals(instancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterfaceModelNew.catalogOffering().toString(), instanceCatalogOfferingPrototypeModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByCatalogOfferingTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByCatalogOfferingTest.java index f779a8a2bd..87fe95586e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByCatalogOfferingTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByCatalogOfferingTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -39,6 +39,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachmentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachmentTest.java index e29fe7d9b5..19e18254f0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachmentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachmentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -37,6 +37,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; @@ -169,6 +170,15 @@ public void testInstancePrototypeInstanceByImageInstanceByImageInstanceByNetwork .build(); assertEquals(vpcIdentityModel.id(), "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModel = new VolumeAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(volumeAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") .build(); @@ -180,6 +190,7 @@ public void testInstancePrototypeInstanceByImageInstanceByImageInstanceByNetwork assertEquals(volumeProfileIdentityModel.name(), "general-purpose"); VolumePrototypeInstanceByImageContext volumePrototypeInstanceByImageContextModel = new VolumePrototypeInstanceByImageContext.Builder() + .allowedUse(volumeAllowedUsePrototypeModel) .bandwidth(Long.valueOf("1000")) .capacity(Long.valueOf("100")) .encryptionKey(encryptionKeyIdentityModel) @@ -189,6 +200,7 @@ public void testInstancePrototypeInstanceByImageInstanceByImageInstanceByNetwork .resourceGroup(resourceGroupIdentityModel) .userTags(java.util.Arrays.asList()) .build(); + assertEquals(volumePrototypeInstanceByImageContextModel.allowedUse(), volumeAllowedUsePrototypeModel); assertEquals(volumePrototypeInstanceByImageContextModel.bandwidth(), Long.valueOf("1000")); assertEquals(volumePrototypeInstanceByImageContextModel.capacity(), Long.valueOf("100")); assertEquals(volumePrototypeInstanceByImageContextModel.encryptionKey(), encryptionKeyIdentityModel); @@ -291,6 +303,7 @@ public void testInstancePrototypeInstanceByImageInstanceByImageInstanceByNetwork .totalVolumeBandwidth(Long.valueOf("500")) .userData("testString") .volumeAttachments(java.util.Arrays.asList(volumeAttachmentPrototypeModel)) + .volumeBandwidthQosMode("pooled") .vpc(vpcIdentityModel) .bootVolumeAttachment(volumeAttachmentPrototypeInstanceByImageContextModel) .image(imageIdentityModel) @@ -313,6 +326,7 @@ public void testInstancePrototypeInstanceByImageInstanceByImageInstanceByNetwork assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachmentModel.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachmentModel.userData(), "testString"); assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachmentModel.volumeAttachments(), java.util.Arrays.asList(volumeAttachmentPrototypeModel)); + assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachmentModel.volumeBandwidthQosMode(), "pooled"); assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachmentModel.vpc(), vpcIdentityModel); assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachmentModel.bootVolumeAttachment(), volumeAttachmentPrototypeInstanceByImageContextModel); assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachmentModel.image(), imageIdentityModel); @@ -336,6 +350,7 @@ public void testInstancePrototypeInstanceByImageInstanceByImageInstanceByNetwork assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachmentModelNew.resourceGroup().toString(), resourceGroupIdentityModel.toString()); assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachmentModelNew.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachmentModelNew.userData(), "testString"); + assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachmentModelNew.volumeBandwidthQosMode(), "pooled"); assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachmentModelNew.vpc().toString(), vpcIdentityModel.toString()); assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachmentModelNew.bootVolumeAttachment().toString(), volumeAttachmentPrototypeInstanceByImageContextModel.toString()); assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachmentModelNew.image().toString(), imageIdentityModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterfaceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterfaceTest.java index 32a6915bb4..1ed895b9fa 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterfaceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterfaceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,6 +35,7 @@ import com.ibm.cloud.is.vpc.v1.model.SubnetIdentityById; import com.ibm.cloud.is.vpc.v1.model.TrustedProfileIdentityById; import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; @@ -167,6 +168,15 @@ public void testInstancePrototypeInstanceByImageInstanceByImageInstanceByNetwork .build(); assertEquals(vpcIdentityModel.id(), "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModel = new VolumeAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(volumeAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") .build(); @@ -178,6 +188,7 @@ public void testInstancePrototypeInstanceByImageInstanceByImageInstanceByNetwork assertEquals(volumeProfileIdentityModel.name(), "general-purpose"); VolumePrototypeInstanceByImageContext volumePrototypeInstanceByImageContextModel = new VolumePrototypeInstanceByImageContext.Builder() + .allowedUse(volumeAllowedUsePrototypeModel) .bandwidth(Long.valueOf("1000")) .capacity(Long.valueOf("100")) .encryptionKey(encryptionKeyIdentityModel) @@ -187,6 +198,7 @@ public void testInstancePrototypeInstanceByImageInstanceByImageInstanceByNetwork .resourceGroup(resourceGroupIdentityModel) .userTags(java.util.Arrays.asList()) .build(); + assertEquals(volumePrototypeInstanceByImageContextModel.allowedUse(), volumeAllowedUsePrototypeModel); assertEquals(volumePrototypeInstanceByImageContextModel.bandwidth(), Long.valueOf("1000")); assertEquals(volumePrototypeInstanceByImageContextModel.capacity(), Long.valueOf("100")); assertEquals(volumePrototypeInstanceByImageContextModel.encryptionKey(), encryptionKeyIdentityModel); @@ -263,6 +275,7 @@ public void testInstancePrototypeInstanceByImageInstanceByImageInstanceByNetwork .totalVolumeBandwidth(Long.valueOf("500")) .userData("testString") .volumeAttachments(java.util.Arrays.asList(volumeAttachmentPrototypeModel)) + .volumeBandwidthQosMode("pooled") .vpc(vpcIdentityModel) .bootVolumeAttachment(volumeAttachmentPrototypeInstanceByImageContextModel) .image(imageIdentityModel) @@ -285,6 +298,7 @@ public void testInstancePrototypeInstanceByImageInstanceByImageInstanceByNetwork assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterfaceModel.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterfaceModel.userData(), "testString"); assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterfaceModel.volumeAttachments(), java.util.Arrays.asList(volumeAttachmentPrototypeModel)); + assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterfaceModel.volumeBandwidthQosMode(), "pooled"); assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterfaceModel.vpc(), vpcIdentityModel); assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterfaceModel.bootVolumeAttachment(), volumeAttachmentPrototypeInstanceByImageContextModel); assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterfaceModel.image(), imageIdentityModel); @@ -308,6 +322,7 @@ public void testInstancePrototypeInstanceByImageInstanceByImageInstanceByNetwork assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterfaceModelNew.resourceGroup().toString(), resourceGroupIdentityModel.toString()); assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterfaceModelNew.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterfaceModelNew.userData(), "testString"); + assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterfaceModelNew.volumeBandwidthQosMode(), "pooled"); assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterfaceModelNew.vpc().toString(), vpcIdentityModel.toString()); assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterfaceModelNew.bootVolumeAttachment().toString(), volumeAttachmentPrototypeInstanceByImageContextModel.toString()); assertEquals(instancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterfaceModelNew.image().toString(), imageIdentityModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByImageTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByImageTest.java index 7946ac8c0a..039a7a4252 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByImageTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByImageTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -37,6 +37,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachmentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachmentTest.java index c9ab2301f7..13ad58b26e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachmentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachmentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -37,6 +37,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceBySourceSnapshotContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; @@ -169,6 +170,15 @@ public void testInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapsho .build(); assertEquals(vpcIdentityModel.id(), "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModel = new VolumeAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(volumeAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") .build(); @@ -185,6 +195,7 @@ public void testInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapsho assertEquals(snapshotIdentityModel.id(), "r006-f6bfa329-0e36-433f-a3bb-0df632e79263"); VolumePrototypeInstanceBySourceSnapshotContext volumePrototypeInstanceBySourceSnapshotContextModel = new VolumePrototypeInstanceBySourceSnapshotContext.Builder() + .allowedUse(volumeAllowedUsePrototypeModel) .bandwidth(Long.valueOf("1000")) .capacity(Long.valueOf("100")) .encryptionKey(encryptionKeyIdentityModel) @@ -195,6 +206,7 @@ public void testInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapsho .sourceSnapshot(snapshotIdentityModel) .userTags(java.util.Arrays.asList()) .build(); + assertEquals(volumePrototypeInstanceBySourceSnapshotContextModel.allowedUse(), volumeAllowedUsePrototypeModel); assertEquals(volumePrototypeInstanceBySourceSnapshotContextModel.bandwidth(), Long.valueOf("1000")); assertEquals(volumePrototypeInstanceBySourceSnapshotContextModel.capacity(), Long.valueOf("100")); assertEquals(volumePrototypeInstanceBySourceSnapshotContextModel.encryptionKey(), encryptionKeyIdentityModel); @@ -293,6 +305,7 @@ public void testInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapsho .totalVolumeBandwidth(Long.valueOf("500")) .userData("testString") .volumeAttachments(java.util.Arrays.asList(volumeAttachmentPrototypeModel)) + .volumeBandwidthQosMode("pooled") .vpc(vpcIdentityModel) .bootVolumeAttachment(volumeAttachmentPrototypeInstanceBySourceSnapshotContextModel) .zone(zoneIdentityModel) @@ -314,6 +327,7 @@ public void testInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapsho assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachmentModel.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachmentModel.userData(), "testString"); assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachmentModel.volumeAttachments(), java.util.Arrays.asList(volumeAttachmentPrototypeModel)); + assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachmentModel.volumeBandwidthQosMode(), "pooled"); assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachmentModel.vpc(), vpcIdentityModel); assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachmentModel.bootVolumeAttachment(), volumeAttachmentPrototypeInstanceBySourceSnapshotContextModel); assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachmentModel.zone(), zoneIdentityModel); @@ -336,6 +350,7 @@ public void testInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapsho assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachmentModelNew.resourceGroup().toString(), resourceGroupIdentityModel.toString()); assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachmentModelNew.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachmentModelNew.userData(), "testString"); + assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachmentModelNew.volumeBandwidthQosMode(), "pooled"); assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachmentModelNew.vpc().toString(), vpcIdentityModel.toString()); assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachmentModelNew.bootVolumeAttachment().toString(), volumeAttachmentPrototypeInstanceBySourceSnapshotContextModel.toString()); assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachmentModelNew.zone().toString(), zoneIdentityModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterfaceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterfaceTest.java index 9c2aabe2aa..da131c8bb8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterfaceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterfaceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,6 +35,7 @@ import com.ibm.cloud.is.vpc.v1.model.SubnetIdentityById; import com.ibm.cloud.is.vpc.v1.model.TrustedProfileIdentityById; import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceBySourceSnapshotContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; @@ -167,6 +168,15 @@ public void testInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapsho .build(); assertEquals(vpcIdentityModel.id(), "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModel = new VolumeAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(volumeAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") .build(); @@ -183,6 +193,7 @@ public void testInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapsho assertEquals(snapshotIdentityModel.id(), "r006-f6bfa329-0e36-433f-a3bb-0df632e79263"); VolumePrototypeInstanceBySourceSnapshotContext volumePrototypeInstanceBySourceSnapshotContextModel = new VolumePrototypeInstanceBySourceSnapshotContext.Builder() + .allowedUse(volumeAllowedUsePrototypeModel) .bandwidth(Long.valueOf("1000")) .capacity(Long.valueOf("100")) .encryptionKey(encryptionKeyIdentityModel) @@ -193,6 +204,7 @@ public void testInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapsho .sourceSnapshot(snapshotIdentityModel) .userTags(java.util.Arrays.asList()) .build(); + assertEquals(volumePrototypeInstanceBySourceSnapshotContextModel.allowedUse(), volumeAllowedUsePrototypeModel); assertEquals(volumePrototypeInstanceBySourceSnapshotContextModel.bandwidth(), Long.valueOf("1000")); assertEquals(volumePrototypeInstanceBySourceSnapshotContextModel.capacity(), Long.valueOf("100")); assertEquals(volumePrototypeInstanceBySourceSnapshotContextModel.encryptionKey(), encryptionKeyIdentityModel); @@ -265,6 +277,7 @@ public void testInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapsho .totalVolumeBandwidth(Long.valueOf("500")) .userData("testString") .volumeAttachments(java.util.Arrays.asList(volumeAttachmentPrototypeModel)) + .volumeBandwidthQosMode("pooled") .vpc(vpcIdentityModel) .bootVolumeAttachment(volumeAttachmentPrototypeInstanceBySourceSnapshotContextModel) .zone(zoneIdentityModel) @@ -286,6 +299,7 @@ public void testInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapsho assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterfaceModel.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterfaceModel.userData(), "testString"); assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterfaceModel.volumeAttachments(), java.util.Arrays.asList(volumeAttachmentPrototypeModel)); + assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterfaceModel.volumeBandwidthQosMode(), "pooled"); assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterfaceModel.vpc(), vpcIdentityModel); assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterfaceModel.bootVolumeAttachment(), volumeAttachmentPrototypeInstanceBySourceSnapshotContextModel); assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterfaceModel.zone(), zoneIdentityModel); @@ -308,6 +322,7 @@ public void testInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapsho assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterfaceModelNew.resourceGroup().toString(), resourceGroupIdentityModel.toString()); assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterfaceModelNew.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterfaceModelNew.userData(), "testString"); + assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterfaceModelNew.volumeBandwidthQosMode(), "pooled"); assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterfaceModelNew.vpc().toString(), vpcIdentityModel.toString()); assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterfaceModelNew.bootVolumeAttachment().toString(), volumeAttachmentPrototypeInstanceBySourceSnapshotContextModel.toString()); assertEquals(instancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterfaceModelNew.zone().toString(), zoneIdentityModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceSnapshotTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceSnapshotTest.java index c4680db170..130b135348 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceSnapshotTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceSnapshotTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -37,6 +37,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceBySourceSnapshotContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceTemplateTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceTemplateTest.java index 9c0fbac408..373867640f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceTemplateTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceBySourceTemplateTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -43,6 +43,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; @@ -175,6 +176,15 @@ public void testInstancePrototypeInstanceBySourceTemplate() throws Throwable { .build(); assertEquals(vpcIdentityModel.id(), "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModel = new VolumeAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(volumeAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") .build(); @@ -186,6 +196,7 @@ public void testInstancePrototypeInstanceBySourceTemplate() throws Throwable { assertEquals(volumeProfileIdentityModel.name(), "general-purpose"); VolumePrototypeInstanceByImageContext volumePrototypeInstanceByImageContextModel = new VolumePrototypeInstanceByImageContext.Builder() + .allowedUse(volumeAllowedUsePrototypeModel) .bandwidth(Long.valueOf("1000")) .capacity(Long.valueOf("100")) .encryptionKey(encryptionKeyIdentityModel) @@ -195,6 +206,7 @@ public void testInstancePrototypeInstanceBySourceTemplate() throws Throwable { .resourceGroup(resourceGroupIdentityModel) .userTags(java.util.Arrays.asList()) .build(); + assertEquals(volumePrototypeInstanceByImageContextModel.allowedUse(), volumeAllowedUsePrototypeModel); assertEquals(volumePrototypeInstanceByImageContextModel.bandwidth(), Long.valueOf("1000")); assertEquals(volumePrototypeInstanceByImageContextModel.capacity(), Long.valueOf("100")); assertEquals(volumePrototypeInstanceByImageContextModel.encryptionKey(), encryptionKeyIdentityModel); @@ -341,6 +353,7 @@ public void testInstancePrototypeInstanceBySourceTemplate() throws Throwable { .totalVolumeBandwidth(Long.valueOf("500")) .userData("testString") .volumeAttachments(java.util.Arrays.asList(volumeAttachmentPrototypeModel)) + .volumeBandwidthQosMode("pooled") .vpc(vpcIdentityModel) .bootVolumeAttachment(volumeAttachmentPrototypeInstanceByImageContextModel) .catalogOffering(instanceCatalogOfferingPrototypeModel) @@ -367,6 +380,7 @@ public void testInstancePrototypeInstanceBySourceTemplate() throws Throwable { assertEquals(instancePrototypeInstanceBySourceTemplateModel.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instancePrototypeInstanceBySourceTemplateModel.userData(), "testString"); assertEquals(instancePrototypeInstanceBySourceTemplateModel.volumeAttachments(), java.util.Arrays.asList(volumeAttachmentPrototypeModel)); + assertEquals(instancePrototypeInstanceBySourceTemplateModel.volumeBandwidthQosMode(), "pooled"); assertEquals(instancePrototypeInstanceBySourceTemplateModel.vpc(), vpcIdentityModel); assertEquals(instancePrototypeInstanceBySourceTemplateModel.bootVolumeAttachment(), volumeAttachmentPrototypeInstanceByImageContextModel); assertEquals(instancePrototypeInstanceBySourceTemplateModel.catalogOffering(), instanceCatalogOfferingPrototypeModel); @@ -394,6 +408,7 @@ public void testInstancePrototypeInstanceBySourceTemplate() throws Throwable { assertEquals(instancePrototypeInstanceBySourceTemplateModelNew.resourceGroup().toString(), resourceGroupIdentityModel.toString()); assertEquals(instancePrototypeInstanceBySourceTemplateModelNew.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instancePrototypeInstanceBySourceTemplateModelNew.userData(), "testString"); + assertEquals(instancePrototypeInstanceBySourceTemplateModelNew.volumeBandwidthQosMode(), "pooled"); assertEquals(instancePrototypeInstanceBySourceTemplateModelNew.vpc().toString(), vpcIdentityModel.toString()); assertEquals(instancePrototypeInstanceBySourceTemplateModelNew.bootVolumeAttachment().toString(), volumeAttachmentPrototypeInstanceByImageContextModel.toString()); assertEquals(instancePrototypeInstanceBySourceTemplateModelNew.catalogOffering().toString(), instanceCatalogOfferingPrototypeModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachmentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachmentTest.java index d21590ce79..27e1705131 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachmentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachmentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -259,6 +259,7 @@ public void testInstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetwo .totalVolumeBandwidth(Long.valueOf("500")) .userData("testString") .volumeAttachments(java.util.Arrays.asList(volumeAttachmentPrototypeModel)) + .volumeBandwidthQosMode("pooled") .vpc(vpcIdentityModel) .bootVolumeAttachment(volumeAttachmentPrototypeInstanceByVolumeContextModel) .zone(zoneIdentityModel) @@ -280,6 +281,7 @@ public void testInstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetwo assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachmentModel.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachmentModel.userData(), "testString"); assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachmentModel.volumeAttachments(), java.util.Arrays.asList(volumeAttachmentPrototypeModel)); + assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachmentModel.volumeBandwidthQosMode(), "pooled"); assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachmentModel.vpc(), vpcIdentityModel); assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachmentModel.bootVolumeAttachment(), volumeAttachmentPrototypeInstanceByVolumeContextModel); assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachmentModel.zone(), zoneIdentityModel); @@ -302,6 +304,7 @@ public void testInstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetwo assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachmentModelNew.resourceGroup().toString(), resourceGroupIdentityModel.toString()); assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachmentModelNew.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachmentModelNew.userData(), "testString"); + assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachmentModelNew.volumeBandwidthQosMode(), "pooled"); assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachmentModelNew.vpc().toString(), vpcIdentityModel.toString()); assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachmentModelNew.bootVolumeAttachment().toString(), volumeAttachmentPrototypeInstanceByVolumeContextModel.toString()); assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachmentModelNew.zone().toString(), zoneIdentityModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterfaceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterfaceTest.java index 0f4c4393be..bdc857771d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterfaceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterfaceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -231,6 +231,7 @@ public void testInstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetwo .totalVolumeBandwidth(Long.valueOf("500")) .userData("testString") .volumeAttachments(java.util.Arrays.asList(volumeAttachmentPrototypeModel)) + .volumeBandwidthQosMode("pooled") .vpc(vpcIdentityModel) .bootVolumeAttachment(volumeAttachmentPrototypeInstanceByVolumeContextModel) .zone(zoneIdentityModel) @@ -252,6 +253,7 @@ public void testInstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetwo assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterfaceModel.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterfaceModel.userData(), "testString"); assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterfaceModel.volumeAttachments(), java.util.Arrays.asList(volumeAttachmentPrototypeModel)); + assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterfaceModel.volumeBandwidthQosMode(), "pooled"); assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterfaceModel.vpc(), vpcIdentityModel); assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterfaceModel.bootVolumeAttachment(), volumeAttachmentPrototypeInstanceByVolumeContextModel); assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterfaceModel.zone(), zoneIdentityModel); @@ -274,6 +276,7 @@ public void testInstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetwo assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterfaceModelNew.resourceGroup().toString(), resourceGroupIdentityModel.toString()); assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterfaceModelNew.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterfaceModelNew.userData(), "testString"); + assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterfaceModelNew.volumeBandwidthQosMode(), "pooled"); assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterfaceModelNew.vpc().toString(), vpcIdentityModel.toString()); assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterfaceModelNew.bootVolumeAttachment().toString(), volumeAttachmentPrototypeInstanceByVolumeContextModel.toString()); assertEquals(instancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterfaceModelNew.zone().toString(), zoneIdentityModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByVolumeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByVolumeTest.java index 8e00939900..c84e97ea2b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByVolumeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeInstanceByVolumeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeTest.java index 21ddedceba..e9b0f7aa84 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstancePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,6 +35,7 @@ import com.ibm.cloud.is.vpc.v1.model.SubnetIdentityById; import com.ibm.cloud.is.vpc.v1.model.TrustedProfileIdentityById; import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity; diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceReferenceTest.java index a878b2935f..3f934f16e1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceReservationAffinityPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceReservationAffinityPatchTest.java index fafafddf54..097b581fd0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceReservationAffinityPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceReservationAffinityPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceReservationAffinityPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceReservationAffinityPrototypeTest.java index fec5001ef0..6a04b90166 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceReservationAffinityPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceReservationAffinityPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceReservationAffinityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceReservationAffinityTest.java index 9f4840599d..0c4b9c5a1a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceReservationAffinityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceReservationAffinityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceStatusReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceStatusReasonTest.java index 589c618153..e296e22cfd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceStatusReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceStatusReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateCollectionTest.java index 07c6e44613..d77cb8aec7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -40,6 +40,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityByCRNTest.java index 7b5d911870..e09907fdf8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityByHrefTest.java index 2eb9779a7c..570d13914d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityByIdTest.java index 48c192e967..2af31c0c1b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityTest.java index 7e49986978..eee70e8df2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachmentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachmentTest.java index bf505abcfa..a9bd4b81bf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachmentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachmentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -40,6 +40,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; @@ -83,6 +84,7 @@ public void testInstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext assertNull(instanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachmentModel.getTotalVolumeBandwidth()); assertNull(instanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachmentModel.getUserData()); assertNull(instanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachmentModel.getVolumeAttachments()); + assertNull(instanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachmentModel.getVolumeBandwidthQosMode()); assertNull(instanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachmentModel.getVpc()); assertNull(instanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachmentModel.getBootVolumeAttachment()); assertNull(instanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachmentModel.getCatalogOffering()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterfaceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterfaceTest.java index a777ca6386..482e0cda56 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterfaceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterfaceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -38,6 +38,7 @@ import com.ibm.cloud.is.vpc.v1.model.SubnetIdentityById; import com.ibm.cloud.is.vpc.v1.model.TrustedProfileIdentityById; import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; @@ -81,6 +82,7 @@ public void testInstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext assertNull(instanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterfaceModel.getTotalVolumeBandwidth()); assertNull(instanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterfaceModel.getUserData()); assertNull(instanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterfaceModel.getVolumeAttachments()); + assertNull(instanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterfaceModel.getVolumeBandwidthQosMode()); assertNull(instanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterfaceModel.getVpc()); assertNull(instanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterfaceModel.getBootVolumeAttachment()); assertNull(instanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterfaceModel.getCatalogOffering()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextTest.java index 6c2a50c624..a70316d5a9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -40,6 +40,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachmentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachmentTest.java index 92781ee5de..575ce78728 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachmentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachmentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -38,6 +38,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; @@ -81,6 +82,7 @@ public void testInstanceTemplateInstanceByImageInstanceTemplateContextInstanceBy assertNull(instanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachmentModel.getTotalVolumeBandwidth()); assertNull(instanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachmentModel.getUserData()); assertNull(instanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachmentModel.getVolumeAttachments()); + assertNull(instanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachmentModel.getVolumeBandwidthQosMode()); assertNull(instanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachmentModel.getVpc()); assertNull(instanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachmentModel.getBootVolumeAttachment()); assertNull(instanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachmentModel.getImage()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterfaceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterfaceTest.java index ed7a95b72d..1cfe9eac65 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterfaceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterfaceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -36,6 +36,7 @@ import com.ibm.cloud.is.vpc.v1.model.SubnetIdentityById; import com.ibm.cloud.is.vpc.v1.model.TrustedProfileIdentityById; import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; @@ -79,6 +80,7 @@ public void testInstanceTemplateInstanceByImageInstanceTemplateContextInstanceBy assertNull(instanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterfaceModel.getTotalVolumeBandwidth()); assertNull(instanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterfaceModel.getUserData()); assertNull(instanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterfaceModel.getVolumeAttachments()); + assertNull(instanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterfaceModel.getVolumeBandwidthQosMode()); assertNull(instanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterfaceModel.getVpc()); assertNull(instanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterfaceModel.getBootVolumeAttachment()); assertNull(instanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterfaceModel.getImage()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByImageInstanceTemplateContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByImageInstanceTemplateContextTest.java index fdf26ea749..17ef615e91 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByImageInstanceTemplateContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceByImageInstanceTemplateContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -38,6 +38,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachmentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachmentTest.java index d077e535c9..b0bcf23ee4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachmentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachmentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -40,6 +40,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceBySourceSnapshotContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; @@ -83,6 +84,7 @@ public void testInstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextI assertNull(instanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachmentModel.getTotalVolumeBandwidth()); assertNull(instanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachmentModel.getUserData()); assertNull(instanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachmentModel.getVolumeAttachments()); + assertNull(instanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachmentModel.getVolumeBandwidthQosMode()); assertNull(instanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachmentModel.getVpc()); assertNull(instanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachmentModel.getBootVolumeAttachment()); assertNull(instanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachmentModel.getNetworkInterfaces()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterfaceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterfaceTest.java index 9e609d0ff2..9b142939c1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterfaceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterfaceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -40,6 +40,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceBySourceSnapshotContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; @@ -83,6 +84,7 @@ public void testInstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextI assertNull(instanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterfaceModel.getTotalVolumeBandwidth()); assertNull(instanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterfaceModel.getUserData()); assertNull(instanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterfaceModel.getVolumeAttachments()); + assertNull(instanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterfaceModel.getVolumeBandwidthQosMode()); assertNull(instanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterfaceModel.getVpc()); assertNull(instanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterfaceModel.getBootVolumeAttachment()); assertNull(instanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterfaceModel.getNetworkAttachments()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextTest.java index 6b11b14326..d9d60e4790 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -40,6 +40,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceBySourceSnapshotContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePatchTest.java index 05e701aa3f..983b85ee1f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachmentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachmentTest.java index 90b64f380c..45afde3ad2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachmentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachmentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -39,6 +39,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; @@ -171,6 +172,15 @@ public void testInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstan .build(); assertEquals(vpcIdentityModel.id(), "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModel = new VolumeAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(volumeAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") .build(); @@ -182,6 +192,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstan assertEquals(volumeProfileIdentityModel.name(), "general-purpose"); VolumePrototypeInstanceByImageContext volumePrototypeInstanceByImageContextModel = new VolumePrototypeInstanceByImageContext.Builder() + .allowedUse(volumeAllowedUsePrototypeModel) .bandwidth(Long.valueOf("1000")) .capacity(Long.valueOf("100")) .encryptionKey(encryptionKeyIdentityModel) @@ -191,6 +202,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstan .resourceGroup(resourceGroupIdentityModel) .userTags(java.util.Arrays.asList()) .build(); + assertEquals(volumePrototypeInstanceByImageContextModel.allowedUse(), volumeAllowedUsePrototypeModel); assertEquals(volumePrototypeInstanceByImageContextModel.bandwidth(), Long.valueOf("1000")); assertEquals(volumePrototypeInstanceByImageContextModel.capacity(), Long.valueOf("100")); assertEquals(volumePrototypeInstanceByImageContextModel.encryptionKey(), encryptionKeyIdentityModel); @@ -305,6 +317,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstan .totalVolumeBandwidth(Long.valueOf("500")) .userData("testString") .volumeAttachments(java.util.Arrays.asList(volumeAttachmentPrototypeModel)) + .volumeBandwidthQosMode("pooled") .vpc(vpcIdentityModel) .bootVolumeAttachment(volumeAttachmentPrototypeInstanceByImageContextModel) .catalogOffering(instanceCatalogOfferingPrototypeModel) @@ -327,6 +340,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstan assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachmentModel.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachmentModel.userData(), "testString"); assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachmentModel.volumeAttachments(), java.util.Arrays.asList(volumeAttachmentPrototypeModel)); + assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachmentModel.volumeBandwidthQosMode(), "pooled"); assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachmentModel.vpc(), vpcIdentityModel); assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachmentModel.bootVolumeAttachment(), volumeAttachmentPrototypeInstanceByImageContextModel); assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachmentModel.catalogOffering(), instanceCatalogOfferingPrototypeModel); @@ -350,6 +364,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstan assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachmentModelNew.resourceGroup().toString(), resourceGroupIdentityModel.toString()); assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachmentModelNew.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachmentModelNew.userData(), "testString"); + assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachmentModelNew.volumeBandwidthQosMode(), "pooled"); assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachmentModelNew.vpc().toString(), vpcIdentityModel.toString()); assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachmentModelNew.bootVolumeAttachment().toString(), volumeAttachmentPrototypeInstanceByImageContextModel.toString()); assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachmentModelNew.catalogOffering().toString(), instanceCatalogOfferingPrototypeModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterfaceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterfaceTest.java index df45162ba1..9cea37694c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterfaceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterfaceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -37,6 +37,7 @@ import com.ibm.cloud.is.vpc.v1.model.SubnetIdentityById; import com.ibm.cloud.is.vpc.v1.model.TrustedProfileIdentityById; import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; @@ -169,6 +170,15 @@ public void testInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstan .build(); assertEquals(vpcIdentityModel.id(), "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModel = new VolumeAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(volumeAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") .build(); @@ -180,6 +190,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstan assertEquals(volumeProfileIdentityModel.name(), "general-purpose"); VolumePrototypeInstanceByImageContext volumePrototypeInstanceByImageContextModel = new VolumePrototypeInstanceByImageContext.Builder() + .allowedUse(volumeAllowedUsePrototypeModel) .bandwidth(Long.valueOf("1000")) .capacity(Long.valueOf("100")) .encryptionKey(encryptionKeyIdentityModel) @@ -189,6 +200,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstan .resourceGroup(resourceGroupIdentityModel) .userTags(java.util.Arrays.asList()) .build(); + assertEquals(volumePrototypeInstanceByImageContextModel.allowedUse(), volumeAllowedUsePrototypeModel); assertEquals(volumePrototypeInstanceByImageContextModel.bandwidth(), Long.valueOf("1000")); assertEquals(volumePrototypeInstanceByImageContextModel.capacity(), Long.valueOf("100")); assertEquals(volumePrototypeInstanceByImageContextModel.encryptionKey(), encryptionKeyIdentityModel); @@ -277,6 +289,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstan .totalVolumeBandwidth(Long.valueOf("500")) .userData("testString") .volumeAttachments(java.util.Arrays.asList(volumeAttachmentPrototypeModel)) + .volumeBandwidthQosMode("pooled") .vpc(vpcIdentityModel) .bootVolumeAttachment(volumeAttachmentPrototypeInstanceByImageContextModel) .catalogOffering(instanceCatalogOfferingPrototypeModel) @@ -299,6 +312,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstan assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterfaceModel.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterfaceModel.userData(), "testString"); assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterfaceModel.volumeAttachments(), java.util.Arrays.asList(volumeAttachmentPrototypeModel)); + assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterfaceModel.volumeBandwidthQosMode(), "pooled"); assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterfaceModel.vpc(), vpcIdentityModel); assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterfaceModel.bootVolumeAttachment(), volumeAttachmentPrototypeInstanceByImageContextModel); assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterfaceModel.catalogOffering(), instanceCatalogOfferingPrototypeModel); @@ -322,6 +336,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstan assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterfaceModelNew.resourceGroup().toString(), resourceGroupIdentityModel.toString()); assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterfaceModelNew.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterfaceModelNew.userData(), "testString"); + assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterfaceModelNew.volumeBandwidthQosMode(), "pooled"); assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterfaceModelNew.vpc().toString(), vpcIdentityModel.toString()); assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterfaceModelNew.bootVolumeAttachment().toString(), volumeAttachmentPrototypeInstanceByImageContextModel.toString()); assertEquals(instanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterfaceModelNew.catalogOffering().toString(), instanceCatalogOfferingPrototypeModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingTest.java index 2c4cd9c6f0..0784725254 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -39,6 +39,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachmentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachmentTest.java index 6da0bf9b82..dd4297fffa 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachmentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachmentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -37,6 +37,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; @@ -169,6 +170,15 @@ public void testInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplate .build(); assertEquals(vpcIdentityModel.id(), "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModel = new VolumeAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(volumeAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") .build(); @@ -180,6 +190,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplate assertEquals(volumeProfileIdentityModel.name(), "general-purpose"); VolumePrototypeInstanceByImageContext volumePrototypeInstanceByImageContextModel = new VolumePrototypeInstanceByImageContext.Builder() + .allowedUse(volumeAllowedUsePrototypeModel) .bandwidth(Long.valueOf("1000")) .capacity(Long.valueOf("100")) .encryptionKey(encryptionKeyIdentityModel) @@ -189,6 +200,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplate .resourceGroup(resourceGroupIdentityModel) .userTags(java.util.Arrays.asList()) .build(); + assertEquals(volumePrototypeInstanceByImageContextModel.allowedUse(), volumeAllowedUsePrototypeModel); assertEquals(volumePrototypeInstanceByImageContextModel.bandwidth(), Long.valueOf("1000")); assertEquals(volumePrototypeInstanceByImageContextModel.capacity(), Long.valueOf("100")); assertEquals(volumePrototypeInstanceByImageContextModel.encryptionKey(), encryptionKeyIdentityModel); @@ -291,6 +303,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplate .totalVolumeBandwidth(Long.valueOf("500")) .userData("testString") .volumeAttachments(java.util.Arrays.asList(volumeAttachmentPrototypeModel)) + .volumeBandwidthQosMode("pooled") .vpc(vpcIdentityModel) .bootVolumeAttachment(volumeAttachmentPrototypeInstanceByImageContextModel) .image(imageIdentityModel) @@ -313,6 +326,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplate assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachmentModel.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachmentModel.userData(), "testString"); assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachmentModel.volumeAttachments(), java.util.Arrays.asList(volumeAttachmentPrototypeModel)); + assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachmentModel.volumeBandwidthQosMode(), "pooled"); assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachmentModel.vpc(), vpcIdentityModel); assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachmentModel.bootVolumeAttachment(), volumeAttachmentPrototypeInstanceByImageContextModel); assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachmentModel.image(), imageIdentityModel); @@ -336,6 +350,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplate assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachmentModelNew.resourceGroup().toString(), resourceGroupIdentityModel.toString()); assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachmentModelNew.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachmentModelNew.userData(), "testString"); + assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachmentModelNew.volumeBandwidthQosMode(), "pooled"); assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachmentModelNew.vpc().toString(), vpcIdentityModel.toString()); assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachmentModelNew.bootVolumeAttachment().toString(), volumeAttachmentPrototypeInstanceByImageContextModel.toString()); assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachmentModelNew.image().toString(), imageIdentityModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterfaceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterfaceTest.java index 1d5b728369..cd20077f64 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterfaceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterfaceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,6 +35,7 @@ import com.ibm.cloud.is.vpc.v1.model.SubnetIdentityById; import com.ibm.cloud.is.vpc.v1.model.TrustedProfileIdentityById; import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; @@ -167,6 +168,15 @@ public void testInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplate .build(); assertEquals(vpcIdentityModel.id(), "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModel = new VolumeAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(volumeAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") .build(); @@ -178,6 +188,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplate assertEquals(volumeProfileIdentityModel.name(), "general-purpose"); VolumePrototypeInstanceByImageContext volumePrototypeInstanceByImageContextModel = new VolumePrototypeInstanceByImageContext.Builder() + .allowedUse(volumeAllowedUsePrototypeModel) .bandwidth(Long.valueOf("1000")) .capacity(Long.valueOf("100")) .encryptionKey(encryptionKeyIdentityModel) @@ -187,6 +198,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplate .resourceGroup(resourceGroupIdentityModel) .userTags(java.util.Arrays.asList()) .build(); + assertEquals(volumePrototypeInstanceByImageContextModel.allowedUse(), volumeAllowedUsePrototypeModel); assertEquals(volumePrototypeInstanceByImageContextModel.bandwidth(), Long.valueOf("1000")); assertEquals(volumePrototypeInstanceByImageContextModel.capacity(), Long.valueOf("100")); assertEquals(volumePrototypeInstanceByImageContextModel.encryptionKey(), encryptionKeyIdentityModel); @@ -263,6 +275,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplate .totalVolumeBandwidth(Long.valueOf("500")) .userData("testString") .volumeAttachments(java.util.Arrays.asList(volumeAttachmentPrototypeModel)) + .volumeBandwidthQosMode("pooled") .vpc(vpcIdentityModel) .bootVolumeAttachment(volumeAttachmentPrototypeInstanceByImageContextModel) .image(imageIdentityModel) @@ -285,6 +298,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplate assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterfaceModel.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterfaceModel.userData(), "testString"); assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterfaceModel.volumeAttachments(), java.util.Arrays.asList(volumeAttachmentPrototypeModel)); + assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterfaceModel.volumeBandwidthQosMode(), "pooled"); assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterfaceModel.vpc(), vpcIdentityModel); assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterfaceModel.bootVolumeAttachment(), volumeAttachmentPrototypeInstanceByImageContextModel); assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterfaceModel.image(), imageIdentityModel); @@ -308,6 +322,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplate assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterfaceModelNew.resourceGroup().toString(), resourceGroupIdentityModel.toString()); assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterfaceModelNew.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterfaceModelNew.userData(), "testString"); + assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterfaceModelNew.volumeBandwidthQosMode(), "pooled"); assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterfaceModelNew.vpc().toString(), vpcIdentityModel.toString()); assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterfaceModelNew.bootVolumeAttachment().toString(), volumeAttachmentPrototypeInstanceByImageContextModel.toString()); assertEquals(instanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterfaceModelNew.image().toString(), imageIdentityModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByImageTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByImageTest.java index 2b8038cb99..7605548a89 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByImageTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateByImageTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -37,6 +37,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachmentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachmentTest.java index 4cb9205825..5dccca739b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachmentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachmentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -37,6 +37,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceBySourceSnapshotContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; @@ -169,6 +170,15 @@ public void testInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanc .build(); assertEquals(vpcIdentityModel.id(), "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModel = new VolumeAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(volumeAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") .build(); @@ -185,6 +195,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanc assertEquals(snapshotIdentityModel.id(), "r006-f6bfa329-0e36-433f-a3bb-0df632e79263"); VolumePrototypeInstanceBySourceSnapshotContext volumePrototypeInstanceBySourceSnapshotContextModel = new VolumePrototypeInstanceBySourceSnapshotContext.Builder() + .allowedUse(volumeAllowedUsePrototypeModel) .bandwidth(Long.valueOf("1000")) .capacity(Long.valueOf("100")) .encryptionKey(encryptionKeyIdentityModel) @@ -195,6 +206,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanc .sourceSnapshot(snapshotIdentityModel) .userTags(java.util.Arrays.asList()) .build(); + assertEquals(volumePrototypeInstanceBySourceSnapshotContextModel.allowedUse(), volumeAllowedUsePrototypeModel); assertEquals(volumePrototypeInstanceBySourceSnapshotContextModel.bandwidth(), Long.valueOf("1000")); assertEquals(volumePrototypeInstanceBySourceSnapshotContextModel.capacity(), Long.valueOf("100")); assertEquals(volumePrototypeInstanceBySourceSnapshotContextModel.encryptionKey(), encryptionKeyIdentityModel); @@ -293,6 +305,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanc .totalVolumeBandwidth(Long.valueOf("500")) .userData("testString") .volumeAttachments(java.util.Arrays.asList(volumeAttachmentPrototypeModel)) + .volumeBandwidthQosMode("pooled") .vpc(vpcIdentityModel) .bootVolumeAttachment(volumeAttachmentPrototypeInstanceBySourceSnapshotContextModel) .zone(zoneIdentityModel) @@ -314,6 +327,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanc assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachmentModel.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachmentModel.userData(), "testString"); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachmentModel.volumeAttachments(), java.util.Arrays.asList(volumeAttachmentPrototypeModel)); + assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachmentModel.volumeBandwidthQosMode(), "pooled"); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachmentModel.vpc(), vpcIdentityModel); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachmentModel.bootVolumeAttachment(), volumeAttachmentPrototypeInstanceBySourceSnapshotContextModel); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachmentModel.zone(), zoneIdentityModel); @@ -336,6 +350,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanc assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachmentModelNew.resourceGroup().toString(), resourceGroupIdentityModel.toString()); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachmentModelNew.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachmentModelNew.userData(), "testString"); + assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachmentModelNew.volumeBandwidthQosMode(), "pooled"); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachmentModelNew.vpc().toString(), vpcIdentityModel.toString()); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachmentModelNew.bootVolumeAttachment().toString(), volumeAttachmentPrototypeInstanceBySourceSnapshotContextModel.toString()); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachmentModelNew.zone().toString(), zoneIdentityModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterfaceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterfaceTest.java index 5b85fba151..b4572c647c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterfaceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterfaceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,6 +35,7 @@ import com.ibm.cloud.is.vpc.v1.model.SubnetIdentityById; import com.ibm.cloud.is.vpc.v1.model.TrustedProfileIdentityById; import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceBySourceSnapshotContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; @@ -167,6 +168,15 @@ public void testInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanc .build(); assertEquals(vpcIdentityModel.id(), "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModel = new VolumeAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(volumeAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") .build(); @@ -183,6 +193,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanc assertEquals(snapshotIdentityModel.id(), "r006-f6bfa329-0e36-433f-a3bb-0df632e79263"); VolumePrototypeInstanceBySourceSnapshotContext volumePrototypeInstanceBySourceSnapshotContextModel = new VolumePrototypeInstanceBySourceSnapshotContext.Builder() + .allowedUse(volumeAllowedUsePrototypeModel) .bandwidth(Long.valueOf("1000")) .capacity(Long.valueOf("100")) .encryptionKey(encryptionKeyIdentityModel) @@ -193,6 +204,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanc .sourceSnapshot(snapshotIdentityModel) .userTags(java.util.Arrays.asList()) .build(); + assertEquals(volumePrototypeInstanceBySourceSnapshotContextModel.allowedUse(), volumeAllowedUsePrototypeModel); assertEquals(volumePrototypeInstanceBySourceSnapshotContextModel.bandwidth(), Long.valueOf("1000")); assertEquals(volumePrototypeInstanceBySourceSnapshotContextModel.capacity(), Long.valueOf("100")); assertEquals(volumePrototypeInstanceBySourceSnapshotContextModel.encryptionKey(), encryptionKeyIdentityModel); @@ -265,6 +277,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanc .totalVolumeBandwidth(Long.valueOf("500")) .userData("testString") .volumeAttachments(java.util.Arrays.asList(volumeAttachmentPrototypeModel)) + .volumeBandwidthQosMode("pooled") .vpc(vpcIdentityModel) .bootVolumeAttachment(volumeAttachmentPrototypeInstanceBySourceSnapshotContextModel) .zone(zoneIdentityModel) @@ -286,6 +299,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanc assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterfaceModel.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterfaceModel.userData(), "testString"); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterfaceModel.volumeAttachments(), java.util.Arrays.asList(volumeAttachmentPrototypeModel)); + assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterfaceModel.volumeBandwidthQosMode(), "pooled"); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterfaceModel.vpc(), vpcIdentityModel); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterfaceModel.bootVolumeAttachment(), volumeAttachmentPrototypeInstanceBySourceSnapshotContextModel); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterfaceModel.zone(), zoneIdentityModel); @@ -308,6 +322,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanc assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterfaceModelNew.resourceGroup().toString(), resourceGroupIdentityModel.toString()); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterfaceModelNew.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterfaceModelNew.userData(), "testString"); + assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterfaceModelNew.volumeBandwidthQosMode(), "pooled"); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterfaceModelNew.vpc().toString(), vpcIdentityModel.toString()); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterfaceModelNew.bootVolumeAttachment().toString(), volumeAttachmentPrototypeInstanceBySourceSnapshotContextModel.toString()); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterfaceModelNew.zone().toString(), zoneIdentityModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotTest.java index db908a4835..764105bc76 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -37,6 +37,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceBySourceSnapshotContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceTemplateTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceTemplateTest.java index 180f871a37..d628b968aa 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceTemplateTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeInstanceTemplateBySourceTemplateTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -43,6 +43,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; @@ -175,6 +176,15 @@ public void testInstanceTemplatePrototypeInstanceTemplateBySourceTemplate() thro .build(); assertEquals(vpcIdentityModel.id(), "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModel = new VolumeAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(volumeAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") .build(); @@ -186,6 +196,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateBySourceTemplate() thro assertEquals(volumeProfileIdentityModel.name(), "general-purpose"); VolumePrototypeInstanceByImageContext volumePrototypeInstanceByImageContextModel = new VolumePrototypeInstanceByImageContext.Builder() + .allowedUse(volumeAllowedUsePrototypeModel) .bandwidth(Long.valueOf("1000")) .capacity(Long.valueOf("100")) .encryptionKey(encryptionKeyIdentityModel) @@ -195,6 +206,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateBySourceTemplate() thro .resourceGroup(resourceGroupIdentityModel) .userTags(java.util.Arrays.asList()) .build(); + assertEquals(volumePrototypeInstanceByImageContextModel.allowedUse(), volumeAllowedUsePrototypeModel); assertEquals(volumePrototypeInstanceByImageContextModel.bandwidth(), Long.valueOf("1000")); assertEquals(volumePrototypeInstanceByImageContextModel.capacity(), Long.valueOf("100")); assertEquals(volumePrototypeInstanceByImageContextModel.encryptionKey(), encryptionKeyIdentityModel); @@ -341,6 +353,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateBySourceTemplate() thro .totalVolumeBandwidth(Long.valueOf("500")) .userData("testString") .volumeAttachments(java.util.Arrays.asList(volumeAttachmentPrototypeModel)) + .volumeBandwidthQosMode("pooled") .vpc(vpcIdentityModel) .bootVolumeAttachment(volumeAttachmentPrototypeInstanceByImageContextModel) .catalogOffering(instanceCatalogOfferingPrototypeModel) @@ -367,6 +380,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateBySourceTemplate() thro assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceTemplateModel.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceTemplateModel.userData(), "testString"); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceTemplateModel.volumeAttachments(), java.util.Arrays.asList(volumeAttachmentPrototypeModel)); + assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceTemplateModel.volumeBandwidthQosMode(), "pooled"); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceTemplateModel.vpc(), vpcIdentityModel); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceTemplateModel.bootVolumeAttachment(), volumeAttachmentPrototypeInstanceByImageContextModel); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceTemplateModel.catalogOffering(), instanceCatalogOfferingPrototypeModel); @@ -394,6 +408,7 @@ public void testInstanceTemplatePrototypeInstanceTemplateBySourceTemplate() thro assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceTemplateModelNew.resourceGroup().toString(), resourceGroupIdentityModel.toString()); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceTemplateModelNew.totalVolumeBandwidth(), Long.valueOf("500")); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceTemplateModelNew.userData(), "testString"); + assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceTemplateModelNew.volumeBandwidthQosMode(), "pooled"); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceTemplateModelNew.vpc().toString(), vpcIdentityModel.toString()); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceTemplateModelNew.bootVolumeAttachment().toString(), volumeAttachmentPrototypeInstanceByImageContextModel.toString()); assertEquals(instanceTemplatePrototypeInstanceTemplateBySourceTemplateModelNew.catalogOffering().toString(), instanceCatalogOfferingPrototypeModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeTest.java index d41ab88450..26ca883c9c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplatePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -37,6 +37,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateReferenceTest.java index 0b35be8665..abde5da7d8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateTest.java index 99b6ccaca0..749db96247 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTemplateTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -38,6 +38,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPCIdentityById; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext; import com.ibm.cloud.is.vpc.v1.model.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById; diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTest.java index a09c45f953..1987f6244e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -108,6 +108,7 @@ public void testInstance() throws Throwable { assertNull(instanceModel.getTotalVolumeBandwidth()); assertNull(instanceModel.getVcpu()); assertNull(instanceModel.getVolumeAttachments()); + assertNull(instanceModel.getVolumeBandwidthQosMode()); assertNull(instanceModel.getVpc()); assertNull(instanceModel.getZone()); } diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceVCPUTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceVCPUTest.java index 7d05aa2233..ca6e50544f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceVCPUTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/InstanceVCPUTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyCollectionTest.java index 7073d5373b..2319836564 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByCRNTest.java index 901a0c77a6..7d88097855 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByFingerprintTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByFingerprintTest.java index eadac73ce0..dcf39bfda8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByFingerprintTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByFingerprintTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByHrefTest.java index a78c96136d..f67d962bc9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByIdTest.java index 7f1b9c4f68..181f3d2075 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityTest.java index f2b746e662..6863073132 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyPatchTest.java index 98bb1178a7..c8b8c09bee 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyReferenceTest.java index 6cc9e0c7e2..6e98644965 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyTest.java index 6f0555cda8..d97d4e1f64 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/KeyTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByNameTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByNameTest.java index 2e313f1110..26fba9c331 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByNameTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByNameTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LegacyCloudObjectStorageBucketIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LegacyCloudObjectStorageBucketIdentityTest.java index 3068f7305f..f6b93e88e2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LegacyCloudObjectStorageBucketIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LegacyCloudObjectStorageBucketIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LegacyCloudObjectStorageBucketReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LegacyCloudObjectStorageBucketReferenceTest.java index ff09fadc86..65d49b699c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LegacyCloudObjectStorageBucketReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LegacyCloudObjectStorageBucketReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBackupPoliciesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBackupPoliciesOptionsTest.java index 910b7776e6..9288674497 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBackupPoliciesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBackupPoliciesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBackupPolicyJobsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBackupPolicyJobsOptionsTest.java index 5b9a2c2e73..89e265c30d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBackupPolicyJobsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBackupPolicyJobsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBackupPolicyPlansOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBackupPolicyPlansOptionsTest.java index fca9d3baca..a4f1329fd7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBackupPolicyPlansOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBackupPolicyPlansOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerDisksOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerDisksOptionsTest.java index 66e62cb7d9..da4a6f1868 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerDisksOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerDisksOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkAttachmentsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkAttachmentsOptionsTest.java index 08b706969a..55e651b825 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkAttachmentsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkAttachmentsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkInterfaceFloatingIpsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkInterfaceFloatingIpsOptionsTest.java index ee4827d9b2..177974c34f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkInterfaceFloatingIpsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkInterfaceFloatingIpsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkInterfaceIpsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkInterfaceIpsOptionsTest.java index b8524925ff..9f8ea97db4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkInterfaceIpsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkInterfaceIpsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkInterfacesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkInterfacesOptionsTest.java index dc2bad10a3..18338b64b2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkInterfacesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerNetworkInterfacesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerProfilesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerProfilesOptionsTest.java index d30be78908..a62392d371 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerProfilesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServerProfilesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServersOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServersOptionsTest.java index db220b2854..6e09fe4615 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServersOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListBareMetalServersOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkInterfacesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkInterfacesOptionsTest.java index 508e5c238a..1b413713b0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkInterfacesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkInterfacesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkProfilesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkProfilesOptionsTest.java index d4e95a0e11..b99fc65715 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkProfilesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkProfilesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkSubnetReservedIpsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkSubnetReservedIpsOptionsTest.java index 504e22e6ff..855b392551 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkSubnetReservedIpsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkSubnetReservedIpsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkSubnetsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkSubnetsOptionsTest.java index 33dc16ab7e..8edf95b9af 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkSubnetsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworkSubnetsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworksOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworksOptionsTest.java index 6808aac977..f79b0a3b23 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworksOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListClusterNetworksOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostDisksOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostDisksOptionsTest.java index 65d356b116..1e26d7c7bf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostDisksOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostDisksOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostGroupsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostGroupsOptionsTest.java index a4a7520bae..e5c559a968 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostGroupsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostGroupsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostProfilesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostProfilesOptionsTest.java index f9ac3ee967..883ea0588d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostProfilesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostProfilesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostsOptionsTest.java index c8900e8cb7..e4e8c571c8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListDedicatedHostsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListEndpointGatewayIpsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListEndpointGatewayIpsOptionsTest.java index 911c655e55..5ff8b4c4c0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListEndpointGatewayIpsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListEndpointGatewayIpsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListEndpointGatewaysOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListEndpointGatewaysOptionsTest.java index f7b6c9adcc..267a741282 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListEndpointGatewaysOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListEndpointGatewaysOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListFloatingIpsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListFloatingIpsOptionsTest.java index c000b8270b..60ac57c726 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListFloatingIpsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListFloatingIpsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListFlowLogCollectorsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListFlowLogCollectorsOptionsTest.java index e54bc48b54..a319a7a137 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListFlowLogCollectorsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListFlowLogCollectorsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListIkePoliciesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListIkePoliciesOptionsTest.java index 9222f1e618..3fd260b0b5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListIkePoliciesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListIkePoliciesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListIkePolicyConnectionsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListIkePolicyConnectionsOptionsTest.java index 6853c055f7..3a9852145f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListIkePolicyConnectionsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListIkePolicyConnectionsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListImageBareMetalServerProfilesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListImageBareMetalServerProfilesOptionsTest.java new file mode 100644 index 0000000000..4b9c0983e2 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListImageBareMetalServerProfilesOptionsTest.java @@ -0,0 +1,49 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.ListImageBareMetalServerProfilesOptions; +import com.ibm.cloud.is.vpc.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 ListImageBareMetalServerProfilesOptions model. + */ +public class ListImageBareMetalServerProfilesOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testListImageBareMetalServerProfilesOptions() throws Throwable { + ListImageBareMetalServerProfilesOptions listImageBareMetalServerProfilesOptionsModel = new ListImageBareMetalServerProfilesOptions.Builder() + .id("testString") + .start("testString") + .limit(Long.valueOf("50")) + .build(); + assertEquals(listImageBareMetalServerProfilesOptionsModel.id(), "testString"); + assertEquals(listImageBareMetalServerProfilesOptionsModel.start(), "testString"); + assertEquals(listImageBareMetalServerProfilesOptionsModel.limit(), Long.valueOf("50")); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testListImageBareMetalServerProfilesOptionsError() throws Throwable { + new ListImageBareMetalServerProfilesOptions.Builder().build(); + } + +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListImageExportJobsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListImageExportJobsOptionsTest.java index 21815404f2..795511ed2e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListImageExportJobsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListImageExportJobsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListImageInstanceProfilesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListImageInstanceProfilesOptionsTest.java new file mode 100644 index 0000000000..c5c2e2a898 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListImageInstanceProfilesOptionsTest.java @@ -0,0 +1,49 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.ListImageInstanceProfilesOptions; +import com.ibm.cloud.is.vpc.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 ListImageInstanceProfilesOptions model. + */ +public class ListImageInstanceProfilesOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testListImageInstanceProfilesOptions() throws Throwable { + ListImageInstanceProfilesOptions listImageInstanceProfilesOptionsModel = new ListImageInstanceProfilesOptions.Builder() + .id("testString") + .start("testString") + .limit(Long.valueOf("50")) + .build(); + assertEquals(listImageInstanceProfilesOptionsModel.id(), "testString"); + assertEquals(listImageInstanceProfilesOptionsModel.start(), "testString"); + assertEquals(listImageInstanceProfilesOptionsModel.limit(), Long.valueOf("50")); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testListImageInstanceProfilesOptionsError() throws Throwable { + new ListImageInstanceProfilesOptions.Builder().build(); + } + +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListImagesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListImagesOptionsTest.java index 81f97aafdc..af7d490174 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListImagesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListImagesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceClusterNetworkAttachmentsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceClusterNetworkAttachmentsOptionsTest.java index 790e6829a7..0d02bdd1cd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceClusterNetworkAttachmentsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceClusterNetworkAttachmentsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceDisksOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceDisksOptionsTest.java index 2213333618..7379485051 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceDisksOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceDisksOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupManagerActionsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupManagerActionsOptionsTest.java index d71d6f4abc..0d7c434881 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupManagerActionsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupManagerActionsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupManagerPoliciesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupManagerPoliciesOptionsTest.java index c116d5094e..18c3c99d2f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupManagerPoliciesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupManagerPoliciesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupManagersOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupManagersOptionsTest.java index 06bfbfbc84..b094f8d319 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupManagersOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupManagersOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupMembershipsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupMembershipsOptionsTest.java index 9a350095ee..d999cd0c59 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupMembershipsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupMembershipsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupsOptionsTest.java index c488e156cd..3b030c3389 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceGroupsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkAttachmentsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkAttachmentsOptionsTest.java index a2f7349bd5..77079ecb78 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkAttachmentsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkAttachmentsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkInterfaceFloatingIpsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkInterfaceFloatingIpsOptionsTest.java index 5121ecefad..9f1f970b9f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkInterfaceFloatingIpsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkInterfaceFloatingIpsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkInterfaceIpsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkInterfaceIpsOptionsTest.java index 671f8bd56e..6d2babe0c4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkInterfaceIpsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkInterfaceIpsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkInterfacesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkInterfacesOptionsTest.java index 9d35f740e8..519d83ebc0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkInterfacesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceNetworkInterfacesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceProfilesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceProfilesOptionsTest.java index c92dabbfb2..38de06b6c4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceProfilesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceProfilesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceTemplatesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceTemplatesOptionsTest.java index 3f6e252eec..8d80f7b6cf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceTemplatesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceTemplatesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceVolumeAttachmentsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceVolumeAttachmentsOptionsTest.java index ca54183235..8031e3f517 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceVolumeAttachmentsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstanceVolumeAttachmentsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstancesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstancesOptionsTest.java index fea3db2812..c5792ad784 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstancesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListInstancesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListIpsecPoliciesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListIpsecPoliciesOptionsTest.java index fe743d8d65..7b8f8de883 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListIpsecPoliciesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListIpsecPoliciesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListIpsecPolicyConnectionsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListIpsecPolicyConnectionsOptionsTest.java index 412b28812e..795ff40480 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListIpsecPolicyConnectionsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListIpsecPolicyConnectionsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListKeysOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListKeysOptionsTest.java index 0793ea9b31..a1912d0cb5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListKeysOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListKeysOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerListenerPoliciesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerListenerPoliciesOptionsTest.java index 9692850a12..c4a2e8eb1d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerListenerPoliciesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerListenerPoliciesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerListenerPolicyRulesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerListenerPolicyRulesOptionsTest.java index 33882de1e0..f2e3d1edaf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerListenerPolicyRulesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerListenerPolicyRulesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerListenersOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerListenersOptionsTest.java index 7f22cecdec..95dfc53738 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerListenersOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerListenersOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerPoolMembersOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerPoolMembersOptionsTest.java index 01e09cd031..446990f2a6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerPoolMembersOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerPoolMembersOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerPoolsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerPoolsOptionsTest.java index 29c71adcc2..63b464aae0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerPoolsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerPoolsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerProfilesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerProfilesOptionsTest.java index 5f08f87ece..b7bb452360 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerProfilesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancerProfilesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancersOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancersOptionsTest.java index f0af29fed7..2757ab3a9d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancersOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListLoadBalancersOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListNetworkAclRulesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListNetworkAclRulesOptionsTest.java index 54623afe8c..b78c1e2fd9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListNetworkAclRulesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListNetworkAclRulesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListNetworkAclsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListNetworkAclsOptionsTest.java index e040d022f4..2e05e5a57c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListNetworkAclsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListNetworkAclsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListNetworkInterfaceFloatingIpsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListNetworkInterfaceFloatingIpsOptionsTest.java index b9b8707c50..532e9d4135 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListNetworkInterfaceFloatingIpsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListNetworkInterfaceFloatingIpsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListOperatingSystemsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListOperatingSystemsOptionsTest.java index d5d8cd7f2a..f889abf5da 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListOperatingSystemsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListOperatingSystemsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListPlacementGroupsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListPlacementGroupsOptionsTest.java index 31bf95dc76..5baded6861 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListPlacementGroupsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListPlacementGroupsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListPrivatePathServiceGatewayAccountPoliciesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListPrivatePathServiceGatewayAccountPoliciesOptionsTest.java index fe60005637..c3fecc8632 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListPrivatePathServiceGatewayAccountPoliciesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListPrivatePathServiceGatewayAccountPoliciesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListPrivatePathServiceGatewayEndpointGatewayBindingsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListPrivatePathServiceGatewayEndpointGatewayBindingsOptionsTest.java index cc302490b1..43e80a176b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListPrivatePathServiceGatewayEndpointGatewayBindingsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListPrivatePathServiceGatewayEndpointGatewayBindingsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListPrivatePathServiceGatewaysOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListPrivatePathServiceGatewaysOptionsTest.java index 371ebad855..f4bac389cb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListPrivatePathServiceGatewaysOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListPrivatePathServiceGatewaysOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListPublicAddressRangesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListPublicAddressRangesOptionsTest.java index 32c934d7b3..e57e2c6af3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListPublicAddressRangesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListPublicAddressRangesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListPublicGatewaysOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListPublicGatewaysOptionsTest.java index 595a9e6132..a85fb8d4a1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListPublicGatewaysOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListPublicGatewaysOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListRegionZonesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListRegionZonesOptionsTest.java index fb28b4376f..f35eba1480 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListRegionZonesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListRegionZonesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListRegionsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListRegionsOptionsTest.java index ee62064910..1419fb18f6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListRegionsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListRegionsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListReservationsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListReservationsOptionsTest.java index 0ed9942073..9781be6e2a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListReservationsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListReservationsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSecurityGroupRulesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSecurityGroupRulesOptionsTest.java index c2c327fd38..e02cde5fb6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSecurityGroupRulesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSecurityGroupRulesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSecurityGroupTargetsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSecurityGroupTargetsOptionsTest.java index f0d23dec05..b97813e9d7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSecurityGroupTargetsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSecurityGroupTargetsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSecurityGroupsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSecurityGroupsOptionsTest.java index 2d4beb7ae5..556e22986d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSecurityGroupsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSecurityGroupsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListShareAccessorBindingsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListShareAccessorBindingsOptionsTest.java index 0b861be080..10b22da3cc 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListShareAccessorBindingsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListShareAccessorBindingsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListShareMountTargetsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListShareMountTargetsOptionsTest.java index c0e6f6410d..1ec720c056 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListShareMountTargetsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListShareMountTargetsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListShareProfilesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListShareProfilesOptionsTest.java index 6b21a64061..43e93de420 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListShareProfilesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListShareProfilesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListShareSnapshotsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListShareSnapshotsOptionsTest.java index ee6e26b7bf..8604a0a18f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListShareSnapshotsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListShareSnapshotsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSharesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSharesOptionsTest.java index a0c66cedf8..7e1ce02204 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSharesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSharesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotClonesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotClonesOptionsTest.java index 80403bef1b..4c48e47db2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotClonesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotClonesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotConsistencyGroupsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotConsistencyGroupsOptionsTest.java index 66700d7afb..25d45bf137 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotConsistencyGroupsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotConsistencyGroupsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotInstanceProfilesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotInstanceProfilesOptionsTest.java new file mode 100644 index 0000000000..27ebdc34a6 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotInstanceProfilesOptionsTest.java @@ -0,0 +1,49 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.ListSnapshotInstanceProfilesOptions; +import com.ibm.cloud.is.vpc.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 ListSnapshotInstanceProfilesOptions model. + */ +public class ListSnapshotInstanceProfilesOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testListSnapshotInstanceProfilesOptions() throws Throwable { + ListSnapshotInstanceProfilesOptions listSnapshotInstanceProfilesOptionsModel = new ListSnapshotInstanceProfilesOptions.Builder() + .id("testString") + .start("testString") + .limit(Long.valueOf("50")) + .build(); + assertEquals(listSnapshotInstanceProfilesOptionsModel.id(), "testString"); + assertEquals(listSnapshotInstanceProfilesOptionsModel.start(), "testString"); + assertEquals(listSnapshotInstanceProfilesOptionsModel.limit(), Long.valueOf("50")); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testListSnapshotInstanceProfilesOptionsError() throws Throwable { + new ListSnapshotInstanceProfilesOptions.Builder().build(); + } + +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotsOptionsTest.java index cc02c2709e..483e41957a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSnapshotsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSubnetReservedIpsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSubnetReservedIpsOptionsTest.java index 33dd1d626d..8ef582d98d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSubnetReservedIpsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSubnetReservedIpsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSubnetsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSubnetsOptionsTest.java index 7142e8215c..025820c9cc 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSubnetsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListSubnetsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVirtualNetworkInterfaceIpsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVirtualNetworkInterfaceIpsOptionsTest.java index 83c28b9182..537db44148 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVirtualNetworkInterfaceIpsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVirtualNetworkInterfaceIpsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVirtualNetworkInterfacesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVirtualNetworkInterfacesOptionsTest.java index ca6ceff89f..ea29e0c053 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVirtualNetworkInterfacesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVirtualNetworkInterfacesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVolumeInstanceProfilesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVolumeInstanceProfilesOptionsTest.java new file mode 100644 index 0000000000..d4e2ff1901 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVolumeInstanceProfilesOptionsTest.java @@ -0,0 +1,49 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.ListVolumeInstanceProfilesOptions; +import com.ibm.cloud.is.vpc.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 ListVolumeInstanceProfilesOptions model. + */ +public class ListVolumeInstanceProfilesOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testListVolumeInstanceProfilesOptions() throws Throwable { + ListVolumeInstanceProfilesOptions listVolumeInstanceProfilesOptionsModel = new ListVolumeInstanceProfilesOptions.Builder() + .id("testString") + .start("testString") + .limit(Long.valueOf("50")) + .build(); + assertEquals(listVolumeInstanceProfilesOptionsModel.id(), "testString"); + assertEquals(listVolumeInstanceProfilesOptionsModel.start(), "testString"); + assertEquals(listVolumeInstanceProfilesOptionsModel.limit(), Long.valueOf("50")); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testListVolumeInstanceProfilesOptionsError() throws Throwable { + new ListVolumeInstanceProfilesOptions.Builder().build(); + } + +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVolumeProfilesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVolumeProfilesOptionsTest.java index 153868a319..125c3bdf73 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVolumeProfilesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVolumeProfilesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVolumesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVolumesOptionsTest.java index 34dbbc0c2c..c7d2b7fdca 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVolumesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVolumesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpcAddressPrefixesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpcAddressPrefixesOptionsTest.java index 1dc7ae99ec..1ee68d404a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpcAddressPrefixesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpcAddressPrefixesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpcDnsResolutionBindingsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpcDnsResolutionBindingsOptionsTest.java index bf278a4c6b..ca12212aca 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpcDnsResolutionBindingsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpcDnsResolutionBindingsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpcRoutesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpcRoutesOptionsTest.java index 6845cddf94..8540d31e42 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpcRoutesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpcRoutesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpcRoutingTableRoutesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpcRoutingTableRoutesOptionsTest.java index 740d9b1d06..ceddbe55da 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpcRoutingTableRoutesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpcRoutingTableRoutesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpcRoutingTablesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpcRoutingTablesOptionsTest.java index 871b4bcaac..1c97adeb1e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpcRoutingTablesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpcRoutingTablesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpcsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpcsOptionsTest.java index e7d15e395d..8616057a24 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpcsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpcsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayAdvertisedCidrsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayAdvertisedCidrsOptionsTest.java new file mode 100644 index 0000000000..d45eb28a32 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayAdvertisedCidrsOptionsTest.java @@ -0,0 +1,45 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.ListVpnGatewayAdvertisedCidrsOptions; +import com.ibm.cloud.is.vpc.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 ListVpnGatewayAdvertisedCidrsOptions model. + */ +public class ListVpnGatewayAdvertisedCidrsOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testListVpnGatewayAdvertisedCidrsOptions() throws Throwable { + ListVpnGatewayAdvertisedCidrsOptions listVpnGatewayAdvertisedCidrsOptionsModel = new ListVpnGatewayAdvertisedCidrsOptions.Builder() + .vpnGatewayId("testString") + .build(); + assertEquals(listVpnGatewayAdvertisedCidrsOptionsModel.vpnGatewayId(), "testString"); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testListVpnGatewayAdvertisedCidrsOptionsError() throws Throwable { + new ListVpnGatewayAdvertisedCidrsOptions.Builder().build(); + } + +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayConnectionsLocalCidrsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayConnectionsLocalCidrsOptionsTest.java index d097c30f1f..9778565a43 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayConnectionsLocalCidrsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayConnectionsLocalCidrsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayConnectionsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayConnectionsOptionsTest.java index 85918c16e8..307008b3dd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayConnectionsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayConnectionsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayConnectionsPeerCidrsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayConnectionsPeerCidrsOptionsTest.java index 8357f446b3..d92c0f4c12 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayConnectionsPeerCidrsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayConnectionsPeerCidrsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayServiceConnectionsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayServiceConnectionsOptionsTest.java new file mode 100644 index 0000000000..1500d7c882 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewayServiceConnectionsOptionsTest.java @@ -0,0 +1,49 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.ListVpnGatewayServiceConnectionsOptions; +import com.ibm.cloud.is.vpc.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 ListVpnGatewayServiceConnectionsOptions model. + */ +public class ListVpnGatewayServiceConnectionsOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testListVpnGatewayServiceConnectionsOptions() throws Throwable { + ListVpnGatewayServiceConnectionsOptions listVpnGatewayServiceConnectionsOptionsModel = new ListVpnGatewayServiceConnectionsOptions.Builder() + .vpnGatewayId("testString") + .start("testString") + .limit(Long.valueOf("50")) + .build(); + assertEquals(listVpnGatewayServiceConnectionsOptionsModel.vpnGatewayId(), "testString"); + assertEquals(listVpnGatewayServiceConnectionsOptionsModel.start(), "testString"); + assertEquals(listVpnGatewayServiceConnectionsOptionsModel.limit(), Long.valueOf("50")); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testListVpnGatewayServiceConnectionsOptionsError() throws Throwable { + new ListVpnGatewayServiceConnectionsOptions.Builder().build(); + } + +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewaysOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewaysOptionsTest.java index a2317ed5e6..c1a42b5de4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewaysOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnGatewaysOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnServerClientsOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnServerClientsOptionsTest.java index f99b8af83a..330763aafd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnServerClientsOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnServerClientsOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnServerRoutesOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnServerRoutesOptionsTest.java index 3475f19bc7..f6d2aa8ca1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnServerRoutesOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnServerRoutesOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnServersOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnServersOptionsTest.java index f2a1e3597b..3d7a2a64f7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnServersOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ListVpnServersOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerCollectionTest.java index a205e9c920..432095e238 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerDNSPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerDNSPatchTest.java index bb63503dda..292b927306 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerDNSPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerDNSPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerDNSPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerDNSPrototypeTest.java index eff8bfcb4d..104cb22b10 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerDNSPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerDNSPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerDNSTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerDNSTest.java index f90107c418..09792c0cd0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerDNSTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerDNSTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityByCRNTest.java index 27f2fa904d..e9b13d1d30 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityByHrefTest.java index ab7f3d869f..ce32510431 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityByIdTest.java index 6efefaf019..23fb2f594e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityTest.java index 2e89081d58..bf10f943fd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerCollectionTest.java index 3608ffb6ba..fcf407c24f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHrefTest.java index a629bf4164..5410f6ac8f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByIdTest.java index bbf9e3f3f2..70a9b01c30 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerDefaultPoolPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerDefaultPoolPatchTest.java index 82a8f6881b..e2784c6ae1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerDefaultPoolPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerDefaultPoolPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerHTTPSRedirectPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerHTTPSRedirectPatchTest.java index 92bcad1bf5..9c19e53033 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerHTTPSRedirectPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerHTTPSRedirectPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerHTTPSRedirectPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerHTTPSRedirectPrototypeTest.java index 30698fcb55..76ef2d0aa9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerHTTPSRedirectPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerHTTPSRedirectPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerHTTPSRedirectTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerHTTPSRedirectTest.java index 115d8e07ce..c657eba71f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerHTTPSRedirectTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerHTTPSRedirectTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerIdentityByHrefTest.java index 4699027c55..703cfd604f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerIdentityByIdTest.java index 4147d6fcd8..a5c66b735a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerIdentityTest.java index e40d3dab83..09d14a01a3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPatchTest.java index 2847c5ab82..9afcd3c250 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyCollectionTest.java index d1c624a467..6f8914d9e6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyPatchTest.java index 4a7e1a4094..1edffdb845 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyPrototypeTest.java index 9a0f43e884..7c27d74d4b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyReferenceTest.java index 50d2ba4ae5..f385120ece 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRuleCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRuleCollectionTest.java index 4e1c26b00f..05df3b5609 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRuleCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRuleCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRulePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRulePatchTest.java index 5731b3056c..277f9f1837 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRulePatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRulePatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRulePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRulePrototypeTest.java index 730a042d39..01fd305e93 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRulePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRulePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRuleReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRuleReferenceTest.java index 41f5080bdb..3ccd271b1d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRuleReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRuleReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRuleTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRuleTest.java index a043123602..21cf3f9cb0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRuleTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyRuleTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirectTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirectTest.java index 8c654a8181..7be7dd6a73 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirectTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirectTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURLTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURLTest.java index 82ae810930..3f6b017cea 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURLTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURLTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerListenerReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerListenerReferenceTest.java index 9c687b7339..06f9c4bf84 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerListenerReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerListenerReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerPoolReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerPoolReferenceTest.java index 1ce8d55529..233be7de79 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerPoolReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetLoadBalancerPoolReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerIdentityLoadBalancerListenerIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerIdentityLoadBalancerListenerIdentityByHrefTest.java index 3ffb57ce09..22df0891d7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerIdentityLoadBalancerListenerIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerIdentityLoadBalancerListenerIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerIdentityLoadBalancerListenerIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerIdentityLoadBalancerListenerIdentityByIdTest.java index 9ecd5c7504..c8671cadb7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerIdentityLoadBalancerListenerIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerIdentityLoadBalancerListenerIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerIdentityTest.java index 47eee8ef96..331d4af6f6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatchTest.java index 519ea0a004..bb70618f92 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatchTest.java index b75a1ce629..a4d043b2bf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHrefTest.java index c3373b4f22..02a82c57b1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByIdTest.java index 8709df8def..fef1d90b30 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityTest.java index 870a3cedac..cc5e3c98a6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchTest.java index 845ad736e5..8e00975b5f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerIdentityLoadBalancerListenerIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerIdentityLoadBalancerListenerIdentityByHrefTest.java index 221d01a501..e132346618 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerIdentityLoadBalancerListenerIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerIdentityLoadBalancerListenerIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerIdentityLoadBalancerListenerIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerIdentityLoadBalancerListenerIdentityByIdTest.java index d875637654..95bc3f1db8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerIdentityLoadBalancerListenerIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerIdentityLoadBalancerListenerIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerIdentityTest.java index 29b3c74e36..06750794a7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototypeTest.java index 302150dd37..a21ef19dd5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototypeTest.java index e271896fb0..36c52bddb6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHrefTest.java index 5f22462192..fdd7073385 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByIdTest.java index 064ee276ac..fb8c6568cb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityTest.java index 322480bad3..f475833b5e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeTest.java index 957a4214cb..ee89b349ec 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetTest.java index df922c599c..064ef4222e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTargetTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTest.java index 70bf9620a4..47fed65b73 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPolicyTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPrototypeLoadBalancerContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPrototypeLoadBalancerContextTest.java index 02d9ce98bc..1152444a0d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPrototypeLoadBalancerContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerPrototypeLoadBalancerContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerReferenceTest.java index b9cb0fbdca..b0d4474ca6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerTest.java index 0cea37b9fa..7abde61881 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerListenerTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingDatapathPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingDatapathPatchTest.java index 437d0ee138..3244b86d2d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingDatapathPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingDatapathPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingDatapathPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingDatapathPrototypeTest.java index 217e7967f8..2826738009 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingDatapathPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingDatapathPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingDatapathTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingDatapathTest.java index fbf0703cb3..4c8b998f61 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingDatapathTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingDatapathTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingPatchTest.java index e2374abc14..aa3e9033a3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingPrototypeTest.java index b8a9217811..c57bab3b50 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingTest.java index 9c6a017855..d246959573 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerLoggingTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPatchTest.java index 701f999358..4475c49702 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolCollectionTest.java index 53a0138501..eaf6cfba66 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyPatchTest.java index 1b77d4d72c..53c78aa086 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyPrototypeTest.java index 6bfeebb30e..7f4b5ed44d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTargetPatchLoadBalancerPoolIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTargetPatchLoadBalancerPoolIdentityByHrefTest.java index b58f48a676..f11b1b1266 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTargetPatchLoadBalancerPoolIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTargetPatchLoadBalancerPoolIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTargetPatchLoadBalancerPoolIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTargetPatchLoadBalancerPoolIdentityByIdTest.java index 81773a53a9..bc85262cfa 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTargetPatchLoadBalancerPoolIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTargetPatchLoadBalancerPoolIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTargetPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTargetPatchTest.java index 0a595b83f8..b318e4ae61 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTargetPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTargetPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTest.java index 5d9ad66df7..c582841623 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolFailsafePolicyTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPatchTest.java index fc779bad1c..b43fc7d2de 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeHTTPHTTPSPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeHTTPHTTPSPrototypeTest.java index 282889ddcc..ab30e6e459 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeHTTPHTTPSPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeHTTPHTTPSPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeTCPPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeTCPPrototypeTest.java index 2d4fd906ed..6447aa6229 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeTCPPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPrototypeLoadBalancerPoolHealthMonitorTypeTCPPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPrototypeTest.java index 18da45a40b..fa922a5551 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorTest.java index 94a28a7e44..98d09ba35b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorTypeHTTPHTTPSTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorTypeHTTPHTTPSTest.java index 2a3bac1005..2893fcd879 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorTypeHTTPHTTPSTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorTypeHTTPHTTPSTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorTypeTCPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorTypeTCPTest.java index 0792f0f1bb..3100853cd2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorTypeTCPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolHealthMonitorTypeTCPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityByNameTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityByNameTest.java index e1924ee029..e9e39fb7e2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityByNameTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityByNameTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHrefTest.java index d31d9baff7..b495071f4c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityLoadBalancerPoolIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityLoadBalancerPoolIdentityByIdTest.java index 8c54943392..17a57113f6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityLoadBalancerPoolIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityLoadBalancerPoolIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityTest.java index e1956779ac..ad414a8aaa 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberCollectionTest.java index bca6cb8a13..b067014b64 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberPatchTest.java index b47fab25a9..15a5d2aaf8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberPrototypeTest.java index e10e4eeee5..ac83609b73 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberReferenceTest.java index 675446ce08..c27b1fd907 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetByReservedIpTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetByReservedIpTest.java new file mode 100644 index 0000000000..3d7adb3b54 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetByReservedIpTest.java @@ -0,0 +1,43 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.Deleted; +import com.ibm.cloud.is.vpc.v1.model.LoadBalancerPoolMemberTargetByReservedIp; +import com.ibm.cloud.is.vpc.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 LoadBalancerPoolMemberTargetByReservedIp model. + */ +public class LoadBalancerPoolMemberTargetByReservedIpTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testLoadBalancerPoolMemberTargetByReservedIp() throws Throwable { + LoadBalancerPoolMemberTargetByReservedIp loadBalancerPoolMemberTargetByReservedIpModel = new LoadBalancerPoolMemberTargetByReservedIp(); + assertNull(loadBalancerPoolMemberTargetByReservedIpModel.getAddress()); + assertNull(loadBalancerPoolMemberTargetByReservedIpModel.getDeleted()); + assertNull(loadBalancerPoolMemberTargetByReservedIpModel.getHref()); + assertNull(loadBalancerPoolMemberTargetByReservedIpModel.getId()); + assertNull(loadBalancerPoolMemberTargetByReservedIpModel.getName()); + assertNull(loadBalancerPoolMemberTargetByReservedIpModel.getResourceType()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetIPNotReservedIPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetIPNotReservedIPTest.java new file mode 100644 index 0000000000..5393ef80e7 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetIPNotReservedIPTest.java @@ -0,0 +1,37 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.LoadBalancerPoolMemberTargetIPNotReservedIP; +import com.ibm.cloud.is.vpc.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 LoadBalancerPoolMemberTargetIPNotReservedIP model. + */ +public class LoadBalancerPoolMemberTargetIPNotReservedIPTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testLoadBalancerPoolMemberTargetIPNotReservedIP() throws Throwable { + LoadBalancerPoolMemberTargetIPNotReservedIP loadBalancerPoolMemberTargetIpNotReservedIpModel = new LoadBalancerPoolMemberTargetIPNotReservedIP(); + assertNull(loadBalancerPoolMemberTargetIpNotReservedIpModel.getAddress()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetInstanceReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetInstanceReferenceTest.java index 7fdcaeea76..2c981bd8a7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetInstanceReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetInstanceReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetLoadBalancerReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetLoadBalancerReferenceTest.java index e9ef8b80b2..5e0fb29d2b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetLoadBalancerReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetLoadBalancerReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeIPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeIPTest.java index 0648fc35ed..ff5bf290df 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeIPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeIPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRNTest.java index b666dc270d..646aebbb14 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHrefTest.java index ba90c5fd4d..6f7ba8cd04 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByIdTest.java index 17c010dcf1..383161aa37 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityTest.java index a4170bc59f..3a885335fc 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeInstanceIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityByCRNTest.java index 5593d14bbe..bdde343f7b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityByHrefTest.java index c0b75377e2..db2980a5c7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityByIdTest.java index de852d5db0..24c4980315 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityTest.java index 2c3e8d56a9..b517aec52c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHrefTest.java new file mode 100644 index 0000000000..859aa6e2b8 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHrefTest.java @@ -0,0 +1,51 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref; +import com.ibm.cloud.is.vpc.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 LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref model. + */ +public class LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHrefTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testLoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref() throws Throwable { + LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref loadBalancerPoolMemberTargetPrototypeReservedIpIdentityByHrefModel = new LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref.Builder() + .href("https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + .build(); + assertEquals(loadBalancerPoolMemberTargetPrototypeReservedIpIdentityByHrefModel.href(), "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"); + + String json = TestUtilities.serialize(loadBalancerPoolMemberTargetPrototypeReservedIpIdentityByHrefModel); + + LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref loadBalancerPoolMemberTargetPrototypeReservedIpIdentityByHrefModelNew = TestUtilities.deserialize(json, LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref.class); + assertTrue(loadBalancerPoolMemberTargetPrototypeReservedIpIdentityByHrefModelNew instanceof LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref); + assertEquals(loadBalancerPoolMemberTargetPrototypeReservedIpIdentityByHrefModelNew.href(), "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testLoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHrefError() throws Throwable { + new LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref.Builder().build(); + } + +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByIdTest.java new file mode 100644 index 0000000000..157a737cad --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByIdTest.java @@ -0,0 +1,51 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityById; +import com.ibm.cloud.is.vpc.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 LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityById model. + */ +public class LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByIdTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testLoadBalancerPoolMemberTargetPrototypeReservedIPIdentityById() throws Throwable { + LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityById loadBalancerPoolMemberTargetPrototypeReservedIpIdentityByIdModel = new LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityById.Builder() + .id("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + .build(); + assertEquals(loadBalancerPoolMemberTargetPrototypeReservedIpIdentityByIdModel.id(), "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"); + + String json = TestUtilities.serialize(loadBalancerPoolMemberTargetPrototypeReservedIpIdentityByIdModel); + + LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityById loadBalancerPoolMemberTargetPrototypeReservedIpIdentityByIdModelNew = TestUtilities.deserialize(json, LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityById.class); + assertTrue(loadBalancerPoolMemberTargetPrototypeReservedIpIdentityByIdModelNew instanceof LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityById); + assertEquals(loadBalancerPoolMemberTargetPrototypeReservedIpIdentityByIdModelNew.id(), "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testLoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByIdError() throws Throwable { + new LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityById.Builder().build(); + } + +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityTest.java new file mode 100644 index 0000000000..a25e910173 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityTest.java @@ -0,0 +1,38 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity; +import com.ibm.cloud.is.vpc.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 LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity model. + */ +public class LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + // TODO: Add tests for models that are abstract + @Test + public void testLoadBalancerPoolMemberTargetPrototypeReservedIPIdentity() throws Throwable { + LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity loadBalancerPoolMemberTargetPrototypeReservedIpIdentityModel = new LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity(); + assertNotNull(loadBalancerPoolMemberTargetPrototypeReservedIpIdentityModel); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeTest.java index ac38bfb34e..8e029ca468 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetTest.java index 39654d45ad..d151e3a737 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTargetTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTest.java index 8aa6a8a5a9..ebdd1ec8df 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolMemberTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolPatchTest.java index 70d3265189..439ca4911b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolPrototypeLoadBalancerContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolPrototypeLoadBalancerContextTest.java index 652b9e7b4a..e84bfd463b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolPrototypeLoadBalancerContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolPrototypeLoadBalancerContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolReferenceTest.java index 313040a497..5ee2fb21b9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolSessionPersistencePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolSessionPersistencePatchTest.java index d864e4ca97..7a8cf9b305 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolSessionPersistencePatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolSessionPersistencePatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolSessionPersistencePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolSessionPersistencePrototypeTest.java index 4e2f64d39b..44ca7527a3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolSessionPersistencePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolSessionPersistencePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolSessionPersistenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolSessionPersistenceTest.java index c3e601bbf2..ffaf9e51eb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolSessionPersistenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolSessionPersistenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolTest.java index 361e37d056..b4c1b672b0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerPoolTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAccessModesTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAccessModesTest.java index bc5b41ab6e..15829be9e1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAccessModesTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAccessModesTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAvailabilityDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAvailabilityDependentTest.java index 8764f2e092..fd42d4be77 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAvailabilityDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAvailabilityDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAvailabilityFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAvailabilityFixedTest.java index 4688ee6f4a..34581c825e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAvailabilityFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAvailabilityFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAvailabilityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAvailabilityTest.java index 2664b28225..20998fa098 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAvailabilityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileAvailabilityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileCollectionTest.java index dab135ad25..8a088ddaf3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -24,6 +24,7 @@ import com.ibm.cloud.is.vpc.v1.model.LoadBalancerProfileRouteModeSupportedFixed; import com.ibm.cloud.is.vpc.v1.model.LoadBalancerProfileSecurityGroupsSupportedFixed; import com.ibm.cloud.is.vpc.v1.model.LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed; +import com.ibm.cloud.is.vpc.v1.model.LoadBalancerProfileTargetableResourceTypes; import com.ibm.cloud.is.vpc.v1.model.LoadBalancerProfileUDPSupportedFixed; import com.ibm.cloud.is.vpc.v1.model.PageLink; import com.ibm.cloud.is.vpc.v1.utils.TestUtilities; diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileFailsafePolicyActionsDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileFailsafePolicyActionsDependentTest.java index 881deb4ae5..eb67875247 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileFailsafePolicyActionsDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileFailsafePolicyActionsDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileFailsafePolicyActionsEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileFailsafePolicyActionsEnumTest.java index 0819e15ff7..677c8194a3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileFailsafePolicyActionsEnumTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileFailsafePolicyActionsEnumTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileFailsafePolicyActionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileFailsafePolicyActionsTest.java index 19503988a2..93fbb6ec85 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileFailsafePolicyActionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileFailsafePolicyActionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileIdentityByHrefTest.java index 35aa643cf5..6d1e5f4b77 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileIdentityByNameTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileIdentityByNameTest.java index f81134e9e9..ec63f40278 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileIdentityByNameTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileIdentityByNameTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileIdentityTest.java index af9cb094ea..85525da43d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileInstanceGroupsSupportedDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileInstanceGroupsSupportedDependentTest.java index ae738deabe..6a81ce1a89 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileInstanceGroupsSupportedDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileInstanceGroupsSupportedDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileInstanceGroupsSupportedFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileInstanceGroupsSupportedFixedTest.java index 2efd01319c..9f15d1104c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileInstanceGroupsSupportedFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileInstanceGroupsSupportedFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileInstanceGroupsSupportedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileInstanceGroupsSupportedTest.java index f813e805b6..d1f028e7ba 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileInstanceGroupsSupportedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileInstanceGroupsSupportedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileLoggingSupportedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileLoggingSupportedTest.java index a29cbf55e3..a9563c7142 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileLoggingSupportedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileLoggingSupportedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileReferenceTest.java index f629f889f1..4361b1fe7c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileRouteModeSupportedDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileRouteModeSupportedDependentTest.java index d286d183ac..55d38cb094 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileRouteModeSupportedDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileRouteModeSupportedDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileRouteModeSupportedFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileRouteModeSupportedFixedTest.java index fabf90b5f7..295c51ce63 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileRouteModeSupportedFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileRouteModeSupportedFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileRouteModeSupportedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileRouteModeSupportedTest.java index b142156d0f..1719268961 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileRouteModeSupportedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileRouteModeSupportedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSecurityGroupsSupportedDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSecurityGroupsSupportedDependentTest.java index d0ff766970..dcd0fbc79c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSecurityGroupsSupportedDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSecurityGroupsSupportedDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSecurityGroupsSupportedFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSecurityGroupsSupportedFixedTest.java index 4e85e7281c..7542a533c6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSecurityGroupsSupportedFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSecurityGroupsSupportedFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSecurityGroupsSupportedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSecurityGroupsSupportedTest.java index 7c94b4b5a5..4762137471 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSecurityGroupsSupportedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSecurityGroupsSupportedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSourceIPSessionPersistenceSupportedDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSourceIPSessionPersistenceSupportedDependentTest.java index 0c0b5dcefd..3fcd2b3d26 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSourceIPSessionPersistenceSupportedDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSourceIPSessionPersistenceSupportedDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSourceIPSessionPersistenceSupportedFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSourceIPSessionPersistenceSupportedFixedTest.java index b28a1eae8b..5da225c69b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSourceIPSessionPersistenceSupportedFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSourceIPSessionPersistenceSupportedFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSourceIPSessionPersistenceSupportedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSourceIPSessionPersistenceSupportedTest.java index 71844cc7be..83daa5187d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSourceIPSessionPersistenceSupportedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileSourceIPSessionPersistenceSupportedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileTargetableResourceTypesTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileTargetableResourceTypesTest.java new file mode 100644 index 0000000000..b6c2499a5b --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileTargetableResourceTypesTest.java @@ -0,0 +1,38 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.LoadBalancerProfileTargetableResourceTypes; +import com.ibm.cloud.is.vpc.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 LoadBalancerProfileTargetableResourceTypes model. + */ +public class LoadBalancerProfileTargetableResourceTypesTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testLoadBalancerProfileTargetableResourceTypes() throws Throwable { + LoadBalancerProfileTargetableResourceTypes loadBalancerProfileTargetableResourceTypesModel = new LoadBalancerProfileTargetableResourceTypes(); + assertNull(loadBalancerProfileTargetableResourceTypesModel.getType()); + assertNull(loadBalancerProfileTargetableResourceTypesModel.getValues()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileTest.java index 7affd50391..30868694e1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -23,6 +23,7 @@ import com.ibm.cloud.is.vpc.v1.model.LoadBalancerProfileRouteModeSupportedFixed; import com.ibm.cloud.is.vpc.v1.model.LoadBalancerProfileSecurityGroupsSupportedFixed; import com.ibm.cloud.is.vpc.v1.model.LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed; +import com.ibm.cloud.is.vpc.v1.model.LoadBalancerProfileTargetableResourceTypes; import com.ibm.cloud.is.vpc.v1.model.LoadBalancerProfileUDPSupportedFixed; import com.ibm.cloud.is.vpc.v1.utils.TestUtilities; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; @@ -54,6 +55,7 @@ public void testLoadBalancerProfile() throws Throwable { assertNull(loadBalancerProfileModel.getSecurityGroupsSupported()); assertNull(loadBalancerProfileModel.getSourceIpSessionPersistenceSupported()); assertNull(loadBalancerProfileModel.getTargetableLoadBalancerProfiles()); + assertNull(loadBalancerProfileModel.getTargetableResourceTypes()); assertNull(loadBalancerProfileModel.getUdpSupported()); } } \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileUDPSupportedDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileUDPSupportedDependentTest.java index 024459a07c..be8b673994 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileUDPSupportedDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileUDPSupportedDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileUDPSupportedFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileUDPSupportedFixedTest.java index 87c20ac986..7174c254b2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileUDPSupportedFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileUDPSupportedFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileUDPSupportedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileUDPSupportedTest.java index 427fbb6008..badf69c448 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileUDPSupportedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerProfileUDPSupportedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerReferenceTest.java index 49561f7cd2..1f4261a558 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerStatisticsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerStatisticsTest.java index 377735a55b..bb83839d0c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerStatisticsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerStatisticsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerTest.java index 54b8671322..eec0199a36 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/LoadBalancerTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLCollectionTest.java index 394aa11f2a..9fb2efaad6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityByCRNTest.java index a91845e598..b47ccefd65 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityByHrefTest.java index 5c3bd42f45..a0fd89bf58 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityByIdTest.java index ac38885938..07d5045b6e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityTest.java index 8aefd472af..9f62ff9d51 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPatchTest.java index 6566b7e6b4..8cbf124f1e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPrototypeNetworkACLByRulesTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPrototypeNetworkACLByRulesTest.java index fdcf152ce8..1870a4758d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPrototypeNetworkACLByRulesTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPrototypeNetworkACLByRulesTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPrototypeNetworkACLBySourceNetworkACLTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPrototypeNetworkACLBySourceNetworkACLTest.java index 73cf0c7417..523ef7543d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPrototypeNetworkACLBySourceNetworkACLTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPrototypeNetworkACLBySourceNetworkACLTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPrototypeTest.java index c46ae46a18..76227a6d25 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLReferenceTest.java index af52fa1995..a1edecaeb5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHrefTest.java index a7117e1098..a41e3bddd7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePatchNetworkACLRuleIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePatchNetworkACLRuleIdentityByIdTest.java index 810bbd4ec5..d1be7cda6c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePatchNetworkACLRuleIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePatchNetworkACLRuleIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePatchTest.java index 0223fb50c1..25f8b84fb7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHrefTest.java index b5689fdcd5..a535c67f96 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByIdTest.java index a0e4df084c..4df517f658 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePrototypeTest.java index 24a53080b1..8775b78c6d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleBeforePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleCollectionTest.java index a2e0df1887..5bc6cc0904 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemNetworkACLRuleProtocolAllTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemNetworkACLRuleProtocolAllTest.java index 04debc6563..d2c7216a64 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemNetworkACLRuleProtocolAllTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemNetworkACLRuleProtocolAllTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemNetworkACLRuleProtocolICMPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemNetworkACLRuleProtocolICMPTest.java index a9580be62d..77373aea04 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemNetworkACLRuleProtocolICMPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemNetworkACLRuleProtocolICMPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemNetworkACLRuleProtocolTCPUDPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemNetworkACLRuleProtocolTCPUDPTest.java index f8fb8cee3b..71b2002ff8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemNetworkACLRuleProtocolTCPUDPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemNetworkACLRuleProtocolTCPUDPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemTest.java index 8bc702b2e1..94f558f312 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleItemTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleNetworkACLRuleProtocolAllTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleNetworkACLRuleProtocolAllTest.java index 5d8d903d82..e7e976f082 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleNetworkACLRuleProtocolAllTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleNetworkACLRuleProtocolAllTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleNetworkACLRuleProtocolICMPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleNetworkACLRuleProtocolICMPTest.java index 8820bc3936..f408351487 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleNetworkACLRuleProtocolICMPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleNetworkACLRuleProtocolICMPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleNetworkACLRuleProtocolTCPUDPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleNetworkACLRuleProtocolTCPUDPTest.java index 718101b267..b6b39da4de 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleNetworkACLRuleProtocolTCPUDPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleNetworkACLRuleProtocolTCPUDPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePatchTest.java index 2fc58c0708..94fd240747 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototypeTest.java index 384ab5767c..b563f6bc57 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototypeTest.java index 19ccee2878..cab4b98988 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototypeTest.java index 66e78edf56..8c178f69f7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextTest.java index 14f4890a8a..359e0bc7b2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototypeTest.java index f6f6c8e077..cbb0768e62 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototypeTest.java index 7ca142733d..6021f272ab 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototypeTest.java index b50558f251..1dc2fed82c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeTest.java index bdb56a4d7b..df7acfbe1b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRulePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleReferenceTest.java index 25a94dd9f9..93030b75aa 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleTest.java index b961263daa..5538b7fd26 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLRuleTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLTest.java index bce90e9a47..b41a807b7b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkACLTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceBareMetalServerContextReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceBareMetalServerContextReferenceTest.java index 08124fb258..3d932d96b1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceBareMetalServerContextReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceBareMetalServerContextReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPIdentityByHrefTest.java index a25dffeb01..483dddf043 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPIdentityByIdTest.java index 0a9edc3500..6e7e80dbc8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPIdentityTest.java index 65013ec43d..340d06c067 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContextTest.java index 79f96cce30..dcf7b5cfca 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeTest.java index 83547b6223..4099f4f07b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceIPPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceInstanceContextReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceInstanceContextReferenceTest.java index 9d30d60e0b..d6bdb6dc4c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceInstanceContextReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceInstanceContextReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfacePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfacePatchTest.java index 42fcf53c14..31bf53c44e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfacePatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfacePatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfacePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfacePrototypeTest.java index b16cb50908..a72c1f47fb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfacePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfacePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceTest.java index aa7fef1a59..49601480f0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceUnpaginatedCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceUnpaginatedCollectionTest.java index 90475ccf56..2324668ccd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceUnpaginatedCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/NetworkInterfaceUnpaginatedCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ObsoleteImageOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ObsoleteImageOptionsTest.java index 90f30857b7..870d544694 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ObsoleteImageOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ObsoleteImageOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemCollectionTest.java index eb0c97fac3..828f0e1128 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemIdentityByHrefTest.java index 0867274a97..18e9b2dc77 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemIdentityByNameTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemIdentityByNameTest.java index ea78241798..6f1f9a82bd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemIdentityByNameTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemIdentityByNameTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemIdentityTest.java index 89e0763ce3..62acaddba0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemTest.java index 81586e6920..f73dbad0a1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/OperatingSystemTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PageLinkTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PageLinkTest.java index 1089e51e63..7d2344d17b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PageLinkTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PageLinkTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PermitPrivatePathServiceGatewayEndpointGatewayBindingOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PermitPrivatePathServiceGatewayEndpointGatewayBindingOptionsTest.java index 31256ee849..245fae2a83 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PermitPrivatePathServiceGatewayEndpointGatewayBindingOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PermitPrivatePathServiceGatewayEndpointGatewayBindingOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroupCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroupCollectionTest.java index 850bb25536..d54c2b2954 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroupCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroupCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroupPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroupPatchTest.java index 049a3d03b9..0fe6c310b2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroupPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroupPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroupTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroupTest.java index 5f543e974e..4e0a7adeba 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroupTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PlacementGroupTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPolicyCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPolicyCollectionTest.java index 334e5ee678..31b9f80a89 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPolicyCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPolicyCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPolicyPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPolicyPatchTest.java index 05878995f5..a06869b668 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPolicyPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPolicyPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPolicyTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPolicyTest.java index 3e599a19e6..c19e6b5399 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPolicyTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayAccountPolicyTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayCollectionTest.java index 17465b123c..b85a817816 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayEndpointGatewayBindingCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayEndpointGatewayBindingCollectionTest.java index 2fff3f6695..1820310ec3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayEndpointGatewayBindingCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayEndpointGatewayBindingCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayEndpointGatewayBindingTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayEndpointGatewayBindingTest.java index e82c7e009e..99bd835418 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayEndpointGatewayBindingTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayEndpointGatewayBindingTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayPatchTest.java index 8d5635ba98..b69c1b5c5a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayRemoteTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayRemoteTest.java index 32dba0cf9f..b88c3cfb1f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayRemoteTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayRemoteTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayTest.java index 7ba1c3a25c..2dd0c3e6c8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PrivatePathServiceGatewayTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeCollectionTest.java index f401aa41f9..ab4c65b612 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangePatchTest.java index b1c6561328..9996d9d301 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangePatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangePatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeReferenceTest.java index 450200b80e..b4017224f0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTargetPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTargetPatchTest.java index 8258f52b48..bd3a4413e3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTargetPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTargetPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTargetPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTargetPrototypeTest.java index ea22076b8d..cf12e3a27e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTargetPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTargetPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTargetTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTargetTest.java index 711696615f..8a57472f1c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTargetTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTargetTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTest.java index 8ab05c62ad..a3926e491e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicAddressRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayCollectionTest.java index 5271cdd669..c20293a0fe 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddressTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddressTest.java index 7042077e7b..16fc71f397 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddressTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddressTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRNTest.java index db6d1b88b7..39eb368fec 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHrefTest.java index deec477702..90763cc7e4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByIdTest.java index ce8fc406c0..05995b22fc 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityTest.java index 95409885ca..b41c356311 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContextTest.java index 6e01966e62..298e7ae919 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeTest.java index 576aaeec55..4fb6851a26 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIPPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIpTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIpTest.java index 38681d596d..ea50c30026 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIpTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayFloatingIpTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityPublicGatewayIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityPublicGatewayIdentityByCRNTest.java index 699c7f6957..8f667fe2c2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityPublicGatewayIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityPublicGatewayIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityPublicGatewayIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityPublicGatewayIdentityByHrefTest.java index 46d76a60e7..1b5c959f0f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityPublicGatewayIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityPublicGatewayIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityPublicGatewayIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityPublicGatewayIdentityByIdTest.java index 2a94119084..de95a0ac65 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityPublicGatewayIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityPublicGatewayIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityTest.java index 732349b4b8..6728416ac7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayPatchTest.java index 844a397c88..7394697de2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayReferenceTest.java index 894172daa9..9934de5230 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayTest.java index ef72393ca3..64bdbb0125 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublicGatewayTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublishPrivatePathServiceGatewayOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublishPrivatePathServiceGatewayOptionsTest.java index 5260233bc1..5fd0685a10 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublishPrivatePathServiceGatewayOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/PublishPrivatePathServiceGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RegionCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RegionCollectionTest.java index c14ad0793a..38360c40a3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RegionCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RegionCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RegionIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RegionIdentityByHrefTest.java index 8bab52b1e6..4d026509e4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RegionIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RegionIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RegionIdentityByNameTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RegionIdentityByNameTest.java index ee58de8361..b4ed4e55b0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RegionIdentityByNameTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RegionIdentityByNameTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RegionIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RegionIdentityTest.java index 07a6556b16..e189003286 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RegionIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RegionIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RegionReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RegionReferenceTest.java index 17d3695ce3..ade490743c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RegionReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RegionReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RegionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RegionTest.java index 140e2ceb1d..5c51591927 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RegionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RegionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveBareMetalServerNetworkInterfaceFloatingIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveBareMetalServerNetworkInterfaceFloatingIpOptionsTest.java index a27338bcc9..5f69d8ea55 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveBareMetalServerNetworkInterfaceFloatingIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveBareMetalServerNetworkInterfaceFloatingIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveEndpointGatewayIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveEndpointGatewayIpOptionsTest.java index e7b7d4e034..654b65ef68 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveEndpointGatewayIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveEndpointGatewayIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveInstanceNetworkInterfaceFloatingIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveInstanceNetworkInterfaceFloatingIpOptionsTest.java index 2d7aff7147..cd70a4ad7b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveInstanceNetworkInterfaceFloatingIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveInstanceNetworkInterfaceFloatingIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveNetworkInterfaceFloatingIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveNetworkInterfaceFloatingIpOptionsTest.java index 6717fd2733..27210101dc 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveNetworkInterfaceFloatingIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveNetworkInterfaceFloatingIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveVirtualNetworkInterfaceIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveVirtualNetworkInterfaceIpOptionsTest.java index 1f86a571ed..cfdde4fab2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveVirtualNetworkInterfaceIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveVirtualNetworkInterfaceIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveVpnGatewayAdvertisedCidrOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveVpnGatewayAdvertisedCidrOptionsTest.java new file mode 100644 index 0000000000..450af08015 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveVpnGatewayAdvertisedCidrOptionsTest.java @@ -0,0 +1,47 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.RemoveVpnGatewayAdvertisedCidrOptions; +import com.ibm.cloud.is.vpc.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 RemoveVpnGatewayAdvertisedCidrOptions model. + */ +public class RemoveVpnGatewayAdvertisedCidrOptionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testRemoveVpnGatewayAdvertisedCidrOptions() throws Throwable { + RemoveVpnGatewayAdvertisedCidrOptions removeVpnGatewayAdvertisedCidrOptionsModel = new RemoveVpnGatewayAdvertisedCidrOptions.Builder() + .vpnGatewayId("testString") + .cidr("192.168.1.0/24") + .build(); + assertEquals(removeVpnGatewayAdvertisedCidrOptionsModel.vpnGatewayId(), "testString"); + assertEquals(removeVpnGatewayAdvertisedCidrOptionsModel.cidr(), "192.168.1.0/24"); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testRemoveVpnGatewayAdvertisedCidrOptionsError() throws Throwable { + new RemoveVpnGatewayAdvertisedCidrOptions.Builder().build(); + } + +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveVpnGatewayConnectionsLocalCidrOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveVpnGatewayConnectionsLocalCidrOptionsTest.java index 33ad34d305..fdbe7cbfc8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveVpnGatewayConnectionsLocalCidrOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveVpnGatewayConnectionsLocalCidrOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveVpnGatewayConnectionsPeerCidrOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveVpnGatewayConnectionsPeerCidrOptionsTest.java index 163e06d28a..7a99ef7281 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveVpnGatewayConnectionsPeerCidrOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RemoveVpnGatewayConnectionsPeerCidrOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReplaceBareMetalServerInitializationOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReplaceBareMetalServerInitializationOptionsTest.java index 6695d178af..bd89c249f6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReplaceBareMetalServerInitializationOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReplaceBareMetalServerInitializationOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -13,9 +13,11 @@ package com.ibm.cloud.is.vpc.v1.model; +import com.ibm.cloud.is.vpc.v1.model.BareMetalServerInitializationDefaultTrustedProfilePrototype; import com.ibm.cloud.is.vpc.v1.model.ImageIdentityById; import com.ibm.cloud.is.vpc.v1.model.KeyIdentityById; import com.ibm.cloud.is.vpc.v1.model.ReplaceBareMetalServerInitializationOptions; +import com.ibm.cloud.is.vpc.v1.model.TrustedProfileIdentityById; import com.ibm.cloud.is.vpc.v1.utils.TestUtilities; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; import java.io.InputStream; @@ -43,15 +45,29 @@ public void testReplaceBareMetalServerInitializationOptions() throws Throwable { .build(); assertEquals(keyIdentityModel.id(), "r006-82679077-ac3b-4c10-be16-63e9c21f0f45"); + TrustedProfileIdentityById trustedProfileIdentityModel = new TrustedProfileIdentityById.Builder() + .id("Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5") + .build(); + assertEquals(trustedProfileIdentityModel.id(), "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"); + + BareMetalServerInitializationDefaultTrustedProfilePrototype bareMetalServerInitializationDefaultTrustedProfilePrototypeModel = new BareMetalServerInitializationDefaultTrustedProfilePrototype.Builder() + .autoLink(false) + .target(trustedProfileIdentityModel) + .build(); + assertEquals(bareMetalServerInitializationDefaultTrustedProfilePrototypeModel.autoLink(), Boolean.valueOf(false)); + assertEquals(bareMetalServerInitializationDefaultTrustedProfilePrototypeModel.target(), trustedProfileIdentityModel); + ReplaceBareMetalServerInitializationOptions replaceBareMetalServerInitializationOptionsModel = new ReplaceBareMetalServerInitializationOptions.Builder() .id("testString") .image(imageIdentityModel) .keys(java.util.Arrays.asList(keyIdentityModel)) + .defaultTrustedProfile(bareMetalServerInitializationDefaultTrustedProfilePrototypeModel) .userData("testString") .build(); assertEquals(replaceBareMetalServerInitializationOptionsModel.id(), "testString"); assertEquals(replaceBareMetalServerInitializationOptionsModel.image(), imageIdentityModel); assertEquals(replaceBareMetalServerInitializationOptionsModel.keys(), java.util.Arrays.asList(keyIdentityModel)); + assertEquals(replaceBareMetalServerInitializationOptionsModel.defaultTrustedProfile(), bareMetalServerInitializationDefaultTrustedProfilePrototypeModel); assertEquals(replaceBareMetalServerInitializationOptionsModel.userData(), "testString"); } diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReplaceLoadBalancerPoolMembersOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReplaceLoadBalancerPoolMembersOptionsTest.java index 0c35252eee..3bddc78670 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReplaceLoadBalancerPoolMembersOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReplaceLoadBalancerPoolMembersOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReplaceSubnetNetworkAclOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReplaceSubnetNetworkAclOptionsTest.java index 0ef24e9ef4..6a6de488be 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReplaceSubnetNetworkAclOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReplaceSubnetNetworkAclOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReplaceSubnetRoutingTableOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReplaceSubnetRoutingTableOptionsTest.java index 210a8d2046..3b4e5c0554 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReplaceSubnetRoutingTableOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReplaceSubnetRoutingTableOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCapacityPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCapacityPatchTest.java index cf0ecce71e..a6609deb54 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCapacityPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCapacityPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCapacityPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCapacityPrototypeTest.java index 97786445fb..ae897372cf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCapacityPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCapacityPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCapacityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCapacityTest.java index a5db55d14d..97d7d533be 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCapacityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCapacityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCollectionTest.java index dc78f5389e..56d774a1a2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCommittedUsePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCommittedUsePatchTest.java index d42813407d..c62a95ee5a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCommittedUsePatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCommittedUsePatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCommittedUsePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCommittedUsePrototypeTest.java index ef6d02f169..2c98b7fd83 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCommittedUsePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCommittedUsePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCommittedUseTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCommittedUseTest.java index b73259e72e..a72497196e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCommittedUseTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationCommittedUseTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityByCRNTest.java index f8be605b7d..07a1cbf7f4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityByHrefTest.java index 2822a83074..b8160a1af6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityByIdTest.java index a1c452b35c..2759a7d9de 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityTest.java index 4d85508eb5..cfb8ed996d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationPatchTest.java index c83f0752c1..ebc1eb0fb5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfileBareMetalServerProfileReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfileBareMetalServerProfileReferenceTest.java index 70ac035f3e..5d8b7ffc55 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfileBareMetalServerProfileReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfileBareMetalServerProfileReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfileInstanceProfileReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfileInstanceProfileReferenceTest.java index ced09faff5..b7642e9225 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfileInstanceProfileReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfileInstanceProfileReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfilePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfilePatchTest.java index 64c04f596f..8c2e4587dd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfilePatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfilePatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfilePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfilePrototypeTest.java index bc602f6a0e..c089206f21 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfilePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfilePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfileTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfileTest.java index e6dc9707ef..6f4bdebbb1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfileTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationProfileTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationReferenceTest.java index 8bcfb9233b..04366364f5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationStatusReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationStatusReasonTest.java index 98ef6d9dd3..a1681ae168 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationStatusReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationStatusReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationTest.java index c32ffb85e9..c9d156cd32 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservationTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionBareMetalServerNetworkInterfaceContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionBareMetalServerNetworkInterfaceContextTest.java index 9c1b12da18..59c36fc9ea 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionBareMetalServerNetworkInterfaceContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionBareMetalServerNetworkInterfaceContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionEndpointGatewayContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionEndpointGatewayContextTest.java index c9bb47edff..3c8fd3ed25 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionEndpointGatewayContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionEndpointGatewayContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionInstanceNetworkInterfaceContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionInstanceNetworkInterfaceContextTest.java index 24322f702e..84a0d07706 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionInstanceNetworkInterfaceContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionInstanceNetworkInterfaceContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionTest.java index 0867ee7c80..711a1e04fd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionVirtualNetworkInterfaceContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionVirtualNetworkInterfaceContextTest.java index 9cb5a1d5b4..4828b88bb3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionVirtualNetworkInterfaceContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPCollectionVirtualNetworkInterfaceContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPPatchTest.java index 1630b46231..c7a74f3aba 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPReferenceTest.java index 7005345007..a284cbb3bd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContextTest.java index 97b4c2e525..da38570ecf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetEndpointGatewayReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetEndpointGatewayReferenceTest.java index 5812f387cd..da29dd7dcf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetEndpointGatewayReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetEndpointGatewayReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetGenericResourceReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetGenericResourceReferenceTest.java index a1795fd702..37991fa513 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetGenericResourceReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetGenericResourceReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetLoadBalancerReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetLoadBalancerReferenceTest.java index d66f927c69..f028118edf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetLoadBalancerReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetLoadBalancerReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetNetworkInterfaceReferenceTargetContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetNetworkInterfaceReferenceTargetContextTest.java index 228aad6a64..1f05ce8b68 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetNetworkInterfaceReferenceTargetContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetNetworkInterfaceReferenceTargetContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRNTest.java index 31a2c1e689..ff1ce9be29 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHrefTest.java index 86294ec709..e3a463629f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByIdTest.java index 9696672995..b2d9cb8d6d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityTest.java index 9329066ca5..36bc137293 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeEndpointGatewayIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeTest.java index dabf4da986..53ea31cdc4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityTest.java index d3f7ae4a16..8db677db98 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java index 681bcd5fba..16da771ef6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java index 77bc5391c6..a4533ae75d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java index 4a7fa6441f..11e7c2eae1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetTest.java index 0b3fb0039d..0b41b0c13b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetVPNGatewayReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetVPNGatewayReferenceTest.java index b647958619..eee723b010 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetVPNGatewayReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetVPNGatewayReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetVPNServerReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetVPNServerReferenceTest.java index e1bc2a9a41..b7918a8619 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetVPNServerReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetVPNServerReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContextTest.java index 662eaf17ef..e20b367029 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTest.java index 04a9c00664..c4853d9f9e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ReservedIPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ResourceFilterTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ResourceFilterTest.java index 0b56d51ddb..e97f980827 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ResourceFilterTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ResourceFilterTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ResourceGroupIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ResourceGroupIdentityByIdTest.java index d9dfbf1e66..8a6b026135 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ResourceGroupIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ResourceGroupIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ResourceGroupIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ResourceGroupIdentityTest.java index bba1f164dd..ef4242d49e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ResourceGroupIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ResourceGroupIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ResourceGroupReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ResourceGroupReferenceTest.java index 69c8b0188d..4cf674cf5b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ResourceGroupReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ResourceGroupReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RestartBareMetalServerOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RestartBareMetalServerOptionsTest.java index 0ece5c693f..efca336cc9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RestartBareMetalServerOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RestartBareMetalServerOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RevokeAccountForPrivatePathServiceGatewayOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RevokeAccountForPrivatePathServiceGatewayOptionsTest.java index c4d1dca612..349fad6d08 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RevokeAccountForPrivatePathServiceGatewayOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RevokeAccountForPrivatePathServiceGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteCollectionTest.java index bd820434c7..dd8247e908 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteCollectionVPCContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteCollectionVPCContextTest.java index 5b893fe1ba..058ddf453d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteCollectionVPCContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteCollectionVPCContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteCreatorTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteCreatorTest.java index 58c01f3538..c418e7007e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteCreatorTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteCreatorTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteCreatorVPNGatewayReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteCreatorVPNGatewayReferenceTest.java index 896123dd1d..f00562bbce 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteCreatorVPNGatewayReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteCreatorVPNGatewayReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteCreatorVPNServerReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteCreatorVPNServerReferenceTest.java index c4cdc1cb44..f725584f38 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteCreatorVPNServerReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteCreatorVPNServerReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopIPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopIPTest.java index 4dc96c02f9..10a6b56419 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopIPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopIPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIPTest.java index 7c0f93baf7..dfb319c02d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIPTest.java index f045ce531b..690dda3114 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchRouteNextHopIPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchRouteNextHopIPTest.java index daa22cb7a4..536d01c14d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchRouteNextHopIPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchRouteNextHopIPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchTest.java index 3181652551..e4e98b6520 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchVPNGatewayConnectionIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchVPNGatewayConnectionIdentityTest.java index caa9fb7c40..2b475c414c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchVPNGatewayConnectionIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchVPNGatewayConnectionIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHrefTest.java index 1aff12d673..5155b914fa 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByIdTest.java index c596c5bfe3..e1fe7bc3b4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIPTest.java index 6587077d5a..54b5a422e9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIPTest.java index 728bed39e3..4eeec86744 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeRouteNextHopIPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeRouteNextHopIPTest.java index 8263ee45d4..f4c3e891d9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeRouteNextHopIPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeRouteNextHopIPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeTest.java index aa1598ebfd..4c8bf1a237 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeVPNGatewayConnectionIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeVPNGatewayConnectionIdentityTest.java index 6a3ae5a9b3..b7b159d90e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeVPNGatewayConnectionIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeVPNGatewayConnectionIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHrefTest.java index ff3a7f29cf..c8f6d34287 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByIdTest.java index 220679e874..c4b3a9128c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopTest.java index 492f32e74d..36c75f7f0d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopVPNGatewayConnectionReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopVPNGatewayConnectionReferenceTest.java index fc89a67df5..910d257de1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopVPNGatewayConnectionReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteNextHopVPNGatewayConnectionReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutePatchTest.java index e09481aca7..c6f3ce90bd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutePatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutePatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutePrototypeTest.java index e36c203c86..be6a2d0e80 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteReferenceTest.java index 4cfa470fed..f59942fcca 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteTest.java index 6e7deb6ec3..170f980719 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RouteTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableCollectionTest.java index a78085ac87..af482943c5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityByCRNTest.java index c07b2b33d8..82b5aba9e2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityByHrefTest.java index e5a7018fb5..e3b51428a5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityByIdTest.java index 0275770b11..e65a0ea52d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityTest.java index 41b99029c3..e741bcf821 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTablePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTablePatchTest.java index 72b09ec7fd..2b9ef5ae6a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTablePatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTablePatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableReferenceTest.java index c3bcdff57d..f2d0f2d028 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableTest.java index 81e66e859b..10e08fbac5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/RoutingTableTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupCollectionTest.java index 2a010858ff..d8e45769f9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityByCRNTest.java index bf88351f82..e6c2d6dc5e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityByHrefTest.java index 4d03b491b0..493dd5241a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityByIdTest.java index 73d7b50506..17993a727e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityTest.java index daa77a77c2..cd5503ecc8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupPatchTest.java index 9bcd88d0d7..13b0496852 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupReferenceTest.java index 2717ec4aa9..616edf67a2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleCollectionTest.java index 0c0505d240..68689e318e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalCIDRTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalCIDRTest.java index 82ae0af6ff..fc6e7038f7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalCIDRTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalCIDRTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalIPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalIPTest.java index ac9f6791af..d2cf4c7cad 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalIPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalIPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPatchCIDRTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPatchCIDRTest.java index 0672a3e613..46b6a5e487 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPatchCIDRTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPatchCIDRTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPatchIPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPatchIPTest.java index c3c573300e..e0248f83b4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPatchIPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPatchIPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPatchTest.java index 08d01935ea..342de10bb1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPrototypeCIDRTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPrototypeCIDRTest.java index cf3628b5c3..2bf3f8f133 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPrototypeCIDRTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPrototypeCIDRTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPrototypeIPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPrototypeIPTest.java index 1fcd92a3b0..a70ff92395 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPrototypeIPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPrototypeIPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPrototypeTest.java index 43089cff1d..0ec7c6db7a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalTest.java index d895a6ddc7..a04f943f7b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleLocalTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePatchTest.java index 90730c92a2..2449250c8e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllTest.java index c9c1b9eb4b..106b4b11ea 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMPTest.java index 598fa32827..3a7c34d47c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDPTest.java index cd5f350a12..6f83f33687 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeTest.java index 1bd89b98ba..0f786deb9c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRulePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteCIDRTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteCIDRTest.java index 19cb454495..9e2ee2225e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteCIDRTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteCIDRTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteIPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteIPTest.java index 09a8e2201a..6ae13457ee 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteIPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteIPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchCIDRTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchCIDRTest.java index d74e442c99..921475ea5d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchCIDRTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchCIDRTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchIPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchIPTest.java index 52252c284b..8aa05d65b9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchIPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchIPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRNTest.java index 5cc7fcabf7..e6310f3309 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHrefTest.java index b5de767495..71e9fe3c2c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByIdTest.java index 4b7dad21e1..86ea227d62 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentityTest.java index e7b992c7b1..80c64c2673 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchSecurityGroupIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchTest.java index 3b5ffd5ac2..000b909e29 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeCIDRTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeCIDRTest.java index ac157fcba7..17060a17e8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeCIDRTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeCIDRTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeIPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeIPTest.java index 339c0eb6a8..c3dff94042 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeIPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeIPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRNTest.java index e24225a4cb..53b7922de9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHrefTest.java index eb3b9eaa89..9dadb406dc 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByIdTest.java index 26140f8f13..22a5ff184c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentityTest.java index f284ddc1da..196f760d99 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeSecurityGroupIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeTest.java index 8ff3080633..dc365d61c4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemotePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteSecurityGroupReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteSecurityGroupReferenceTest.java index 3e2d2ed8d7..2d05f30d96 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteSecurityGroupReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteSecurityGroupReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteTest.java index 1522ac9cab..230697a0b0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleRemoteTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleSecurityGroupRuleProtocolAllTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleSecurityGroupRuleProtocolAllTest.java index 08e89b7e67..3987c97509 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleSecurityGroupRuleProtocolAllTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleSecurityGroupRuleProtocolAllTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleSecurityGroupRuleProtocolICMPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleSecurityGroupRuleProtocolICMPTest.java index 7e57e80205..09046d158b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleSecurityGroupRuleProtocolICMPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleSecurityGroupRuleProtocolICMPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleSecurityGroupRuleProtocolTCPUDPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleSecurityGroupRuleProtocolTCPUDPTest.java index 1819fdad24..dbe0ea8bc0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleSecurityGroupRuleProtocolTCPUDPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleSecurityGroupRuleProtocolTCPUDPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleTest.java index 5a2ad8b1bc..11e2d99afb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupRuleTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetCollectionTest.java index 6fff9e0a07..470019383f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContextTest.java index 4e83d63e4c..54340632ab 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceEndpointGatewayReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceEndpointGatewayReferenceTest.java index 83aa412500..1d49c6f783 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceEndpointGatewayReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceEndpointGatewayReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceLoadBalancerReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceLoadBalancerReferenceTest.java index b8fcc52cae..296368e34b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceLoadBalancerReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceLoadBalancerReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContextTest.java index 32f73723dc..794e51ca8d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceTest.java index cc691e7656..aafe942d13 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceVPNServerReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceVPNServerReferenceTest.java index 243733c8bf..fbbab60671 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceVPNServerReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceVPNServerReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceVirtualNetworkInterfaceReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceVirtualNetworkInterfaceReferenceTest.java index da5129cc66..edb61a9fe7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceVirtualNetworkInterfaceReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTargetReferenceVirtualNetworkInterfaceReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTest.java index 71f4692f6b..cf54cb26d8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SecurityGroupTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SetSubnetPublicGatewayOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SetSubnetPublicGatewayOptionsTest.java index 08e2ab5932..58a493f346 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SetSubnetPublicGatewayOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SetSubnetPublicGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingAccessorShareReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingAccessorShareReferenceTest.java index f0ec139266..294bc64bf5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingAccessorShareReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingAccessorShareReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingAccessorTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingAccessorTest.java index 3a0dfd2042..40e9d97053 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingAccessorTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingAccessorTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingAccessorWatsonxMachineLearningReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingAccessorWatsonxMachineLearningReferenceTest.java index 94b1af6746..92ece7d6ba 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingAccessorWatsonxMachineLearningReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingAccessorWatsonxMachineLearningReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingCollectionTest.java index 038392a2c4..6d414e4f4f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingReferenceTest.java index 7ee3b9a948..e5452719db 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingTest.java index c3a86c0221..92a75da64c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareAccessorBindingTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareCollectionTest.java index e647c0de95..41009ba53f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityByCRNTest.java index a79dc9ceea..f4f77496ed 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityByHrefTest.java index 2120677430..2dd34b4814 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityByIdTest.java index 3419c8b981..8c3081f434 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityTest.java index 5b536cc621..77932c40df 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareInitialOwnerTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareInitialOwnerTest.java index a1607ce236..54277acf42 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareInitialOwnerTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareInitialOwnerTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareJobStatusReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareJobStatusReasonTest.java index fbd8ea6645..1651ddee17 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareJobStatusReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareJobStatusReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareJobTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareJobTest.java index 85aec0ea73..d4c6410eeb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareJobTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareJobTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareLatestSyncTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareLatestSyncTest.java index 231cd00b38..6a5e59a4c9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareLatestSyncTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareLatestSyncTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareLifecycleReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareLifecycleReasonTest.java index 7d44b12cb5..9931fd1f95 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareLifecycleReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareLifecycleReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetCollectionTest.java index 7a4aa0f1bf..851d487090 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPatchTest.java index 199ff0c22a..326b136796 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroupTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroupTest.java index 02a3db4a34..88aafb0e85 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroupTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroupTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -94,10 +94,12 @@ public void testShareMountTargetPrototypeShareMountTargetByAccessControlModeSecu assertEquals(shareMountTargetVirtualNetworkInterfacePrototypeModel.subnet(), subnetIdentityModel); ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup shareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroupModel = new ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.Builder() + .accessProtocol("nfs4") .name("my-share-mount-target") .transitEncryption("none") .virtualNetworkInterface(shareMountTargetVirtualNetworkInterfacePrototypeModel) .build(); + assertEquals(shareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroupModel.accessProtocol(), "nfs4"); assertEquals(shareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroupModel.name(), "my-share-mount-target"); assertEquals(shareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroupModel.transitEncryption(), "none"); assertEquals(shareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroupModel.virtualNetworkInterface(), shareMountTargetVirtualNetworkInterfacePrototypeModel); @@ -106,6 +108,7 @@ public void testShareMountTargetPrototypeShareMountTargetByAccessControlModeSecu ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup shareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroupModelNew = TestUtilities.deserialize(json, ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.class); assertTrue(shareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroupModelNew instanceof ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup); + assertEquals(shareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroupModelNew.accessProtocol(), "nfs4"); assertEquals(shareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroupModelNew.name(), "my-share-mount-target"); assertEquals(shareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroupModelNew.transitEncryption(), "none"); assertEquals(shareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroupModelNew.virtualNetworkInterface().toString(), shareMountTargetVirtualNetworkInterfacePrototypeModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPCTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPCTest.java index 5050f7d64e..bcab2b2e37 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPCTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPCTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -38,10 +38,12 @@ public void testShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC( assertEquals(vpcIdentityModel.id(), "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"); ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC shareMountTargetPrototypeShareMountTargetByAccessControlModeVpcModel = new ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC.Builder() + .accessProtocol("nfs4") .name("my-share-mount-target") .transitEncryption("none") .vpc(vpcIdentityModel) .build(); + assertEquals(shareMountTargetPrototypeShareMountTargetByAccessControlModeVpcModel.accessProtocol(), "nfs4"); assertEquals(shareMountTargetPrototypeShareMountTargetByAccessControlModeVpcModel.name(), "my-share-mount-target"); assertEquals(shareMountTargetPrototypeShareMountTargetByAccessControlModeVpcModel.transitEncryption(), "none"); assertEquals(shareMountTargetPrototypeShareMountTargetByAccessControlModeVpcModel.vpc(), vpcIdentityModel); @@ -50,6 +52,7 @@ public void testShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC( ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC shareMountTargetPrototypeShareMountTargetByAccessControlModeVpcModelNew = TestUtilities.deserialize(json, ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC.class); assertTrue(shareMountTargetPrototypeShareMountTargetByAccessControlModeVpcModelNew instanceof ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC); + assertEquals(shareMountTargetPrototypeShareMountTargetByAccessControlModeVpcModelNew.accessProtocol(), "nfs4"); assertEquals(shareMountTargetPrototypeShareMountTargetByAccessControlModeVpcModelNew.name(), "my-share-mount-target"); assertEquals(shareMountTargetPrototypeShareMountTargetByAccessControlModeVpcModelNew.transitEncryption(), "none"); assertEquals(shareMountTargetPrototypeShareMountTargetByAccessControlModeVpcModelNew.vpc().toString(), vpcIdentityModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPrototypeTest.java index 3d053b6132..668524980a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetReferenceTest.java index 6de79fc5d1..1a4593bcc8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetTest.java index 28e6ccb168..8028690664 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -38,6 +38,7 @@ public class ShareMountTargetTest { public void testShareMountTarget() throws Throwable { ShareMountTarget shareMountTargetModel = new ShareMountTarget(); assertNull(shareMountTargetModel.getAccessControlMode()); + assertNull(shareMountTargetModel.getAccessProtocol()); assertNull(shareMountTargetModel.getCreatedAt()); assertNull(shareMountTargetModel.getHref()); assertNull(shareMountTargetModel.getId()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeTest.java index ce4750e993..f6b0c7bf8f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityTest.java index 469e17f889..3c53be72be 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java index be7896822c..51bc31d475 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java index b7761bb33f..c33b527e48 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java index c439a88f3e..8d17318012 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContextTest.java index baa153cb39..4726664166 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePatchTest.java index c5f8c09816..59f3f52263 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -40,7 +40,9 @@ public void testSharePatch() throws Throwable { SharePatch sharePatchModel = new SharePatch.Builder() .accessControlMode("security_group") - .allowedTransitEncryptionModes(java.util.Arrays.asList("none")) + .allowedAccessProtocols(java.util.Arrays.asList("nfs4")) + .allowedTransitEncryptionModes(java.util.Arrays.asList("ipsec")) + .bandwidth(Long.valueOf("1")) .iops(Long.valueOf("100")) .name("my-share") .profile(shareProfileIdentityModel) @@ -49,7 +51,9 @@ public void testSharePatch() throws Throwable { .userTags(java.util.Arrays.asList("testString")) .build(); assertEquals(sharePatchModel.accessControlMode(), "security_group"); - assertEquals(sharePatchModel.allowedTransitEncryptionModes(), java.util.Arrays.asList("none")); + assertEquals(sharePatchModel.allowedAccessProtocols(), java.util.Arrays.asList("nfs4")); + assertEquals(sharePatchModel.allowedTransitEncryptionModes(), java.util.Arrays.asList("ipsec")); + assertEquals(sharePatchModel.bandwidth(), Long.valueOf("1")); assertEquals(sharePatchModel.iops(), Long.valueOf("100")); assertEquals(sharePatchModel.name(), "my-share"); assertEquals(sharePatchModel.profile(), shareProfileIdentityModel); @@ -62,6 +66,7 @@ public void testSharePatch() throws Throwable { SharePatch sharePatchModelNew = TestUtilities.deserialize(json, SharePatch.class); assertTrue(sharePatchModelNew instanceof SharePatch); assertEquals(sharePatchModelNew.accessControlMode(), "security_group"); + assertEquals(sharePatchModelNew.bandwidth(), Long.valueOf("1")); assertEquals(sharePatchModelNew.iops(), Long.valueOf("100")); assertEquals(sharePatchModelNew.name(), "my-share"); assertEquals(sharePatchModelNew.profile().toString(), shareProfileIdentityModel.toString()); @@ -76,7 +81,9 @@ public void testSharePatchAsPatch() throws Throwable { SharePatch sharePatchModel = new SharePatch.Builder() .accessControlMode("security_group") - .allowedTransitEncryptionModes(java.util.Arrays.asList("none")) + .allowedAccessProtocols(java.util.Arrays.asList("nfs4")) + .allowedTransitEncryptionModes(java.util.Arrays.asList("ipsec")) + .bandwidth(Long.valueOf("1")) .iops(Long.valueOf("100")) .name("my-share") .profile(shareProfileIdentityModel) @@ -88,7 +95,9 @@ public void testSharePatchAsPatch() throws Throwable { Map mergePatch = sharePatchModel.asPatch(); assertEquals(mergePatch.get("access_control_mode"), "security_group"); + assertTrue(mergePatch.containsKey("allowed_access_protocols")); assertTrue(mergePatch.containsKey("allowed_transit_encryption_modes")); + assertTrue(mergePatch.containsKey("bandwidth")); assertTrue(mergePatch.containsKey("iops")); assertEquals(mergePatch.get("name"), "my-share"); assertTrue(mergePatch.containsKey("profile")); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAllowedAccessProtocolsSubsetTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAllowedAccessProtocolsSubsetTest.java new file mode 100644 index 0000000000..a35df06fb3 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAllowedAccessProtocolsSubsetTest.java @@ -0,0 +1,39 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.ShareProfileAllowedAccessProtocolsSubset; +import com.ibm.cloud.is.vpc.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 ShareProfileAllowedAccessProtocolsSubset model. + */ +public class ShareProfileAllowedAccessProtocolsSubsetTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testShareProfileAllowedAccessProtocolsSubset() throws Throwable { + ShareProfileAllowedAccessProtocolsSubset shareProfileAllowedAccessProtocolsSubsetModel = new ShareProfileAllowedAccessProtocolsSubset(); + assertNull(shareProfileAllowedAccessProtocolsSubsetModel.getXDefault()); + assertNull(shareProfileAllowedAccessProtocolsSubsetModel.getType()); + assertNull(shareProfileAllowedAccessProtocolsSubsetModel.getValues()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAllowedAccessProtocolsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAllowedAccessProtocolsTest.java new file mode 100644 index 0000000000..7c67ec72e0 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAllowedAccessProtocolsTest.java @@ -0,0 +1,38 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.ShareProfileAllowedAccessProtocols; +import com.ibm.cloud.is.vpc.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 ShareProfileAllowedAccessProtocols model. + */ +public class ShareProfileAllowedAccessProtocolsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + // TODO: Add tests for models that are abstract + @Test + public void testShareProfileAllowedAccessProtocols() throws Throwable { + ShareProfileAllowedAccessProtocols shareProfileAllowedAccessProtocolsModel = new ShareProfileAllowedAccessProtocols(); + assertNotNull(shareProfileAllowedAccessProtocolsModel); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAllowedTransitEncryptionModesSubsetTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAllowedTransitEncryptionModesSubsetTest.java new file mode 100644 index 0000000000..f7b2643f6f --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAllowedTransitEncryptionModesSubsetTest.java @@ -0,0 +1,39 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.ShareProfileAllowedTransitEncryptionModesSubset; +import com.ibm.cloud.is.vpc.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 ShareProfileAllowedTransitEncryptionModesSubset model. + */ +public class ShareProfileAllowedTransitEncryptionModesSubsetTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testShareProfileAllowedTransitEncryptionModesSubset() throws Throwable { + ShareProfileAllowedTransitEncryptionModesSubset shareProfileAllowedTransitEncryptionModesSubsetModel = new ShareProfileAllowedTransitEncryptionModesSubset(); + assertNull(shareProfileAllowedTransitEncryptionModesSubsetModel.getXDefault()); + assertNull(shareProfileAllowedTransitEncryptionModesSubsetModel.getType()); + assertNull(shareProfileAllowedTransitEncryptionModesSubsetModel.getValues()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAllowedTransitEncryptionModesTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAllowedTransitEncryptionModesTest.java new file mode 100644 index 0000000000..68d3f5fa73 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAllowedTransitEncryptionModesTest.java @@ -0,0 +1,38 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.ShareProfileAllowedTransitEncryptionModes; +import com.ibm.cloud.is.vpc.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 ShareProfileAllowedTransitEncryptionModes model. + */ +public class ShareProfileAllowedTransitEncryptionModesTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + // TODO: Add tests for models that are abstract + @Test + public void testShareProfileAllowedTransitEncryptionModes() throws Throwable { + ShareProfileAllowedTransitEncryptionModes shareProfileAllowedTransitEncryptionModesModel = new ShareProfileAllowedTransitEncryptionModes(); + assertNotNull(shareProfileAllowedTransitEncryptionModesModel); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAvailabilityModesEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAvailabilityModesEnumTest.java new file mode 100644 index 0000000000..6165073cc8 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAvailabilityModesEnumTest.java @@ -0,0 +1,39 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.ShareProfileAvailabilityModesEnum; +import com.ibm.cloud.is.vpc.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 ShareProfileAvailabilityModesEnum model. + */ +public class ShareProfileAvailabilityModesEnumTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testShareProfileAvailabilityModesEnum() throws Throwable { + ShareProfileAvailabilityModesEnum shareProfileAvailabilityModesEnumModel = new ShareProfileAvailabilityModesEnum(); + assertNull(shareProfileAvailabilityModesEnumModel.getXDefault()); + assertNull(shareProfileAvailabilityModesEnumModel.getType()); + assertNull(shareProfileAvailabilityModesEnumModel.getValues()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAvailabilityModesFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAvailabilityModesFixedTest.java new file mode 100644 index 0000000000..aaeece4fda --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAvailabilityModesFixedTest.java @@ -0,0 +1,38 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.ShareProfileAvailabilityModesFixed; +import com.ibm.cloud.is.vpc.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 ShareProfileAvailabilityModesFixed model. + */ +public class ShareProfileAvailabilityModesFixedTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testShareProfileAvailabilityModesFixed() throws Throwable { + ShareProfileAvailabilityModesFixed shareProfileAvailabilityModesFixedModel = new ShareProfileAvailabilityModesFixed(); + assertNull(shareProfileAvailabilityModesFixedModel.getType()); + assertNull(shareProfileAvailabilityModesFixedModel.getValue()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAvailabilityModesTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAvailabilityModesTest.java new file mode 100644 index 0000000000..f06bf97850 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileAvailabilityModesTest.java @@ -0,0 +1,38 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.ShareProfileAvailabilityModes; +import com.ibm.cloud.is.vpc.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 ShareProfileAvailabilityModes model. + */ +public class ShareProfileAvailabilityModesTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + // TODO: Add tests for models that are abstract + @Test + public void testShareProfileAvailabilityModes() throws Throwable { + ShareProfileAvailabilityModes shareProfileAvailabilityModesModel = new ShareProfileAvailabilityModes(); + assertNotNull(shareProfileAvailabilityModesModel); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthDependentRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthDependentRangeTest.java new file mode 100644 index 0000000000..0e8ceb164b --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthDependentRangeTest.java @@ -0,0 +1,40 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.ShareProfileBandwidthDependentRange; +import com.ibm.cloud.is.vpc.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 ShareProfileBandwidthDependentRange model. + */ +public class ShareProfileBandwidthDependentRangeTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testShareProfileBandwidthDependentRange() throws Throwable { + ShareProfileBandwidthDependentRange shareProfileBandwidthDependentRangeModel = new ShareProfileBandwidthDependentRange(); + assertNull(shareProfileBandwidthDependentRangeModel.getMax()); + assertNull(shareProfileBandwidthDependentRangeModel.getMin()); + assertNull(shareProfileBandwidthDependentRangeModel.getStep()); + assertNull(shareProfileBandwidthDependentRangeModel.getType()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthDependentTest.java new file mode 100644 index 0000000000..6f86504e4c --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthDependentTest.java @@ -0,0 +1,37 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.ShareProfileBandwidthDependent; +import com.ibm.cloud.is.vpc.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 ShareProfileBandwidthDependent model. + */ +public class ShareProfileBandwidthDependentTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testShareProfileBandwidthDependent() throws Throwable { + ShareProfileBandwidthDependent shareProfileBandwidthDependentModel = new ShareProfileBandwidthDependent(); + assertNull(shareProfileBandwidthDependentModel.getType()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthEnumTest.java new file mode 100644 index 0000000000..1f23f7e55c --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthEnumTest.java @@ -0,0 +1,39 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.ShareProfileBandwidthEnum; +import com.ibm.cloud.is.vpc.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 ShareProfileBandwidthEnum model. + */ +public class ShareProfileBandwidthEnumTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testShareProfileBandwidthEnum() throws Throwable { + ShareProfileBandwidthEnum shareProfileBandwidthEnumModel = new ShareProfileBandwidthEnum(); + assertNull(shareProfileBandwidthEnumModel.getXDefault()); + assertNull(shareProfileBandwidthEnumModel.getType()); + assertNull(shareProfileBandwidthEnumModel.getValues()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthFixedTest.java new file mode 100644 index 0000000000..23156a5fbe --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthFixedTest.java @@ -0,0 +1,38 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.ShareProfileBandwidthFixed; +import com.ibm.cloud.is.vpc.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 ShareProfileBandwidthFixed model. + */ +public class ShareProfileBandwidthFixedTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testShareProfileBandwidthFixed() throws Throwable { + ShareProfileBandwidthFixed shareProfileBandwidthFixedModel = new ShareProfileBandwidthFixed(); + assertNull(shareProfileBandwidthFixedModel.getType()); + assertNull(shareProfileBandwidthFixedModel.getValue()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthRangeTest.java new file mode 100644 index 0000000000..124becc4ce --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthRangeTest.java @@ -0,0 +1,42 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.ShareProfileBandwidthRange; +import com.ibm.cloud.is.vpc.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 ShareProfileBandwidthRange model. + */ +public class ShareProfileBandwidthRangeTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testShareProfileBandwidthRange() throws Throwable { + ShareProfileBandwidthRange shareProfileBandwidthRangeModel = new ShareProfileBandwidthRange(); + assertNull(shareProfileBandwidthRangeModel.getXDefault()); + assertNull(shareProfileBandwidthRangeModel.getMax()); + assertNull(shareProfileBandwidthRangeModel.getMin()); + assertNull(shareProfileBandwidthRangeModel.getStep()); + assertNull(shareProfileBandwidthRangeModel.getType()); + assertNull(shareProfileBandwidthRangeModel.getValue()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthTest.java new file mode 100644 index 0000000000..8c8b250eef --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileBandwidthTest.java @@ -0,0 +1,38 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.ShareProfileBandwidth; +import com.ibm.cloud.is.vpc.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 ShareProfileBandwidth model. + */ +public class ShareProfileBandwidthTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + // TODO: Add tests for models that are abstract + @Test + public void testShareProfileBandwidth() throws Throwable { + ShareProfileBandwidth shareProfileBandwidthModel = new ShareProfileBandwidth(); + assertNotNull(shareProfileBandwidthModel); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityDependentRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityDependentRangeTest.java index 6d7bb58962..69d8937e12 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityDependentRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityDependentRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityEnumTest.java index 72699f2798..c9717f785f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityEnumTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityEnumTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityFixedTest.java index e3173466a3..cd74d1311b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityRangeTest.java index 43a42d9cf4..e5fef70858 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityTest.java index ca8e5bbb0b..0e152d0f0f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCapacityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCollectionTest.java index 667fc019b3..fbc63f503e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -15,9 +15,14 @@ import com.ibm.cloud.is.vpc.v1.model.PageLink; import com.ibm.cloud.is.vpc.v1.model.ShareProfile; +import com.ibm.cloud.is.vpc.v1.model.ShareProfileAllowedAccessProtocolsSubset; +import com.ibm.cloud.is.vpc.v1.model.ShareProfileAllowedTransitEncryptionModesSubset; +import com.ibm.cloud.is.vpc.v1.model.ShareProfileAvailabilityModesFixed; +import com.ibm.cloud.is.vpc.v1.model.ShareProfileBandwidthRange; import com.ibm.cloud.is.vpc.v1.model.ShareProfileCapacityRange; import com.ibm.cloud.is.vpc.v1.model.ShareProfileCollection; import com.ibm.cloud.is.vpc.v1.model.ShareProfileIOPSRange; +import com.ibm.cloud.is.vpc.v1.model.ShareProfileStorageGenerationFixed; import com.ibm.cloud.is.vpc.v1.utils.TestUtilities; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; import java.io.InputStream; diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSDependentRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSDependentRangeTest.java index c611bf3762..1096deff4c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSDependentRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSDependentRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSDependentTest.java index 96c97f9c0f..dbdb2bf4a2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSEnumTest.java index 548f46b4e6..859ab9a542 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSEnumTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSEnumTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSFixedTest.java index 58c7abd6b4..7968e1867d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSRangeTest.java index 17af25b094..89c795249b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSTest.java index 75e3f201af..e9edec1bad 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIOPSTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIdentityByHrefTest.java index f5c8d0358d..032230d3d2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIdentityByNameTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIdentityByNameTest.java index 543575c7e0..d06a6a7c6d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIdentityByNameTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIdentityByNameTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIdentityTest.java index 3cf4ab22aa..228fd80728 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileReferenceTest.java index 81d0b7f9f1..a66b886530 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileStorageGenerationFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileStorageGenerationFixedTest.java new file mode 100644 index 0000000000..0ebad130d6 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileStorageGenerationFixedTest.java @@ -0,0 +1,38 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.ShareProfileStorageGenerationFixed; +import com.ibm.cloud.is.vpc.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 ShareProfileStorageGenerationFixed model. + */ +public class ShareProfileStorageGenerationFixedTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testShareProfileStorageGenerationFixed() throws Throwable { + ShareProfileStorageGenerationFixed shareProfileStorageGenerationFixedModel = new ShareProfileStorageGenerationFixed(); + assertNull(shareProfileStorageGenerationFixedModel.getType()); + assertNull(shareProfileStorageGenerationFixedModel.getValue()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileStorageGenerationTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileStorageGenerationTest.java new file mode 100644 index 0000000000..840e05719b --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileStorageGenerationTest.java @@ -0,0 +1,38 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.ShareProfileStorageGeneration; +import com.ibm.cloud.is.vpc.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 ShareProfileStorageGeneration model. + */ +public class ShareProfileStorageGenerationTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + // TODO: Add tests for models that are abstract + @Test + public void testShareProfileStorageGeneration() throws Throwable { + ShareProfileStorageGeneration shareProfileStorageGenerationModel = new ShareProfileStorageGeneration(); + assertNotNull(shareProfileStorageGenerationModel); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileTest.java index 04b636e88a..372ac9d371 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareProfileTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -14,8 +14,13 @@ package com.ibm.cloud.is.vpc.v1.model; import com.ibm.cloud.is.vpc.v1.model.ShareProfile; +import com.ibm.cloud.is.vpc.v1.model.ShareProfileAllowedAccessProtocolsSubset; +import com.ibm.cloud.is.vpc.v1.model.ShareProfileAllowedTransitEncryptionModesSubset; +import com.ibm.cloud.is.vpc.v1.model.ShareProfileAvailabilityModesFixed; +import com.ibm.cloud.is.vpc.v1.model.ShareProfileBandwidthRange; import com.ibm.cloud.is.vpc.v1.model.ShareProfileCapacityRange; import com.ibm.cloud.is.vpc.v1.model.ShareProfileIOPSRange; +import com.ibm.cloud.is.vpc.v1.model.ShareProfileStorageGenerationFixed; import com.ibm.cloud.is.vpc.v1.utils.TestUtilities; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; import java.io.InputStream; @@ -34,11 +39,16 @@ public class ShareProfileTest { @Test public void testShareProfile() throws Throwable { ShareProfile shareProfileModel = new ShareProfile(); + assertNull(shareProfileModel.getAllowedAccessProtocols()); + assertNull(shareProfileModel.getAllowedTransitEncryptionModes()); + assertNull(shareProfileModel.getAvailabilityModes()); + assertNull(shareProfileModel.getBandwidth()); assertNull(shareProfileModel.getCapacity()); assertNull(shareProfileModel.getFamily()); assertNull(shareProfileModel.getHref()); assertNull(shareProfileModel.getIops()); assertNull(shareProfileModel.getName()); assertNull(shareProfileModel.getResourceType()); + assertNull(shareProfileModel.getStorageGeneration()); } } \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareByOriginShareTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareByOriginShareTest.java index f511248bb3..2bf9f54953 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareByOriginShareTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareByOriginShareTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -99,10 +99,12 @@ public void testSharePrototypeShareByOriginShare() throws Throwable { assertEquals(shareMountTargetVirtualNetworkInterfacePrototypeModel.subnet(), subnetIdentityModel); ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup shareMountTargetPrototypeModel = new ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.Builder() + .accessProtocol("nfs4") .name("my-share-mount-target") .transitEncryption("none") .virtualNetworkInterface(shareMountTargetVirtualNetworkInterfacePrototypeModel) .build(); + assertEquals(shareMountTargetPrototypeModel.accessProtocol(), "nfs4"); assertEquals(shareMountTargetPrototypeModel.name(), "my-share-mount-target"); assertEquals(shareMountTargetPrototypeModel.transitEncryption(), "none"); assertEquals(shareMountTargetPrototypeModel.virtualNetworkInterface(), shareMountTargetVirtualNetworkInterfacePrototypeModel); @@ -118,7 +120,7 @@ public void testSharePrototypeShareByOriginShare() throws Throwable { assertEquals(zoneIdentityModel.name(), "us-south-1"); SharePrototypeShareContext sharePrototypeShareContextModel = new SharePrototypeShareContext.Builder() - .allowedTransitEncryptionModes(java.util.Arrays.asList("none")) + .allowedTransitEncryptionModes(java.util.Arrays.asList("ipsec")) .iops(Long.valueOf("100")) .mountTargets(java.util.Arrays.asList(shareMountTargetPrototypeModel)) .name("my-share") @@ -128,7 +130,7 @@ public void testSharePrototypeShareByOriginShare() throws Throwable { .userTags(java.util.Arrays.asList()) .zone(zoneIdentityModel) .build(); - assertEquals(sharePrototypeShareContextModel.allowedTransitEncryptionModes(), java.util.Arrays.asList("none")); + assertEquals(sharePrototypeShareContextModel.allowedTransitEncryptionModes(), java.util.Arrays.asList("ipsec")); assertEquals(sharePrototypeShareContextModel.iops(), Long.valueOf("100")); assertEquals(sharePrototypeShareContextModel.mountTargets(), java.util.Arrays.asList(shareMountTargetPrototypeModel)); assertEquals(sharePrototypeShareContextModel.name(), "my-share"); @@ -144,19 +146,21 @@ public void testSharePrototypeShareByOriginShare() throws Throwable { assertEquals(shareIdentityModel.id(), "r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58"); SharePrototypeShareByOriginShare sharePrototypeShareByOriginShareModel = new SharePrototypeShareByOriginShare.Builder() - .allowedTransitEncryptionModes(java.util.Arrays.asList("none")) + .allowedTransitEncryptionModes(java.util.Arrays.asList("ipsec")) .mountTargets(java.util.Arrays.asList(shareMountTargetPrototypeModel)) .name("my-share") .replicaShare(sharePrototypeShareContextModel) .userTags(java.util.Arrays.asList()) .originShare(shareIdentityModel) + .resourceGroup(resourceGroupIdentityModel) .build(); - assertEquals(sharePrototypeShareByOriginShareModel.allowedTransitEncryptionModes(), java.util.Arrays.asList("none")); + assertEquals(sharePrototypeShareByOriginShareModel.allowedTransitEncryptionModes(), java.util.Arrays.asList("ipsec")); assertEquals(sharePrototypeShareByOriginShareModel.mountTargets(), java.util.Arrays.asList(shareMountTargetPrototypeModel)); assertEquals(sharePrototypeShareByOriginShareModel.name(), "my-share"); assertEquals(sharePrototypeShareByOriginShareModel.replicaShare(), sharePrototypeShareContextModel); assertEquals(sharePrototypeShareByOriginShareModel.userTags(), java.util.Arrays.asList()); assertEquals(sharePrototypeShareByOriginShareModel.originShare(), shareIdentityModel); + assertEquals(sharePrototypeShareByOriginShareModel.resourceGroup(), resourceGroupIdentityModel); String json = TestUtilities.serialize(sharePrototypeShareByOriginShareModel); @@ -165,6 +169,7 @@ public void testSharePrototypeShareByOriginShare() throws Throwable { assertEquals(sharePrototypeShareByOriginShareModelNew.name(), "my-share"); assertEquals(sharePrototypeShareByOriginShareModelNew.replicaShare().toString(), sharePrototypeShareContextModel.toString()); assertEquals(sharePrototypeShareByOriginShareModelNew.originShare().toString(), shareIdentityModel.toString()); + assertEquals(sharePrototypeShareByOriginShareModelNew.resourceGroup().toString(), resourceGroupIdentityModel.toString()); } @Test(expectedExceptions = IllegalArgumentException.class) diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareBySizeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareBySizeTest.java index 92f74fb63b..c52a189911 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareBySizeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareBySizeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -100,10 +100,12 @@ public void testSharePrototypeShareBySize() throws Throwable { assertEquals(shareMountTargetVirtualNetworkInterfacePrototypeModel.subnet(), subnetIdentityModel); ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup shareMountTargetPrototypeModel = new ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.Builder() + .accessProtocol("nfs4") .name("my-share-mount-target") .transitEncryption("none") .virtualNetworkInterface(shareMountTargetVirtualNetworkInterfacePrototypeModel) .build(); + assertEquals(shareMountTargetPrototypeModel.accessProtocol(), "nfs4"); assertEquals(shareMountTargetPrototypeModel.name(), "my-share-mount-target"); assertEquals(shareMountTargetPrototypeModel.transitEncryption(), "none"); assertEquals(shareMountTargetPrototypeModel.virtualNetworkInterface(), shareMountTargetVirtualNetworkInterfacePrototypeModel); @@ -119,7 +121,7 @@ public void testSharePrototypeShareBySize() throws Throwable { assertEquals(zoneIdentityModel.name(), "us-south-1"); SharePrototypeShareContext sharePrototypeShareContextModel = new SharePrototypeShareContext.Builder() - .allowedTransitEncryptionModes(java.util.Arrays.asList("none")) + .allowedTransitEncryptionModes(java.util.Arrays.asList("ipsec")) .iops(Long.valueOf("100")) .mountTargets(java.util.Arrays.asList(shareMountTargetPrototypeModel)) .name("my-share") @@ -129,7 +131,7 @@ public void testSharePrototypeShareBySize() throws Throwable { .userTags(java.util.Arrays.asList()) .zone(zoneIdentityModel) .build(); - assertEquals(sharePrototypeShareContextModel.allowedTransitEncryptionModes(), java.util.Arrays.asList("none")); + assertEquals(sharePrototypeShareContextModel.allowedTransitEncryptionModes(), java.util.Arrays.asList("ipsec")); assertEquals(sharePrototypeShareContextModel.iops(), Long.valueOf("100")); assertEquals(sharePrototypeShareContextModel.mountTargets(), java.util.Arrays.asList(shareMountTargetPrototypeModel)); assertEquals(sharePrototypeShareContextModel.name(), "my-share"); @@ -152,12 +154,14 @@ public void testSharePrototypeShareBySize() throws Throwable { assertEquals(shareInitialOwnerModel.uid(), Long.valueOf("50")); SharePrototypeShareBySize sharePrototypeShareBySizeModel = new SharePrototypeShareBySize.Builder() - .allowedTransitEncryptionModes(java.util.Arrays.asList("none")) + .allowedTransitEncryptionModes(java.util.Arrays.asList("ipsec")) .mountTargets(java.util.Arrays.asList(shareMountTargetPrototypeModel)) .name("my-share") .replicaShare(sharePrototypeShareContextModel) .userTags(java.util.Arrays.asList()) .accessControlMode("security_group") + .allowedAccessProtocols(java.util.Arrays.asList("nfs4")) + .bandwidth(Long.valueOf("100")) .encryptionKey(encryptionKeyIdentityModel) .initialOwner(shareInitialOwnerModel) .iops(Long.valueOf("100")) @@ -166,12 +170,14 @@ public void testSharePrototypeShareBySize() throws Throwable { .size(Long.valueOf("200")) .zone(zoneIdentityModel) .build(); - assertEquals(sharePrototypeShareBySizeModel.allowedTransitEncryptionModes(), java.util.Arrays.asList("none")); + assertEquals(sharePrototypeShareBySizeModel.allowedTransitEncryptionModes(), java.util.Arrays.asList("ipsec")); assertEquals(sharePrototypeShareBySizeModel.mountTargets(), java.util.Arrays.asList(shareMountTargetPrototypeModel)); assertEquals(sharePrototypeShareBySizeModel.name(), "my-share"); assertEquals(sharePrototypeShareBySizeModel.replicaShare(), sharePrototypeShareContextModel); assertEquals(sharePrototypeShareBySizeModel.userTags(), java.util.Arrays.asList()); assertEquals(sharePrototypeShareBySizeModel.accessControlMode(), "security_group"); + assertEquals(sharePrototypeShareBySizeModel.allowedAccessProtocols(), java.util.Arrays.asList("nfs4")); + assertEquals(sharePrototypeShareBySizeModel.bandwidth(), Long.valueOf("100")); assertEquals(sharePrototypeShareBySizeModel.encryptionKey(), encryptionKeyIdentityModel); assertEquals(sharePrototypeShareBySizeModel.initialOwner(), shareInitialOwnerModel); assertEquals(sharePrototypeShareBySizeModel.iops(), Long.valueOf("100")); @@ -187,6 +193,7 @@ public void testSharePrototypeShareBySize() throws Throwable { assertEquals(sharePrototypeShareBySizeModelNew.name(), "my-share"); assertEquals(sharePrototypeShareBySizeModelNew.replicaShare().toString(), sharePrototypeShareContextModel.toString()); assertEquals(sharePrototypeShareBySizeModelNew.accessControlMode(), "security_group"); + assertEquals(sharePrototypeShareBySizeModelNew.bandwidth(), Long.valueOf("100")); assertEquals(sharePrototypeShareBySizeModelNew.encryptionKey().toString(), encryptionKeyIdentityModel.toString()); assertEquals(sharePrototypeShareBySizeModelNew.initialOwner().toString(), shareInitialOwnerModel.toString()); assertEquals(sharePrototypeShareBySizeModelNew.iops(), Long.valueOf("100")); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareBySourceShareTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareBySourceShareTest.java index e5a415a614..b832f5344a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareBySourceShareTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareBySourceShareTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -100,10 +100,12 @@ public void testSharePrototypeShareBySourceShare() throws Throwable { assertEquals(shareMountTargetVirtualNetworkInterfacePrototypeModel.subnet(), subnetIdentityModel); ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup shareMountTargetPrototypeModel = new ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.Builder() + .accessProtocol("nfs4") .name("my-share-mount-target") .transitEncryption("none") .virtualNetworkInterface(shareMountTargetVirtualNetworkInterfacePrototypeModel) .build(); + assertEquals(shareMountTargetPrototypeModel.accessProtocol(), "nfs4"); assertEquals(shareMountTargetPrototypeModel.name(), "my-share-mount-target"); assertEquals(shareMountTargetPrototypeModel.transitEncryption(), "none"); assertEquals(shareMountTargetPrototypeModel.virtualNetworkInterface(), shareMountTargetVirtualNetworkInterfacePrototypeModel); @@ -119,7 +121,7 @@ public void testSharePrototypeShareBySourceShare() throws Throwable { assertEquals(zoneIdentityModel.name(), "us-south-1"); SharePrototypeShareContext sharePrototypeShareContextModel = new SharePrototypeShareContext.Builder() - .allowedTransitEncryptionModes(java.util.Arrays.asList("none")) + .allowedTransitEncryptionModes(java.util.Arrays.asList("ipsec")) .iops(Long.valueOf("100")) .mountTargets(java.util.Arrays.asList(shareMountTargetPrototypeModel)) .name("my-share") @@ -129,7 +131,7 @@ public void testSharePrototypeShareBySourceShare() throws Throwable { .userTags(java.util.Arrays.asList()) .zone(zoneIdentityModel) .build(); - assertEquals(sharePrototypeShareContextModel.allowedTransitEncryptionModes(), java.util.Arrays.asList("none")); + assertEquals(sharePrototypeShareContextModel.allowedTransitEncryptionModes(), java.util.Arrays.asList("ipsec")); assertEquals(sharePrototypeShareContextModel.iops(), Long.valueOf("100")); assertEquals(sharePrototypeShareContextModel.mountTargets(), java.util.Arrays.asList(shareMountTargetPrototypeModel)); assertEquals(sharePrototypeShareContextModel.name(), "my-share"); @@ -150,7 +152,7 @@ public void testSharePrototypeShareBySourceShare() throws Throwable { assertEquals(shareIdentityModel.id(), "r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58"); SharePrototypeShareBySourceShare sharePrototypeShareBySourceShareModel = new SharePrototypeShareBySourceShare.Builder() - .allowedTransitEncryptionModes(java.util.Arrays.asList("none")) + .allowedTransitEncryptionModes(java.util.Arrays.asList("ipsec")) .mountTargets(java.util.Arrays.asList(shareMountTargetPrototypeModel)) .name("my-share") .replicaShare(sharePrototypeShareContextModel) @@ -163,7 +165,7 @@ public void testSharePrototypeShareBySourceShare() throws Throwable { .sourceShare(shareIdentityModel) .zone(zoneIdentityModel) .build(); - assertEquals(sharePrototypeShareBySourceShareModel.allowedTransitEncryptionModes(), java.util.Arrays.asList("none")); + assertEquals(sharePrototypeShareBySourceShareModel.allowedTransitEncryptionModes(), java.util.Arrays.asList("ipsec")); assertEquals(sharePrototypeShareBySourceShareModel.mountTargets(), java.util.Arrays.asList(shareMountTargetPrototypeModel)); assertEquals(sharePrototypeShareBySourceShareModel.name(), "my-share"); assertEquals(sharePrototypeShareBySourceShareModel.replicaShare(), sharePrototypeShareContextModel); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareBySourceSnapshotTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareBySourceSnapshotTest.java index aeb0c52979..503de21a49 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareBySourceSnapshotTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareBySourceSnapshotTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -101,10 +101,12 @@ public void testSharePrototypeShareBySourceSnapshot() throws Throwable { assertEquals(shareMountTargetVirtualNetworkInterfacePrototypeModel.subnet(), subnetIdentityModel); ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup shareMountTargetPrototypeModel = new ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.Builder() + .accessProtocol("nfs4") .name("my-share-mount-target") .transitEncryption("none") .virtualNetworkInterface(shareMountTargetVirtualNetworkInterfacePrototypeModel) .build(); + assertEquals(shareMountTargetPrototypeModel.accessProtocol(), "nfs4"); assertEquals(shareMountTargetPrototypeModel.name(), "my-share-mount-target"); assertEquals(shareMountTargetPrototypeModel.transitEncryption(), "none"); assertEquals(shareMountTargetPrototypeModel.virtualNetworkInterface(), shareMountTargetVirtualNetworkInterfacePrototypeModel); @@ -120,7 +122,7 @@ public void testSharePrototypeShareBySourceSnapshot() throws Throwable { assertEquals(zoneIdentityModel.name(), "us-south-1"); SharePrototypeShareContext sharePrototypeShareContextModel = new SharePrototypeShareContext.Builder() - .allowedTransitEncryptionModes(java.util.Arrays.asList("none")) + .allowedTransitEncryptionModes(java.util.Arrays.asList("ipsec")) .iops(Long.valueOf("100")) .mountTargets(java.util.Arrays.asList(shareMountTargetPrototypeModel)) .name("my-share") @@ -130,7 +132,7 @@ public void testSharePrototypeShareBySourceSnapshot() throws Throwable { .userTags(java.util.Arrays.asList()) .zone(zoneIdentityModel) .build(); - assertEquals(sharePrototypeShareContextModel.allowedTransitEncryptionModes(), java.util.Arrays.asList("none")); + assertEquals(sharePrototypeShareContextModel.allowedTransitEncryptionModes(), java.util.Arrays.asList("ipsec")); assertEquals(sharePrototypeShareContextModel.iops(), Long.valueOf("100")); assertEquals(sharePrototypeShareContextModel.mountTargets(), java.util.Arrays.asList(shareMountTargetPrototypeModel)); assertEquals(sharePrototypeShareContextModel.name(), "my-share"); @@ -158,11 +160,13 @@ public void testSharePrototypeShareBySourceSnapshot() throws Throwable { assertEquals(shareSourceSnapshotPrototypeModel.id(), "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4"); SharePrototypeShareBySourceSnapshot sharePrototypeShareBySourceSnapshotModel = new SharePrototypeShareBySourceSnapshot.Builder() - .allowedTransitEncryptionModes(java.util.Arrays.asList("none")) + .allowedTransitEncryptionModes(java.util.Arrays.asList("ipsec")) .mountTargets(java.util.Arrays.asList(shareMountTargetPrototypeModel)) .name("my-share") .replicaShare(sharePrototypeShareContextModel) .userTags(java.util.Arrays.asList()) + .allowedAccessProtocols(java.util.Arrays.asList("nfs4")) + .bandwidth(Long.valueOf("100")) .encryptionKey(encryptionKeyIdentityModel) .initialOwner(shareInitialOwnerModel) .iops(Long.valueOf("100")) @@ -171,11 +175,13 @@ public void testSharePrototypeShareBySourceSnapshot() throws Throwable { .size(Long.valueOf("200")) .sourceSnapshot(shareSourceSnapshotPrototypeModel) .build(); - assertEquals(sharePrototypeShareBySourceSnapshotModel.allowedTransitEncryptionModes(), java.util.Arrays.asList("none")); + assertEquals(sharePrototypeShareBySourceSnapshotModel.allowedTransitEncryptionModes(), java.util.Arrays.asList("ipsec")); assertEquals(sharePrototypeShareBySourceSnapshotModel.mountTargets(), java.util.Arrays.asList(shareMountTargetPrototypeModel)); assertEquals(sharePrototypeShareBySourceSnapshotModel.name(), "my-share"); assertEquals(sharePrototypeShareBySourceSnapshotModel.replicaShare(), sharePrototypeShareContextModel); assertEquals(sharePrototypeShareBySourceSnapshotModel.userTags(), java.util.Arrays.asList()); + assertEquals(sharePrototypeShareBySourceSnapshotModel.allowedAccessProtocols(), java.util.Arrays.asList("nfs4")); + assertEquals(sharePrototypeShareBySourceSnapshotModel.bandwidth(), Long.valueOf("100")); assertEquals(sharePrototypeShareBySourceSnapshotModel.encryptionKey(), encryptionKeyIdentityModel); assertEquals(sharePrototypeShareBySourceSnapshotModel.initialOwner(), shareInitialOwnerModel); assertEquals(sharePrototypeShareBySourceSnapshotModel.iops(), Long.valueOf("100")); @@ -190,6 +196,7 @@ public void testSharePrototypeShareBySourceSnapshot() throws Throwable { assertTrue(sharePrototypeShareBySourceSnapshotModelNew instanceof SharePrototypeShareBySourceSnapshot); assertEquals(sharePrototypeShareBySourceSnapshotModelNew.name(), "my-share"); assertEquals(sharePrototypeShareBySourceSnapshotModelNew.replicaShare().toString(), sharePrototypeShareContextModel.toString()); + assertEquals(sharePrototypeShareBySourceSnapshotModelNew.bandwidth(), Long.valueOf("100")); assertEquals(sharePrototypeShareBySourceSnapshotModelNew.encryptionKey().toString(), encryptionKeyIdentityModel.toString()); assertEquals(sharePrototypeShareBySourceSnapshotModelNew.initialOwner().toString(), shareInitialOwnerModel.toString()); assertEquals(sharePrototypeShareBySourceSnapshotModelNew.iops(), Long.valueOf("100")); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareContextTest.java index 872f85b0d7..5fe2278fae 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeShareContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -97,10 +97,12 @@ public void testSharePrototypeShareContext() throws Throwable { assertEquals(shareMountTargetVirtualNetworkInterfacePrototypeModel.subnet(), subnetIdentityModel); ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup shareMountTargetPrototypeModel = new ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.Builder() + .accessProtocol("nfs4") .name("my-share-mount-target") .transitEncryption("none") .virtualNetworkInterface(shareMountTargetVirtualNetworkInterfacePrototypeModel) .build(); + assertEquals(shareMountTargetPrototypeModel.accessProtocol(), "nfs4"); assertEquals(shareMountTargetPrototypeModel.name(), "my-share-mount-target"); assertEquals(shareMountTargetPrototypeModel.transitEncryption(), "none"); assertEquals(shareMountTargetPrototypeModel.virtualNetworkInterface(), shareMountTargetVirtualNetworkInterfacePrototypeModel); @@ -116,7 +118,7 @@ public void testSharePrototypeShareContext() throws Throwable { assertEquals(zoneIdentityModel.name(), "us-south-1"); SharePrototypeShareContext sharePrototypeShareContextModel = new SharePrototypeShareContext.Builder() - .allowedTransitEncryptionModes(java.util.Arrays.asList("none")) + .allowedTransitEncryptionModes(java.util.Arrays.asList("ipsec")) .iops(Long.valueOf("100")) .mountTargets(java.util.Arrays.asList(shareMountTargetPrototypeModel)) .name("my-share") @@ -126,7 +128,7 @@ public void testSharePrototypeShareContext() throws Throwable { .userTags(java.util.Arrays.asList()) .zone(zoneIdentityModel) .build(); - assertEquals(sharePrototypeShareContextModel.allowedTransitEncryptionModes(), java.util.Arrays.asList("none")); + assertEquals(sharePrototypeShareContextModel.allowedTransitEncryptionModes(), java.util.Arrays.asList("ipsec")); assertEquals(sharePrototypeShareContextModel.iops(), Long.valueOf("100")); assertEquals(sharePrototypeShareContextModel.mountTargets(), java.util.Arrays.asList(shareMountTargetPrototypeModel)); assertEquals(sharePrototypeShareContextModel.name(), "my-share"); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeTest.java index aed4c944b8..b4f9a13966 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SharePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareReferenceTest.java index abd77b5b91..aefda8e619 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareRemoteTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareRemoteTest.java index eee0bdc62f..3c549145e8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareRemoteTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareRemoteTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareReplicationStatusReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareReplicationStatusReasonTest.java index 2065ff85da..9c4507cda8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareReplicationStatusReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareReplicationStatusReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotCollectionTest.java index 9e43610d34..18390f4d4d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotLifecycleReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotLifecycleReasonTest.java index cc6929581c..9de4707e13 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotLifecycleReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotLifecycleReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotPatchTest.java index ada2f1bfca..cf689321fb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -33,23 +33,28 @@ public class ShareSnapshotPatchTest { @Test public void testShareSnapshotPatch() throws Throwable { ShareSnapshotPatch shareSnapshotPatchModel = new ShareSnapshotPatch.Builder() + .name("my-share-snapshot") .userTags(java.util.Arrays.asList("testString")) .build(); + assertEquals(shareSnapshotPatchModel.name(), "my-share-snapshot"); assertEquals(shareSnapshotPatchModel.userTags(), java.util.Arrays.asList("testString")); String json = TestUtilities.serialize(shareSnapshotPatchModel); ShareSnapshotPatch shareSnapshotPatchModelNew = TestUtilities.deserialize(json, ShareSnapshotPatch.class); assertTrue(shareSnapshotPatchModelNew instanceof ShareSnapshotPatch); + assertEquals(shareSnapshotPatchModelNew.name(), "my-share-snapshot"); } @Test public void testShareSnapshotPatchAsPatch() throws Throwable { ShareSnapshotPatch shareSnapshotPatchModel = new ShareSnapshotPatch.Builder() + .name("my-share-snapshot") .userTags(java.util.Arrays.asList("testString")) .build(); Map mergePatch = shareSnapshotPatchModel.asPatch(); + assertEquals(mergePatch.get("name"), "my-share-snapshot"); assertTrue(mergePatch.containsKey("user_tags")); } diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotStatusReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotStatusReasonTest.java index 38eb7d32d1..3ccca200bb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotStatusReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotStatusReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotTest.java index ed8f07f93d..58143dcea2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSnapshotTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRNTest.java index 899a386300..cd387f8ef2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHrefTest.java index 8df1af68ab..fa9f0f38cb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByIdTest.java index ad7620f495..22b21d878c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityTest.java index 1f70011bf2..07dbcd025c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeShareSnapshotIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeTest.java index 2deb4d7cc7..29b872d524 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotShareSnapshotReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotShareSnapshotReferenceTest.java index 029c66089f..80fbcfca02 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotShareSnapshotReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotShareSnapshotReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotTest.java index b5c063b884..facc8d02f8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareSourceSnapshotTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareTest.java index 2d3ff04f04..98a86feb1d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ShareTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -54,7 +54,10 @@ public void testShare() throws Throwable { assertNull(shareModel.getAccessControlMode()); assertNull(shareModel.getAccessorBindingRole()); assertNull(shareModel.getAccessorBindings()); + assertNull(shareModel.getAllowedAccessProtocols()); assertNull(shareModel.getAllowedTransitEncryptionModes()); + assertNull(shareModel.getAvailabilityMode()); + assertNull(shareModel.getBandwidth()); assertNull(shareModel.getCreatedAt()); assertNull(shareModel.getCrn()); assertNull(shareModel.getEncryption()); @@ -83,6 +86,7 @@ public void testShare() throws Throwable { assertNull(shareModel.getSnapshotSize()); assertNull(shareModel.getSourceShare()); assertNull(shareModel.getSourceSnapshot()); + assertNull(shareModel.getStorageGeneration()); assertNull(shareModel.getUserTags()); assertNull(shareModel.getZone()); } diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotAllowedUsePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotAllowedUsePatchTest.java new file mode 100644 index 0000000000..3737c05251 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotAllowedUsePatchTest.java @@ -0,0 +1,51 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.SnapshotAllowedUsePatch; +import com.ibm.cloud.is.vpc.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 SnapshotAllowedUsePatch model. + */ +public class SnapshotAllowedUsePatchTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testSnapshotAllowedUsePatch() throws Throwable { + SnapshotAllowedUsePatch snapshotAllowedUsePatchModel = new SnapshotAllowedUsePatch.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(snapshotAllowedUsePatchModel.apiVersion(), "2024-06-23"); + assertEquals(snapshotAllowedUsePatchModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(snapshotAllowedUsePatchModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + + String json = TestUtilities.serialize(snapshotAllowedUsePatchModel); + + SnapshotAllowedUsePatch snapshotAllowedUsePatchModelNew = TestUtilities.deserialize(json, SnapshotAllowedUsePatch.class); + assertTrue(snapshotAllowedUsePatchModelNew instanceof SnapshotAllowedUsePatch); + assertEquals(snapshotAllowedUsePatchModelNew.apiVersion(), "2024-06-23"); + assertEquals(snapshotAllowedUsePatchModelNew.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(snapshotAllowedUsePatchModelNew.instance(), "gpu.count > 0 && enable_secure_boot == true"); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotAllowedUsePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotAllowedUsePrototypeTest.java new file mode 100644 index 0000000000..ef71f89e5b --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotAllowedUsePrototypeTest.java @@ -0,0 +1,51 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.SnapshotAllowedUsePrototype; +import com.ibm.cloud.is.vpc.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 SnapshotAllowedUsePrototype model. + */ +public class SnapshotAllowedUsePrototypeTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testSnapshotAllowedUsePrototype() throws Throwable { + SnapshotAllowedUsePrototype snapshotAllowedUsePrototypeModel = new SnapshotAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(snapshotAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(snapshotAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(snapshotAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + + String json = TestUtilities.serialize(snapshotAllowedUsePrototypeModel); + + SnapshotAllowedUsePrototype snapshotAllowedUsePrototypeModelNew = TestUtilities.deserialize(json, SnapshotAllowedUsePrototype.class); + assertTrue(snapshotAllowedUsePrototypeModelNew instanceof SnapshotAllowedUsePrototype); + assertEquals(snapshotAllowedUsePrototypeModelNew.apiVersion(), "2024-06-23"); + assertEquals(snapshotAllowedUsePrototypeModelNew.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(snapshotAllowedUsePrototypeModelNew.instance(), "gpu.count > 0 && enable_secure_boot == true"); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotAllowedUseTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotAllowedUseTest.java new file mode 100644 index 0000000000..6b1b5768a3 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotAllowedUseTest.java @@ -0,0 +1,39 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.SnapshotAllowedUse; +import com.ibm.cloud.is.vpc.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 SnapshotAllowedUse model. + */ +public class SnapshotAllowedUseTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testSnapshotAllowedUse() throws Throwable { + SnapshotAllowedUse snapshotAllowedUseModel = new SnapshotAllowedUse(); + assertNull(snapshotAllowedUseModel.getApiVersion()); + assertNull(snapshotAllowedUseModel.getBareMetalServer()); + assertNull(snapshotAllowedUseModel.getInstance()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCatalogOfferingTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCatalogOfferingTest.java index f20996faf6..871ef94b04 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCatalogOfferingTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCatalogOfferingTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCloneCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCloneCollectionTest.java index 328e837819..48c5f2e0cb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCloneCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCloneCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotClonePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotClonePrototypeTest.java index cf4d6db8a0..ebd42f75d1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotClonePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotClonePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCloneTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCloneTest.java index aacee88214..70e8a2dc41 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCloneTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCloneTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCollectionTest.java index 1545dd48ed..b1ab0362cf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -27,6 +27,7 @@ import com.ibm.cloud.is.vpc.v1.model.RegionReference; import com.ibm.cloud.is.vpc.v1.model.ResourceGroupReference; import com.ibm.cloud.is.vpc.v1.model.Snapshot; +import com.ibm.cloud.is.vpc.v1.model.SnapshotAllowedUse; import com.ibm.cloud.is.vpc.v1.model.SnapshotCatalogOffering; import com.ibm.cloud.is.vpc.v1.model.SnapshotClone; import com.ibm.cloud.is.vpc.v1.model.SnapshotCollection; diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupCollectionTest.java index f81da93427..b6ef464531 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupPatchTest.java index 5aa64e6157..feb530b7fd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshotsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshotsTest.java index 6bf7bfc7e9..12a17307ae 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshotsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshotsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupPrototypeTest.java index 22bbe123f3..bd1880013f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupReferenceTest.java index ba51ea4ea7..441a88e5ac 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupTest.java index c30f4c3929..e8be82bcd3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotConsistencyGroupTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCopiesItemTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCopiesItemTest.java index 625c98c651..fdb38b7009 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCopiesItemTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotCopiesItemTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityByCRNTest.java index 7edc908fc2..29aaaa3ff7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityByHrefTest.java index cd8f3507c1..c743c8381f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityByIdTest.java index 50215f932c..f4bb965b0c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityTest.java index 86c049675a..228a745b8e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotInstanceProfileCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotInstanceProfileCollectionTest.java new file mode 100644 index 0000000000..c8c557d2a0 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotInstanceProfileCollectionTest.java @@ -0,0 +1,43 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.InstanceProfileReference; +import com.ibm.cloud.is.vpc.v1.model.PageLink; +import com.ibm.cloud.is.vpc.v1.model.SnapshotInstanceProfileCollection; +import com.ibm.cloud.is.vpc.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 SnapshotInstanceProfileCollection model. + */ +public class SnapshotInstanceProfileCollectionTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testSnapshotInstanceProfileCollection() throws Throwable { + SnapshotInstanceProfileCollection snapshotInstanceProfileCollectionModel = new SnapshotInstanceProfileCollection(); + assertNull(snapshotInstanceProfileCollectionModel.getFirst()); + assertNull(snapshotInstanceProfileCollectionModel.getInstanceProfiles()); + assertNull(snapshotInstanceProfileCollectionModel.getLimit()); + assertNull(snapshotInstanceProfileCollectionModel.getNext()); + assertNull(snapshotInstanceProfileCollectionModel.getTotalCount()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPatchTest.java index 8bf1445499..3502e03d3e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -13,6 +13,7 @@ package com.ibm.cloud.is.vpc.v1.model; +import com.ibm.cloud.is.vpc.v1.model.SnapshotAllowedUsePatch; import com.ibm.cloud.is.vpc.v1.model.SnapshotPatch; import com.ibm.cloud.is.vpc.v1.utils.TestUtilities; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; @@ -32,10 +33,21 @@ public class SnapshotPatchTest { @Test public void testSnapshotPatch() throws Throwable { + SnapshotAllowedUsePatch snapshotAllowedUsePatchModel = new SnapshotAllowedUsePatch.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(snapshotAllowedUsePatchModel.apiVersion(), "2024-06-23"); + assertEquals(snapshotAllowedUsePatchModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(snapshotAllowedUsePatchModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + SnapshotPatch snapshotPatchModel = new SnapshotPatch.Builder() + .allowedUse(snapshotAllowedUsePatchModel) .name("my-snapshot") .userTags(java.util.Arrays.asList("testString")) .build(); + assertEquals(snapshotPatchModel.allowedUse(), snapshotAllowedUsePatchModel); assertEquals(snapshotPatchModel.name(), "my-snapshot"); assertEquals(snapshotPatchModel.userTags(), java.util.Arrays.asList("testString")); @@ -43,17 +55,26 @@ public void testSnapshotPatch() throws Throwable { SnapshotPatch snapshotPatchModelNew = TestUtilities.deserialize(json, SnapshotPatch.class); assertTrue(snapshotPatchModelNew instanceof SnapshotPatch); + assertEquals(snapshotPatchModelNew.allowedUse().toString(), snapshotAllowedUsePatchModel.toString()); assertEquals(snapshotPatchModelNew.name(), "my-snapshot"); } @Test public void testSnapshotPatchAsPatch() throws Throwable { + SnapshotAllowedUsePatch snapshotAllowedUsePatchModel = new SnapshotAllowedUsePatch.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + SnapshotPatch snapshotPatchModel = new SnapshotPatch.Builder() + .allowedUse(snapshotAllowedUsePatchModel) .name("my-snapshot") .userTags(java.util.Arrays.asList("testString")) .build(); Map mergePatch = snapshotPatchModel.asPatch(); + assertTrue(mergePatch.containsKey("allowed_use")); assertEquals(mergePatch.get("name"), "my-snapshot"); assertTrue(mergePatch.containsKey("user_tags")); } diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeSnapshotBySourceSnapshotTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeSnapshotBySourceSnapshotTest.java index 19c1042a2f..fa7733c8a7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeSnapshotBySourceSnapshotTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeSnapshotBySourceSnapshotTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -15,6 +15,7 @@ import com.ibm.cloud.is.vpc.v1.model.EncryptionKeyIdentityByCRN; import com.ibm.cloud.is.vpc.v1.model.ResourceGroupIdentityById; +import com.ibm.cloud.is.vpc.v1.model.SnapshotAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.SnapshotClonePrototype; import com.ibm.cloud.is.vpc.v1.model.SnapshotIdentityByCRN; import com.ibm.cloud.is.vpc.v1.model.SnapshotPrototypeSnapshotBySourceSnapshot; @@ -36,6 +37,15 @@ public class SnapshotPrototypeSnapshotBySourceSnapshotTest { @Test public void testSnapshotPrototypeSnapshotBySourceSnapshot() throws Throwable { + SnapshotAllowedUsePrototype snapshotAllowedUsePrototypeModel = new SnapshotAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(snapshotAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(snapshotAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(snapshotAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() .name("us-south-1") .build(); @@ -62,6 +72,7 @@ public void testSnapshotPrototypeSnapshotBySourceSnapshot() throws Throwable { assertEquals(snapshotIdentityByCrnModel.crn(), "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-f6bfa329-0e36-433f-a3bb-0df632e79263"); SnapshotPrototypeSnapshotBySourceSnapshot snapshotPrototypeSnapshotBySourceSnapshotModel = new SnapshotPrototypeSnapshotBySourceSnapshot.Builder() + .allowedUse(snapshotAllowedUsePrototypeModel) .clones(java.util.Arrays.asList(snapshotClonePrototypeModel)) .name("my-snapshot") .resourceGroup(resourceGroupIdentityModel) @@ -69,6 +80,7 @@ public void testSnapshotPrototypeSnapshotBySourceSnapshot() throws Throwable { .encryptionKey(encryptionKeyIdentityModel) .sourceSnapshot(snapshotIdentityByCrnModel) .build(); + assertEquals(snapshotPrototypeSnapshotBySourceSnapshotModel.allowedUse(), snapshotAllowedUsePrototypeModel); assertEquals(snapshotPrototypeSnapshotBySourceSnapshotModel.clones(), java.util.Arrays.asList(snapshotClonePrototypeModel)); assertEquals(snapshotPrototypeSnapshotBySourceSnapshotModel.name(), "my-snapshot"); assertEquals(snapshotPrototypeSnapshotBySourceSnapshotModel.resourceGroup(), resourceGroupIdentityModel); @@ -80,6 +92,7 @@ public void testSnapshotPrototypeSnapshotBySourceSnapshot() throws Throwable { SnapshotPrototypeSnapshotBySourceSnapshot snapshotPrototypeSnapshotBySourceSnapshotModelNew = TestUtilities.deserialize(json, SnapshotPrototypeSnapshotBySourceSnapshot.class); assertTrue(snapshotPrototypeSnapshotBySourceSnapshotModelNew instanceof SnapshotPrototypeSnapshotBySourceSnapshot); + assertEquals(snapshotPrototypeSnapshotBySourceSnapshotModelNew.allowedUse().toString(), snapshotAllowedUsePrototypeModel.toString()); assertEquals(snapshotPrototypeSnapshotBySourceSnapshotModelNew.name(), "my-snapshot"); assertEquals(snapshotPrototypeSnapshotBySourceSnapshotModelNew.resourceGroup().toString(), resourceGroupIdentityModel.toString()); assertEquals(snapshotPrototypeSnapshotBySourceSnapshotModelNew.encryptionKey().toString(), encryptionKeyIdentityModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeSnapshotBySourceVolumeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeSnapshotBySourceVolumeTest.java index 044b35929a..eab7726b21 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeSnapshotBySourceVolumeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeSnapshotBySourceVolumeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -14,6 +14,7 @@ package com.ibm.cloud.is.vpc.v1.model; import com.ibm.cloud.is.vpc.v1.model.ResourceGroupIdentityById; +import com.ibm.cloud.is.vpc.v1.model.SnapshotAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.SnapshotClonePrototype; import com.ibm.cloud.is.vpc.v1.model.SnapshotPrototypeSnapshotBySourceVolume; import com.ibm.cloud.is.vpc.v1.model.VolumeIdentityById; @@ -35,6 +36,15 @@ public class SnapshotPrototypeSnapshotBySourceVolumeTest { @Test public void testSnapshotPrototypeSnapshotBySourceVolume() throws Throwable { + SnapshotAllowedUsePrototype snapshotAllowedUsePrototypeModel = new SnapshotAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(snapshotAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(snapshotAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(snapshotAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + ZoneIdentityByName zoneIdentityModel = new ZoneIdentityByName.Builder() .name("us-south-1") .build(); @@ -56,12 +66,14 @@ public void testSnapshotPrototypeSnapshotBySourceVolume() throws Throwable { assertEquals(volumeIdentityModel.id(), "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"); SnapshotPrototypeSnapshotBySourceVolume snapshotPrototypeSnapshotBySourceVolumeModel = new SnapshotPrototypeSnapshotBySourceVolume.Builder() + .allowedUse(snapshotAllowedUsePrototypeModel) .clones(java.util.Arrays.asList(snapshotClonePrototypeModel)) .name("my-snapshot") .resourceGroup(resourceGroupIdentityModel) .userTags(java.util.Arrays.asList()) .sourceVolume(volumeIdentityModel) .build(); + assertEquals(snapshotPrototypeSnapshotBySourceVolumeModel.allowedUse(), snapshotAllowedUsePrototypeModel); assertEquals(snapshotPrototypeSnapshotBySourceVolumeModel.clones(), java.util.Arrays.asList(snapshotClonePrototypeModel)); assertEquals(snapshotPrototypeSnapshotBySourceVolumeModel.name(), "my-snapshot"); assertEquals(snapshotPrototypeSnapshotBySourceVolumeModel.resourceGroup(), resourceGroupIdentityModel); @@ -72,6 +84,7 @@ public void testSnapshotPrototypeSnapshotBySourceVolume() throws Throwable { SnapshotPrototypeSnapshotBySourceVolume snapshotPrototypeSnapshotBySourceVolumeModelNew = TestUtilities.deserialize(json, SnapshotPrototypeSnapshotBySourceVolume.class); assertTrue(snapshotPrototypeSnapshotBySourceVolumeModelNew instanceof SnapshotPrototypeSnapshotBySourceVolume); + assertEquals(snapshotPrototypeSnapshotBySourceVolumeModelNew.allowedUse().toString(), snapshotAllowedUsePrototypeModel.toString()); assertEquals(snapshotPrototypeSnapshotBySourceVolumeModelNew.name(), "my-snapshot"); assertEquals(snapshotPrototypeSnapshotBySourceVolumeModelNew.resourceGroup().toString(), resourceGroupIdentityModel.toString()); assertEquals(snapshotPrototypeSnapshotBySourceVolumeModelNew.sourceVolume().toString(), volumeIdentityModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeSnapshotConsistencyGroupContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeSnapshotConsistencyGroupContextTest.java index 995e0f136a..fa98944f8c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeSnapshotConsistencyGroupContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeSnapshotConsistencyGroupContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeTest.java index f43c64dba5..f9be8242d6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -14,6 +14,7 @@ package com.ibm.cloud.is.vpc.v1.model; import com.ibm.cloud.is.vpc.v1.model.ResourceGroupIdentityById; +import com.ibm.cloud.is.vpc.v1.model.SnapshotAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.SnapshotClonePrototype; import com.ibm.cloud.is.vpc.v1.model.SnapshotPrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeIdentityById; diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotReferenceTest.java index 97e9ea2b3d..585b735b56 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotRemoteTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotRemoteTest.java index b017b2ca5b..7459aa564a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotRemoteTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotRemoteTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotSourceSnapshotTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotSourceSnapshotTest.java index 5a04fc3504..b73286794f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotSourceSnapshotTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotSourceSnapshotTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotTest.java index 174abc0167..e27de5192d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SnapshotTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -26,6 +26,7 @@ import com.ibm.cloud.is.vpc.v1.model.RegionReference; import com.ibm.cloud.is.vpc.v1.model.ResourceGroupReference; import com.ibm.cloud.is.vpc.v1.model.Snapshot; +import com.ibm.cloud.is.vpc.v1.model.SnapshotAllowedUse; import com.ibm.cloud.is.vpc.v1.model.SnapshotCatalogOffering; import com.ibm.cloud.is.vpc.v1.model.SnapshotClone; import com.ibm.cloud.is.vpc.v1.model.SnapshotConsistencyGroupReference; @@ -54,6 +55,7 @@ public class SnapshotTest { @Test public void testSnapshot() throws Throwable { Snapshot snapshotModel = new Snapshot(); + assertNull(snapshotModel.getAllowedUse()); assertNull(snapshotModel.getBackupPolicyPlan()); assertNull(snapshotModel.isBootable()); assertNull(snapshotModel.getCapturedAt()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/StartBareMetalServerOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/StartBareMetalServerOptionsTest.java index f71c91d35f..2aa13bb619 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/StartBareMetalServerOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/StartBareMetalServerOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/StopBareMetalServerOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/StopBareMetalServerOptionsTest.java index ff65359e5d..54d896e0b3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/StopBareMetalServerOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/StopBareMetalServerOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetCollectionTest.java index f7943243d6..557049ed35 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityByCRNTest.java index b1961399a2..107fdee994 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityByHrefTest.java index e4b049d7bd..a638983984 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityByIdTest.java index 8d516dbe1d..cb0fb6c60c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityTest.java index efedd33ef9..8ca9687ce9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPatchTest.java index 0323ade758..ef7c6ec0af 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPrototypeSubnetByCIDRTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPrototypeSubnetByCIDRTest.java index 60660d12ed..bc089fc043 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPrototypeSubnetByCIDRTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPrototypeSubnetByCIDRTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPrototypeSubnetByTotalCountTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPrototypeSubnetByTotalCountTest.java index 285d0cfa29..120da3f2fb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPrototypeSubnetByTotalCountTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPrototypeSubnetByTotalCountTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPrototypeTest.java index 7773ccecee..eb55e3b41e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchPublicGatewayIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchPublicGatewayIdentityByCRNTest.java index c39f26aa6b..19789a1e1c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchPublicGatewayIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchPublicGatewayIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchPublicGatewayIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchPublicGatewayIdentityByHrefTest.java index 6356d5e0ba..09478d119f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchPublicGatewayIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchPublicGatewayIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchPublicGatewayIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchPublicGatewayIdentityByIdTest.java index a5bc218a86..3f48467108 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchPublicGatewayIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchPublicGatewayIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchTest.java index d742273a48..98ba7bcf67 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetPublicGatewayPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetReferenceTest.java index 2003d02a55..b9e084190c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetTest.java index bbdb22b09f..514bc368df 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/SubnetTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileIdentityByCRNTest.java index a807e02fbe..4371f8f2a8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileIdentityByIdTest.java index 776b0646ce..5770e3bf0e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileIdentityTest.java index 6fcf941443..55a5447784 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileReferenceTest.java index 96a71257f2..4efe416502 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/TrustedProfileReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UnpublishPrivatePathServiceGatewayOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UnpublishPrivatePathServiceGatewayOptionsTest.java index 96abbc0d5c..a749a81460 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UnpublishPrivatePathServiceGatewayOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UnpublishPrivatePathServiceGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UnsetSubnetPublicGatewayOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UnsetSubnetPublicGatewayOptionsTest.java index 8a8dc05618..d7df0c2666 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UnsetSubnetPublicGatewayOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UnsetSubnetPublicGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateBackupPolicyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateBackupPolicyOptionsTest.java index 37fb4b5772..242bb7e7fe 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateBackupPolicyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateBackupPolicyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateBackupPolicyPlanOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateBackupPolicyPlanOptionsTest.java index 3d2e56f146..3420b73063 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateBackupPolicyPlanOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateBackupPolicyPlanOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerDiskOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerDiskOptionsTest.java index 3516996416..289d7a9faf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerDiskOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerDiskOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerNetworkAttachmentOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerNetworkAttachmentOptionsTest.java index e177bd0a80..fc773f8bd6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerNetworkAttachmentOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerNetworkAttachmentOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerNetworkInterfaceOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerNetworkInterfaceOptionsTest.java index 0d06864767..999814b272 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerNetworkInterfaceOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerNetworkInterfaceOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerOptionsTest.java index 9f7838de60..2b25075909 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateBareMetalServerOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkInterfaceOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkInterfaceOptionsTest.java index 6fc8cdf787..38cce6fc72 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkInterfaceOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkInterfaceOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkOptionsTest.java index 7ce698f7cf..ddebaa552c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkSubnetOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkSubnetOptionsTest.java index 14e8865465..0b020cefaa 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkSubnetOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkSubnetOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkSubnetReservedIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkSubnetReservedIpOptionsTest.java index 4e36e4564e..adf738ae93 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkSubnetReservedIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateClusterNetworkSubnetReservedIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateDedicatedHostDiskOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateDedicatedHostDiskOptionsTest.java index acb41170e5..54ac7222b6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateDedicatedHostDiskOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateDedicatedHostDiskOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateDedicatedHostGroupOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateDedicatedHostGroupOptionsTest.java index 31f300111d..fef7a5ea76 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateDedicatedHostGroupOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateDedicatedHostGroupOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateDedicatedHostOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateDedicatedHostOptionsTest.java index bfc9c2ea1c..86ceee218e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateDedicatedHostOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateDedicatedHostOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateEndpointGatewayOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateEndpointGatewayOptionsTest.java index ad65bce031..d0db6d4b9d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateEndpointGatewayOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateEndpointGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateFirmwareForBareMetalServerOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateFirmwareForBareMetalServerOptionsTest.java index c80b5cbb8b..512a6b66dc 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateFirmwareForBareMetalServerOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateFirmwareForBareMetalServerOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateFloatingIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateFloatingIpOptionsTest.java index 87af6c26ad..f0bf7fb21e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateFloatingIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateFloatingIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateFlowLogCollectorOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateFlowLogCollectorOptionsTest.java index 173b576061..2dbea90d50 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateFlowLogCollectorOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateFlowLogCollectorOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateIkePolicyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateIkePolicyOptionsTest.java index 929e344ecf..0b481b0e01 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateIkePolicyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateIkePolicyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateImageExportJobOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateImageExportJobOptionsTest.java index 95022917bd..9509cf0dd9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateImageExportJobOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateImageExportJobOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateImageOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateImageOptionsTest.java index 1c3eb41233..3ca9807fef 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateImageOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateImageOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceClusterNetworkAttachmentOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceClusterNetworkAttachmentOptionsTest.java index 2d0b25c161..5795bbe902 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceClusterNetworkAttachmentOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceClusterNetworkAttachmentOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceDiskOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceDiskOptionsTest.java index 17e0fe7719..958b6728bf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceDiskOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceDiskOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupManagerActionOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupManagerActionOptionsTest.java index 348292c2e9..b3a5c21d92 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupManagerActionOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupManagerActionOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupManagerOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupManagerOptionsTest.java index bf7729827b..5006eca988 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupManagerOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupManagerOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupManagerPolicyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupManagerPolicyOptionsTest.java index 86d0ee6453..c0a8560b80 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupManagerPolicyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupManagerPolicyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupMembershipOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupMembershipOptionsTest.java index 97e0142f78..ddb8e79785 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupMembershipOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupMembershipOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupOptionsTest.java index 169e50f9ae..fa104d1749 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceGroupOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceNetworkAttachmentOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceNetworkAttachmentOptionsTest.java index f34964324b..1bff2de34a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceNetworkAttachmentOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceNetworkAttachmentOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceNetworkInterfaceOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceNetworkInterfaceOptionsTest.java index b115a81f8f..1f4f9fbbf7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceNetworkInterfaceOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceNetworkInterfaceOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceOptionsTest.java index 203f650939..f99180ea81 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceTemplateOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceTemplateOptionsTest.java index 05cb4be113..09440d350c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceTemplateOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceTemplateOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceVolumeAttachmentOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceVolumeAttachmentOptionsTest.java index 4b7dd5c1a0..26bbfc489b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceVolumeAttachmentOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateInstanceVolumeAttachmentOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateIpsecPolicyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateIpsecPolicyOptionsTest.java index 3511271887..31d80d68b3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateIpsecPolicyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateIpsecPolicyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateKeyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateKeyOptionsTest.java index 8c55c83067..3546a21834 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateKeyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateKeyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerListenerOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerListenerOptionsTest.java index 9e089f4cfa..0ecedfc6dc 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerListenerOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerListenerOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerListenerPolicyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerListenerPolicyOptionsTest.java index 443b41096f..ae19ef3d33 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerListenerPolicyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerListenerPolicyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerListenerPolicyRuleOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerListenerPolicyRuleOptionsTest.java index c60a19a2e1..6deded9ca9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerListenerPolicyRuleOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerListenerPolicyRuleOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerOptionsTest.java index 599a16dfc6..8d0972da85 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerPoolMemberOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerPoolMemberOptionsTest.java index 4b8eeac47f..fe1218fd39 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerPoolMemberOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerPoolMemberOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerPoolOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerPoolOptionsTest.java index bc766c934e..b2576aee8f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerPoolOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateLoadBalancerPoolOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateNetworkAclOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateNetworkAclOptionsTest.java index 8832315e47..5487f3bbf0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateNetworkAclOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateNetworkAclOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateNetworkAclRuleOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateNetworkAclRuleOptionsTest.java index 7acaf56cbb..c5f348f724 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateNetworkAclRuleOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateNetworkAclRuleOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdatePlacementGroupOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdatePlacementGroupOptionsTest.java index 9dce6bcc3d..1c458410fd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdatePlacementGroupOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdatePlacementGroupOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdatePrivatePathServiceGatewayAccountPolicyOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdatePrivatePathServiceGatewayAccountPolicyOptionsTest.java index be3d77f019..a044824cce 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdatePrivatePathServiceGatewayAccountPolicyOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdatePrivatePathServiceGatewayAccountPolicyOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdatePrivatePathServiceGatewayOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdatePrivatePathServiceGatewayOptionsTest.java index a6f7c5048e..04e41b9a03 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdatePrivatePathServiceGatewayOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdatePrivatePathServiceGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdatePublicAddressRangeOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdatePublicAddressRangeOptionsTest.java index ccf69fa8d1..59ca6cebda 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdatePublicAddressRangeOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdatePublicAddressRangeOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdatePublicGatewayOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdatePublicGatewayOptionsTest.java index 2d50286963..8685963c3b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdatePublicGatewayOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdatePublicGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateReservationOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateReservationOptionsTest.java index 5909224691..d586f452cc 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateReservationOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateReservationOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateSecurityGroupOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateSecurityGroupOptionsTest.java index fe41e150e0..b3720ec678 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateSecurityGroupOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateSecurityGroupOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateSecurityGroupRuleOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateSecurityGroupRuleOptionsTest.java index ade5099035..be5c0f9cb3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateSecurityGroupRuleOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateSecurityGroupRuleOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateShareMountTargetOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateShareMountTargetOptionsTest.java index bbd34b9fb3..4204c8c8e5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateShareMountTargetOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateShareMountTargetOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateShareOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateShareOptionsTest.java index 68319059e0..81093dde17 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateShareOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateShareOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateShareSnapshotOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateShareSnapshotOptionsTest.java index 8ce85261f2..96d3cc2d4d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateShareSnapshotOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateShareSnapshotOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateSnapshotConsistencyGroupOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateSnapshotConsistencyGroupOptionsTest.java index 496c5e7388..a535c6e60b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateSnapshotConsistencyGroupOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateSnapshotConsistencyGroupOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateSnapshotOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateSnapshotOptionsTest.java index f261e7a477..cb7805ead5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateSnapshotOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateSnapshotOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateSubnetOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateSubnetOptionsTest.java index 2e9b70dd81..86b337b4a1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateSubnetOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateSubnetOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateSubnetReservedIpOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateSubnetReservedIpOptionsTest.java index 343761e82a..1b73d5569c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateSubnetReservedIpOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateSubnetReservedIpOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVirtualNetworkInterfaceOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVirtualNetworkInterfaceOptionsTest.java index 11ff4642fe..72aeb664e9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVirtualNetworkInterfaceOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVirtualNetworkInterfaceOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVolumeOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVolumeOptionsTest.java index a221808f9d..fee13ab58f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVolumeOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVolumeOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcAddressPrefixOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcAddressPrefixOptionsTest.java index 5e1ea9de4d..de55808383 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcAddressPrefixOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcAddressPrefixOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcDnsResolutionBindingOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcDnsResolutionBindingOptionsTest.java index f7e130ee41..3700be9b7e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcDnsResolutionBindingOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcDnsResolutionBindingOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcOptionsTest.java index 13c98c5070..6afd44a5f7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRouteOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRouteOptionsTest.java index 13c6449930..244d71eca9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRouteOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRouteOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRouteResponseTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRouteResponseTest.java new file mode 100644 index 0000000000..531a1991ee --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRouteResponseTest.java @@ -0,0 +1,53 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.Deleted; +import com.ibm.cloud.is.vpc.v1.model.RouteCreatorVPNGatewayReference; +import com.ibm.cloud.is.vpc.v1.model.RouteNextHopIP; +import com.ibm.cloud.is.vpc.v1.model.UpdateVpcRouteResponse; +import com.ibm.cloud.is.vpc.v1.model.ZoneReference; +import com.ibm.cloud.is.vpc.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 UpdateVpcRouteResponse model. + */ +public class UpdateVpcRouteResponseTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testUpdateVpcRouteResponse() throws Throwable { + UpdateVpcRouteResponse updateVpcRouteResponseModel = new UpdateVpcRouteResponse(); + assertNull(updateVpcRouteResponseModel.getAction()); + assertNull(updateVpcRouteResponseModel.isAdvertise()); + assertNull(updateVpcRouteResponseModel.getCreatedAt()); + assertNull(updateVpcRouteResponseModel.getCreator()); + assertNull(updateVpcRouteResponseModel.getDestination()); + assertNull(updateVpcRouteResponseModel.getHref()); + assertNull(updateVpcRouteResponseModel.getId()); + assertNull(updateVpcRouteResponseModel.getLifecycleState()); + assertNull(updateVpcRouteResponseModel.getName()); + assertNull(updateVpcRouteResponseModel.getNextHop()); + assertNull(updateVpcRouteResponseModel.getOrigin()); + assertNull(updateVpcRouteResponseModel.getPriority()); + assertNull(updateVpcRouteResponseModel.getZone()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRoutingTableOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRoutingTableOptionsTest.java index 4f02fadd38..4acf8b92da 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRoutingTableOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRoutingTableOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRoutingTableRouteOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRoutingTableRouteOptionsTest.java index 0e90534d88..dad9e008b3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRoutingTableRouteOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpcRoutingTableRouteOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnGatewayConnectionOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnGatewayConnectionOptionsTest.java index 4f27e50504..19fa88974b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnGatewayConnectionOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnGatewayConnectionOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,10 +35,12 @@ public void testUpdateVpnGatewayConnectionOptions() throws Throwable { .vpnGatewayId("testString") .id("testString") .vpnGatewayConnectionPatch(java.util.Collections.singletonMap("anyKey", "anyValue")) + .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"") .build(); assertEquals(updateVpnGatewayConnectionOptionsModel.vpnGatewayId(), "testString"); assertEquals(updateVpnGatewayConnectionOptionsModel.id(), "testString"); assertEquals(updateVpnGatewayConnectionOptionsModel.vpnGatewayConnectionPatch(), java.util.Collections.singletonMap("anyKey", "anyValue")); + assertEquals(updateVpnGatewayConnectionOptionsModel.ifMatch(), "W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\""); } @Test(expectedExceptions = IllegalArgumentException.class) diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnGatewayOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnGatewayOptionsTest.java index ba4f50f2b1..7159a7d53e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnGatewayOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnGatewayOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnServerOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnServerOptionsTest.java index 9cb9371262..1c2e076a89 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnServerOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnServerOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnServerRouteOptionsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnServerRouteOptionsTest.java index 7ab516e7ee..3dbd29debf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnServerRouteOptionsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/UpdateVpnServerRouteOptionsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VCPUTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VCPUTest.java index 5d10e81d08..4e4dcbe634 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VCPUTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VCPUTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCCSESourceIPTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCCSESourceIPTest.java index 1a043311ca..c703f7c356 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCCSESourceIPTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCCSESourceIPTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCCollectionTest.java index 079426db9c..1df79fc8b4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSPatchTest.java index 3c1f71aabf..cf511030cf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSPrototypeTest.java index f4f2ff4d20..bad2d18f53 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingCollectionTest.java index 3f7cad5c69..c55f8e105e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingHealthReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingHealthReasonTest.java index 905cdb9883..4a5a5930a2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingHealthReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingHealthReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingPatchTest.java index 169a6580f3..cd183ad2e8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingTest.java index 5e95141d56..a7582db48f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolutionBindingTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPatchTest.java index 324d07d2ff..8a0b2153e3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPrototypeTest.java index 7fb5cc6806..b88f42e8e1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototypeTest.java index 7d2dcc1d78..990dce18bd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototypeTest.java index a59a5b2a12..0f5b369198 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTest.java index 29a514d248..538372422f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTypeDelegatedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTypeDelegatedTest.java index 945512392b..a193d3369a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTypeDelegatedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTypeDelegatedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTypeManualTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTypeManualTest.java index 8d7fe9b58a..02d0b72d7e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTypeManualTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTypeManualTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTypeSystemTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTypeSystemTest.java index 478cb121c6..f60384b923 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTypeSystemTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverTypeSystemTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchTest.java index 592ababbe1..901fe38868 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchVPCIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchVPCIdentityByCRNTest.java index 941cf0f1c8..36f3a27187 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchVPCIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchVPCIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchVPCIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchVPCIdentityByHrefTest.java index 38bfdf71b6..178973a70e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchVPCIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchVPCIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchVPCIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchVPCIdentityByIdTest.java index 7a869dcf95..c362c8947d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchVPCIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSResolverVPCPatchVPCIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSTest.java index 530c0ae65d..607a027874 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCDNSTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCHealthReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCHealthReasonTest.java index 847032bce6..5a8dc86153 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCHealthReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCHealthReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityByCRNTest.java index 1d5c025c89..eb91fab952 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityByHrefTest.java index 2bc1da5817..c8ca0b042f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityByIdTest.java index a6ded9bdb5..0a627df353 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityTest.java index b30c29ee5d..57432c0604 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCPatchTest.java index 72dcfa9111..a871fe718e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCReferenceDNSResolverContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCReferenceDNSResolverContextTest.java index 851f23b5df..eda4a7b1c0 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCReferenceDNSResolverContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCReferenceDNSResolverContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCReferenceRemoteTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCReferenceRemoteTest.java index d2f8e50b8f..0f99f23107 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCReferenceRemoteTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCReferenceRemoteTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCReferenceTest.java index 08b8cdd1f7..2ec913a8cd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCRemoteTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCRemoteTest.java index 4a7c77729c..5d963488d9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCRemoteTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCRemoteTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCTest.java index d4b5fa7400..b46679b420 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPCTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayAdvertisedCIDRCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayAdvertisedCIDRCollectionTest.java new file mode 100644 index 0000000000..03bcd3ef80 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayAdvertisedCIDRCollectionTest.java @@ -0,0 +1,37 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayAdvertisedCIDRCollection; +import com.ibm.cloud.is.vpc.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 VPNGatewayAdvertisedCIDRCollection model. + */ +public class VPNGatewayAdvertisedCIDRCollectionTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testVPNGatewayAdvertisedCIDRCollection() throws Throwable { + VPNGatewayAdvertisedCIDRCollection vpnGatewayAdvertisedCidrCollectionModel = new VPNGatewayAdvertisedCIDRCollection(); + assertNull(vpnGatewayAdvertisedCidrCollectionModel.getAdvertisedCidrs()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayCollectionTest.java index 66c22ae167..1adc5a207d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -27,7 +27,7 @@ import com.ibm.cloud.is.vpc.v1.model.VPNGatewayMember; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayMemberHealthReason; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayMemberLifecycleReason; -import com.ibm.cloud.is.vpc.v1.model.VPNGatewayPolicyMode; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayRouteMode; import com.ibm.cloud.is.vpc.v1.utils.TestUtilities; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; import com.ibm.cloud.sdk.core.util.DateUtils; diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionCIDRsTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionCIDRsTest.java index e465d63304..abfe0bd210 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionCIDRsTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionCIDRsTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionCollectionTest.java index fd37b1fdbb..612de48142 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDPDPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDPDPatchTest.java index e5f2a8813a..9f4d4ee42d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDPDPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDPDPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDPDPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDPDPrototypeTest.java index 5ec71a4989..3768cd3260 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDPDPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDPDPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDPDTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDPDTest.java index 96912dd18c..5330f80146 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDPDTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDPDTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModeLocalPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModeLocalPrototypeTest.java new file mode 100644 index 0000000000..91151a5fc6 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModeLocalPrototypeTest.java @@ -0,0 +1,52 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDynamicRouteModeLocalPrototype; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN; +import com.ibm.cloud.is.vpc.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 VPNGatewayConnectionDynamicRouteModeLocalPrototype model. + */ +public class VPNGatewayConnectionDynamicRouteModeLocalPrototypeTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testVPNGatewayConnectionDynamicRouteModeLocalPrototype() throws Throwable { + VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN vpnGatewayConnectionIkeIdentityPrototypeModel = new VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN.Builder() + .type("fqdn") + .value("my-service.example.com") + .build(); + assertEquals(vpnGatewayConnectionIkeIdentityPrototypeModel.type(), "fqdn"); + assertEquals(vpnGatewayConnectionIkeIdentityPrototypeModel.value(), "my-service.example.com"); + + VPNGatewayConnectionDynamicRouteModeLocalPrototype vpnGatewayConnectionDynamicRouteModeLocalPrototypeModel = new VPNGatewayConnectionDynamicRouteModeLocalPrototype.Builder() + .ikeIdentities(java.util.Arrays.asList(vpnGatewayConnectionIkeIdentityPrototypeModel)) + .build(); + assertEquals(vpnGatewayConnectionDynamicRouteModeLocalPrototypeModel.ikeIdentities(), java.util.Arrays.asList(vpnGatewayConnectionIkeIdentityPrototypeModel)); + + String json = TestUtilities.serialize(vpnGatewayConnectionDynamicRouteModeLocalPrototypeModel); + + VPNGatewayConnectionDynamicRouteModeLocalPrototype vpnGatewayConnectionDynamicRouteModeLocalPrototypeModelNew = TestUtilities.deserialize(json, VPNGatewayConnectionDynamicRouteModeLocalPrototype.class); + assertTrue(vpnGatewayConnectionDynamicRouteModeLocalPrototypeModelNew instanceof VPNGatewayConnectionDynamicRouteModeLocalPrototype); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModeLocalTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModeLocalTest.java new file mode 100644 index 0000000000..94bee6aaa8 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModeLocalTest.java @@ -0,0 +1,38 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDynamicRouteModeLocal; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN; +import com.ibm.cloud.is.vpc.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 VPNGatewayConnectionDynamicRouteModeLocal model. + */ +public class VPNGatewayConnectionDynamicRouteModeLocalTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testVPNGatewayConnectionDynamicRouteModeLocal() throws Throwable { + VPNGatewayConnectionDynamicRouteModeLocal vpnGatewayConnectionDynamicRouteModeLocalModel = new VPNGatewayConnectionDynamicRouteModeLocal(); + assertNull(vpnGatewayConnectionDynamicRouteModeLocalModel.getIkeIdentities()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerPrototypeTest.java new file mode 100644 index 0000000000..8a10e81286 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerPrototypeTest.java @@ -0,0 +1,39 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDynamicRouteModePeerPrototype; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN; +import com.ibm.cloud.is.vpc.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 VPNGatewayConnectionDynamicRouteModePeerPrototype model. + */ +public class VPNGatewayConnectionDynamicRouteModePeerPrototypeTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + // TODO: Add tests for models that are abstract + @Test + public void testVPNGatewayConnectionDynamicRouteModePeerPrototype() throws Throwable { + VPNGatewayConnectionDynamicRouteModePeerPrototype vpnGatewayConnectionDynamicRouteModePeerPrototypeModel = new VPNGatewayConnectionDynamicRouteModePeerPrototype(); + assertNotNull(vpnGatewayConnectionDynamicRouteModePeerPrototypeModel); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddressTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddressTest.java new file mode 100644 index 0000000000..5c8af7c089 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddressTest.java @@ -0,0 +1,65 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN; +import com.ibm.cloud.is.vpc.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 VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress model. + */ +public class VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddressTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testVPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress() throws Throwable { + VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN vpnGatewayConnectionIkeIdentityPrototypeModel = new VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN.Builder() + .type("fqdn") + .value("my-service.example.com") + .build(); + assertEquals(vpnGatewayConnectionIkeIdentityPrototypeModel.type(), "fqdn"); + assertEquals(vpnGatewayConnectionIkeIdentityPrototypeModel.value(), "my-service.example.com"); + + VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByAddressModel = new VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress.Builder() + .asn(Long.valueOf("26")) + .ikeIdentity(vpnGatewayConnectionIkeIdentityPrototypeModel) + .address("192.0.2.5") + .build(); + assertEquals(vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByAddressModel.asn(), Long.valueOf("26")); + assertEquals(vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByAddressModel.ikeIdentity(), vpnGatewayConnectionIkeIdentityPrototypeModel); + assertEquals(vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByAddressModel.address(), "192.0.2.5"); + + String json = TestUtilities.serialize(vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByAddressModel); + + VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByAddressModelNew = TestUtilities.deserialize(json, VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress.class); + assertTrue(vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByAddressModelNew instanceof VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress); + assertEquals(vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByAddressModelNew.asn(), Long.valueOf("26")); + assertEquals(vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByAddressModelNew.ikeIdentity().toString(), vpnGatewayConnectionIkeIdentityPrototypeModel.toString()); + assertEquals(vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByAddressModelNew.address(), "192.0.2.5"); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testVPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddressError() throws Throwable { + new VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress.Builder().build(); + } + +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDNTest.java new file mode 100644 index 0000000000..8b7dcb8c7e --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDNTest.java @@ -0,0 +1,65 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN; +import com.ibm.cloud.is.vpc.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 VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN model. + */ +public class VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDNTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testVPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN() throws Throwable { + VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN vpnGatewayConnectionIkeIdentityPrototypeModel = new VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN.Builder() + .type("fqdn") + .value("my-service.example.com") + .build(); + assertEquals(vpnGatewayConnectionIkeIdentityPrototypeModel.type(), "fqdn"); + assertEquals(vpnGatewayConnectionIkeIdentityPrototypeModel.value(), "my-service.example.com"); + + VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByFqdnModel = new VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN.Builder() + .asn(Long.valueOf("26")) + .ikeIdentity(vpnGatewayConnectionIkeIdentityPrototypeModel) + .fqdn("my-service.example.com") + .build(); + assertEquals(vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByFqdnModel.asn(), Long.valueOf("26")); + assertEquals(vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByFqdnModel.ikeIdentity(), vpnGatewayConnectionIkeIdentityPrototypeModel); + assertEquals(vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByFqdnModel.fqdn(), "my-service.example.com"); + + String json = TestUtilities.serialize(vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByFqdnModel); + + VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByFqdnModelNew = TestUtilities.deserialize(json, VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN.class); + assertTrue(vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByFqdnModelNew instanceof VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN); + assertEquals(vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByFqdnModelNew.asn(), Long.valueOf("26")); + assertEquals(vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByFqdnModelNew.ikeIdentity().toString(), vpnGatewayConnectionIkeIdentityPrototypeModel.toString()); + assertEquals(vpnGatewayConnectionDynamicRouteModePeerPrototypeVpnGatewayConnectionPeerByFqdnModelNew.fqdn(), "my-service.example.com"); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testVPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDNError() throws Throwable { + new VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN.Builder().build(); + } + +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerTest.java new file mode 100644 index 0000000000..f5432c810b --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerTest.java @@ -0,0 +1,39 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDynamicRouteModePeer; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN; +import com.ibm.cloud.is.vpc.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 VPNGatewayConnectionDynamicRouteModePeer model. + */ +public class VPNGatewayConnectionDynamicRouteModePeerTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + // TODO: Add tests for models that are abstract + @Test + public void testVPNGatewayConnectionDynamicRouteModePeer() throws Throwable { + VPNGatewayConnectionDynamicRouteModePeer vpnGatewayConnectionDynamicRouteModePeerModel = new VPNGatewayConnectionDynamicRouteModePeer(); + assertNotNull(vpnGatewayConnectionDynamicRouteModePeerModel); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddressTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddressTest.java new file mode 100644 index 0000000000..73bbfa4b45 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddressTest.java @@ -0,0 +1,41 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddress; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN; +import com.ibm.cloud.is.vpc.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 VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddress model. + */ +public class VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddressTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testVPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddress() throws Throwable { + VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddress vpnGatewayConnectionDynamicRouteModePeerVpnGatewayConnectionPeerByAddressModel = new VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddress(); + assertNull(vpnGatewayConnectionDynamicRouteModePeerVpnGatewayConnectionPeerByAddressModel.getAsn()); + assertNull(vpnGatewayConnectionDynamicRouteModePeerVpnGatewayConnectionPeerByAddressModel.getIkeIdentity()); + assertNull(vpnGatewayConnectionDynamicRouteModePeerVpnGatewayConnectionPeerByAddressModel.getType()); + assertNull(vpnGatewayConnectionDynamicRouteModePeerVpnGatewayConnectionPeerByAddressModel.getAddress()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFQDNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFQDNTest.java new file mode 100644 index 0000000000..820f9cd6f9 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFQDNTest.java @@ -0,0 +1,41 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFQDN; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN; +import com.ibm.cloud.is.vpc.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 VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFQDN model. + */ +public class VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFQDNTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testVPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFQDN() throws Throwable { + VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFQDN vpnGatewayConnectionDynamicRouteModePeerVpnGatewayConnectionPeerByFqdnModel = new VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFQDN(); + assertNull(vpnGatewayConnectionDynamicRouteModePeerVpnGatewayConnectionPeerByFqdnModel.getAsn()); + assertNull(vpnGatewayConnectionDynamicRouteModePeerVpnGatewayConnectionPeerByFqdnModel.getIkeIdentity()); + assertNull(vpnGatewayConnectionDynamicRouteModePeerVpnGatewayConnectionPeerByFqdnModel.getType()); + assertNull(vpnGatewayConnectionDynamicRouteModePeerVpnGatewayConnectionPeerByFqdnModel.getFqdn()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModeTunnelTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModeTunnelTest.java new file mode 100644 index 0000000000..4b6860ddd5 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionDynamicRouteModeTunnelTest.java @@ -0,0 +1,44 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.IP; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDynamicRouteModeTunnel; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionTunnelStatusReason; +import com.ibm.cloud.is.vpc.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 VPNGatewayConnectionDynamicRouteModeTunnel model. + */ +public class VPNGatewayConnectionDynamicRouteModeTunnelTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testVPNGatewayConnectionDynamicRouteModeTunnel() throws Throwable { + VPNGatewayConnectionDynamicRouteModeTunnel vpnGatewayConnectionDynamicRouteModeTunnelModel = new VPNGatewayConnectionDynamicRouteModeTunnel(); + assertNull(vpnGatewayConnectionDynamicRouteModeTunnelModel.getNeighborIp()); + assertNull(vpnGatewayConnectionDynamicRouteModeTunnelModel.getProtocolState()); + assertNull(vpnGatewayConnectionDynamicRouteModeTunnelModel.getPublicIp()); + assertNull(vpnGatewayConnectionDynamicRouteModeTunnelModel.getStatus()); + assertNull(vpnGatewayConnectionDynamicRouteModeTunnelModel.getStatusReasons()); + assertNull(vpnGatewayConnectionDynamicRouteModeTunnelModel.getTunnelInterfaceIp()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeTest.java index f9eac6c4b7..04746c890a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDNTest.java index 2a1a00c3da..7fc0ae8739 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostnameTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostnameTest.java index acd016fa9f..41510caab9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostnameTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostnameTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4Test.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4Test.java index da03bef976..490c6226e9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4Test.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4Test.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyIDTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyIDTest.java index 271d84b173..1293583a49 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyIDTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyIDTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityTest.java index 32a2f5d361..f489eb1c8d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDNTest.java index 0b0ab24871..d139053bed 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostnameTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostnameTest.java index 29b4f3bd22..43c5137e5c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostnameTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostnameTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4Test.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4Test.java index 997f57958f..a0f0fce7ff 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4Test.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4Test.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyIDTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyIDTest.java index d1dc260b10..4ff3ff215e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyIDTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyIDTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHrefTest.java index 51adb1f103..72c265b0c3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByIdTest.java index 8746803320..230c0f432f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPatchTest.java index 2910e8214c..5c183e48df 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHrefTest.java index 3ec58ba9d0..87545e550e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByIdTest.java index 1cc867471b..2044fd57e4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPrototypeTest.java index 0a128272b5..98345bf4c3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIKEPolicyPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHrefTest.java index 5ba482de8b..a80b54edb6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByIdTest.java index 03762b65d8..0228d52150 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPatchTest.java index 97ddb15485..0fd6e28594 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHrefTest.java index febabe5e0a..d2c5b0e3bb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByIdTest.java index 2b6352cac4..8ea2e56dd7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPrototypeTest.java index 860ef6e12e..390c853399 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionIPsecPolicyPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPatchTest.java index 0e08655d90..66a25e0703 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -13,11 +13,13 @@ package com.ibm.cloud.is.vpc.v1.model; +import com.ibm.cloud.is.vpc.v1.model.IP; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDPDPatch; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionPatch; import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionTunnel; import com.ibm.cloud.is.vpc.v1.utils.TestUtilities; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; import java.io.InputStream; @@ -60,6 +62,18 @@ public void testVPNGatewayConnectionPatch() throws Throwable { .build(); assertEquals(vpnGatewayConnectionPeerPatchModel.address(), "192.0.2.5"); + IP ipModel = new IP.Builder() + .address("169.254.0.2") + .build(); + assertEquals(ipModel.address(), "169.254.0.2"); + + VPNGatewayConnectionTunnel vpnGatewayConnectionTunnelModel = new VPNGatewayConnectionTunnel.Builder() + .neighborIp(ipModel) + .tunnelInterfaceIp(ipModel) + .build(); + assertEquals(vpnGatewayConnectionTunnelModel.neighborIp(), ipModel); + assertEquals(vpnGatewayConnectionTunnelModel.tunnelInterfaceIp(), ipModel); + VPNGatewayConnectionPatch vpnGatewayConnectionPatchModel = new VPNGatewayConnectionPatch.Builder() .adminStateUp(true) .deadPeerDetection(vpnGatewayConnectionDpdPatchModel) @@ -70,6 +84,8 @@ public void testVPNGatewayConnectionPatch() throws Throwable { .name("my-vpn-gateway-connection") .peer(vpnGatewayConnectionPeerPatchModel) .psk("lkj14b1oi0alcniejkso") + .routingProtocol("bgp") + .tunnels(java.util.Arrays.asList(vpnGatewayConnectionTunnelModel)) .build(); assertEquals(vpnGatewayConnectionPatchModel.adminStateUp(), Boolean.valueOf(true)); assertEquals(vpnGatewayConnectionPatchModel.deadPeerDetection(), vpnGatewayConnectionDpdPatchModel); @@ -80,6 +96,8 @@ public void testVPNGatewayConnectionPatch() throws Throwable { assertEquals(vpnGatewayConnectionPatchModel.name(), "my-vpn-gateway-connection"); assertEquals(vpnGatewayConnectionPatchModel.peer(), vpnGatewayConnectionPeerPatchModel); assertEquals(vpnGatewayConnectionPatchModel.psk(), "lkj14b1oi0alcniejkso"); + assertEquals(vpnGatewayConnectionPatchModel.routingProtocol(), "bgp"); + assertEquals(vpnGatewayConnectionPatchModel.tunnels(), java.util.Arrays.asList(vpnGatewayConnectionTunnelModel)); String json = TestUtilities.serialize(vpnGatewayConnectionPatchModel); @@ -94,6 +112,7 @@ public void testVPNGatewayConnectionPatch() throws Throwable { assertEquals(vpnGatewayConnectionPatchModelNew.name(), "my-vpn-gateway-connection"); assertEquals(vpnGatewayConnectionPatchModelNew.peer().toString(), vpnGatewayConnectionPeerPatchModel.toString()); assertEquals(vpnGatewayConnectionPatchModelNew.psk(), "lkj14b1oi0alcniejkso"); + assertEquals(vpnGatewayConnectionPatchModelNew.routingProtocol(), "bgp"); } @Test public void testVPNGatewayConnectionPatchAsPatch() throws Throwable { @@ -115,6 +134,15 @@ public void testVPNGatewayConnectionPatchAsPatch() throws Throwable { .address("192.0.2.5") .build(); + IP ipModel = new IP.Builder() + .address("169.254.0.2") + .build(); + + VPNGatewayConnectionTunnel vpnGatewayConnectionTunnelModel = new VPNGatewayConnectionTunnel.Builder() + .neighborIp(ipModel) + .tunnelInterfaceIp(ipModel) + .build(); + VPNGatewayConnectionPatch vpnGatewayConnectionPatchModel = new VPNGatewayConnectionPatch.Builder() .adminStateUp(true) .deadPeerDetection(vpnGatewayConnectionDpdPatchModel) @@ -125,6 +153,8 @@ public void testVPNGatewayConnectionPatchAsPatch() throws Throwable { .name("my-vpn-gateway-connection") .peer(vpnGatewayConnectionPeerPatchModel) .psk("lkj14b1oi0alcniejkso") + .routingProtocol("bgp") + .tunnels(java.util.Arrays.asList(vpnGatewayConnectionTunnelModel)) .build(); Map mergePatch = vpnGatewayConnectionPatchModel.asPatch(); @@ -138,6 +168,8 @@ public void testVPNGatewayConnectionPatchAsPatch() throws Throwable { assertEquals(mergePatch.get("name"), "my-vpn-gateway-connection"); assertTrue(mergePatch.containsKey("peer")); assertEquals(mergePatch.get("psk"), "lkj14b1oi0alcniejkso"); + assertEquals(mergePatch.get("routing_protocol"), "bgp"); + assertTrue(mergePatch.containsKey("tunnels")); } } \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchTest.java index 0436750354..dcd9474048 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchTest.java new file mode 100644 index 0000000000..9b02898db5 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchTest.java @@ -0,0 +1,38 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch; +import com.ibm.cloud.is.vpc.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 VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch model. + */ +public class VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + // TODO: Add tests for models that are abstract + @Test + public void testVPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch() throws Throwable { + VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchModel = new VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch(); + assertNotNull(vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchModel); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatchTest.java new file mode 100644 index 0000000000..99046371a0 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatchTest.java @@ -0,0 +1,48 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch; +import com.ibm.cloud.is.vpc.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 VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch model. + */ +public class VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatchTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testVPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch() throws Throwable { + VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionPeerAddressPatchModel = new VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch.Builder() + .asn(Long.valueOf("26")) + .address("192.0.2.5") + .build(); + assertEquals(vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionPeerAddressPatchModel.asn(), Long.valueOf("26")); + assertEquals(vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionPeerAddressPatchModel.address(), "192.0.2.5"); + + String json = TestUtilities.serialize(vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionPeerAddressPatchModel); + + VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionPeerAddressPatchModelNew = TestUtilities.deserialize(json, VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch.class); + assertTrue(vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionPeerAddressPatchModelNew instanceof VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch); + assertEquals(vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionPeerAddressPatchModelNew.asn(), Long.valueOf("26")); + assertEquals(vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionPeerAddressPatchModelNew.address(), "192.0.2.5"); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatchTest.java new file mode 100644 index 0000000000..b4b879cbd9 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatchTest.java @@ -0,0 +1,48 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch; +import com.ibm.cloud.is.vpc.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 VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch model. + */ +public class VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatchTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testVPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch() throws Throwable { + VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionPeerFqdnPatchModel = new VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch.Builder() + .asn(Long.valueOf("26")) + .fqdn("my-service.example.com") + .build(); + assertEquals(vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionPeerFqdnPatchModel.asn(), Long.valueOf("26")); + assertEquals(vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionPeerFqdnPatchModel.fqdn(), "my-service.example.com"); + + String json = TestUtilities.serialize(vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionPeerFqdnPatchModel); + + VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionPeerFqdnPatchModelNew = TestUtilities.deserialize(json, VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch.class); + assertTrue(vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionPeerFqdnPatchModelNew instanceof VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch); + assertEquals(vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionPeerFqdnPatchModelNew.asn(), Long.valueOf("26")); + assertEquals(vpnGatewayConnectionPeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionDynamicRouteModePeerPatchVpnGatewayConnectionPeerFqdnPatchModelNew.fqdn(), "my-service.example.com"); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchTest.java index 14306b53db..2471382cc8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatchTest.java index 9416668aa6..77a951b05a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatchTest.java index fa35ae6f53..cea810db88 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchTest.java index c6cdf40832..954cc0f915 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatchTest.java index ddad8c1b8a..d9086d9dd1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatchTest.java index 90a3fd9e95..a1d10fbbc2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModeLocalPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModeLocalPrototypeTest.java index c8024c4bde..4300f26d8f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModeLocalPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModeLocalPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModeLocalTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModeLocalTest.java index 4661277f5a..919b320ccd 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModeLocalTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModeLocalTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerPrototypeTest.java index 627149ce42..b993823b90 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddressTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddressTest.java index 27e4e2af7c..795a6fa94e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddressTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddressTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDNTest.java index 399300b5cb..99a35425ed 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerTest.java index 206b874549..4a26c4e4bf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddressTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddressTest.java index a58f5d12e3..b2281134c4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddressTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddressTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDNTest.java index 453364a4f5..84173a7dda 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModeTest.java index 2aa2ff57e1..617d380db2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPolicyModeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeTest.java index b4e29fde36..daa0d49c5c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototypeTest.java new file mode 100644 index 0000000000..f79c76d911 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototypeTest.java @@ -0,0 +1,143 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.IP; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDPDPrototype; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDynamicRouteModeLocalPrototype; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionTunnelPrototype; +import com.ibm.cloud.is.vpc.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 VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype model. + */ +public class VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototypeTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testVPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype() throws Throwable { + VPNGatewayConnectionDPDPrototype vpnGatewayConnectionDpdPrototypeModel = new VPNGatewayConnectionDPDPrototype.Builder() + .action("restart") + .interval(Long.valueOf("30")) + .timeout(Long.valueOf("120")) + .build(); + assertEquals(vpnGatewayConnectionDpdPrototypeModel.action(), "restart"); + assertEquals(vpnGatewayConnectionDpdPrototypeModel.interval(), Long.valueOf("30")); + assertEquals(vpnGatewayConnectionDpdPrototypeModel.timeout(), Long.valueOf("120")); + + VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById vpnGatewayConnectionIkePolicyPrototypeModel = new VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById.Builder() + .id("r006-e98f46a3-1e4e-4195-b4e5-b8155192689d") + .build(); + assertEquals(vpnGatewayConnectionIkePolicyPrototypeModel.id(), "r006-e98f46a3-1e4e-4195-b4e5-b8155192689d"); + + VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById vpnGatewayConnectionIPsecPolicyPrototypeModel = new VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById.Builder() + .id("r006-51eae621-dbbc-4c47-b623-b57a43c19876") + .build(); + assertEquals(vpnGatewayConnectionIPsecPolicyPrototypeModel.id(), "r006-51eae621-dbbc-4c47-b623-b57a43c19876"); + + VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN vpnGatewayConnectionIkeIdentityPrototypeModel = new VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN.Builder() + .type("fqdn") + .value("my-service.example.com") + .build(); + assertEquals(vpnGatewayConnectionIkeIdentityPrototypeModel.type(), "fqdn"); + assertEquals(vpnGatewayConnectionIkeIdentityPrototypeModel.value(), "my-service.example.com"); + + VPNGatewayConnectionDynamicRouteModeLocalPrototype vpnGatewayConnectionDynamicRouteModeLocalPrototypeModel = new VPNGatewayConnectionDynamicRouteModeLocalPrototype.Builder() + .ikeIdentities(java.util.Arrays.asList(vpnGatewayConnectionIkeIdentityPrototypeModel)) + .build(); + assertEquals(vpnGatewayConnectionDynamicRouteModeLocalPrototypeModel.ikeIdentities(), java.util.Arrays.asList(vpnGatewayConnectionIkeIdentityPrototypeModel)); + + VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress vpnGatewayConnectionDynamicRouteModePeerPrototypeModel = new VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress.Builder() + .asn(Long.valueOf("26")) + .ikeIdentity(vpnGatewayConnectionIkeIdentityPrototypeModel) + .address("192.0.2.5") + .build(); + assertEquals(vpnGatewayConnectionDynamicRouteModePeerPrototypeModel.asn(), Long.valueOf("26")); + assertEquals(vpnGatewayConnectionDynamicRouteModePeerPrototypeModel.ikeIdentity(), vpnGatewayConnectionIkeIdentityPrototypeModel); + assertEquals(vpnGatewayConnectionDynamicRouteModePeerPrototypeModel.address(), "192.0.2.5"); + + IP ipModel = new IP.Builder() + .address("169.254.0.2") + .build(); + assertEquals(ipModel.address(), "169.254.0.2"); + + VPNGatewayConnectionTunnelPrototype vpnGatewayConnectionTunnelPrototypeModel = new VPNGatewayConnectionTunnelPrototype.Builder() + .neighborIp(ipModel) + .tunnelInterfaceIp(ipModel) + .build(); + assertEquals(vpnGatewayConnectionTunnelPrototypeModel.neighborIp(), ipModel); + assertEquals(vpnGatewayConnectionTunnelPrototypeModel.tunnelInterfaceIp(), ipModel); + + VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModel = new VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype.Builder() + .adminStateUp(true) + .deadPeerDetection(vpnGatewayConnectionDpdPrototypeModel) + .establishMode("bidirectional") + .ikePolicy(vpnGatewayConnectionIkePolicyPrototypeModel) + .ipsecPolicy(vpnGatewayConnectionIPsecPolicyPrototypeModel) + .name("my-vpn-gateway-connection") + .psk("lkj14b1oi0alcniejkso") + .distributeTraffic(false) + .local(vpnGatewayConnectionDynamicRouteModeLocalPrototypeModel) + .peer(vpnGatewayConnectionDynamicRouteModePeerPrototypeModel) + .routingProtocol("bgp") + .tunnels(java.util.Arrays.asList(vpnGatewayConnectionTunnelPrototypeModel)) + .build(); + assertEquals(vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModel.adminStateUp(), Boolean.valueOf(true)); + assertEquals(vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModel.deadPeerDetection(), vpnGatewayConnectionDpdPrototypeModel); + assertEquals(vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModel.establishMode(), "bidirectional"); + assertEquals(vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModel.ikePolicy(), vpnGatewayConnectionIkePolicyPrototypeModel); + assertEquals(vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModel.ipsecPolicy(), vpnGatewayConnectionIPsecPolicyPrototypeModel); + assertEquals(vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModel.name(), "my-vpn-gateway-connection"); + assertEquals(vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModel.psk(), "lkj14b1oi0alcniejkso"); + assertEquals(vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModel.distributeTraffic(), Boolean.valueOf(false)); + assertEquals(vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModel.local(), vpnGatewayConnectionDynamicRouteModeLocalPrototypeModel); + assertEquals(vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModel.peer(), vpnGatewayConnectionDynamicRouteModePeerPrototypeModel); + assertEquals(vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModel.routingProtocol(), "bgp"); + assertEquals(vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModel.tunnels(), java.util.Arrays.asList(vpnGatewayConnectionTunnelPrototypeModel)); + + String json = TestUtilities.serialize(vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModel); + + VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModelNew = TestUtilities.deserialize(json, VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype.class); + assertTrue(vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModelNew instanceof VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype); + assertEquals(vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModelNew.adminStateUp(), Boolean.valueOf(true)); + assertEquals(vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModelNew.deadPeerDetection().toString(), vpnGatewayConnectionDpdPrototypeModel.toString()); + assertEquals(vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModelNew.establishMode(), "bidirectional"); + assertEquals(vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModelNew.ikePolicy().toString(), vpnGatewayConnectionIkePolicyPrototypeModel.toString()); + assertEquals(vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModelNew.ipsecPolicy().toString(), vpnGatewayConnectionIPsecPolicyPrototypeModel.toString()); + assertEquals(vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModelNew.name(), "my-vpn-gateway-connection"); + assertEquals(vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModelNew.psk(), "lkj14b1oi0alcniejkso"); + assertEquals(vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModelNew.distributeTraffic(), Boolean.valueOf(false)); + assertEquals(vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModelNew.local().toString(), vpnGatewayConnectionDynamicRouteModeLocalPrototypeModel.toString()); + assertEquals(vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModelNew.peer().toString(), vpnGatewayConnectionDynamicRouteModePeerPrototypeModel.toString()); + assertEquals(vpnGatewayConnectionPrototypeVpnGatewayConnectionDynamicRouteModePrototypeModelNew.routingProtocol(), "bgp"); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testVPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototypeError() throws Throwable { + new VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype.Builder().build(); + } + +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototypeTest.java index a32b27881e..4809ac12dc 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototypeTest.java index a8b3bf7c5b..1eac296f1f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionReferenceTest.java index 7776f5778c..cd184ff8a5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionRouteModeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionRouteModeTest.java index 523f04116b..b613bbff2c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionRouteModeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionRouteModeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteModeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteModeTest.java new file mode 100644 index 0000000000..e3ea90031e --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteModeTest.java @@ -0,0 +1,67 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.Deleted; +import com.ibm.cloud.is.vpc.v1.model.IKEPolicyReference; +import com.ibm.cloud.is.vpc.v1.model.IP; +import com.ibm.cloud.is.vpc.v1.model.IPsecPolicyReference; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDPD; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDynamicRouteModeLocal; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddress; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionDynamicRouteModeTunnel; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionStatusReason; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionTunnelStatusReason; +import com.ibm.cloud.is.vpc.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 VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode model. + */ +public class VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteModeTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testVPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode() throws Throwable { + VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode vpnGatewayConnectionRouteModeVpnGatewayConnectionDynamicRouteModeModel = new VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode(); + assertNull(vpnGatewayConnectionRouteModeVpnGatewayConnectionDynamicRouteModeModel.isAdminStateUp()); + assertNull(vpnGatewayConnectionRouteModeVpnGatewayConnectionDynamicRouteModeModel.getAuthenticationMode()); + assertNull(vpnGatewayConnectionRouteModeVpnGatewayConnectionDynamicRouteModeModel.getCreatedAt()); + assertNull(vpnGatewayConnectionRouteModeVpnGatewayConnectionDynamicRouteModeModel.getDeadPeerDetection()); + assertNull(vpnGatewayConnectionRouteModeVpnGatewayConnectionDynamicRouteModeModel.getEstablishMode()); + assertNull(vpnGatewayConnectionRouteModeVpnGatewayConnectionDynamicRouteModeModel.getHref()); + assertNull(vpnGatewayConnectionRouteModeVpnGatewayConnectionDynamicRouteModeModel.getId()); + assertNull(vpnGatewayConnectionRouteModeVpnGatewayConnectionDynamicRouteModeModel.getIkePolicy()); + assertNull(vpnGatewayConnectionRouteModeVpnGatewayConnectionDynamicRouteModeModel.getIpsecPolicy()); + assertNull(vpnGatewayConnectionRouteModeVpnGatewayConnectionDynamicRouteModeModel.getMode()); + assertNull(vpnGatewayConnectionRouteModeVpnGatewayConnectionDynamicRouteModeModel.getName()); + assertNull(vpnGatewayConnectionRouteModeVpnGatewayConnectionDynamicRouteModeModel.getPsk()); + assertNull(vpnGatewayConnectionRouteModeVpnGatewayConnectionDynamicRouteModeModel.getResourceType()); + assertNull(vpnGatewayConnectionRouteModeVpnGatewayConnectionDynamicRouteModeModel.getStatus()); + assertNull(vpnGatewayConnectionRouteModeVpnGatewayConnectionDynamicRouteModeModel.getStatusReasons()); + assertNull(vpnGatewayConnectionRouteModeVpnGatewayConnectionDynamicRouteModeModel.isDistributeTraffic()); + assertNull(vpnGatewayConnectionRouteModeVpnGatewayConnectionDynamicRouteModeModel.getLocal()); + assertNull(vpnGatewayConnectionRouteModeVpnGatewayConnectionDynamicRouteModeModel.getPeer()); + assertNull(vpnGatewayConnectionRouteModeVpnGatewayConnectionDynamicRouteModeModel.getRoutingProtocol()); + assertNull(vpnGatewayConnectionRouteModeVpnGatewayConnectionDynamicRouteModeModel.getTunnels()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteModeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteModeTest.java index 222812d7a9..329c49ac42 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteModeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteModeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModeLocalPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModeLocalPrototypeTest.java index 48a12d16cf..0c3f248751 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModeLocalPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModeLocalPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModeLocalTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModeLocalTest.java index cf71a27486..0553e67ae7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModeLocalTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModeLocalTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerPrototypeTest.java index e9d046ea64..98c178bd3e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddressTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddressTest.java index 120f806992..d1914fc0ce 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddressTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddressTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDNTest.java index 35e4d13318..29da627614 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerTest.java index bb5a3e53dc..6bdb0e87ea 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddressTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddressTest.java index e7263d2316..ed0a2070f9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddressTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddressTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDNTest.java index 6579c79899..226ec419db 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModeTunnelTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModeTunnelTest.java index 7d59059967..a60564a468 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModeTunnelTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStaticRouteModeTunnelTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStatusReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStatusReasonTest.java index b595edc9a4..9fd6c63034 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStatusReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionStatusReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionTest.java index 49a4c2dd3e..793ea845d6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionTunnelPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionTunnelPrototypeTest.java new file mode 100644 index 0000000000..211492fc38 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionTunnelPrototypeTest.java @@ -0,0 +1,60 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.IP; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionTunnelPrototype; +import com.ibm.cloud.is.vpc.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 VPNGatewayConnectionTunnelPrototype model. + */ +public class VPNGatewayConnectionTunnelPrototypeTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testVPNGatewayConnectionTunnelPrototype() throws Throwable { + IP ipModel = new IP.Builder() + .address("169.254.0.2") + .build(); + assertEquals(ipModel.address(), "169.254.0.2"); + + VPNGatewayConnectionTunnelPrototype vpnGatewayConnectionTunnelPrototypeModel = new VPNGatewayConnectionTunnelPrototype.Builder() + .neighborIp(ipModel) + .tunnelInterfaceIp(ipModel) + .build(); + assertEquals(vpnGatewayConnectionTunnelPrototypeModel.neighborIp(), ipModel); + assertEquals(vpnGatewayConnectionTunnelPrototypeModel.tunnelInterfaceIp(), ipModel); + + String json = TestUtilities.serialize(vpnGatewayConnectionTunnelPrototypeModel); + + VPNGatewayConnectionTunnelPrototype vpnGatewayConnectionTunnelPrototypeModelNew = TestUtilities.deserialize(json, VPNGatewayConnectionTunnelPrototype.class); + assertTrue(vpnGatewayConnectionTunnelPrototypeModelNew instanceof VPNGatewayConnectionTunnelPrototype); + assertEquals(vpnGatewayConnectionTunnelPrototypeModelNew.neighborIp().toString(), ipModel.toString()); + assertEquals(vpnGatewayConnectionTunnelPrototypeModelNew.tunnelInterfaceIp().toString(), ipModel.toString()); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testVPNGatewayConnectionTunnelPrototypeError() throws Throwable { + new VPNGatewayConnectionTunnelPrototype.Builder().build(); + } + +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionTunnelStatusReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionTunnelStatusReasonTest.java index ce6ee380f7..68904f393d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionTunnelStatusReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionTunnelStatusReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionTunnelTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionTunnelTest.java new file mode 100644 index 0000000000..075a32a55c --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayConnectionTunnelTest.java @@ -0,0 +1,54 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.IP; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayConnectionTunnel; +import com.ibm.cloud.is.vpc.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 VPNGatewayConnectionTunnel model. + */ +public class VPNGatewayConnectionTunnelTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testVPNGatewayConnectionTunnel() throws Throwable { + IP ipModel = new IP.Builder() + .address("169.254.0.2") + .build(); + assertEquals(ipModel.address(), "169.254.0.2"); + + VPNGatewayConnectionTunnel vpnGatewayConnectionTunnelModel = new VPNGatewayConnectionTunnel.Builder() + .neighborIp(ipModel) + .tunnelInterfaceIp(ipModel) + .build(); + assertEquals(vpnGatewayConnectionTunnelModel.neighborIp(), ipModel); + assertEquals(vpnGatewayConnectionTunnelModel.tunnelInterfaceIp(), ipModel); + + String json = TestUtilities.serialize(vpnGatewayConnectionTunnelModel); + + VPNGatewayConnectionTunnel vpnGatewayConnectionTunnelModelNew = TestUtilities.deserialize(json, VPNGatewayConnectionTunnel.class); + assertTrue(vpnGatewayConnectionTunnelModelNew instanceof VPNGatewayConnectionTunnel); + assertEquals(vpnGatewayConnectionTunnelModelNew.neighborIp().toString(), ipModel.toString()); + assertEquals(vpnGatewayConnectionTunnelModelNew.tunnelInterfaceIp().toString(), ipModel.toString()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayHealthReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayHealthReasonTest.java index 8c61028ad7..41f04f5b88 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayHealthReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayHealthReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayLifecycleReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayLifecycleReasonTest.java index cbba7d22a2..1c107cddbf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayLifecycleReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayLifecycleReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayMemberHealthReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayMemberHealthReasonTest.java index cbc5f91de3..3c12fbca12 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayMemberHealthReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayMemberHealthReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayMemberLifecycleReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayMemberLifecycleReasonTest.java index 00e9ab0dfa..08aa44ef1b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayMemberLifecycleReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayMemberLifecycleReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayMemberTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayMemberTest.java index e1d2647a6d..f71c9956e9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayMemberTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayMemberTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPatchTest.java index 5d14374c5e..0fe78d14be 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -33,24 +33,29 @@ public class VPNGatewayPatchTest { @Test public void testVPNGatewayPatch() throws Throwable { VPNGatewayPatch vpnGatewayPatchModel = new VPNGatewayPatch.Builder() + .localAsn(Long.valueOf("64520")) .name("my-vpn-gateway") .build(); + assertEquals(vpnGatewayPatchModel.localAsn(), Long.valueOf("64520")); assertEquals(vpnGatewayPatchModel.name(), "my-vpn-gateway"); String json = TestUtilities.serialize(vpnGatewayPatchModel); VPNGatewayPatch vpnGatewayPatchModelNew = TestUtilities.deserialize(json, VPNGatewayPatch.class); assertTrue(vpnGatewayPatchModelNew instanceof VPNGatewayPatch); + assertEquals(vpnGatewayPatchModelNew.localAsn(), Long.valueOf("64520")); assertEquals(vpnGatewayPatchModelNew.name(), "my-vpn-gateway"); } @Test public void testVPNGatewayPatchAsPatch() throws Throwable { VPNGatewayPatch vpnGatewayPatchModel = new VPNGatewayPatch.Builder() + .localAsn(Long.valueOf("64520")) .name("my-vpn-gateway") .build(); Map mergePatch = vpnGatewayPatchModel.asPatch(); + assertTrue(mergePatch.containsKey("local_asn")); assertEquals(mergePatch.get("name"), "my-vpn-gateway"); } diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPolicyModeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPolicyModeTest.java index cd4b959444..e860c98d07 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPolicyModeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPolicyModeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPrototypeTest.java index 621c109ede..510379af4c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPrototypeVPNGatewayPolicyModePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPrototypeVPNGatewayPolicyModePrototypeTest.java index d8d386d807..f1fab09839 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPrototypeVPNGatewayPolicyModePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPrototypeVPNGatewayPolicyModePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPrototypeVPNGatewayRouteModePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPrototypeVPNGatewayRouteModePrototypeTest.java index 01a4ade68a..b644001af9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPrototypeVPNGatewayRouteModePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayPrototypeVPNGatewayRouteModePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -47,11 +47,15 @@ public void testVPNGatewayPrototypeVPNGatewayRouteModePrototype() throws Throwab .name("my-vpn-gateway") .resourceGroup(resourceGroupIdentityModel) .subnet(subnetIdentityModel) + .advertisedCidrs(java.util.Arrays.asList("192.168.3.0/24")) + .localAsn(Long.valueOf("64520")) .mode("route") .build(); assertEquals(vpnGatewayPrototypeVpnGatewayRouteModePrototypeModel.name(), "my-vpn-gateway"); assertEquals(vpnGatewayPrototypeVpnGatewayRouteModePrototypeModel.resourceGroup(), resourceGroupIdentityModel); assertEquals(vpnGatewayPrototypeVpnGatewayRouteModePrototypeModel.subnet(), subnetIdentityModel); + assertEquals(vpnGatewayPrototypeVpnGatewayRouteModePrototypeModel.advertisedCidrs(), java.util.Arrays.asList("192.168.3.0/24")); + assertEquals(vpnGatewayPrototypeVpnGatewayRouteModePrototypeModel.localAsn(), Long.valueOf("64520")); assertEquals(vpnGatewayPrototypeVpnGatewayRouteModePrototypeModel.mode(), "route"); String json = TestUtilities.serialize(vpnGatewayPrototypeVpnGatewayRouteModePrototypeModel); @@ -61,6 +65,7 @@ public void testVPNGatewayPrototypeVPNGatewayRouteModePrototype() throws Throwab assertEquals(vpnGatewayPrototypeVpnGatewayRouteModePrototypeModelNew.name(), "my-vpn-gateway"); assertEquals(vpnGatewayPrototypeVpnGatewayRouteModePrototypeModelNew.resourceGroup().toString(), resourceGroupIdentityModel.toString()); assertEquals(vpnGatewayPrototypeVpnGatewayRouteModePrototypeModelNew.subnet().toString(), subnetIdentityModel.toString()); + assertEquals(vpnGatewayPrototypeVpnGatewayRouteModePrototypeModelNew.localAsn(), Long.valueOf("64520")); assertEquals(vpnGatewayPrototypeVpnGatewayRouteModePrototypeModelNew.mode(), "route"); } diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayRouteModeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayRouteModeTest.java index 3f03401c2d..9b4d96774b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayRouteModeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayRouteModeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -59,6 +59,8 @@ public void testVPNGatewayRouteMode() throws Throwable { assertNull(vpnGatewayRouteModeModel.getResourceType()); assertNull(vpnGatewayRouteModeModel.getSubnet()); assertNull(vpnGatewayRouteModeModel.getVpc()); + assertNull(vpnGatewayRouteModeModel.getAdvertisedCidrs()); + assertNull(vpnGatewayRouteModeModel.getLocalAsn()); assertNull(vpnGatewayRouteModeModel.getMode()); } } \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionCollectionTest.java new file mode 100644 index 0000000000..7b4d83b557 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionCollectionTest.java @@ -0,0 +1,47 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.PageLink; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayServiceConnection; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayServiceConnectionCollection; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayServiceConnectionCreatorTransitGatewayReference; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayServiceConnectionLifecycleReason; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayServiceConnectionStatusReason; +import com.ibm.cloud.is.vpc.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 VPNGatewayServiceConnectionCollection model. + */ +public class VPNGatewayServiceConnectionCollectionTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testVPNGatewayServiceConnectionCollection() throws Throwable { + VPNGatewayServiceConnectionCollection vpnGatewayServiceConnectionCollectionModel = new VPNGatewayServiceConnectionCollection(); + assertNull(vpnGatewayServiceConnectionCollectionModel.getFirst()); + assertNull(vpnGatewayServiceConnectionCollectionModel.getLimit()); + assertNull(vpnGatewayServiceConnectionCollectionModel.getNext()); + assertNull(vpnGatewayServiceConnectionCollectionModel.getServiceConnections()); + assertNull(vpnGatewayServiceConnectionCollectionModel.getTotalCount()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionCreatorTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionCreatorTest.java new file mode 100644 index 0000000000..2b8a1a5733 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionCreatorTest.java @@ -0,0 +1,38 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayServiceConnectionCreator; +import com.ibm.cloud.is.vpc.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 VPNGatewayServiceConnectionCreator model. + */ +public class VPNGatewayServiceConnectionCreatorTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + // TODO: Add tests for models that are abstract + @Test + public void testVPNGatewayServiceConnectionCreator() throws Throwable { + VPNGatewayServiceConnectionCreator vpnGatewayServiceConnectionCreatorModel = new VPNGatewayServiceConnectionCreator(); + assertNotNull(vpnGatewayServiceConnectionCreatorModel); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionCreatorTransitGatewayReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionCreatorTransitGatewayReferenceTest.java new file mode 100644 index 0000000000..aa3af224dd --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionCreatorTransitGatewayReferenceTest.java @@ -0,0 +1,39 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayServiceConnectionCreatorTransitGatewayReference; +import com.ibm.cloud.is.vpc.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 VPNGatewayServiceConnectionCreatorTransitGatewayReference model. + */ +public class VPNGatewayServiceConnectionCreatorTransitGatewayReferenceTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testVPNGatewayServiceConnectionCreatorTransitGatewayReference() throws Throwable { + VPNGatewayServiceConnectionCreatorTransitGatewayReference vpnGatewayServiceConnectionCreatorTransitGatewayReferenceModel = new VPNGatewayServiceConnectionCreatorTransitGatewayReference(); + assertNull(vpnGatewayServiceConnectionCreatorTransitGatewayReferenceModel.getCrn()); + assertNull(vpnGatewayServiceConnectionCreatorTransitGatewayReferenceModel.getId()); + assertNull(vpnGatewayServiceConnectionCreatorTransitGatewayReferenceModel.getResourceType()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionLifecycleReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionLifecycleReasonTest.java new file mode 100644 index 0000000000..ef5e30a15f --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionLifecycleReasonTest.java @@ -0,0 +1,39 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayServiceConnectionLifecycleReason; +import com.ibm.cloud.is.vpc.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 VPNGatewayServiceConnectionLifecycleReason model. + */ +public class VPNGatewayServiceConnectionLifecycleReasonTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testVPNGatewayServiceConnectionLifecycleReason() throws Throwable { + VPNGatewayServiceConnectionLifecycleReason vpnGatewayServiceConnectionLifecycleReasonModel = new VPNGatewayServiceConnectionLifecycleReason(); + assertNull(vpnGatewayServiceConnectionLifecycleReasonModel.getCode()); + assertNull(vpnGatewayServiceConnectionLifecycleReasonModel.getMessage()); + assertNull(vpnGatewayServiceConnectionLifecycleReasonModel.getMoreInfo()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionStatusReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionStatusReasonTest.java new file mode 100644 index 0000000000..23eb448f52 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionStatusReasonTest.java @@ -0,0 +1,39 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayServiceConnectionStatusReason; +import com.ibm.cloud.is.vpc.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 VPNGatewayServiceConnectionStatusReason model. + */ +public class VPNGatewayServiceConnectionStatusReasonTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testVPNGatewayServiceConnectionStatusReason() throws Throwable { + VPNGatewayServiceConnectionStatusReason vpnGatewayServiceConnectionStatusReasonModel = new VPNGatewayServiceConnectionStatusReason(); + assertNull(vpnGatewayServiceConnectionStatusReasonModel.getCode()); + assertNull(vpnGatewayServiceConnectionStatusReasonModel.getMessage()); + assertNull(vpnGatewayServiceConnectionStatusReasonModel.getMoreInfo()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionTest.java new file mode 100644 index 0000000000..2f2a32834b --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayServiceConnectionTest.java @@ -0,0 +1,46 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayServiceConnection; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayServiceConnectionCreatorTransitGatewayReference; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayServiceConnectionLifecycleReason; +import com.ibm.cloud.is.vpc.v1.model.VPNGatewayServiceConnectionStatusReason; +import com.ibm.cloud.is.vpc.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 VPNGatewayServiceConnection model. + */ +public class VPNGatewayServiceConnectionTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testVPNGatewayServiceConnection() throws Throwable { + VPNGatewayServiceConnection vpnGatewayServiceConnectionModel = new VPNGatewayServiceConnection(); + assertNull(vpnGatewayServiceConnectionModel.getCreatedAt()); + assertNull(vpnGatewayServiceConnectionModel.getCreator()); + assertNull(vpnGatewayServiceConnectionModel.getId()); + assertNull(vpnGatewayServiceConnectionModel.getLifecycleReasons()); + assertNull(vpnGatewayServiceConnectionModel.getLifecycleState()); + assertNull(vpnGatewayServiceConnectionModel.getStatus()); + assertNull(vpnGatewayServiceConnectionModel.getStatusReasons()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayTest.java index 6bc259a52a..00073a1959 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNGatewayTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByCertificateTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByCertificateTest.java index 0a52827a70..667153a55b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByCertificateTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByCertificateTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByUsernameIdProviderByIAMTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByUsernameIdProviderByIAMTest.java index d305c93673..1e4cfda867 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByUsernameIdProviderByIAMTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByUsernameIdProviderByIAMTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByUsernameIdProviderTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByUsernameIdProviderTest.java index 1eb90da706..6e28d2641c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByUsernameIdProviderTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByUsernameIdProviderTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByUsernameTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByUsernameTest.java index 0d43ccf09d..dc95f319ea 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByUsernameTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationByUsernameTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationPrototypeTest.java index e38c463ba8..6ddfdafaaf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototypeTest.java index 6c8e2bc59f..01239edcab 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototypeTest.java index 883cee9196..2d5014aa29 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationTest.java index 19a6fd9813..df3ed60789 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerAuthenticationTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerClientCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerClientCollectionTest.java index cc914d0332..15cdcd879f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerClientCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerClientCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerClientTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerClientTest.java index 4bfe720d5d..18a795e86d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerClientTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerClientTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerCollectionTest.java index 39bd02dcb6..87b8fcaa60 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerHealthReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerHealthReasonTest.java index ffd85745f8..c19001e707 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerHealthReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerHealthReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerLifecycleReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerLifecycleReasonTest.java index c1ede80823..7f85c41acf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerLifecycleReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerLifecycleReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerPatchTest.java index 2359156372..86d0d04a2a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteCollectionTest.java index e6f7dfbc12..968c0a62df 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteHealthReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteHealthReasonTest.java index 0fa00722cc..3fdab7b53a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteHealthReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteHealthReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteLifecycleReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteLifecycleReasonTest.java index e48b7dc5f8..58e6113fa2 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteLifecycleReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteLifecycleReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRoutePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRoutePatchTest.java index 269167f4fd..97971277b9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRoutePatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRoutePatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteTest.java index d86b642a28..4daccb457f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerRouteTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerTest.java index 109cc20900..90405fc1f6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VPNServerTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceCollectionTest.java index 86dbc29f90..cd94db365a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHrefTest.java index d4b56388f6..e830fd7128 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByIdTest.java index d6381e7908..f206167379 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextTest.java index d576e5d230..b11b585562 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContextTest.java index f17d7697f2..675924dc13 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeTest.java index 51434a4060..3f3c702ff8 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceIPPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePatchTest.java index 2ae619e741..9b509e3a5c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHrefTest.java index 02aec2427c..c7a6553b8e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByIdTest.java index ff778e85b5..7af3831bae 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextTest.java index a11a0dd9cf..5df6bbe598 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContextTest.java index 63af76694b..f0e53d3649 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeTest.java index b7290ec6a0..5bfa161750 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfacePrimaryIPPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceReferenceAttachmentContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceReferenceAttachmentContextTest.java index 019d182884..dcd5437096 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceReferenceAttachmentContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceReferenceAttachmentContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContextTest.java index ca8c2096cb..ae157917cb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContextTest.java index 71b68c2a08..3d339ccb5d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetShareMountTargetReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetShareMountTargetReferenceTest.java index 4d638eed0a..dd5a8b9819 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetShareMountTargetReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetShareMountTargetReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetTest.java index 01d12f52f3..3574d1c05c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTargetTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTest.java index b6eeea5d79..3cb391e318 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VirtualNetworkInterfaceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAllowedUsePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAllowedUsePatchTest.java new file mode 100644 index 0000000000..3123494ec6 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAllowedUsePatchTest.java @@ -0,0 +1,51 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePatch; +import com.ibm.cloud.is.vpc.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 VolumeAllowedUsePatch model. + */ +public class VolumeAllowedUsePatchTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testVolumeAllowedUsePatch() throws Throwable { + VolumeAllowedUsePatch volumeAllowedUsePatchModel = new VolumeAllowedUsePatch.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(volumeAllowedUsePatchModel.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePatchModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePatchModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + + String json = TestUtilities.serialize(volumeAllowedUsePatchModel); + + VolumeAllowedUsePatch volumeAllowedUsePatchModelNew = TestUtilities.deserialize(json, VolumeAllowedUsePatch.class); + assertTrue(volumeAllowedUsePatchModelNew instanceof VolumeAllowedUsePatch); + assertEquals(volumeAllowedUsePatchModelNew.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePatchModelNew.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePatchModelNew.instance(), "gpu.count > 0 && enable_secure_boot == true"); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAllowedUsePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAllowedUsePrototypeTest.java new file mode 100644 index 0000000000..7abeacd2b7 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAllowedUsePrototypeTest.java @@ -0,0 +1,51 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; +import com.ibm.cloud.is.vpc.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 VolumeAllowedUsePrototype model. + */ +public class VolumeAllowedUsePrototypeTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testVolumeAllowedUsePrototype() throws Throwable { + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModel = new VolumeAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(volumeAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + + String json = TestUtilities.serialize(volumeAllowedUsePrototypeModel); + + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModelNew = TestUtilities.deserialize(json, VolumeAllowedUsePrototype.class); + assertTrue(volumeAllowedUsePrototypeModelNew instanceof VolumeAllowedUsePrototype); + assertEquals(volumeAllowedUsePrototypeModelNew.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePrototypeModelNew.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePrototypeModelNew.instance(), "gpu.count > 0 && enable_secure_boot == true"); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAllowedUseTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAllowedUseTest.java new file mode 100644 index 0000000000..f8435bfb24 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAllowedUseTest.java @@ -0,0 +1,39 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.cloud.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUse; +import com.ibm.cloud.is.vpc.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 VolumeAllowedUse model. + */ +public class VolumeAllowedUseTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testVolumeAllowedUse() throws Throwable { + VolumeAllowedUse volumeAllowedUseModel = new VolumeAllowedUse(); + assertNull(volumeAllowedUseModel.getApiVersion()); + assertNull(volumeAllowedUseModel.getBareMetalServer()); + assertNull(volumeAllowedUseModel.getInstance()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentCollectionTest.java index 8cf644eda0..8df069b01e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentDeviceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentDeviceTest.java index 228f05020c..e59bbf0020 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentDeviceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentDeviceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPatchTest.java index b4f2cf88c0..377e1c6a34 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeInstanceByImageContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeInstanceByImageContextTest.java index b1baa115fb..387ec22a04 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeInstanceByImageContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeInstanceByImageContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -15,6 +15,7 @@ import com.ibm.cloud.is.vpc.v1.model.EncryptionKeyIdentityByCRN; import com.ibm.cloud.is.vpc.v1.model.ResourceGroupIdentityById; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.model.VolumeProfileIdentityByName; import com.ibm.cloud.is.vpc.v1.model.VolumePrototypeInstanceByImageContext; @@ -35,6 +36,15 @@ public class VolumeAttachmentPrototypeInstanceByImageContextTest { @Test public void testVolumeAttachmentPrototypeInstanceByImageContext() throws Throwable { + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModel = new VolumeAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(volumeAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") .build(); @@ -51,6 +61,7 @@ public void testVolumeAttachmentPrototypeInstanceByImageContext() throws Throwab assertEquals(resourceGroupIdentityModel.id(), "fee82deba12e4c0fb69c3b09d1f12345"); VolumePrototypeInstanceByImageContext volumePrototypeInstanceByImageContextModel = new VolumePrototypeInstanceByImageContext.Builder() + .allowedUse(volumeAllowedUsePrototypeModel) .bandwidth(Long.valueOf("1000")) .capacity(Long.valueOf("100")) .encryptionKey(encryptionKeyIdentityModel) @@ -60,6 +71,7 @@ public void testVolumeAttachmentPrototypeInstanceByImageContext() throws Throwab .resourceGroup(resourceGroupIdentityModel) .userTags(java.util.Arrays.asList()) .build(); + assertEquals(volumePrototypeInstanceByImageContextModel.allowedUse(), volumeAllowedUsePrototypeModel); assertEquals(volumePrototypeInstanceByImageContextModel.bandwidth(), Long.valueOf("1000")); assertEquals(volumePrototypeInstanceByImageContextModel.capacity(), Long.valueOf("100")); assertEquals(volumePrototypeInstanceByImageContextModel.encryptionKey(), encryptionKeyIdentityModel); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeInstanceBySourceSnapshotContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeInstanceBySourceSnapshotContextTest.java index 499f15cb02..cf80428c76 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeInstanceBySourceSnapshotContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeInstanceBySourceSnapshotContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -16,6 +16,7 @@ import com.ibm.cloud.is.vpc.v1.model.EncryptionKeyIdentityByCRN; import com.ibm.cloud.is.vpc.v1.model.ResourceGroupIdentityById; import com.ibm.cloud.is.vpc.v1.model.SnapshotIdentityById; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeInstanceBySourceSnapshotContext; import com.ibm.cloud.is.vpc.v1.model.VolumeProfileIdentityByName; import com.ibm.cloud.is.vpc.v1.model.VolumePrototypeInstanceBySourceSnapshotContext; @@ -36,6 +37,15 @@ public class VolumeAttachmentPrototypeInstanceBySourceSnapshotContextTest { @Test public void testVolumeAttachmentPrototypeInstanceBySourceSnapshotContext() throws Throwable { + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModel = new VolumeAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(volumeAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") .build(); @@ -57,6 +67,7 @@ public void testVolumeAttachmentPrototypeInstanceBySourceSnapshotContext() throw assertEquals(snapshotIdentityModel.id(), "r006-f6bfa329-0e36-433f-a3bb-0df632e79263"); VolumePrototypeInstanceBySourceSnapshotContext volumePrototypeInstanceBySourceSnapshotContextModel = new VolumePrototypeInstanceBySourceSnapshotContext.Builder() + .allowedUse(volumeAllowedUsePrototypeModel) .bandwidth(Long.valueOf("1000")) .capacity(Long.valueOf("100")) .encryptionKey(encryptionKeyIdentityModel) @@ -67,6 +78,7 @@ public void testVolumeAttachmentPrototypeInstanceBySourceSnapshotContext() throw .sourceSnapshot(snapshotIdentityModel) .userTags(java.util.Arrays.asList()) .build(); + assertEquals(volumePrototypeInstanceBySourceSnapshotContextModel.allowedUse(), volumeAllowedUsePrototypeModel); assertEquals(volumePrototypeInstanceBySourceSnapshotContextModel.bandwidth(), Long.valueOf("1000")); assertEquals(volumePrototypeInstanceBySourceSnapshotContextModel.capacity(), Long.valueOf("100")); assertEquals(volumePrototypeInstanceBySourceSnapshotContextModel.encryptionKey(), encryptionKeyIdentityModel); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeInstanceByVolumeContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeInstanceByVolumeContextTest.java index b05c9f7d04..9bd0c6928d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeInstanceByVolumeContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeInstanceByVolumeContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeTest.java index b75c7e1722..bf13a062d7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeTest.java index 8e05deb3d5..14338cda55 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityTest.java index dd70a98d90..ead459a92a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRNTest.java index df7b7c8f96..fc6f2386c4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHrefTest.java index 5672723d5d..2f633b8ef7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByIdTest.java index 61c5747c4a..6b8418b388 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextTest.java index 1eecf2730d..769a15dfe7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacityTest.java index ced1bd1019..3ee3a0f285 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshotTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshotTest.java index 45baacf4de..6065fb0bd7 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshotTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshotTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -16,6 +16,7 @@ import com.ibm.cloud.is.vpc.v1.model.EncryptionKeyIdentityByCRN; import com.ibm.cloud.is.vpc.v1.model.ResourceGroupIdentityById; import com.ibm.cloud.is.vpc.v1.model.SnapshotIdentityById; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot; import com.ibm.cloud.is.vpc.v1.model.VolumeProfileIdentityByName; import com.ibm.cloud.is.vpc.v1.utils.TestUtilities; @@ -45,6 +46,15 @@ public void testVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVol .build(); assertEquals(resourceGroupIdentityModel.id(), "fee82deba12e4c0fb69c3b09d1f12345"); + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModel = new VolumeAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(volumeAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") .build(); @@ -62,6 +72,7 @@ public void testVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVol .profile(volumeProfileIdentityModel) .resourceGroup(resourceGroupIdentityModel) .userTags(java.util.Arrays.asList()) + .allowedUse(volumeAllowedUsePrototypeModel) .capacity(Long.valueOf("100")) .encryptionKey(encryptionKeyIdentityModel) .sourceSnapshot(snapshotIdentityModel) @@ -72,6 +83,7 @@ public void testVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVol assertEquals(volumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshotModel.profile(), volumeProfileIdentityModel); assertEquals(volumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshotModel.resourceGroup(), resourceGroupIdentityModel); assertEquals(volumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshotModel.userTags(), java.util.Arrays.asList()); + assertEquals(volumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshotModel.allowedUse(), volumeAllowedUsePrototypeModel); assertEquals(volumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshotModel.capacity(), Long.valueOf("100")); assertEquals(volumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshotModel.encryptionKey(), encryptionKeyIdentityModel); assertEquals(volumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshotModel.sourceSnapshot(), snapshotIdentityModel); @@ -85,6 +97,7 @@ public void testVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVol assertEquals(volumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshotModelNew.name(), "my-volume"); assertEquals(volumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshotModelNew.profile().toString(), volumeProfileIdentityModel.toString()); assertEquals(volumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshotModelNew.resourceGroup().toString(), resourceGroupIdentityModel.toString()); + assertEquals(volumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshotModelNew.allowedUse().toString(), volumeAllowedUsePrototypeModel.toString()); assertEquals(volumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshotModelNew.capacity(), Long.valueOf("100")); assertEquals(volumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshotModelNew.encryptionKey().toString(), encryptionKeyIdentityModel.toString()); assertEquals(volumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshotModelNew.sourceSnapshot().toString(), snapshotIdentityModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentReferenceInstanceContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentReferenceInstanceContextTest.java index c29cafdbee..4ddb6f573d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentReferenceInstanceContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentReferenceInstanceContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentReferenceVolumeContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentReferenceVolumeContextTest.java index 8fde102414..4ef3da14c6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentReferenceVolumeContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentReferenceVolumeContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentTest.java index d1d3e3ca6d..4e33345399 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeAttachmentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeCatalogOfferingTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeCatalogOfferingTest.java index 944d5b1de9..089f2274ad 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeCatalogOfferingTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeCatalogOfferingTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeCollectionTest.java index 301614bbac..e9044879cc 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -28,6 +28,7 @@ import com.ibm.cloud.is.vpc.v1.model.SnapshotReference; import com.ibm.cloud.is.vpc.v1.model.SnapshotRemote; import com.ibm.cloud.is.vpc.v1.model.Volume; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUse; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentDevice; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentReferenceVolumeContext; import com.ibm.cloud.is.vpc.v1.model.VolumeCatalogOffering; diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeHealthReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeHealthReasonTest.java index e180a0ab62..8c9a85a6b6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeHealthReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeHealthReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityByCRNTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityByCRNTest.java index ba446000dd..02c7aa4781 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityByCRNTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityByCRNTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityByHrefTest.java index 32c9c347b8..f0fa7ca8d6 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityByIdTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityByIdTest.java index 89273f879d..3aa27b3df9 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityByIdTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityByIdTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityTest.java index 0137eabd87..9bd3427822 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeInstanceProfileCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeInstanceProfileCollectionTest.java new file mode 100644 index 0000000000..d2f0d810d8 --- /dev/null +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeInstanceProfileCollectionTest.java @@ -0,0 +1,43 @@ +/* + * (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.is.vpc.v1.model; + +import com.ibm.cloud.is.vpc.v1.model.InstanceProfileReference; +import com.ibm.cloud.is.vpc.v1.model.PageLink; +import com.ibm.cloud.is.vpc.v1.model.VolumeInstanceProfileCollection; +import com.ibm.cloud.is.vpc.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 VolumeInstanceProfileCollection model. + */ +public class VolumeInstanceProfileCollectionTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testVolumeInstanceProfileCollection() throws Throwable { + VolumeInstanceProfileCollection volumeInstanceProfileCollectionModel = new VolumeInstanceProfileCollection(); + assertNull(volumeInstanceProfileCollectionModel.getFirst()); + assertNull(volumeInstanceProfileCollectionModel.getInstanceProfiles()); + assertNull(volumeInstanceProfileCollectionModel.getLimit()); + assertNull(volumeInstanceProfileCollectionModel.getNext()); + assertNull(volumeInstanceProfileCollectionModel.getTotalCount()); + } +} \ No newline at end of file diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumePatchTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumePatchTest.java index d09c3b03f8..651d66b4fc 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumePatchTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumePatchTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -13,6 +13,7 @@ package com.ibm.cloud.is.vpc.v1.model; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePatch; import com.ibm.cloud.is.vpc.v1.model.VolumePatch; import com.ibm.cloud.is.vpc.v1.model.VolumeProfileIdentityByName; import com.ibm.cloud.is.vpc.v1.utils.TestUtilities; @@ -33,12 +34,22 @@ public class VolumePatchTest { @Test public void testVolumePatch() throws Throwable { + VolumeAllowedUsePatch volumeAllowedUsePatchModel = new VolumeAllowedUsePatch.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(volumeAllowedUsePatchModel.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePatchModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePatchModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + VolumeProfileIdentityByName volumeProfileIdentityModel = new VolumeProfileIdentityByName.Builder() .name("general-purpose") .build(); assertEquals(volumeProfileIdentityModel.name(), "general-purpose"); VolumePatch volumePatchModel = new VolumePatch.Builder() + .allowedUse(volumeAllowedUsePatchModel) .bandwidth(Long.valueOf("1000")) .capacity(Long.valueOf("100")) .iops(Long.valueOf("10000")) @@ -46,6 +57,7 @@ public void testVolumePatch() throws Throwable { .profile(volumeProfileIdentityModel) .userTags(java.util.Arrays.asList("testString")) .build(); + assertEquals(volumePatchModel.allowedUse(), volumeAllowedUsePatchModel); assertEquals(volumePatchModel.bandwidth(), Long.valueOf("1000")); assertEquals(volumePatchModel.capacity(), Long.valueOf("100")); assertEquals(volumePatchModel.iops(), Long.valueOf("10000")); @@ -57,6 +69,7 @@ public void testVolumePatch() throws Throwable { VolumePatch volumePatchModelNew = TestUtilities.deserialize(json, VolumePatch.class); assertTrue(volumePatchModelNew instanceof VolumePatch); + assertEquals(volumePatchModelNew.allowedUse().toString(), volumeAllowedUsePatchModel.toString()); assertEquals(volumePatchModelNew.bandwidth(), Long.valueOf("1000")); assertEquals(volumePatchModelNew.capacity(), Long.valueOf("100")); assertEquals(volumePatchModelNew.iops(), Long.valueOf("10000")); @@ -65,11 +78,18 @@ public void testVolumePatch() throws Throwable { } @Test public void testVolumePatchAsPatch() throws Throwable { + VolumeAllowedUsePatch volumeAllowedUsePatchModel = new VolumeAllowedUsePatch.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + VolumeProfileIdentityByName volumeProfileIdentityModel = new VolumeProfileIdentityByName.Builder() .name("general-purpose") .build(); VolumePatch volumePatchModel = new VolumePatch.Builder() + .allowedUse(volumeAllowedUsePatchModel) .bandwidth(Long.valueOf("1000")) .capacity(Long.valueOf("100")) .iops(Long.valueOf("10000")) @@ -80,6 +100,7 @@ public void testVolumePatchAsPatch() throws Throwable { Map mergePatch = volumePatchModel.asPatch(); + assertTrue(mergePatch.containsKey("allowed_use")); assertTrue(mergePatch.containsKey("bandwidth")); assertTrue(mergePatch.containsKey("capacity")); assertTrue(mergePatch.containsKey("iops")); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileAdjustableCapacityStatesTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileAdjustableCapacityStatesTest.java index a829cb6e74..852bf0e8ba 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileAdjustableCapacityStatesTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileAdjustableCapacityStatesTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileAdjustableIOPSStatesTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileAdjustableIOPSStatesTest.java index 33dfc14085..b71e008771 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileAdjustableIOPSStatesTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileAdjustableIOPSStatesTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthDependentRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthDependentRangeTest.java index 9c6605a347..9c22718c02 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthDependentRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthDependentRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthDependentTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthDependentTest.java index 91447cae87..ae33a83904 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthDependentTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthDependentTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthEnumTest.java index 8953677e0b..85cf3dd434 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthEnumTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthEnumTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthFixedTest.java index bb0ca4ebf5..e6143eba52 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthRangeTest.java index 91cf8af6a5..1ac38ec3ff 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthTest.java index afdd6bf8b1..3d11a16f7f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBandwidthTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityDependentRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityDependentRangeTest.java index b7d7700d3c..f7114d301b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityDependentRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityDependentRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityEnumTest.java index a4e9d2b64c..8cb1756587 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityEnumTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityEnumTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityFixedTest.java index 5c58319bd0..ed0d6212f4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityRangeTest.java index 9b0f477126..f879b958c4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityTest.java index c86bbe0bc4..2cb2064185 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileBootCapacityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityDependentRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityDependentRangeTest.java index 0bd265f2f7..3ef1e76037 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityDependentRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityDependentRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityEnumTest.java index 553620a689..243772591f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityEnumTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityEnumTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityFixedTest.java index dad0ede01b..2ddd5b345c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityRangeTest.java index 7a9e690969..c2e64a7cf3 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityTest.java index 6a695456c5..500fb6dd0d 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCapacityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCollectionTest.java index 15d5a0d5a9..7420064f20 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSDependentRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSDependentRangeTest.java index d91dcef1d4..1813cfb8d5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSDependentRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSDependentRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSEnumTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSEnumTest.java index e33b1551bf..df54d3ef77 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSEnumTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSEnumTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSFixedTest.java index a84fd38cdd..c889024c5f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSRangeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSRangeTest.java index 7443625ce2..f1456c7367 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSRangeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSRangeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSTest.java index ed8016953b..151a0bcbbc 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIOPSTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIdentityByHrefTest.java index 036ec21bb8..682877fa78 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIdentityByNameTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIdentityByNameTest.java index 8db38b8f27..fea8c108ab 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIdentityByNameTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIdentityByNameTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIdentityTest.java index 6bf0ceb93e..9e41e86161 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileReferenceTest.java index f63538cdec..560c190e48 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileStorageGenerationFixedTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileStorageGenerationFixedTest.java index 9a4ec6352b..fd635a160b 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileStorageGenerationFixedTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileStorageGenerationFixedTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileTest.java index 592c695aee..62cb4d4796 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeProfileTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeInstanceByImageContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeInstanceByImageContextTest.java index 21d6fc127b..ca54a93e22 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeInstanceByImageContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeInstanceByImageContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -15,6 +15,7 @@ import com.ibm.cloud.is.vpc.v1.model.EncryptionKeyIdentityByCRN; import com.ibm.cloud.is.vpc.v1.model.ResourceGroupIdentityById; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeProfileIdentityByName; import com.ibm.cloud.is.vpc.v1.model.VolumePrototypeInstanceByImageContext; import com.ibm.cloud.is.vpc.v1.utils.TestUtilities; @@ -34,6 +35,15 @@ public class VolumePrototypeInstanceByImageContextTest { @Test public void testVolumePrototypeInstanceByImageContext() throws Throwable { + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModel = new VolumeAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(volumeAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") .build(); @@ -50,6 +60,7 @@ public void testVolumePrototypeInstanceByImageContext() throws Throwable { assertEquals(resourceGroupIdentityModel.id(), "fee82deba12e4c0fb69c3b09d1f12345"); VolumePrototypeInstanceByImageContext volumePrototypeInstanceByImageContextModel = new VolumePrototypeInstanceByImageContext.Builder() + .allowedUse(volumeAllowedUsePrototypeModel) .bandwidth(Long.valueOf("1000")) .capacity(Long.valueOf("100")) .encryptionKey(encryptionKeyIdentityModel) @@ -59,6 +70,7 @@ public void testVolumePrototypeInstanceByImageContext() throws Throwable { .resourceGroup(resourceGroupIdentityModel) .userTags(java.util.Arrays.asList()) .build(); + assertEquals(volumePrototypeInstanceByImageContextModel.allowedUse(), volumeAllowedUsePrototypeModel); assertEquals(volumePrototypeInstanceByImageContextModel.bandwidth(), Long.valueOf("1000")); assertEquals(volumePrototypeInstanceByImageContextModel.capacity(), Long.valueOf("100")); assertEquals(volumePrototypeInstanceByImageContextModel.encryptionKey(), encryptionKeyIdentityModel); @@ -72,6 +84,7 @@ public void testVolumePrototypeInstanceByImageContext() throws Throwable { VolumePrototypeInstanceByImageContext volumePrototypeInstanceByImageContextModelNew = TestUtilities.deserialize(json, VolumePrototypeInstanceByImageContext.class); assertTrue(volumePrototypeInstanceByImageContextModelNew instanceof VolumePrototypeInstanceByImageContext); + assertEquals(volumePrototypeInstanceByImageContextModelNew.allowedUse().toString(), volumeAllowedUsePrototypeModel.toString()); assertEquals(volumePrototypeInstanceByImageContextModelNew.bandwidth(), Long.valueOf("1000")); assertEquals(volumePrototypeInstanceByImageContextModelNew.capacity(), Long.valueOf("100")); assertEquals(volumePrototypeInstanceByImageContextModelNew.encryptionKey().toString(), encryptionKeyIdentityModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeInstanceBySourceSnapshotContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeInstanceBySourceSnapshotContextTest.java index 1a0295c1d9..d7da3d8797 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeInstanceBySourceSnapshotContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeInstanceBySourceSnapshotContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -16,6 +16,7 @@ import com.ibm.cloud.is.vpc.v1.model.EncryptionKeyIdentityByCRN; import com.ibm.cloud.is.vpc.v1.model.ResourceGroupIdentityById; import com.ibm.cloud.is.vpc.v1.model.SnapshotIdentityById; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeProfileIdentityByName; import com.ibm.cloud.is.vpc.v1.model.VolumePrototypeInstanceBySourceSnapshotContext; import com.ibm.cloud.is.vpc.v1.utils.TestUtilities; @@ -35,6 +36,15 @@ public class VolumePrototypeInstanceBySourceSnapshotContextTest { @Test public void testVolumePrototypeInstanceBySourceSnapshotContext() throws Throwable { + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModel = new VolumeAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(volumeAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") .build(); @@ -56,6 +66,7 @@ public void testVolumePrototypeInstanceBySourceSnapshotContext() throws Throwabl assertEquals(snapshotIdentityModel.id(), "r006-f6bfa329-0e36-433f-a3bb-0df632e79263"); VolumePrototypeInstanceBySourceSnapshotContext volumePrototypeInstanceBySourceSnapshotContextModel = new VolumePrototypeInstanceBySourceSnapshotContext.Builder() + .allowedUse(volumeAllowedUsePrototypeModel) .bandwidth(Long.valueOf("1000")) .capacity(Long.valueOf("100")) .encryptionKey(encryptionKeyIdentityModel) @@ -66,6 +77,7 @@ public void testVolumePrototypeInstanceBySourceSnapshotContext() throws Throwabl .sourceSnapshot(snapshotIdentityModel) .userTags(java.util.Arrays.asList()) .build(); + assertEquals(volumePrototypeInstanceBySourceSnapshotContextModel.allowedUse(), volumeAllowedUsePrototypeModel); assertEquals(volumePrototypeInstanceBySourceSnapshotContextModel.bandwidth(), Long.valueOf("1000")); assertEquals(volumePrototypeInstanceBySourceSnapshotContextModel.capacity(), Long.valueOf("100")); assertEquals(volumePrototypeInstanceBySourceSnapshotContextModel.encryptionKey(), encryptionKeyIdentityModel); @@ -80,6 +92,7 @@ public void testVolumePrototypeInstanceBySourceSnapshotContext() throws Throwabl VolumePrototypeInstanceBySourceSnapshotContext volumePrototypeInstanceBySourceSnapshotContextModelNew = TestUtilities.deserialize(json, VolumePrototypeInstanceBySourceSnapshotContext.class); assertTrue(volumePrototypeInstanceBySourceSnapshotContextModelNew instanceof VolumePrototypeInstanceBySourceSnapshotContext); + assertEquals(volumePrototypeInstanceBySourceSnapshotContextModelNew.allowedUse().toString(), volumeAllowedUsePrototypeModel.toString()); assertEquals(volumePrototypeInstanceBySourceSnapshotContextModelNew.bandwidth(), Long.valueOf("1000")); assertEquals(volumePrototypeInstanceBySourceSnapshotContextModelNew.capacity(), Long.valueOf("100")); assertEquals(volumePrototypeInstanceBySourceSnapshotContextModelNew.encryptionKey().toString(), encryptionKeyIdentityModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeTest.java index b639e290e6..ceba0251cf 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeVolumeByCapacityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeVolumeByCapacityTest.java index 15794158ac..2a269d8bdb 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeVolumeByCapacityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeVolumeByCapacityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeVolumeBySourceSnapshotTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeVolumeBySourceSnapshotTest.java index c7d4816615..d6c152ca7c 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeVolumeBySourceSnapshotTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumePrototypeVolumeBySourceSnapshotTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -16,6 +16,7 @@ import com.ibm.cloud.is.vpc.v1.model.EncryptionKeyIdentityByCRN; import com.ibm.cloud.is.vpc.v1.model.ResourceGroupIdentityById; import com.ibm.cloud.is.vpc.v1.model.SnapshotIdentityById; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUsePrototype; import com.ibm.cloud.is.vpc.v1.model.VolumeProfileIdentityByName; import com.ibm.cloud.is.vpc.v1.model.VolumePrototypeVolumeBySourceSnapshot; import com.ibm.cloud.is.vpc.v1.model.ZoneIdentityByName; @@ -51,6 +52,15 @@ public void testVolumePrototypeVolumeBySourceSnapshot() throws Throwable { .build(); assertEquals(zoneIdentityModel.name(), "us-south-1"); + VolumeAllowedUsePrototype volumeAllowedUsePrototypeModel = new VolumeAllowedUsePrototype.Builder() + .apiVersion("2024-06-23") + .bareMetalServer("enable_secure_boot == true") + .instance("gpu.count > 0 && enable_secure_boot == true") + .build(); + assertEquals(volumeAllowedUsePrototypeModel.apiVersion(), "2024-06-23"); + assertEquals(volumeAllowedUsePrototypeModel.bareMetalServer(), "enable_secure_boot == true"); + assertEquals(volumeAllowedUsePrototypeModel.instance(), "gpu.count > 0 && enable_secure_boot == true"); + EncryptionKeyIdentityByCRN encryptionKeyIdentityModel = new EncryptionKeyIdentityByCRN.Builder() .crn("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") .build(); @@ -69,6 +79,7 @@ public void testVolumePrototypeVolumeBySourceSnapshot() throws Throwable { .resourceGroup(resourceGroupIdentityModel) .userTags(java.util.Arrays.asList()) .zone(zoneIdentityModel) + .allowedUse(volumeAllowedUsePrototypeModel) .capacity(Long.valueOf("100")) .encryptionKey(encryptionKeyIdentityModel) .sourceSnapshot(snapshotIdentityModel) @@ -80,6 +91,7 @@ public void testVolumePrototypeVolumeBySourceSnapshot() throws Throwable { assertEquals(volumePrototypeVolumeBySourceSnapshotModel.resourceGroup(), resourceGroupIdentityModel); assertEquals(volumePrototypeVolumeBySourceSnapshotModel.userTags(), java.util.Arrays.asList()); assertEquals(volumePrototypeVolumeBySourceSnapshotModel.zone(), zoneIdentityModel); + assertEquals(volumePrototypeVolumeBySourceSnapshotModel.allowedUse(), volumeAllowedUsePrototypeModel); assertEquals(volumePrototypeVolumeBySourceSnapshotModel.capacity(), Long.valueOf("100")); assertEquals(volumePrototypeVolumeBySourceSnapshotModel.encryptionKey(), encryptionKeyIdentityModel); assertEquals(volumePrototypeVolumeBySourceSnapshotModel.sourceSnapshot(), snapshotIdentityModel); @@ -94,6 +106,7 @@ public void testVolumePrototypeVolumeBySourceSnapshot() throws Throwable { assertEquals(volumePrototypeVolumeBySourceSnapshotModelNew.profile().toString(), volumeProfileIdentityModel.toString()); assertEquals(volumePrototypeVolumeBySourceSnapshotModelNew.resourceGroup().toString(), resourceGroupIdentityModel.toString()); assertEquals(volumePrototypeVolumeBySourceSnapshotModelNew.zone().toString(), zoneIdentityModel.toString()); + assertEquals(volumePrototypeVolumeBySourceSnapshotModelNew.allowedUse().toString(), volumeAllowedUsePrototypeModel.toString()); assertEquals(volumePrototypeVolumeBySourceSnapshotModelNew.capacity(), Long.valueOf("100")); assertEquals(volumePrototypeVolumeBySourceSnapshotModelNew.encryptionKey().toString(), encryptionKeyIdentityModel.toString()); assertEquals(volumePrototypeVolumeBySourceSnapshotModelNew.sourceSnapshot().toString(), snapshotIdentityModel.toString()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeReferenceTest.java index b7e02df41c..c03366208f 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeReferenceVolumeAttachmentContextTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeReferenceVolumeAttachmentContextTest.java index 2cd65d1c7e..01235a3e4e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeReferenceVolumeAttachmentContextTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeReferenceVolumeAttachmentContextTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeRemoteTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeRemoteTest.java index 09f05791f2..1c6bf45f80 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeRemoteTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeRemoteTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeStatusReasonTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeStatusReasonTest.java index 58f865df35..6d0bc46c17 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeStatusReasonTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeStatusReasonTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeTest.java index 188f4009fc..e4405d9887 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/VolumeTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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 @@ -27,6 +27,7 @@ import com.ibm.cloud.is.vpc.v1.model.SnapshotReference; import com.ibm.cloud.is.vpc.v1.model.SnapshotRemote; import com.ibm.cloud.is.vpc.v1.model.Volume; +import com.ibm.cloud.is.vpc.v1.model.VolumeAllowedUse; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentDevice; import com.ibm.cloud.is.vpc.v1.model.VolumeAttachmentReferenceVolumeContext; import com.ibm.cloud.is.vpc.v1.model.VolumeCatalogOffering; @@ -55,6 +56,7 @@ public void testVolume() throws Throwable { assertNull(volumeModel.isActive()); assertNull(volumeModel.getAdjustableCapacityStates()); assertNull(volumeModel.getAdjustableIopsStates()); + assertNull(volumeModel.getAllowedUse()); assertNull(volumeModel.getAttachmentState()); assertNull(volumeModel.getBandwidth()); assertNull(volumeModel.isBusy()); diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ZoneCollectionTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ZoneCollectionTest.java index 7eb7ffa0dc..277cf278a5 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ZoneCollectionTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ZoneCollectionTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ZoneIdentityByHrefTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ZoneIdentityByHrefTest.java index c4ee4a4658..141d9e5f53 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ZoneIdentityByHrefTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ZoneIdentityByHrefTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ZoneIdentityByNameTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ZoneIdentityByNameTest.java index 622390b724..4c42896c2e 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ZoneIdentityByNameTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ZoneIdentityByNameTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ZoneIdentityTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ZoneIdentityTest.java index 98b0a0feed..b5bde4729a 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ZoneIdentityTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ZoneIdentityTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ZoneReferenceTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ZoneReferenceTest.java index a5507d55ff..2b2be2dcc1 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ZoneReferenceTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ZoneReferenceTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ZoneTest.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ZoneTest.java index 3bdc5bfd45..8cb16f75ec 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ZoneTest.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/model/ZoneTest.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at diff --git a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/utils/TestUtilities.java b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/utils/TestUtilities.java index fc112dd7d0..1be1459ae4 100644 --- a/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/utils/TestUtilities.java +++ b/modules/vpc/src/test/java/com/ibm/cloud/is/vpc/v1/utils/TestUtilities.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2023, 2024, 2025. + * (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